fix: Add zen mode to preferences, remove shortcut (#2003)
This commit is contained in:
parent
9564985a4e
commit
56405f52bb
12 changed files with 35 additions and 31 deletions
|
@ -66,10 +66,6 @@ const shortcutItemGroups: ShortcutItemGroup[] = [
|
|||
description: t('magic_keys.groups.actions.boost'),
|
||||
shortcut: { keys: ['b'], isSequence: false },
|
||||
},
|
||||
{
|
||||
description: t('magic_keys.groups.actions.zen_mode'),
|
||||
shortcut: { keys: ['z'], isSequence: false },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -93,9 +93,9 @@ onBeforeUnmount(() => {
|
|||
transition-colors duration-200 transform
|
||||
hover="bg-gray-100 dark:(bg-gray-700 text-white)"
|
||||
:aria-label="$t('nav.zen_mode')"
|
||||
@click="userSettings.zenMode = !userSettings.zenMode"
|
||||
@click="togglePreferences('zenMode')"
|
||||
>
|
||||
<span :class="userSettings.zenMode ? 'i-ri:layout-right-2-line' : 'i-ri:layout-right-line'" class="flex-shrink-0 text-xl me-4 !align-middle" />
|
||||
<span :class="getPreferences(userSettings, 'zenMode') ? 'i-ri:layout-right-2-line' : 'i-ri:layout-right-line'" class="flex-shrink-0 text-xl me-4 !align-middle" />
|
||||
{{ $t('nav.zen_mode') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -23,9 +23,9 @@ function toggleDark() {
|
|||
<button
|
||||
flex
|
||||
text-lg
|
||||
:class="userSettings.zenMode ? 'i-ri:layout-right-2-line' : 'i-ri:layout-right-line'"
|
||||
:class="getPreferences(userSettings, 'zenMode') ? 'i-ri:layout-right-2-line' : 'i-ri:layout-right-line'"
|
||||
:aria-label="$t('nav.zen_mode')"
|
||||
@click="userSettings.zenMode = !userSettings.zenMode"
|
||||
@click="togglePreferences('zenMode')"
|
||||
/>
|
||||
</CommonTooltip>
|
||||
<CommonTooltip :content="$t('settings.about.sponsor_action')">
|
||||
|
|
|
@ -125,7 +125,7 @@ function showFavoritedAndBoostedBy() {
|
|||
|
||||
<template #popper>
|
||||
<div flex="~ col">
|
||||
<template v-if="userSettings.zenMode">
|
||||
<template v-if="getPreferences(userSettings, 'zenMode')">
|
||||
<CommonDropdownItem
|
||||
:text="$t('action.reply')"
|
||||
icon="i-ri:chat-1-line"
|
||||
|
|
|
@ -154,7 +154,7 @@ const forceShow = ref(false)
|
|||
<StatusAccountDetails :account="status.account" />
|
||||
</AccountHoverWrapper>
|
||||
<div flex-auto />
|
||||
<div v-show="!userSettings.zenMode" text-sm text-secondary flex="~ row nowrap" hover:underline whitespace-nowrap>
|
||||
<div v-show="!getPreferences(userSettings, 'zenMode')" text-sm text-secondary flex="~ row nowrap" hover:underline whitespace-nowrap>
|
||||
<AccountBotIndicator v-if="status.account.bot" me-2 />
|
||||
<div flex="~ gap1" items-center>
|
||||
<StatusVisibilityIndicator v-if="status.visibility !== 'public'" :status="status" />
|
||||
|
@ -182,7 +182,7 @@ const forceShow = ref(false)
|
|||
:in-notification="inNotification"
|
||||
mb2 :class="{ 'mt-2 mb1': isDM }"
|
||||
/>
|
||||
<StatusActions v-if="actions !== false" v-show="!userSettings.zenMode" :status="status" />
|
||||
<StatusActions v-if="actions !== false" v-show="!getPreferences(userSettings, 'zenMode')" :status="status" />
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue