Skip to content

Commit c190c5c

Browse files
add GCard builtin bookmark button as well
I've used the `favoriteToolAction` ref from the comoposable so we do not have to add any additional imports to the card component.
1 parent ae16340 commit c190c5c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

client/src/components/ToolsList/ToolsListCard.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,12 @@ const toolBadges = computed<CardBadge[]>(() => {
135135
return badges;
136136
});
137137
138-
const { toolsListCardPrimaryActions, toolsListCardSecondaryActions, openUploadIfNeeded } = useToolsListCardActions(
138+
const {
139+
favoriteToolAction: bookmark,
140+
toolsListCardPrimaryActions,
141+
toolsListCardSecondaryActions,
142+
openUploadIfNeeded,
143+
} = useToolsListCardActions(
139144
props.id,
140145
props.local,
141146
props.name,
@@ -151,8 +156,11 @@ const { toolsListCardPrimaryActions, toolsListCardSecondaryActions, openUploadIf
151156
:id="props.id"
152157
class="tool-list-item"
153158
:badges="toolBadges"
159+
:bookmarked="bookmark.label === 'Unfavorite'"
160+
:show-bookmark="!bookmark.title.includes('Login')"
154161
:primary-actions="toolsListCardPrimaryActions"
155-
:secondary-actions="toolsListCardSecondaryActions">
162+
:secondary-actions="toolsListCardSecondaryActions"
163+
@bookmark="bookmark.handler">
156164
<template v-slot:title>
157165
<h4 class="py-1 d-flex flex-wrap text-wrap flex-gapx-1">
158166
<span>

0 commit comments

Comments
 (0)