elk/pages/settings/preferences/index.vue

119 lines
4.3 KiB
Vue
Raw Normal View History

2023-01-04 13:57:12 +00:00
<script setup lang="ts">
const { t } = useI18n()
useHead({
2023-01-04 13:57:12 +00:00
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>
<template #title>
<h1 text-lg font-bold flex items-center gap-2 @click="$scrollToTop">
{{ $t('settings.preferences.label') }}
</h1>
</template>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideAltIndicatorOnPosts')"
@click="togglePreferences('hideAltIndicatorOnPosts')"
>
{{ $t('settings.preferences.hide_alt_indi_on_posts') }}
</SettingsToggleItem>
2023-01-15 14:19:22 +00:00
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'hideAccountHoverCard')"
@click="togglePreferences('hideAccountHoverCard')"
2023-01-15 14:19:22 +00:00
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.hide_account_hover_card') }}
2023-01-15 14:19:22 +00:00
</SettingsToggleItem>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'enableAutoplay')"
2023-02-15 10:34:23 +00:00
:disabled="getPreferences(userSettings, 'enableDataSaving')"
2023-02-03 17:27:40 +00:00
@click="togglePreferences('enableAutoplay')"
2023-01-15 14:19:22 +00:00
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.enable_autoplay') }}
2023-01-15 14:19:22 +00:00
</SettingsToggleItem>
2023-02-15 10:34:23 +00:00
<SettingsToggleItem
:checked="getPreferences(userSettings, 'enableDataSaving')"
@click="togglePreferences('enableDataSaving')"
>
{{ $t("settings.preferences.enable_data_saving") }}
<template #description>
{{ $t("settings.preferences.enable_data_saving_description") }}
</template>
</SettingsToggleItem>
2023-01-15 14:19:22 +00:00
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'enablePinchToZoom')"
@click="togglePreferences('enablePinchToZoom')"
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.enable_pinch_to_zoom') }}
</SettingsToggleItem>
2023-02-03 17:27:40 +00:00
<h2 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
<div i-ri-hearts-line />
{{ $t('settings.preferences.wellbeing') }}
</h2>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'grayscaleMode')"
@click="togglePreferences('grayscaleMode')"
2023-01-15 14:19:22 +00:00
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.grayscale_mode') }}
2023-01-15 14:19:22 +00:00
</SettingsToggleItem>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'hideBoostCount')"
@click="togglePreferences('hideBoostCount')"
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.hide_boost_count') }}
</SettingsToggleItem>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'hideFavoriteCount')"
@click="togglePreferences('hideFavoriteCount')"
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.hide_favorite_count') }}
</SettingsToggleItem>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'hideReplyCount')"
@click="togglePreferences('hideReplyCount')"
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.hide_reply_count') }}
</SettingsToggleItem>
<SettingsToggleItem
2023-02-03 17:27:40 +00:00
:checked="getPreferences(userSettings, 'hideFollowerCount')"
@click="togglePreferences('hideFollowerCount')"
>
2023-02-03 17:27:40 +00:00
{{ $t('settings.preferences.hide_follower_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideUsernameEmojis')"
@click="togglePreferences('hideUsernameEmojis')"
>
{{ $t("settings.preferences.hide_username_emojis") }}
<template #description>
{{ $t('settings.preferences.hide_username_emojis_description') }}
</template>
</SettingsToggleItem>
<h2 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
2022-12-27 17:38:38 +00:00
<div i-ri-flask-line />
2023-01-15 14:19:22 +00:00
{{ $t('settings.preferences.title') }}
</h2>
<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>