summaryrefslogtreecommitdiff
path: root/web/source/settings/user
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-10-24 10:28:59 +0200
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2023-10-24 14:34:43 +0200
commit8a23ce2b3ef506cd9f254c40b1c7fd51ba472ce9 (patch)
treec2ba547698d92f53705600851673ccb4f676bab8 /web/source/settings/user
parent[bugfix/frontend] fix typo and other oddness in patchRemoteEmojis (#2281) (diff)
downloadgotosocial-8a23ce2b3ef506cd9f254c40b1c7fd51ba472ce9.tar.xz
[bugfix/frontend] Add `nosubmit` option to form fields + use it when instance custom CSS disabled (#2290)
Diffstat (limited to 'web/source/settings/user')
-rw-r--r--web/source/settings/user/profile.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/source/settings/user/profile.js b/web/source/settings/user/profile.js
index b6daf175b..125f88e70 100644
--- a/web/source/settings/user/profile.js
+++ b/web/source/settings/user/profile.js
@@ -79,7 +79,7 @@ function UserProfileForm({ data: profile }) {
header: useFileInput("header", { withPreview: true }),
displayName: useTextInput("display_name", { source: profile }),
note: useTextInput("note", { source: profile, valueSelector: (p) => p.source?.note }),
- customCSS: useTextInput("custom_css", { source: profile }),
+ customCSS: useTextInput("custom_css", { source: profile, nosubmit: !instanceConfig.allowCustomCSS }),
bot: useBoolInput("bot", { source: profile }),
locked: useBoolInput("locked", { source: profile }),
discoverable: useBoolInput("discoverable", { source: profile}),
@@ -190,7 +190,7 @@ function UserProfileForm({ data: profile }) {
</div>
<TextArea
field={form.customCSS}
- label="Custom CSS"
+ label={`Custom CSS` + (!instanceConfig.allowCustomCSS ? ` (not enabled on this instance)` : ``)}
className="monospace"
rows={8}
disabled={!instanceConfig.allowCustomCSS}