Skip to content

Commit

Permalink
Merge branch 'main' into userquin/feat-expose-push-subscription-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Feb 3, 2023
2 parents 3f6551e + 0258894 commit 480c17d
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 31 deletions.
6 changes: 3 additions & 3 deletions components/account/AccountHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ const isNotifiedOnPost = $computed(() => !!relationship?.notifying)
<ContentRich :content="field.value" :emojis="account.emojis" />
</div>
</div>
<div v-if="iconFields.length" flex="~ wrap gap-4">
<div v-for="field in iconFields" :key="field.name" flex="~ gap-1" items-center>
<div v-if="iconFields.length" flex="~ wrap gap-2">
<div v-for="field in iconFields" :key="field.name" flex="~ gap-1" px1 items-center :class="`${field.verifiedAt ? 'border-1 rounded-full border-dark' : ''}`">
<CommonTooltip :content="getFieldIconTitle(field.name)">
<div text-secondary :class="getAccountFieldIcon(field.name)" :title="getFieldIconTitle(field.name)" />
</CommonTooltip>
<ContentRich text-sm filter-saturate-0 :content="field.value" :emojis="account.emojis" />
<ContentRich text-sm :content="field.value" :emojis="account.emojis" />
</div>
</div>
<AccountPostsFollowers :account="account" />
Expand Down
4 changes: 3 additions & 1 deletion components/status/StatusAttachment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ useIntersectionObserver(video, (entries) => {
}
})
}, { threshold: 0.75 })
const userSettings = useUserSettings()
</script>

<template>
Expand Down Expand Up @@ -167,7 +169,7 @@ useIntersectionObserver(video, (entries) => {
/>
</button>
</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">
<button
font-bold text-sm
Expand Down
2 changes: 2 additions & 0 deletions composables/settings/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type OldFontSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
export type ColorMode = 'light' | 'dark' | 'system'

export interface PreferencesSettings {
hideAltIndicatorOnPosts: boolean
hideBoostCount: boolean
hideReplyCount: boolean
hideFavoriteCount: boolean
Expand Down Expand Up @@ -65,6 +66,7 @@ export function getDefaultUserSettings(locales: string[]): UserSettings {
}

export const DEFAULT__PREFERENCES_SETTINGS: PreferencesSettings = {
hideAltIndicatorOnPosts: false,
hideBoostCount: false,
hideReplyCount: false,
hideFavoriteCount: false,
Expand Down
2 changes: 1 addition & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const isGrayscale = usePreferences('grayscaleMode')
<template>
<div h-full :data-mode="isHydrated && isGrayscale ? 'grayscale' : ''">
<main flex w-full mxa lg:max-w-80rem class="native:grid native:sm:grid-cols-[auto_1fr] native:lg:grid-cols-[auto_minmax(600px,2fr)_1fr]">
<aside class="native:w-auto w-1/8 md:w-1/6 lg:w-1/5 xl:w-1/4" hidden sm:flex justify-end xl:me-4 zen-hide relative>
<aside class="native:w-auto w-1/8 md:w-1/6 lg:w-1/5 xl:w-1/4 zen-hide" hidden sm:flex justify-end xl:me-4 relative>
<div sticky top-0 w-20 xl:w-100 h-screen flex="~ col" lt-xl-items-center>
<slot name="left">
<div flex="~ col" overflow-y-auto justify-between h-full max-w-full pt-5 native:pt-7 overflow-x-hidden>
Expand Down
4 changes: 3 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@
"github_cards": "GitHub Cards",
"grayscale_mode": "Grayscale mode",
"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_favorite_count": "Hide favorite count",
"hide_follower_count": "Hide follower count",
Expand All @@ -411,7 +412,8 @@
"label": "Preferences",
"title": "Experimental Features",
"user_picker": "User Picker",
"virtual_scroll": "Virtual Scrolling"
"virtual_scroll": "Virtual Scrolling",
"wellbeing": "Wellbeing"
},
"profile": {
"appearance": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "module",
"version": "0.7.1",
"version": "0.7.2",
"private": true,
"packageManager": "pnpm@7.9.0",
"license": "MIT",
Expand Down
58 changes: 34 additions & 24 deletions pages/settings/preferences/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,52 +16,62 @@ const userSettings = useUserSettings()
</h1>
</template>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideBoostCount')"
@click="togglePreferences('hideBoostCount')"
>
{{ $t('settings.preferences.hide_boost_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideFavoriteCount')"
@click="togglePreferences('hideFavoriteCount')"
:checked="getPreferences(userSettings, 'hideAltIndicatorOnPosts')"
@click="togglePreferences('hideAltIndicatorOnPosts')"
>
{{ $t('settings.preferences.hide_favorite_count') }}
{{ $t('settings.preferences.hide_alt_indi_on_posts') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideReplyCount')"
@click="togglePreferences('hideReplyCount')"
:checked="getPreferences(userSettings, 'hideAccountHoverCard')"
@click="togglePreferences('hideAccountHoverCard')"
>
{{ $t('settings.preferences.hide_reply_count') }}
{{ $t('settings.preferences.hide_account_hover_card') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideFollowerCount')"
@click="togglePreferences('hideFollowerCount')"
:checked="getPreferences(userSettings, 'enableAutoplay')"
@click="togglePreferences('enableAutoplay')"
>
{{ $t('settings.preferences.hide_follower_count') }}
{{ $t('settings.preferences.enable_autoplay') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideAccountHoverCard')"
@click="togglePreferences('hideAccountHoverCard')"
:checked="getPreferences(userSettings, 'enablePinchToZoom')"
@click="togglePreferences('enablePinchToZoom')"
>
{{ $t('settings.preferences.hide_account_hover_card') }}
{{ $t('settings.preferences.enable_pinch_to_zoom') }}
</SettingsToggleItem>
<h2 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
<div i-ri-hearts-line />
{{ $t('settings.preferences.wellbeing') }}
</h2>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'grayscaleMode')"
@click="togglePreferences('grayscaleMode')"
>
{{ $t('settings.preferences.grayscale_mode') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'enableAutoplay')"
@click="togglePreferences('enableAutoplay')"
:checked="getPreferences(userSettings, 'hideBoostCount')"
@click="togglePreferences('hideBoostCount')"
>
{{ $t('settings.preferences.enable_autoplay') }}
{{ $t('settings.preferences.hide_boost_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'enablePinchToZoom')"
@click="togglePreferences('enablePinchToZoom')"
:checked="getPreferences(userSettings, 'hideFavoriteCount')"
@click="togglePreferences('hideFavoriteCount')"
>
{{ $t('settings.preferences.enable_pinch_to_zoom') }}
{{ $t('settings.preferences.hide_favorite_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideReplyCount')"
@click="togglePreferences('hideReplyCount')"
>
{{ $t('settings.preferences.hide_reply_count') }}
</SettingsToggleItem>
<SettingsToggleItem
:checked="getPreferences(userSettings, 'hideFollowerCount')"
@click="togglePreferences('hideFollowerCount')"
>
{{ $t('settings.preferences.hide_follower_count') }}
</SettingsToggleItem>
<h2 px6 py4 mt2 font-bold text-xl flex="~ gap-1" items-center>
<div i-ri-flask-line />
Expand Down

0 comments on commit 480c17d

Please sign in to comment.