mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 13:22:24 -06:00
[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>
This commit is contained in:
parent
4990099fde
commit
8fb5a7e7f8
15 changed files with 261 additions and 52 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue