feat: font size preference

This commit is contained in:
patak 2022-12-23 23:47:13 +01:00
parent 99abb78ef1
commit 41ef187379
9 changed files with 65 additions and 1 deletions

View file

@ -30,6 +30,13 @@ const buildTimeAgo = useTimeAgo(buildTime, timeAgoOptions)
</button>
</CommonTooltip>
</NavSelectLanguage>
<NavSelectFontSize>
<CommonTooltip :content="$t('nav_footer.select_font_size')">
<button flex :aria-label="$t('nav_footer.select_font_size')">
<div i-ri:font-size text-lg />
</button>
</CommonTooltip>
</NavSelectFontSize>
<NavSelectFeatureFlags v-if="isMastoInitialised && currentUser">
<CommonTooltip :content="$t('nav_footer.select_feature_flags')">
<button flex :aria-label="$t('nav_footer.select_feature_flags')">

View file

@ -0,0 +1,21 @@
<script lang="ts" setup>
import { FontSize } from 'composables/fontSize'
const sizes = ['xs', 'sm', 'md', 'lg', 'xl']
</script>
<template>
<CommonDropdown>
<slot />
<template #popper>
<CommonDropdownItem
v-for="size in sizes"
:key="size"
:checked="size === fontSize"
@click="setFontSize(size as FontSize)"
>
{{ size }}
</CommonDropdownItem>
</template>
</CommonDropdown>
</template>