feat: add option to hide checkmark

hide-checkmark-option
Nolan Lawson 2022-11-25 13:37:46 -08:00
rodzic 098da30f2a
commit f20c329962
4 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -384,6 +384,7 @@ export default {
disableCustomScrollbars: 'Disable custom scrollbars',
bottomNav: 'Place the navigation bar at the bottom of the screen',
centerNav: 'Center the navigation bar',
hideCheckmark: 'Hide chechmark on favorite/boost buttons',
preferences: 'Preferences',
hotkeySettings: 'Hotkey settings',
disableHotkeys: 'Disable all hotkeys',

Wyświetl plik

@ -12,7 +12,7 @@
ref:node
>
<SvgIcon className="icon-button-svg {svgClassName || ''}" ref:svg {href} />
{#if checked}
{#if showCheckmark}
<SvgIcon className="icon-button-svg icon-button-check" ref:check href="#fa-check" />
{/if}
</button>
@ -154,12 +154,13 @@
sameColorWhenPressed ? 'same-pressed' : 'not-same-pressed',
className
)),
ariaLabel: ({ pressable, pressed, label, pressedLabel }) => ((pressable && pressed) ? pressedLabel : label)
ariaLabel: ({ pressable, pressed, label, pressedLabel }) => ((pressable && pressed) ? pressedLabel : label),
showCheckmark: ({ checked, $hideCheckmark }) => (!$hideCheckmark && checked)
},
methods: {
animate (animation, checkmarkAnimation) {
this.refs.svg.animate(animation)
if (checkmarkAnimation && this.get().checked) {
if (checkmarkAnimation && this.get().showCheckmark) {
this.refs.check.animate(checkmarkAnimation)
}
},

Wyświetl plik

@ -67,6 +67,11 @@
bind:checked="$bottomNav" on:change="onChange(event)">
{intl.bottomNav}
</label>
<label class="setting-group">
<input type="checkbox" id="choice-hide-checkmark"
bind:checked="$hideCheckmark" on:change="onChange(event)">
{intl.hideCheckmark}
</label>
</form>
<h2>{intl.accessibility}</h2>

Wyświetl plik

@ -27,6 +27,7 @@ const persistedState = {
disableTapOnStatus: false,
enableGrayscale: false,
hideCards: false,
hideCheckmark: false,
largeInlineMedia: false,
leftRightChangesFocus: isKaiOS(),
instanceNameInSearch: '',