mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 13:23:38 +08:00
REFACTOR: Change watch
wording to unignore
(#7112)
* REFACTOR: Change `watch` wording to `unignore`
This commit is contained in:
parent
9e09224eb4
commit
f19d36cbba
|
@ -195,11 +195,6 @@ export default Ember.Component.extend(
|
|||
this._close();
|
||||
},
|
||||
|
||||
watchUser() {
|
||||
this.get("user").watch();
|
||||
this._close();
|
||||
},
|
||||
|
||||
showUser() {
|
||||
this.showUser(this.get("user"));
|
||||
this._close();
|
||||
|
|
|
@ -152,9 +152,9 @@ export default Ember.Controller.extend(CanCheckEmails, {
|
|||
user.ignore().then(() => user.set("ignored", true));
|
||||
},
|
||||
|
||||
watchUser() {
|
||||
unignoreUser() {
|
||||
const user = this.get("model");
|
||||
user.watch().then(() => user.set("ignored", false));
|
||||
user.unignore().then(() => user.set("ignored", false));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -622,7 +622,7 @@ const User = RestModel.extend({
|
|||
});
|
||||
},
|
||||
|
||||
watch() {
|
||||
unignore() {
|
||||
return ajax(`${userPath(this.get("username"))}/ignore.json`, {
|
||||
type: "DELETE",
|
||||
data: { ignored_user_id: this.get("id") }
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<li>
|
||||
{{#if model.ignored}}
|
||||
{{d-button class="btn-default"
|
||||
action=(action "watchUser")
|
||||
action=(action "unignoreUser")
|
||||
icon="far-eye"
|
||||
label="user.watch"}}
|
||||
label="user.unignore"}}
|
||||
{{else}}
|
||||
{{d-button class="btn-danger"
|
||||
action=(action "ignoreUser")
|
||||
|
|
|
@ -14,7 +14,7 @@ class UsersController < ApplicationController
|
|||
:pick_avatar, :destroy_user_image, :destroy, :check_emails,
|
||||
:topic_tracking_state, :preferences, :create_second_factor,
|
||||
:update_second_factor, :create_second_factor_backup, :select_avatar,
|
||||
:ignore, :watch, :revoke_auth_token
|
||||
:ignore, :unignore, :revoke_auth_token
|
||||
]
|
||||
|
||||
skip_before_action :check_xhr, only: [
|
||||
|
@ -1004,7 +1004,7 @@ class UsersController < ApplicationController
|
|||
render json: success_json
|
||||
end
|
||||
|
||||
def watch
|
||||
def unignore
|
||||
raise Discourse::NotFound unless SiteSetting.ignore_user_enabled
|
||||
|
||||
IgnoredUser.where(user: current_user, ignored_user_id: params[:ignored_user_id]).delete_all
|
||||
|
|
|
@ -637,7 +637,7 @@ en:
|
|||
private_message: "Message"
|
||||
private_messages: "Messages"
|
||||
ignore: "Ignore"
|
||||
watch: "Watch"
|
||||
unignore: "Unignore"
|
||||
activity_stream: "Activity"
|
||||
preferences: "Preferences"
|
||||
profile_hidden: "This user's public profile is hidden."
|
||||
|
|
|
@ -422,7 +422,7 @@ Discourse::Application.routes.draw do
|
|||
get "#{root_path}/:username/staff-info" => "users#staff_info", constraints: { username: RouteFormat.username }
|
||||
get "#{root_path}/:username/summary" => "users#summary", constraints: { username: RouteFormat.username }
|
||||
put "#{root_path}/:username/ignore" => "users#ignore", constraints: { username: RouteFormat.username }
|
||||
delete "#{root_path}/:username/ignore" => "users#watch", constraints: { username: RouteFormat.username }
|
||||
delete "#{root_path}/:username/ignore" => "users#unignore", constraints: { username: RouteFormat.username }
|
||||
get "#{root_path}/:username/invited" => "users#invited", constraints: { username: RouteFormat.username }
|
||||
get "#{root_path}/:username/invited_count" => "users#invited_count", constraints: { username: RouteFormat.username }
|
||||
get "#{root_path}/:username/invited/:filter" => "users#invited", constraints: { username: RouteFormat.username }
|
||||
|
|
Loading…
Reference in New Issue
Block a user