]> cat aescling's git repositories - mastodon.git/commitdiff
added a few more things
authorcwm <chriswmartin@protonmail.com>
Sat, 9 Dec 2017 17:21:41 +0000 (11:21 -0600)
committercwm <chriswmartin@protonmail.com>
Sat, 9 Dec 2017 17:21:41 +0000 (11:21 -0600)
app/javascript/flavours/glitch/features/ui/components/actions_modal.js
app/javascript/mastodon/locales/defaultMessages.json
app/javascript/mastodon/locales/en.json
app/lib/user_settings_decorator.rb
app/serializers/initial_state_serializer.rb

index 0873c282faf8f8de9bab2613c983ce4bedfe60ce..1eb0e026e30677247532022648b975122e151875 100644 (file)
@@ -55,9 +55,25 @@ export default class ActionsModal extends ImmutablePureComponent {
             <DisplayName account={this.props.status.get('account')} />
           </a>
         </div>
+        
+        <div className='favourite-modal__status-header'>
+          <div className='favourite-modal__status-time'>
+            <a href={this.props.status.get('url')} className='status__relative-time' target='_blank' rel='noopener'>
+              <RelativeTimestamp timestamp={this.props.status.get('created_at')} />
+            </a>
+          </div>
+
+          <a href={this.props.status.getIn(['account', 'url'])} className='status__display-name'>
+            <div className='status__avatar'>
+              <Avatar account={this.props.status.get('account')} size={48} />
+            </div>
+
+            <DisplayName account={this.props.status.get('account')} />
+          </a>
+        </div>
 
         <StatusContent status={this.props.status} />
-      </div>
+      </div>      
     );
 
     return (
index bb82cf5f5818ee599dc0648acc93ff7876dffad7..65e20c17ae10ef59db983d169aea275104c577c6 100644 (file)
     ],
     "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": [
       {
     ],
     "path": "app/javascript/mastodon/features/video/index.json"
   }
-]
\ No newline at end of file
+]
index 538124904a6f5d7e899ca11a0a1de6aa4ac247cb..5efd29b81546706132b68b3e78b268f629f2418c 100644 (file)
@@ -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",
   "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",
index 8af384a2d24f0ab9253582ae83308311116bd4da..d69181b5d78649a0870c3b3d8643c8d90c29c108 100644 (file)
@@ -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'
index 9dfa019f59d71f3f0899020f372a612f9a614a5f..904daa804d2528f3ba25fb2aeffd8562bd3e68da 100644 (file)
@@ -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