From a489e5d5cd33f52e4af38e6977a284b367f2f95e Mon Sep 17 00:00:00 2001 From: cwm Date: Sat, 9 Dec 2017 11:21:41 -0600 Subject: added a few more things --- .../glitch/features/ui/components/actions_modal.js | 18 +++++++++++++++++- app/javascript/mastodon/locales/defaultMessages.json | 15 ++++++++++++++- app/javascript/mastodon/locales/en.json | 2 ++ app/lib/user_settings_decorator.rb | 5 +++++ app/serializers/initial_state_serializer.rb | 1 + 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js index 0873c282f..1eb0e026e 100644 --- a/app/javascript/flavours/glitch/features/ui/components/actions_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/actions_modal.js @@ -55,9 +55,25 @@ export default class ActionsModal extends ImmutablePureComponent { + +
+
+ + + +
+ + +
+ +
+ + +
+
- + ); return ( diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index bb82cf5f5..65e20c17a 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -1293,6 +1293,19 @@ ], "path": "app/javascript/mastodon/features/ui/components/boost_modal.json" }, + { + "descriptors": [ + { + "defaultMessage": "Favourite", + "id": "status.favourite" + }, + { + "defaultMessage": "You can press {combo} to skip this next time", + "id": "favourite_modal.combo" + } + ], + "path": "app/javascript/mastodon/features/ui/components/favourite_modal.json" + }, { "descriptors": [ { @@ -1601,4 +1614,4 @@ ], "path": "app/javascript/mastodon/features/video/index.json" } -] \ No newline at end of file +] diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 538124904..5efd29b81 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -25,6 +25,7 @@ "account.unmute_notifications": "Unmute notifications from @{name}", "account.view_full_profile": "View full profile", "boost_modal.combo": "You can press {combo} to skip this next time", + "favourite_modal.combo": "You can press {combo} to skip this next time", "bundle_column_error.body": "Something went wrong while loading this component.", "bundle_column_error.retry": "Try again", "bundle_column_error.title": "Network error", @@ -109,6 +110,7 @@ "home.settings": "Column settings", "keyboard_shortcuts.back": "to navigate back", "keyboard_shortcuts.boost": "to boost", + "keyboard_shortcuts.favourite": "to favourite", "keyboard_shortcuts.column": "to focus a status in one of the columns", "keyboard_shortcuts.compose": "to focus the compose textarea", "keyboard_shortcuts.description": "Description", diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 8af384a2d..d69181b5d 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -21,6 +21,7 @@ class UserSettingsDecorator user.settings['default_sensitive'] = default_sensitive_preference if change?('setting_default_sensitive') user.settings['unfollow_modal'] = unfollow_modal_preference if change?('setting_unfollow_modal') user.settings['boost_modal'] = boost_modal_preference if change?('setting_boost_modal') + user.settings['favourite_modal'] = boost_modal_preference if change?('setting_boost_modal') user.settings['delete_modal'] = delete_modal_preference if change?('setting_delete_modal') user.settings['auto_play_gif'] = auto_play_gif_preference if change?('setting_auto_play_gif') user.settings['reduce_motion'] = reduce_motion_preference if change?('setting_reduce_motion') @@ -53,6 +54,10 @@ class UserSettingsDecorator def boost_modal_preference boolean_cast_setting 'setting_boost_modal' end + + def favourite_modal_preference + boolean_cast_setting 'setting_favourite_modal' + end def delete_modal_preference boolean_cast_setting 'setting_delete_modal' diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index 9dfa019f5..904daa804 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -28,6 +28,7 @@ class InitialStateSerializer < ActiveModel::Serializer store[:me] = object.current_account.id.to_s store[:unfollow_modal] = object.current_account.user.setting_unfollow_modal store[:boost_modal] = object.current_account.user.setting_boost_modal + store[:favourite_modal] = object.current_account.user.setting_favourite_modal store[:delete_modal] = object.current_account.user.setting_delete_modal store[:auto_play_gif] = object.current_account.user.setting_auto_play_gif store[:reduce_motion] = object.current_account.user.setting_reduce_motion -- cgit