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:
authorStarfall <us@starfall.systems>2022-06-06 13:35:20 -0500
committerStarfall <us@starfall.systems>2022-06-06 13:35:20 -0500
commit78266a002b4735caaef07098ba66419fd71f47c1 (patch)
tree4ba2bc330d5ed4b6a3a926ab9a03a89f56bc8843 /app/javascript/flavours/glitch/features/local_settings/page/item/index.js
parente9b2e11520056d0ec822ac0862923d00c6a1289c (diff)
parent434b08e95b1a440bf9ae563b72600d1590106260 (diff)
Merge remote-tracking branch 'glitch/main'
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++) {