about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/local_settings/page/item/index.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-05-15 17:30:40 +0200
committerGitHub <noreply@github.com>2022-05-15 17:30:40 +0200
commitdc350be6f5a9f59385e6fbc7a06b5b9c0d57aec8 (patch)
treeef7ebcaf1937165a14b2c53264f1f4ffb224c1d9 /app/javascript/flavours/glitch/features/local_settings/page/item/index.js
parentaa08399e6f4ff35a7ece05ebbeca4b9771c97927 (diff)
Use upstream's settings for CW auto-expand and column swiping (#1770)
* Use Mastodon server-side settings for automatically expanding toots with CWs

* Add modal warning about settings changes

* Use Mastodon server-side settings for disabling swiping
Diffstat (limited to 'app/javascript/flavours/glitch/features/local_settings/page/item/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/local_settings/page/item/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/local_settings/page/item/index.js b/app/javascript/flavours/glitch/features/local_settings/page/item/index.js
index 5a68523f6..6b24e4143 100644
--- a/app/javascript/flavours/glitch/features/local_settings/page/item/index.js
+++ b/app/javascript/flavours/glitch/features/local_settings/page/item/index.js
@@ -21,6 +21,7 @@ export default class LocalSettingsPageItem extends React.PureComponent {
     })),
     settings: ImmutablePropTypes.map.isRequired,
     placeholder: PropTypes.string,
+    disabled: PropTypes.bool,
   };
 
   handleChange = e => {
@@ -33,8 +34,8 @@ export default class LocalSettingsPageItem extends React.PureComponent {
 
   render () {
     const { handleChange } = this;
-    const { settings, item, id, options, children, dependsOn, dependsOnNot, placeholder } = this.props;
-    let enabled = true;
+    const { settings, item, id, options, children, dependsOn, dependsOnNot, placeholder, disabled } = this.props;
+    let enabled = !disabled;
 
     if (dependsOn) {
       for (let i = 0; i < dependsOn.length; i++) {