@cat-factory/app 0.51.0 → 0.51.1

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.
@@ -1,22 +1,26 @@
1
1
  <script setup lang="ts">
2
- import { computed, ref, watch } from 'vue'
2
+ import { useLocalStorage } from '@vueuse/core'
3
+ import { computed } from 'vue'
3
4
 
4
5
  // Shown whenever the active locale is NOT English: the non-English catalogs are
5
6
  // community/AI-provided and may be inaccurate, so warn the user and point them at the
6
7
  // repository to report mistakes or open a fix PR. Rendered as a slim full-width strip at
7
8
  // the very top (distinct from the centered config-warning cards below it, so they don't
8
- // overlap). Dismissible per session; re-appears the next time the user switches locale.
9
+ // overlap). Dismissal is persisted per-locale in localStorage: once dismissed for a locale
10
+ // it stays hidden across reloads, but switching to a different (separately-translated)
11
+ // locale shows it again, since that catalog is a fresh, independently-translated context.
9
12
  const REPO_URL = 'https://github.com/kibertoad/cat-factory'
10
13
 
11
14
  const { t, locale } = useI18n()
12
15
 
13
- const dismissed = ref(false)
14
- const show = computed(() => locale.value !== 'en' && !dismissed.value)
16
+ const dismissedLocales = useLocalStorage<string[]>('cat-factory:translation-warning-dismissed', [])
17
+ const show = computed(() => locale.value !== 'en' && !dismissedLocales.value.includes(locale.value))
15
18
 
16
- // A fresh switch is a new context for the warning, so un-dismiss on every locale change.
17
- watch(locale, () => {
18
- dismissed.value = false
19
- })
19
+ function dismiss() {
20
+ if (!dismissedLocales.value.includes(locale.value)) {
21
+ dismissedLocales.value = [...dismissedLocales.value, locale.value]
22
+ }
23
+ }
20
24
  </script>
21
25
 
22
26
  <template>
@@ -51,7 +55,7 @@ watch(locale, () => {
51
55
  size="xs"
52
56
  icon="i-lucide-x"
53
57
  :aria-label="t('language.warning.dismiss')"
54
- @click="dismissed = true"
58
+ @click="dismiss"
55
59
  />
56
60
  </div>
57
61
  </Transition>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/app",
3
- "version": "0.51.0",
3
+ "version": "0.51.1",
4
4
  "description": "Reusable Nuxt layer for the Agent Architecture Board SPA (components, stores, composables, pages). Consume it from a thin deployment app via `extends: ['@cat-factory/app']` and point it at your backend with NUXT_PUBLIC_API_BASE. See deploy/frontend for an example.",
5
5
  "repository": {
6
6
  "type": "git",