color+indicator for toggleable stuff in extra-buttons

This commit is contained in:
Henry Jameson 2025-01-12 05:18:23 +02:00
parent 1697b97e9d
commit a89a21c3ef
2 changed files with 57 additions and 5 deletions

View file

@ -88,6 +88,7 @@
} }
} }
// popover // popover
/* stylelint-disable no-descending-specificity */
.extra-action-buttons { .extra-action-buttons {
.extra-action { .extra-action {
display: grid; display: grid;
@ -101,4 +102,33 @@
padding: var(--__horizontal-gap) var(--__horizontal-gap); padding: var(--__horizontal-gap) var(--__horizontal-gap);
} }
} }
.reply-button {
&:hover,
&.-active {
.svg-inline--fa {
color: var(--cBlue);
} }
}
}
.retweet-button {
&:hover,
&.-active {
.svg-inline--fa {
color: var(--cGreen);
}
}
}
.favorite-button {
&:hover,
&.-active {
.svg-inline--fa {
color: var(--cOrange);
}
}
}
}
/* stylelint-enable no-descending-specificity */

View file

@ -118,11 +118,33 @@
@click="close" @click="close"
:href="component(button) == 'a' ? button.link?.(funcArg) || getRemoteInteractionLink : undefined" :href="component(button) == 'a' ? button.link?.(funcArg) || getRemoteInteractionLink : undefined"
> >
<FALayers>
<FAIcon <FAIcon
class="fa-scale-110" class="fa-scale-110"
fixed-width
:icon="button.icon(funcArg)" :icon="button.icon(funcArg)"
/><span>{{ $t(button.label(funcArg)) }}</span> fixed-width
/>
<template v-if="button.toggleable?.(funcArg) && button.active">
<FAIcon
v-if="button.active(funcArg)"
class="active-marker"
transform="shrink-6 up-9 right-12"
:icon="button.activeIndicator?.(funcArg) || 'check'"
/>
<FAIcon
v-if="!button.active(funcArg)"
class="focus-marker"
transform="shrink-6 up-9 right-12"
:icon="button.openIndicator?.(funcArg) || 'plus'"
/>
<FAIcon
v-else
class="focus-marker"
transform="shrink-6 up-9 right-12"
:icon="button.closeIndicator?.(funcArg) || 'minus'"
/>
</template>
</FALayers><span>{{ $t(button.label(funcArg)) }}</span>
</component> </component>
<button <button
v-if="showPin && currentUser" v-if="showPin && currentUser"