Skip to content

Commit ca555b5

Browse files
feat(client): improve ui of assets page (#189)
1 parent d50877a commit ca555b5

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

packages/client/src/assets/styles/main.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,15 @@ body::-webkit-scrollbar {
152152
/* Support Firefox */
153153
scrollbar-width: none;
154154
}
155+
156+
/* Shikiji */
157+
/* refer: https://shikiji.netlify.app/guide/dual-themes#class-based-dark-mode */
158+
html.dark .shiki,
159+
html.dark .shiki span {
160+
color: var(--shiki-dark) !important;
161+
background-color: var(--shiki-dark-bg) !important;
162+
/* Optional, if you also want font styles */
163+
font-style: var(--shiki-dark-font-style) !important;
164+
font-weight: var(--shiki-dark-font-weight) !important;
165+
text-decoration: var(--shiki-dark-text-decoration) !important;
166+
}

packages/client/src/components/assets/AssetDetails.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const supportsPreview = computed(() => {
159159
icon="i-carbon-copy"
160160
action mr1 mt--2px flex-none
161161
:border="false"
162-
@click="copy(asset.publicPath, { silent: false, type: 'assets-public-path' })"
162+
@click="copy(asset.publicPath, { type: 'assets-public-path' })"
163163
/>
164164
<RouterLink
165165
:to="asset.publicPath"

packages/client/src/components/assets/FilepathItem.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script setup lang="ts">
2+
import { VTooltip as vTooltip } from '@vue/devtools-ui'
3+
24
const props = defineProps<{
35
filepath: string
46
lineBreak?: boolean
@@ -7,13 +9,15 @@ const props = defineProps<{
79
810
const parsed = computed(() => ({ path: props.filepath }),
911
)
12+
13+
const { copy } = useCopy()
1014
</script>
1115

1216
<template>
1317
<button
14-
font-mono hover:underline
18+
v-tooltip="'Copy file path'" font-mono hover:underline
1519
:class="lineBreak ? '' : 'ws-nowrap of-hidden truncate'"
16-
:title="filepath"
20+
:title="filepath" @click="copy(filepath)"
1721
>
1822
{{ parsed.path }}
1923
</button>

0 commit comments

Comments
 (0)