From 2267db11c6cf996381005ab7c9aba3ef34aedb29 Mon Sep 17 00:00:00 2001 From: lazzzis Date: Fri, 11 Aug 2023 04:56:47 -0700 Subject: [PATCH] feat: disabled boost button (#2326) --- components/status/StatusActionButton.vue | 5 +++-- components/status/StatusActions.vue | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/status/StatusActionButton.vue b/components/status/StatusActionButton.vue index f67b8dd0..a1a8561c 100644 --- a/components/status/StatusActionButton.vue +++ b/components/status/StatusActionButton.vue @@ -9,6 +9,7 @@ const { as = 'button', command, disabled, content, icon } = defineProps<{ color: string icon: string activeIcon?: string + inactiveIcon?: string hover: string elkGroupHover: string active?: boolean @@ -54,7 +55,7 @@ useCommand({ :hover=" !disabled ? hover : undefined" focus:outline-none :focus-visible="hover" - :class="active ? color : 'text-secondary'" + :class="active ? color : (disabled ? 'op25 pointer-events-none' : 'text-secondary')" :aria-label="content" :disabled="disabled" > @@ -67,7 +68,7 @@ useCommand({ 'group-focus-visible:ring': '2 current', }" > -
+
diff --git a/components/status/StatusActions.vue b/components/status/StatusActions.vue index eb75e707..dc8b67a3 100644 --- a/components/status/StatusActions.vue +++ b/components/status/StatusActions.vue @@ -60,6 +60,7 @@ function reply() { color="text-green" hover="text-green" elk-group-hover="bg-green/10" icon="i-ri:repeat-line" active-icon="i-ri:repeat-fill" + inactive-icon="i-tabler:repeat-off" :active="!!status.reblogged" :disabled="isLoading.reblogged || !canReblog" :command="command"