diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-10-26 20:45:25 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-10-26 20:51:28 +0100 |
commit | 49ee69f75f24ef13f36cb177d5278fcc3a5f3d37 (patch) | |
tree | 3f24094f0886e1c437230a1125fbc49dd5cf65a6 /app/javascript/flavours/glitch/features/local_settings | |
parent | ea5298ab9b4b989119218807281b68d19756cd7a (diff) |
Add local setting for pop-in player position
Diffstat (limited to 'app/javascript/flavours/glitch/features/local_settings')
-rw-r--r-- | app/javascript/flavours/glitch/features/local_settings/page/index.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/local_settings/page/index.js b/app/javascript/flavours/glitch/features/local_settings/page/index.js index bce45901e..45d10d154 100644 --- a/app/javascript/flavours/glitch/features/local_settings/page/index.js +++ b/app/javascript/flavours/glitch/features/local_settings/page/index.js @@ -28,6 +28,8 @@ const messages = defineMessages({ rewrite_mentions_no: { id: 'settings.rewrite_mentions_no', defaultMessage: 'Do not rewrite mentions' }, rewrite_mentions_acct: { id: 'settings.rewrite_mentions_acct', defaultMessage: 'Rewrite with username and domain (when the account is remote)' }, rewrite_mentions_username: { id: 'settings.rewrite_mentions_username', defaultMessage: 'Rewrite with username' }, + pop_in_left: { id: 'settings.pop_in_left', defaultMessage: 'Left' }, + pop_in_right: { id: 'settings.pop_in_right', defaultMessage: 'Right' }, }); export default @injectIntl @@ -384,7 +386,7 @@ class LocalSettingsPage extends React.PureComponent { </section> </div> ), - ({ onChange, settings }) => ( + ({ intl, onChange, settings }) => ( <div className='glitch local-settings__page media'> <h1><FormattedMessage id='settings.media' defaultMessage='Media' /></h1> <LocalSettingsPageItem @@ -428,6 +430,19 @@ class LocalSettingsPage extends React.PureComponent { > <FormattedMessage id='settings.pop_in_player' defaultMessage='Enable pop-in player' /> </LocalSettingsPageItem> + <LocalSettingsPageItem + settings={settings} + item={['media', 'pop_in_position']} + id='mastodon-settings--pop-in-position' + options={[ + { value: 'left', message: intl.formatMessage(messages.pop_in_left) }, + { value: 'right', message: intl.formatMessage(messages.pop_in_right) }, + ]} + onChange={onChange} + dependsOn={[['media', 'pop_in_player']]} + > + <FormattedMessage id='settings.pop_in_position' defaultMessage='Pop-in player position:' /> + </LocalSettingsPageItem> </div> ), ]; |