feat: option to hide alt indicator closes #1410
This commit is contained in:
parent
87496e01af
commit
4a74b16d24
|
@ -87,6 +87,8 @@ useIntersectionObserver(video, (entries) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, { threshold: 0.75 })
|
}, { threshold: 0.75 })
|
||||||
|
|
||||||
|
const userSettings = useUserSettings()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -167,7 +169,7 @@ useIntersectionObserver(video, (entries) => {
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="attachment.description" :class="isAudio ? '' : 'absolute left-2 bottom-2'">
|
<div v-if="attachment.description && !getPreferences(userSettings, 'hideAltIndicatorOnPosts')" :class="isAudio ? '' : 'absolute left-2 bottom-2'">
|
||||||
<VDropdown :distance="6" placement="bottom-start">
|
<VDropdown :distance="6" placement="bottom-start">
|
||||||
<button
|
<button
|
||||||
font-bold text-sm
|
font-bold text-sm
|
||||||
|
|
|
@ -8,6 +8,7 @@ export type OldFontSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
||||||
export type ColorMode = 'light' | 'dark' | 'system'
|
export type ColorMode = 'light' | 'dark' | 'system'
|
||||||
|
|
||||||
export interface PreferencesSettings {
|
export interface PreferencesSettings {
|
||||||
|
hideAltIndicatorOnPosts: boolean
|
||||||
hideBoostCount: boolean
|
hideBoostCount: boolean
|
||||||
hideReplyCount: boolean
|
hideReplyCount: boolean
|
||||||
hideFavoriteCount: boolean
|
hideFavoriteCount: boolean
|
||||||
|
@ -65,6 +66,7 @@ export function getDefaultUserSettings(locales: string[]): UserSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT__PREFERENCES_SETTINGS: PreferencesSettings = {
|
export const DEFAULT__PREFERENCES_SETTINGS: PreferencesSettings = {
|
||||||
|
hideAltIndicatorOnPosts: false,
|
||||||
hideBoostCount: false,
|
hideBoostCount: false,
|
||||||
hideReplyCount: false,
|
hideReplyCount: false,
|
||||||
hideFavoriteCount: false,
|
hideFavoriteCount: false,
|
||||||
|
|
|
@ -400,6 +400,7 @@
|
||||||
"github_cards": "GitHub Cards",
|
"github_cards": "GitHub Cards",
|
||||||
"grayscale_mode": "Grayscale mode",
|
"grayscale_mode": "Grayscale mode",
|
||||||
"hide_account_hover_card": "Hide account hover card",
|
"hide_account_hover_card": "Hide account hover card",
|
||||||
|
"hide_alt_indi_on_posts": "Hide alt indicator on posts",
|
||||||
"hide_boost_count": "Hide boost count",
|
"hide_boost_count": "Hide boost count",
|
||||||
"hide_favorite_count": "Hide favorite count",
|
"hide_favorite_count": "Hide favorite count",
|
||||||
"hide_follower_count": "Hide follower count",
|
"hide_follower_count": "Hide follower count",
|
||||||
|
|
|
@ -15,6 +15,12 @@ const userSettings = useUserSettings()
|
||||||
{{ $t('settings.preferences.label') }}
|
{{ $t('settings.preferences.label') }}
|
||||||
</h1>
|
</h1>
|
||||||
</template>
|
</template>
|
||||||
|
<SettingsToggleItem
|
||||||
|
:checked="getPreferences(userSettings, 'hideAltIndicatorOnPosts')"
|
||||||
|
@click="togglePreferences('hideAltIndicatorOnPosts')"
|
||||||
|
>
|
||||||
|
{{ $t('settings.preferences.hide_alt_indi_on_posts') }}
|
||||||
|
</SettingsToggleItem>
|
||||||
<SettingsToggleItem
|
<SettingsToggleItem
|
||||||
:checked="getPreferences(userSettings, 'hideBoostCount')"
|
:checked="getPreferences(userSettings, 'hideBoostCount')"
|
||||||
@click="togglePreferences('hideBoostCount')"
|
@click="togglePreferences('hideBoostCount')"
|
||||||
|
|
Loading…
Reference in a new issue