Skip to content

Commit d9f13fe

Browse files
committed
fix: code page clean translation, comment cleanup, other fixes
1 parent dfd662e commit d9f13fe

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

app/components/Code/Header.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ useEventListener('keydown', (event: KeyboardEvent) => {
138138
<span class="text-fg-subtle">/</span>
139139
<span ref="pathDropdownButtonRef">
140140
<ButtonBase
141-
size="small"
141+
size="sm"
142142
class="px-2 mx-1"
143143
:aria-label="$t('code.open_path_dropdown')"
144144
:aria-expanded="isPathDropdownOpen"
@@ -178,13 +178,11 @@ useEventListener('keydown', (event: KeyboardEvent) => {
178178
aria-hidden="true"
179179
class="relative h-5 w-4 shrink-0"
180180
>
181+
<!-- add └ mark to better visualize nested folders) -->
181182
<template v-if="level === index">
182-
<!-- vertical: top of row down to vertical midpoint -->
183183
<span class="absolute top-0 bottom-1/2 left-2 w-px bg-fg-subtle/50" />
184-
<!-- horizontal: midpoint across to right edge of span -->
185184
<span class="absolute top-1/2 left-2 right-0 h-px bg-fg-subtle/50" />
186185
</template>
187-
<!-- intermediate levels: empty spacer (correct for └, not ├) -->
188186
</span>
189187
<span :class="{ 'pl-1': index > 0 }" class="min-w-0 break-all"
190188
>{{ crumb.name }}<span class="text-fg-subtle">/</span></span
@@ -229,7 +227,7 @@ useEventListener('keydown', (event: KeyboardEvent) => {
229227
v-if="selectedLines"
230228
class="py-1 px-3"
231229
:classicon="permalinkCopied ? 'i-lucide:check' : 'i-lucide:file-braces-corner'"
232-
:aria-label="$t('code.copy_selected')"
230+
:aria-label="$t('code.copy_link')"
233231
@click="copyPermalinkUrl"
234232
/>
235233
<ButtonBase

app/composables/useSettings.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ export function useCodeContainer() {
243243
const { settings } = useSettings()
244244
const isMounted = useMounted()
245245

246-
// Gate behind isMounted so SSR and initial client render both produce `false`,
247-
// eliminating the hydration mismatch. After mount, isMounted flips to true which
248-
// IS a reactive change, so Vue patches the class correctly from localStorage.
249246
const codeContainerFull = computed(() => isMounted.value && settings.value.codeContainerFull)
250247

251248
function toggleCodeContainer() {

i18n/locales/en.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,14 +814,11 @@
814814
"code": {
815815
"files_label": "Files",
816816
"no_files": "No files in this directory",
817-
"root": "root",
818817
"lines": "{count} line | {count} lines",
819818
"toggle_tree": "Toggle file tree",
820819
"close_tree": "Close file tree",
821820
"copy_content": "Copy file content",
822821
"copy_link": "Copy link",
823-
"copy_selected": "Copy link to selected lines",
824-
"raw": "Raw",
825822
"view_raw": "View raw file",
826823
"toggle_container": "Toggle code container width",
827824
"open_path_dropdown": "Open path segments dropdown",

0 commit comments

Comments
 (0)