Skip to content

Commit 1a6bbb7

Browse files
committed
Merge branch 'main' into i18n/01-30
# Conflicts: # i18n/locales/zh-CN.json # lunaria/files/zh-CN.json
2 parents 26c32bd + 6361d3c commit 1a6bbb7

30 files changed

Lines changed: 1586 additions & 140 deletions

app/assets/main.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ button {
154154

155155
/* Skip link */
156156
.skip-link {
157-
position: absolute;
157+
position: fixed;
158158
top: -100%;
159159
left: 0;
160160
padding: 0.5rem 1rem;
@@ -165,6 +165,15 @@ button {
165165
transition: top 0.2s ease;
166166
}
167167

168+
html[dir='rtl'] .skip-link {
169+
left: unset;
170+
right: 0;
171+
}
172+
173+
.skip-link:hover {
174+
color: var(--bg);
175+
text-decoration: underline;
176+
}
168177
.skip-link:focus {
169178
top: 0;
170179
}

app/components/AccentColorPicker.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
import { useAccentColor } from '~/composables/useSettings'
33
44
const { accentColors, selectedAccentColor, setAccentColor } = useAccentColor()
5+
6+
onPrehydrate(el => {
7+
const settings = JSON.parse(localStorage.getItem('npmx-settings') || '{}')
8+
const id = settings.accentColorId
9+
if (id) {
10+
const input = el.querySelector<HTMLInputElement>(`input[value="${id}"]`)
11+
if (input) {
12+
input.checked = true
13+
}
14+
}
15+
})
516
</script>
617

718
<template>

app/components/OrgMembersPanel.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,7 @@ watch(lastExecutionTime, () => {
286286
</script>
287287

288288
<template>
289-
<section
290-
v-if="isConnected"
291-
aria-labelledby="members-heading"
292-
class="bg-bg-subtle border border-border rounded-lg overflow-hidden"
293-
>
289+
<section v-if="isConnected" class="bg-bg-subtle border border-border rounded-lg overflow-hidden">
294290
<!-- Header -->
295291
<div class="flex items-center justify-between p-4 border-b border-border">
296292
<h2 id="members-heading" class="font-mono text-sm font-medium flex items-center gap-2">

app/components/OrgTeamsPanel.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,7 @@ watch(lastExecutionTime, () => {
255255
</script>
256256

257257
<template>
258-
<section
259-
v-if="isConnected"
260-
aria-labelledby="teams-heading"
261-
class="bg-bg-subtle border border-border rounded-lg overflow-hidden"
262-
>
258+
<section v-if="isConnected" class="bg-bg-subtle border border-border rounded-lg overflow-hidden">
263259
<!-- Header -->
264260
<div class="flex items-center justify-start p-4 border-b border-border">
265261
<h2 id="teams-heading" class="font-mono text-sm font-medium flex items-center gap-2">

app/components/PackageAccessControls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ watch(
150150
</script>
151151

152152
<template>
153-
<section v-if="isConnected && orgName" aria-labelledby="access-heading">
153+
<section v-if="isConnected && orgName">
154154
<div class="flex items-center justify-between mb-3">
155155
<h2 id="access-heading" class="text-xs text-fg-subtle uppercase tracking-wider">
156156
{{ $t('package.access.title') }}

app/components/PackageDependencies.vue

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@ const sortedOptionalDependencies = computed(() => {
7070
<template>
7171
<div class="space-y-8">
7272
<!-- Dependencies -->
73-
<section
74-
id="dependencies"
75-
v-if="sortedDependencies.length > 0"
76-
aria-labelledby="dependencies-heading"
77-
class="scroll-mt-20"
78-
>
73+
<section id="dependencies" v-if="sortedDependencies.length > 0" class="scroll-mt-20">
7974
<h2
8075
id="dependencies-heading"
8176
class="group text-xs text-fg-subtle uppercase tracking-wider mb-3"
@@ -167,12 +162,7 @@ const sortedOptionalDependencies = computed(() => {
167162
</section>
168163

169164
<!-- Peer Dependencies -->
170-
<section
171-
id="peer-dependencies"
172-
v-if="sortedPeerDependencies.length > 0"
173-
aria-labelledby="peer-dependencies-heading"
174-
class="scroll-mt-20"
175-
>
165+
<section id="peer-dependencies" v-if="sortedPeerDependencies.length > 0" class="scroll-mt-20">
176166
<h2
177167
id="peer-dependencies-heading"
178168
class="group text-xs text-fg-subtle uppercase tracking-wider mb-3"
@@ -239,7 +229,6 @@ const sortedOptionalDependencies = computed(() => {
239229
<section
240230
id="optional-dependencies"
241231
v-if="sortedOptionalDependencies.length > 0"
242-
aria-labelledby="optional-dependencies-heading"
243232
class="scroll-mt-20"
244233
>
245234
<h2

app/components/PackageDeprecatedTree.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ function getDepthStyle(depth: DependencyDepth) {
4343
</script>
4444

4545
<template>
46-
<section
47-
v-if="status === 'success' && hasDeprecated"
48-
aria-labelledby="deprecated-tree-heading"
49-
class="relative"
50-
>
46+
<section v-if="status === 'success' && hasDeprecated" class="relative">
5147
<div class="rounded-lg border overflow-hidden" :class="bannerColor">
5248
<!-- Header -->
5349
<button

app/components/PackageDownloadAnalytics.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ const config = computed(() => {
597597
<select
598598
id="granularity"
599599
v-model="selectedGranularity"
600-
class="w-full bg-transparent font-mono text-sm text-fg outline-none appearance-none"
600+
class="w-full bg-bg-subtle font-mono text-sm text-fg outline-none appearance-none"
601601
>
602602
<option value="daily">{{ $t('package.downloads.granularity_daily') }}</option>
603603
<option value="weekly">{{ $t('package.downloads.granularity_weekly') }}</option>
@@ -624,7 +624,7 @@ const config = computed(() => {
624624
id="startDate"
625625
v-model="startDate"
626626
type="date"
627-
class="w-full min-w-0 bg-transparent font-mono text-sm text-fg outline-none [color-scheme:dark]"
627+
class="w-full min-w-0 bg-transparent font-mono text-sm text-fg outline-none [color-scheme:light] dark:[color-scheme:dark]"
628628
/>
629629
</div>
630630
</div>
@@ -644,7 +644,7 @@ const config = computed(() => {
644644
id="endDate"
645645
v-model="endDate"
646646
type="date"
647-
class="w-full min-w-0 bg-transparent font-mono text-sm text-fg outline-none [color-scheme:dark]"
647+
class="w-full min-w-0 bg-transparent font-mono text-sm text-fg outline-none [color-scheme:light] dark:[color-scheme:dark]"
648648
/>
649649
</div>
650650
</div>

app/components/PackageInstallScripts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const isExpanded = shallowRef(false)
1818
</script>
1919

2020
<template>
21-
<section aria-labelledby="install-scripts-heading">
21+
<section>
2222
<h2
2323
id="install-scripts-heading"
2424
class="text-xs text-fg-subtle uppercase tracking-wider mb-3 flex items-center gap-2"

app/components/PackageMaintainers.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,7 @@ watch(
168168
</script>
169169

170170
<template>
171-
<section
172-
id="maintainers"
173-
v-if="maintainers?.length"
174-
aria-labelledby="maintainers-heading"
175-
class="scroll-mt-20"
176-
>
171+
<section id="maintainers" v-if="maintainers?.length" class="scroll-mt-20">
177172
<h2 id="maintainers-heading" class="group text-xs text-fg-subtle uppercase tracking-wider mb-3">
178173
<a
179174
href="#maintainers"

0 commit comments

Comments
 (0)