i18n-dashboard 0.15.2 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nuxt.config.ts CHANGED
@@ -15,10 +15,6 @@ export default defineNuxtConfig({
15
15
  compatibilityDate: '2025-01-01',
16
16
  devtools: { enabled: false },
17
17
 
18
- app: {
19
- pageTransition: { name: 'page', mode: 'out-in' },
20
- },
21
-
22
18
  srcDir: 'src',
23
19
  serverDir: 'src/server',
24
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-dashboard",
3
- "version": "0.15.2",
3
+ "version": "0.15.3",
4
4
  "description": "A web dashboard to manage vue-i18n translation keys with database persistence",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,21 +1,3 @@
1
1
  @import "tailwindcss";
2
2
  @import "@nuxt/ui";
3
3
 
4
- /* ── Page transitions ─────────────────────────────────────────────────────── */
5
- .page-enter-active {
6
- transition: opacity 0.18s ease, transform 0.18s ease;
7
- }
8
-
9
- .page-leave-active {
10
- transition: opacity 0.12s ease, transform 0.12s ease;
11
- }
12
-
13
- .page-enter-from {
14
- opacity: 0;
15
- transform: translateY(8px);
16
- }
17
-
18
- .page-leave-to {
19
- opacity: 0;
20
- transform: translateY(-4px);
21
- }
@@ -1,5 +1,31 @@
1
1
  <template>
2
2
  <div class="min-h-screen bg-gradient-to-br from-primary-50 to-primary-100 dark:from-gray-950 dark:to-gray-900 flex items-center justify-center p-4">
3
+ <Transition name="auth-overlay">
4
+ <div
5
+ v-if="isLoading"
6
+ class="fixed inset-0 z-50 flex items-center justify-center bg-white/60 dark:bg-gray-950/60 backdrop-blur-sm"
7
+ >
8
+ <UIcon
9
+ name="i-heroicons-arrow-path"
10
+ class="text-4xl text-primary-500 animate-spin"
11
+ />
12
+ </div>
13
+ </Transition>
3
14
  <slot />
4
15
  </div>
5
16
  </template>
17
+
18
+ <script setup lang="ts">
19
+ const { isLoading } = useLoadingIndicator()
20
+ </script>
21
+
22
+ <style scoped>
23
+ .auth-overlay-enter-active,
24
+ .auth-overlay-leave-active {
25
+ transition: opacity 0.15s ease;
26
+ }
27
+ .auth-overlay-enter-from,
28
+ .auth-overlay-leave-to {
29
+ opacity: 0;
30
+ }
31
+ </style>
@@ -1,9 +1,17 @@
1
- export default defineNuxtRouteMiddleware(async (to) => {
1
+ export default defineNuxtRouteMiddleware(async (to, from) => {
2
2
  // Skip on SSR — auth checks run client-side only so Cypress intercepts apply.
3
3
  // useFetch does not properly block in client-side route middleware (it resolves
4
4
  // immediately with data = null). Use $fetch which is truly awaitable.
5
5
  if (import.meta.server) return
6
6
 
7
+ const publicPages = ['/login', '/forgot-password', '/reset-password']
8
+
9
+ // Skip the status fetch when navigating between public pages — no auth check needed
10
+ // and avoids a blank-screen flash caused by out-in page transitions waiting on the fetch.
11
+ if (publicPages.includes(to.path) && from && publicPages.includes(from.path)) {
12
+ return
13
+ }
14
+
7
15
  let status: {
8
16
  isLoggedIn: boolean
9
17
  hasUsers: boolean
@@ -36,7 +44,6 @@ export default defineNuxtRouteMiddleware(async (to) => {
36
44
  }
37
45
 
38
46
  // Non connecté → login (sauf si déjà sur /login ou pages publiques)
39
- const publicPages = ['/login', '/forgot-password', '/reset-password']
40
47
  if (!status.isLoggedIn) {
41
48
  if (!publicPages.includes(to.path)) return navigateTo('/login')
42
49
  return
@@ -24,17 +24,26 @@
24
24
  <UCard class="mb-6 max-w-2xl">
25
25
  <template #header>
26
26
  <div class="flex items-center gap-2">
27
- <UIcon class="text-primary-500" name="i-heroicons-cog-6-tooth" />
27
+ <UIcon
28
+ class="text-primary-500"
29
+ name="i-heroicons-cog-6-tooth"
30
+ />
28
31
  <h2 class="font-semibold text-gray-900 dark:text-white">
29
32
  {{ t('logs.settings_title', 'Auto-purge settings') }}
30
33
  </h2>
31
34
  </div>
32
35
  </template>
33
- <div v-if="settingsPending" class="space-y-3">
36
+ <div
37
+ v-if="settingsPending"
38
+ class="space-y-3"
39
+ >
34
40
  <USkeleton class="h-8" />
35
41
  <USkeleton class="h-8" />
36
42
  </div>
37
- <div v-else class="space-y-4">
43
+ <div
44
+ v-else
45
+ class="space-y-4"
46
+ >
38
47
  <UFormField :label="t('logs.retention_days_label', 'Retain logs for (days)')">
39
48
  <UInput
40
49
  v-model="retentionDays"
@@ -96,7 +105,10 @@
96
105
  v-if="!pending && !data?.data?.length"
97
106
  class="bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 py-16 text-center"
98
107
  >
99
- <UIcon name="i-heroicons-check-circle" class="text-5xl text-green-400 mb-3" />
108
+ <UIcon
109
+ name="i-heroicons-check-circle"
110
+ class="text-5xl text-green-400 mb-3"
111
+ />
100
112
  <p class="text-gray-500 font-medium">
101
113
  {{ t('logs.empty', 'No logs found') }}
102
114
  </p>
@@ -108,8 +120,15 @@
108
120
  class="bg-white dark:bg-gray-900 rounded-xl border border-gray-200 dark:border-gray-800 overflow-hidden"
109
121
  >
110
122
  <!-- Loading -->
111
- <div v-if="pending" class="space-y-0">
112
- <div v-for="i in 8" :key="i" class="px-4 py-3 border-b border-gray-100 dark:border-gray-800 last:border-0">
123
+ <div
124
+ v-if="pending"
125
+ class="space-y-0"
126
+ >
127
+ <div
128
+ v-for="i in 8"
129
+ :key="i"
130
+ class="px-4 py-3 border-b border-gray-100 dark:border-gray-800 last:border-0"
131
+ >
113
132
  <USkeleton class="h-4 w-full" />
114
133
  </div>
115
134
  </div>
@@ -138,7 +157,10 @@
138
157
  <p class="text-sm text-gray-700 dark:text-gray-300">
139
158
  {{ log.message }}
140
159
  </p>
141
- <details v-if="log.details" class="mt-1">
160
+ <details
161
+ v-if="log.details"
162
+ class="mt-1"
163
+ >
142
164
  <summary class="text-xs text-gray-400 cursor-pointer hover:text-gray-600">
143
165
  {{ t('logs.show_details', 'Details') }}
144
166
  </summary>
@@ -151,7 +173,10 @@
151
173
  </div>
152
174
 
153
175
  <!-- Pagination -->
154
- <div v-if="(data?.total || 0) > limit" class="flex justify-center mt-5">
176
+ <div
177
+ v-if="(data?.total || 0) > limit"
178
+ class="flex justify-center mt-5"
179
+ >
155
180
  <UPagination
156
181
  v-model:page="page"
157
182
  :total="data?.total || 0"