feat: add 'use star favorite icon' preference (#2067)
This commit is contained in:
parent
126cd4d535
commit
582a9847a1
9 changed files with 37 additions and 10 deletions
|
@ -12,6 +12,7 @@ const focusEditor = inject<typeof noop>('focus-editor', noop)
|
|||
const { details, command } = $(props)
|
||||
|
||||
const userSettings = useUserSettings()
|
||||
const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon')
|
||||
|
||||
const {
|
||||
status,
|
||||
|
@ -77,9 +78,11 @@ function reply() {
|
|||
<StatusActionButton
|
||||
:content="$t('action.favourite')"
|
||||
:text="!getPreferences(userSettings, 'hideFavoriteCount') && status.favouritesCount ? status.favouritesCount : ''"
|
||||
color="text-rose" hover="text-rose" elk-group-hover="bg-rose/10"
|
||||
icon="i-ri:heart-3-line"
|
||||
active-icon="i-ri:heart-3-fill"
|
||||
:color="useStarFavoriteIcon ? 'text-yellow' : 'text-rose'"
|
||||
:hover="useStarFavoriteIcon ? 'text-yellow' : 'text-rose'"
|
||||
:elk-group-hover="useStarFavoriteIcon ? 'bg-yellow/10' : 'bg-rose/10'"
|
||||
:icon="useStarFavoriteIcon ? 'i-ri:star-line' : 'i-ri:heart-3-line'"
|
||||
:active-icon="useStarFavoriteIcon ? 'i-ri:star-fill' : 'i-ri:heart-3-fill'"
|
||||
:active="!!status.favourited"
|
||||
:disabled="isLoading.favourited"
|
||||
:command="command"
|
||||
|
@ -97,7 +100,9 @@ function reply() {
|
|||
<div flex-none>
|
||||
<StatusActionButton
|
||||
:content="$t('action.bookmark')"
|
||||
color="text-yellow" hover="text-yellow" elk-group-hover="bg-yellow/10"
|
||||
:color="useStarFavoriteIcon ? 'text-rose' : 'text-yellow'"
|
||||
:hover="useStarFavoriteIcon ? 'text-rose' : 'text-yellow'"
|
||||
:elk-group-hover="useStarFavoriteIcon ? 'bg-rose/10' : 'bg-yellow/10' "
|
||||
icon="i-ri:bookmark-line"
|
||||
active-icon="i-ri:bookmark-fill"
|
||||
:active="!!status.bookmarked"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue