elk/pages/settings/preferences/index.vue

60 lines
2.0 KiB
Vue
Raw Normal View History

2023-01-04 13:57:12 +00:00
<script setup lang="ts">
const { t } = useI18n()
useHeadFixed({
title: () => `${t('settings.preferences.label')} | ${t('nav.settings')}`,
})
const userSettings = useUserSettings()
2023-01-04 13:57:12 +00:00
</script>
<template>
<MainContent back-on-small-screen>
2023-01-15 14:19:22 +00:00
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideBoostCount')"
@click="togglePreferences('hideBoostCount')"
>
{{ $t('settings.preferences.hide_boost_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideFavoriteCount')"
@click="togglePreferences('hideFavoriteCount')"
>
{{ $t('settings.preferences.hide_favorite_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideFollowerCount')"
@click="togglePreferences('hideFollowerCount')"
>
{{ $t('settings.preferences.hide_follower_count') }}
</SettingsToggleItem>
<template #title>
<div text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
<span>{{ $t('settings.preferences.label') }}</span>
</div>
</template>
2022-12-27 17:38:38 +00:00
<h3 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
<div i-ri-flask-line />
2023-01-15 14:19:22 +00:00
{{ $t('settings.preferences.title') }}
2022-12-27 17:38:38 +00:00
</h3>
<SettingsToggleItem
2023-01-15 14:19:22 +00:00
:checked="getPreferences(userSettings, 'experimentalVirtualScroller')"
@click="togglePreferences('experimentalVirtualScroller')"
2022-12-27 17:38:38 +00:00
>
2023-01-15 14:19:22 +00:00
{{ $t('settings.preferences.virtual_scroll') }}
</SettingsToggleItem>
<SettingsToggleItem
2023-01-15 14:19:22 +00:00
:checked="getPreferences(userSettings, 'experimentalGitHubCards')"
@click="togglePreferences('experimentalGitHubCards')"
2022-12-27 17:38:38 +00:00
>
2023-01-15 14:19:22 +00:00
{{ $t('settings.preferences.github_cards') }}
</SettingsToggleItem>
<SettingsToggleItem
2023-01-15 14:19:22 +00:00
:checked="getPreferences(userSettings, 'experimentalUserPicker')"
@click="togglePreferences('experimentalUserPicker')"
2022-12-27 17:38:38 +00:00
>
2023-01-15 14:19:22 +00:00
{{ $t('settings.preferences.user_picker') }}
</SettingsToggleItem>
</MainContent>
</template>