From 0b2b9a713bf9d384366f2d40e9e58c6b88425ef4 Mon Sep 17 00:00:00 2001 From: rshigg <90143161+rshigg@users.noreply.github.com> Date: Tue, 17 Jan 2023 09:25:36 -0330 Subject: [PATCH] feat: add grayscale mode to user preferences (#1177) --- components/account/AccountAvatar.vue | 1 + components/status/StatusActions.vue | 2 +- components/status/StatusCard.vue | 2 +- components/status/StatusPoll.vue | 2 +- composables/settings/definition.ts | 2 ++ layouts/default.vue | 4 +++- locales/en-US.json | 1 + pages/settings/preferences/index.vue | 20 +++++++++++++------- styles/global.css | 26 ++++++++++++++++++++++++++ 9 files changed, 49 insertions(+), 11 deletions(-) diff --git a/components/account/AccountAvatar.vue b/components/account/AccountAvatar.vue index da7a3fff..26953d8d 100644 --- a/components/account/AccountAvatar.vue +++ b/components/account/AccountAvatar.vue @@ -19,6 +19,7 @@ const error = $ref(false) :src="(error || !loaded) ? 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' : account.avatar" :alt="$t('account.avatar_description', [account.username])" loading="lazy" + class="account-avatar" :class="(loaded ? 'bg-base' : 'bg-gray:10') + (square ? ' ' : ' rounded-full')" :style="{ 'clip-path': square ? `url(#avatar-mask)` : 'none' }" v-bind="$attrs" diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index 6b761d05..96a4fab9 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -33,7 +33,7 @@ const reply = () => {