mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 05:13:39 +08:00
List the "Watching First Post" tags on preferences
This commit is contained in:
parent
944b2aabfe
commit
b2289d733f
|
@ -158,10 +158,10 @@ const User = RestModel.extend({
|
|||
'card_background',
|
||||
'muted_tags',
|
||||
'tracked_tags',
|
||||
'watched_tags'
|
||||
);
|
||||
'watched_tags',
|
||||
'watching_first_post_tags');
|
||||
|
||||
[ 'email_always',
|
||||
['email_always',
|
||||
'mailing_list_mode',
|
||||
'mailing_list_mode_frequency',
|
||||
'external_links_in_new_tab',
|
||||
|
|
|
@ -288,6 +288,11 @@
|
|||
{{tag-chooser tags=model.tracked_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}}
|
||||
</div>
|
||||
<div class="instructions">{{i18n 'user.tracked_tags_instructions'}}</div>
|
||||
<div class="controls tag-controls">
|
||||
<label><span class="icon fa fa-dot-circle-o watching-first-post"></span> {{i18n 'user.watched_first_post_tags'}}</label>
|
||||
{{tag-chooser tags=model.watching_first_post_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}}
|
||||
</div>
|
||||
<div class="instructions">{{i18n 'user.watched_first_post_tags_instructions'}}</div>
|
||||
<div class="controls tag-controls">
|
||||
<label><span class="icon fa fa-times-circle muted"></span> {{i18n 'user.muted_tags'}}</label>
|
||||
{{tag-chooser tags=model.muted_tags blacklist=selectedTags allowCreate=false placeholder="" everyTag="true" unlimitedTagCount="true"}}
|
||||
|
|
|
@ -84,6 +84,7 @@ class UserSerializer < BasicUserSerializer
|
|||
private_attributes :locale,
|
||||
:muted_category_ids,
|
||||
:watched_tags,
|
||||
:watching_first_post_tags,
|
||||
:tracked_tags,
|
||||
:muted_tags,
|
||||
:tracked_category_ids,
|
||||
|
@ -258,6 +259,10 @@ class UserSerializer < BasicUserSerializer
|
|||
TagUser.lookup(object, :tracking).joins(:tag).pluck('tags.name')
|
||||
end
|
||||
|
||||
def watching_first_post_tags
|
||||
TagUser.lookup(object, :watching_first_post).joins(:tag).pluck('tags.name')
|
||||
end
|
||||
|
||||
def watched_tags
|
||||
TagUser.lookup(object, :watching).joins(:tag).pluck('tags.name')
|
||||
end
|
||||
|
|
|
@ -8,6 +8,7 @@ class UserUpdater
|
|||
}
|
||||
|
||||
TAG_NAMES = {
|
||||
watching_first_post_tags: :watching_first_post,
|
||||
watched_tags: :watching,
|
||||
tracked_tags: :tracking,
|
||||
muted_tags: :muted
|
||||
|
|
|
@ -553,6 +553,9 @@ en:
|
|||
tracked_categories_instructions: "You will automatically track all topics in these categories. A count of new posts will appear next to the topic."
|
||||
watched_first_post_categories: "Watching First Post"
|
||||
watched_first_post_categories_instructions: "You will be notified of the first post in each new topic in these categories."
|
||||
watched_first_post_tags: "Watching First Post"
|
||||
watched_first_post_tags_instructions: "You will be notified of the first post in each new topic with these tags."
|
||||
|
||||
muted_categories: "Muted"
|
||||
muted_categories_instructions: "You will not be notified of anything about new topics in these categories, and they will not appear in latest."
|
||||
delete_account: "Delete My Account"
|
||||
|
|
Loading…
Reference in New Issue
Block a user