Skip to content

Commit e61ab49

Browse files
committed
fix: translation status css fixes, add mobile menu link
1 parent befbb97 commit e61ab49

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed

app/components/AppHeader.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
8484
external: false,
8585
iconClass: 'i-custom:a11y',
8686
},
87+
{
88+
name: 'Translation Status',
89+
label: $t('translation_status.title'),
90+
to: { name: 'translation-status' },
91+
type: 'link',
92+
external: false,
93+
iconClass: 'i-lucide:languages',
94+
},
8795
],
8896
},
8997
{

app/pages/translation-status.vue

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ ${template}`
141141
:lang="localeEntry.lang"
142142
:dir="localeEntry.dir === 'rtl' ? 'rtl' : 'auto'"
143143
>
144-
<summary class="list-none cursor-pointer select-none">
144+
<summary class="max-w-full list-none cursor-pointer select-none">
145145
<span class="flex flex-col gap-2">
146146
<span class="flex items-center justify-between">
147147
<span class="flex items-center gap-2">
@@ -180,32 +180,34 @@ ${template}`
180180
</span>
181181
</summary>
182182

183-
<div class="ps-6 mt-4">
184-
<div v-if="localeEntry.missingKeys.length > 0">
185-
<div class="flex items-center justify-between mb-2">
186-
<h4 class="text-sm font-medium text-fg mb-1">
183+
<div class="ps-6 max-md:ps-3 mt-6">
184+
<template v-if="localeEntry.missingKeys.length > 0">
185+
<div class="flex items-center justify-between mb-3">
186+
<h4 class="text-sm font-medium text-fg my-0">
187187
{{ $t('translation_status.missing_keys', {}, { locale: localeEntry.lang }) }}
188188
</h4>
189-
<ButtonBase type="button" size="medium" @click="copyMissingKeys(localeEntry)">
189+
<ButtonBase type="button" size="small" @click="copyMissingKeys(localeEntry)">
190190
{{
191191
copied
192192
? $t('common.copied', {}, { locale: localeEntry.lang })
193193
: $t('i18n.copy_keys', {}, { locale: localeEntry.lang })
194194
}}
195195
</ButtonBase>
196196
</div>
197-
<ul
198-
class="space-y-1 text-xs font-mono bg-bg rounded-md p-2 max-h-64 overflow-y-auto mt-0"
199-
>
200-
<li
201-
v-for="key in localeEntry.missingKeys"
202-
:key="key"
203-
class="text-fg-muted truncate"
204-
:title="key"
197+
<div class="max-w-full">
198+
<ul
199+
class="text-xs font-mono bg-bg rounded-md max-h-64 overflow-y-auto overflow-x-auto space-y-1 p-2 mt-0"
205200
>
206-
{{ key }}
207-
</li>
208-
</ul>
201+
<li
202+
v-for="key in localeEntry.missingKeys"
203+
:key="key"
204+
class="text-fg-muted break-all whitespace-normal border-b border-border/10 last:border-0 pb-1"
205+
:title="key"
206+
>
207+
{{ key }}
208+
</li>
209+
</ul>
210+
</div>
209211
<div class="mt-4">
210212
<LinkBase
211213
:to="localeEntry.githubEditUrl"
@@ -215,10 +217,10 @@ ${template}`
215217
{{ $t('i18n.edit_on_github', {}, { locale: localeEntry.lang }) }}
216218
</LinkBase>
217219
</div>
218-
</div>
220+
</template>
219221
<div
220222
v-else
221-
class="p-4 rounded bg-green-50 dark:bg-green-900/10 border border-green-200 dark:border-green-900/30 text-green-800 dark:text-green-200 flex items-center gap-2"
223+
class="p-4 rounded bg-green-50 dark:bg-green-900/10 border border-green-200 dark:border-green-900/30 text-green-800 dark:text-green-200 flex items-start gap-2"
222224
>
223225
<span>{{
224226
$t('translation_status.complete_text', {}, { locale: localeEntry.lang })

lunaria/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ const ProgressBar = (percentComplete: number): string => {
182182
}
183183

184184
const Link = (href: string, text: string): string => {
185-
return html`<a href="${href}" target="_blank">${text}</a>`
185+
return html`<a href="${href}" target="_blank" rel="noopener noreferrer">${text}</a>`
186186
}
187187

188188
const TitleParagraph = html`

0 commit comments

Comments
 (0)