feat: add wellbeing preference hide news (#2026)

This commit is contained in:
Alex 2023-04-28 15:38:44 +08:00 committed by GitHub
parent cbba846c4f
commit 5c3b8be055
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 1 deletions

View file

@ -14,6 +14,8 @@ onActivated(() =>
)
onDeactivated(() => search?.input?.blur())
const userSettings = useUserSettings()
const tabs = $computed<CommonRouteTabOption[]>(() => [
{
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
@ -26,6 +28,7 @@ const tabs = $computed<CommonRouteTabOption[]>(() => [
{
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
display: isHydrated.value ? t('tab.news') : '',
hide: userSettings.value.preferences.hideNews,
},
// This section can only be accessed after logging in
{