mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(app): let hidden sidebar buttons be shown again (#3061)
This commit is contained in:
1 parent
12bfaa83ba
commit
ab4069ed0e
39 files changed
+3471
-2315
No files matched your search
@@ -8,7 +8,9 @@ import {
|
||||
VideoSeekThumbnailsControl,
|
||||
} from '@app/features/user/components/modals/tabs/advanced_settings_tab/AdvancedAccessibilityControls';
|
||||
import {
|
||||
DownloadButtonControl,
|
||||
FavoritesControl,
|
||||
HelpCenterButtonControl,
|
||||
HideKeyboardHintsControl,
|
||||
KeepNekoStillControl,
|
||||
ShowNekoControl,
|
||||
@@ -67,6 +69,8 @@ export const DIRECT_CONTROL_ITEM_IDS = new Set([
|
||||
'appearance-hide-keyboard-hints',
|
||||
'appearance-voice-channel-join-behavior',
|
||||
'appearance-enable-favorites',
|
||||
'appearance-show-help-center-button',
|
||||
'appearance-show-download-button',
|
||||
'chat-settings-auto-send-gifs',
|
||||
'chat-settings-save-gif-favorites',
|
||||
'chat-settings-message-action-bar',
|
||||
@@ -114,6 +118,8 @@ export const COMPACT_SWITCH_CONTROL_ITEM_IDS = new Set([
|
||||
'appearance-keep-neko-still',
|
||||
'appearance-hide-keyboard-hints',
|
||||
'appearance-enable-favorites',
|
||||
'appearance-show-help-center-button',
|
||||
'appearance-show-download-button',
|
||||
'chat-settings-auto-send-gifs',
|
||||
'chat-settings-save-gif-favorites',
|
||||
'chat-settings-strip-tracking',
|
||||
@@ -175,6 +181,14 @@ export const AdvancedSettingControl = observer(({item}: {item: SearchableSetting
|
||||
return (
|
||||
<FavoritesControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.favorites-control" />
|
||||
);
|
||||
case 'appearance-show-help-center-button':
|
||||
return (
|
||||
<HelpCenterButtonControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.help-center-button-control" />
|
||||
);
|
||||
case 'appearance-show-download-button':
|
||||
return (
|
||||
<DownloadButtonControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.download-button-control" />
|
||||
);
|
||||
case 'chat-settings-auto-send-gifs':
|
||||
return (
|
||||
<AutoSendGifsControl data-flx="user.advanced-setting-direct-controls.advanced-setting-control.auto-send-gifs-control" />
|
||||
|
||||
+31
@@ -2,12 +2,15 @@
|
||||
|
||||
import * as AccessibilityCommands from '@app/features/accessibility/commands/AccessibilityCommands';
|
||||
import Accessibility from '@app/features/accessibility/state/Accessibility';
|
||||
import HiddenGuildListButtons from '@app/features/guild/state/HiddenGuildListButtons';
|
||||
import {Switch} from '@app/features/ui/components/form/FormSwitch';
|
||||
import {SwitchGroup, SwitchGroupItem} from '@app/features/ui/components/SwitchGroup';
|
||||
import {
|
||||
ENABLE_FAVORITES_DESCRIPTOR,
|
||||
KEEP_NEKO_STILL_DESCRIPTOR,
|
||||
KEYBOARD_HINTS_DESCRIPTOR,
|
||||
SHOW_DOWNLOAD_BUTTON_DESCRIPTOR,
|
||||
SHOW_HELP_CENTER_BUTTON_DESCRIPTOR,
|
||||
SHOW_NEKO_DESCRIPTOR,
|
||||
} from '@app/features/user/components/settings_utils/section_registry/SharedDescriptors';
|
||||
import {msg} from '@lingui/core/macro';
|
||||
@@ -95,3 +98,31 @@ export const FavoritesControl = observer(() => {
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
export const HelpCenterButtonControl = observer(() => {
|
||||
const {i18n} = useLingui();
|
||||
return (
|
||||
<Switch
|
||||
ariaLabel={i18n._(SHOW_HELP_CENTER_BUTTON_DESCRIPTOR)}
|
||||
value={!HiddenGuildListButtons.helpButtonHidden}
|
||||
onChange={(value) => (value ? HiddenGuildListButtons.showHelpButton() : HiddenGuildListButtons.hideHelpButton())}
|
||||
compact
|
||||
data-flx="user.advanced-settings-tab.switch.help-center-button"
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
export const DownloadButtonControl = observer(() => {
|
||||
const {i18n} = useLingui();
|
||||
return (
|
||||
<Switch
|
||||
ariaLabel={i18n._(SHOW_DOWNLOAD_BUTTON_DESCRIPTOR)}
|
||||
value={!HiddenGuildListButtons.downloadButtonHidden}
|
||||
onChange={(value) =>
|
||||
value ? HiddenGuildListButtons.showDownloadButton() : HiddenGuildListButtons.hideDownloadButton()
|
||||
}
|
||||
compact
|
||||
data-flx="user.advanced-settings-tab.switch.download-button"
|
||||
/>
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user