diff options
author | 2023-06-13 12:21:26 +0200 | |
---|---|---|
committer | 2023-06-13 12:21:26 +0200 | |
commit | 8fb5a7e7f8d4201590e709989e8f0627e800c147 (patch) | |
tree | 2fb888f081584f33e198eadfcf218714c3824002 /web/source/settings/admin | |
parent | [docs] Made Advanced its own section (#1883) (diff) | |
download | gotosocial-8fb5a7e7f8d4201590e709989e8f0627e800c147.tar.xz |
[Frontend] Settings for profile fields (#1885)
* get max emoji size from instance settings
* expose (hardcoded) max amount of profile fields in instance api
* basic profile field setting
* fix profile field hook structure for updates
* *twirls mustache* fix ze tests
---------
Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
Diffstat (limited to 'web/source/settings/admin')
-rw-r--r-- | web/source/settings/admin/emoji/local/new-emoji.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/source/settings/admin/emoji/local/new-emoji.js b/web/source/settings/admin/emoji/local/new-emoji.js index 76f90b462..de796fe30 100644 --- a/web/source/settings/admin/emoji/local/new-emoji.js +++ b/web/source/settings/admin/emoji/local/new-emoji.js @@ -42,9 +42,14 @@ const MutationButton = require("../../../components/form/mutation-button"); module.exports = function NewEmojiForm() { const shortcode = useShortcode(); + const { data: instance } = query.useInstanceQuery(); + const emojiMaxSize = React.useMemo(() => { + return instance?.configuration?.emojis?.emoji_size_limit ?? 50 * 1024; + }, [instance]); + const image = useFileInput("image", { withPreview: true, - maxSize: 50 * 1024 // TODO: get from instance api? + maxSize: emojiMaxSize }); const category = useComboBoxInput("category"); |