juliuscc / speak.exchange

An online bilingual dictionary, which also offer a flashcard app geared towards learning new words in a foreign language.
https://speak.exchange/
MIT License
2 stars 0 forks source link

Public/private decks #184

Open falcasantos opened 4 years ago

juliuscc commented 4 years ago

Let's discuss what changes has to be done for this to work.

It might be enough to add a field called private. This could be updated in edit-deck. Maybe with a toggle button. Or a modal. How should a user toggle public visibility?

I like the idea that you could still share (link-sharing) your deck even if it is private. So let's let anyone see any deck if they have the correct URL.

Browsing decks could be changed here:

https://github.com/juliuscc/speak.exchange/blob/1d1ce952d8a2cc09bcb983fd21c97e007bd65afc/components/browse-decks/model/DeckList.js#L6-L8

The change could be:

 const query = uid 
   ? db.collection('decks').where('uid', '==', uid) 
-  : db.collection('decks')
+  : db.collection('decks').where('private', '==', false)

Should private decks be a slightly different color when viewing your own decks?

Should new decks be private by default?