refac
This commit is contained in:
@@ -337,8 +337,6 @@
|
|||||||
lastSettingsValue = settingsValue;
|
lastSettingsValue = settingsValue;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
$: textScaleUsesDefault = textScale === null || isDefaultSetting('textScale');
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
@@ -405,13 +403,12 @@
|
|||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (textScale === null) {
|
if (textScale === null) {
|
||||||
textScale = 1;
|
textScale = 1;
|
||||||
} else if (!textScaleUsesDefault) {
|
} else if (!isDefaultSetting('textScale')) {
|
||||||
textScale = null;
|
setTextScaleHandler(defaultSettings.textScale ?? 1);
|
||||||
setTextScaleHandler(1);
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if textScaleUsesDefault}
|
{#if textScale === null || isDefaultSetting('textScale')}
|
||||||
<span>{$i18n.t('Default')}</span>
|
<span>{$i18n.t('Default')}</span>
|
||||||
{:else}
|
{:else}
|
||||||
<span>{textScale}x</span>
|
<span>{textScale}x</span>
|
||||||
@@ -420,7 +417,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if textScale !== null}
|
{#if textScale !== null && !isDefaultSetting('textScale')}
|
||||||
<div class=" flex items-center gap-2 px-1 pb-1">
|
<div class=" flex items-center gap-2 px-1 pb-1">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
Reference in New Issue
Block a user