@cat-factory/app 0.128.0 → 0.129.0
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/app/components/settings/ApiTokensPanel.vue +18 -0
- package/app/stores/publicApiKeys.spec.ts +1 -0
- package/i18n/locales/de.json +2 -0
- package/i18n/locales/en.json +2 -0
- package/i18n/locales/es.json +2 -0
- package/i18n/locales/fr.json +2 -0
- package/i18n/locales/he.json +2 -0
- package/i18n/locales/it.json +2 -0
- package/i18n/locales/ja.json +2 -0
- package/i18n/locales/pl.json +2 -0
- package/i18n/locales/tr.json +2 -0
- package/i18n/locales/uk.json +2 -0
- package/package.json +2 -2
|
@@ -30,7 +30,21 @@ function scopeLabel(scope: PublicApiScope): string {
|
|
|
30
30
|
|
|
31
31
|
const scopeItems = computed(() => SCOPES.map((value) => ({ value, label: scopeLabel(value) })))
|
|
32
32
|
const ui = useUiStore()
|
|
33
|
+
const auth = useAuthStore()
|
|
33
34
|
const store = usePublicApiKeysStore()
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The minter to attribute a key to. `null` when the key predates the audit column (or was
|
|
38
|
+
* minted with no session), so the row simply omits the segment. When the minter is the
|
|
39
|
+
* signed-in user we show a localized "you"; otherwise the raw `usr_*` id (the list has no
|
|
40
|
+
* user-name lookup — the audit id is the honest, non-misleading thing to show).
|
|
41
|
+
*/
|
|
42
|
+
function minterLabel(key: PublicApiKey): string | null {
|
|
43
|
+
if (!key.createdByUserId) return null
|
|
44
|
+
return key.createdByUserId === auth.user?.id
|
|
45
|
+
? t('settings.apiTokens.list.createdByYou')
|
|
46
|
+
: key.createdByUserId
|
|
47
|
+
}
|
|
34
48
|
const toast = useToast()
|
|
35
49
|
const { confirmAction, toastDone } = useConfirmAction()
|
|
36
50
|
|
|
@@ -191,6 +205,10 @@ async function revokeToken(key: PublicApiKey) {
|
|
|
191
205
|
})
|
|
192
206
|
}}</template>
|
|
193
207
|
<template v-else>{{ t('settings.apiTokens.list.neverUsed') }}</template>
|
|
208
|
+
<template v-if="minterLabel(key)">
|
|
209
|
+
<span aria-hidden="true"> · </span>
|
|
210
|
+
{{ t('settings.apiTokens.list.createdBy', { user: minterLabel(key) }) }}
|
|
211
|
+
</template>
|
|
194
212
|
</div>
|
|
195
213
|
</div>
|
|
196
214
|
<UButton
|
package/i18n/locales/de.json
CHANGED
package/i18n/locales/en.json
CHANGED
package/i18n/locales/es.json
CHANGED
package/i18n/locales/fr.json
CHANGED
package/i18n/locales/he.json
CHANGED
package/i18n/locales/it.json
CHANGED
package/i18n/locales/ja.json
CHANGED
package/i18n/locales/pl.json
CHANGED
|
@@ -2298,6 +2298,8 @@
|
|
|
2298
2298
|
"created": "Utworzono {date}",
|
|
2299
2299
|
"lastUsed": "ostatnio użyto {date}",
|
|
2300
2300
|
"neverUsed": "nigdy nie użyto",
|
|
2301
|
+
"createdBy": "utworzone przez {user}",
|
|
2302
|
+
"createdByYou": "Ciebie",
|
|
2301
2303
|
"revoke": "Unieważnij token"
|
|
2302
2304
|
},
|
|
2303
2305
|
"add": {
|
package/i18n/locales/tr.json
CHANGED
|
@@ -2420,6 +2420,8 @@
|
|
|
2420
2420
|
"created": "{date} tarihinde oluşturuldu",
|
|
2421
2421
|
"lastUsed": "son kullanım {date}",
|
|
2422
2422
|
"neverUsed": "hiç kullanılmadı",
|
|
2423
|
+
"createdBy": "oluşturan: {user}",
|
|
2424
|
+
"createdByYou": "siz",
|
|
2423
2425
|
"revoke": "Belirteci iptal et"
|
|
2424
2426
|
},
|
|
2425
2427
|
"add": {
|
package/i18n/locales/uk.json
CHANGED
|
@@ -2298,6 +2298,8 @@
|
|
|
2298
2298
|
"created": "Створено {date}",
|
|
2299
2299
|
"lastUsed": "востаннє використано {date}",
|
|
2300
2300
|
"neverUsed": "ніколи не використовувався",
|
|
2301
|
+
"createdBy": "створено {user}",
|
|
2302
|
+
"createdByYou": "вами",
|
|
2301
2303
|
"revoke": "Відкликати токен"
|
|
2302
2304
|
},
|
|
2303
2305
|
"add": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.129.0",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"valibot": "^1.4.2",
|
|
35
35
|
"vue": "3.5.39",
|
|
36
36
|
"wretch": "^3.0.9",
|
|
37
|
-
"@cat-factory/contracts": "0.147.
|
|
37
|
+
"@cat-factory/contracts": "0.147.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@toad-contracts/testing": "0.3.2",
|