Skip to content

Commit 1ca3df4

Browse files
committed
fix: lint issues & buttons on hover
1 parent a6277e0 commit 1ca3df4

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

apps/app-frontend/src/components/ui/ScreenshotCard.vue

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
<template>
2-
<div class="rounded-lg overflow-hidden shadow-md w-full text-contrast bg-bg-raised">
3-
<div class="relative">
4-
<img
5-
:alt="getFileName(screenshot.path)"
6-
:src="`data:image/png;base64,${screenshot.data}`"
7-
class="w-full h-auto object-contain"
8-
/>
9-
</div>
10-
<div class="p-4">
11-
<div class="flex items-center gap-2">
12-
<div class="font-medium truncate max-w-[calc(100%-120px)]">
13-
{{ getFileName(screenshot.path) }}
14-
</div>
15-
<div class="flex gap-1 ml-auto">
16-
<Button icon-only title="Rename" @click="renameScreenshot">
17-
<EditIcon/>
18-
</Button>
19-
<Button icon-only title="Copy" @click="copyImageToClipboard">
20-
<ClipboardCopyIcon/>
21-
</Button>
22-
<Button icon-only title="Share" @click="shareScreenshot">
23-
<ShareIcon/>
24-
</Button>
25-
<Button color="red" icon-only title="Delete" @click="deleteScreenshot">
26-
<TrashIcon/>
27-
</Button>
28-
</div>
29-
</div>
2+
<div class="group rounded-lg relative overflow-hidden shadow-md w-full text-contrast">
3+
<div
4+
class="absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10"
5+
>
6+
<Button icon-only title="Rename" @click="renameScreenshot">
7+
<EditIcon/>
8+
</Button>
9+
<Button icon-only title="Copy" @click="copyImageToClipboard">
10+
<ClipboardCopyIcon/>
11+
</Button>
12+
<Button icon-only title="Share" @click="shareScreenshot">
13+
<ShareIcon/>
14+
</Button>
15+
<Button color="red" icon-only title="Delete" @click="deleteScreenshot">
16+
<TrashIcon/>
17+
</Button>
3018
</div>
19+
20+
<img
21+
:alt="getFileName(screenshot.path)"
22+
:src="`data:image/png;base64,${screenshot.data}`"
23+
class="w-full h-full object-cover"
24+
/>
3125
</div>
3226
</template>
3327

apps/app-frontend/src/pages/instance/Screenshots.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const hasToday = computed(() => screenshotsByDate.value.some(([label]) => label
7575

7676
<div v-else class="space-y-8">
7777
<template v-if="!hasToday">
78-
<details class="group space-y-2" open>
78+
<details class="space-y-2" open>
7979
<summary class="cursor-pointer flex items-center justify-between">
8080
<h2
8181
class="text-xxl font-bold underline decoration-4 decoration-brand-green underline-offset-8"
@@ -91,7 +91,7 @@ const hasToday = computed(() => screenshotsByDate.value.some(([label]) => label
9191
</template>
9292

9393
<template v-for="[date, shots] in screenshotsByDate" :key="date">
94-
<details class="group space-y-2" open>
94+
<details class="space-y-2" open>
9595
<summary class="cursor-pointer flex items-center justify-between">
9696
<h2
9797
class="text-xxl font-bold underline decoration-4 decoration-brand-green underline-offset-8"

0 commit comments

Comments
 (0)