Move follow/unfollow user actions
This commit is contained in:
parent
e887e8c4fc
commit
91df126132
|
@ -51,7 +51,7 @@ export function userActionHandler(event: Event): void {
|
|||
switch (action) {
|
||||
case 'follow':
|
||||
button.dataset.action = 'unfollow';
|
||||
button.innerText = I18n.translate('views.actions.unfollow');
|
||||
button.innerText = I18n.translate('voc.unfollow');
|
||||
button.classList.remove('btn-primary');
|
||||
button.classList.add('btn-default');
|
||||
break;
|
||||
|
@ -82,7 +82,7 @@ export function userActionHandler(event: Event): void {
|
|||
|
||||
function resetFollowButton(button: HTMLButtonElement) {
|
||||
button.dataset.action = 'follow';
|
||||
button.innerText = I18n.translate('views.actions.follow');
|
||||
button.innerText = I18n.translate('voc.follow');
|
||||
button.classList.remove('btn-default');
|
||||
button.classList.add('btn-primary');
|
||||
}
|
|
@ -5,10 +5,10 @@
|
|||
- elsif user_signed_in?
|
||||
- if current_user.following? user
|
||||
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } }
|
||||
= t 'views.actions.unfollow'
|
||||
= t("voc.unfollow")
|
||||
- else
|
||||
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :follow, type: type, target: user.screen_name } }
|
||||
= t 'views.actions.follow'
|
||||
= t("voc.follow")
|
||||
.btn-group.btn-block
|
||||
%button.btn.btn-light.btn-block.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
||||
= t(".title")
|
||||
|
|
|
@ -15,8 +15,6 @@ en:
|
|||
title: "List"
|
||||
members: "Members"
|
||||
actions:
|
||||
follow: "Follow"
|
||||
unfollow: "Unfollow"
|
||||
list: "Manage list memberships"
|
||||
sessions:
|
||||
destroy: "Logout"
|
||||
|
|
|
@ -7,6 +7,7 @@ en:
|
|||
confirm: "Are you sure?"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
follow: "Follow"
|
||||
load: "Load more"
|
||||
login: "Sign in"
|
||||
save: "Save changes"
|
||||
|
@ -14,6 +15,7 @@ en:
|
|||
report: "Report"
|
||||
terms: "Terms of Service"
|
||||
unblock: "Unblock"
|
||||
unfollow: "Unfollow"
|
||||
update: "Update"
|
||||
view_in_rails_admin: "View in Rails Admin"
|
||||
y: Yes
|
||||
|
|
Loading…
Reference in New Issue