@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.
@@ -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
@@ -11,6 +11,7 @@ function key(over: Partial<PublicApiKey> = {}): PublicApiKey {
11
11
  workspaceId: 'ws1',
12
12
  label: 'CI',
13
13
  scope: 'write',
14
+ createdByUserId: null,
14
15
  createdAt: 1,
15
16
  lastUsedAt: null,
16
17
  revokedAt: null,
@@ -534,6 +534,8 @@
534
534
  "created": "Erstellt am {date}",
535
535
  "lastUsed": "zuletzt verwendet am {date}",
536
536
  "neverUsed": "nie verwendet",
537
+ "createdBy": "erstellt von {user}",
538
+ "createdByYou": "Ihnen",
537
539
  "revoke": "Token widerrufen"
538
540
  },
539
541
  "add": {
@@ -2483,6 +2483,8 @@
2483
2483
  "created": "Created {date}",
2484
2484
  "lastUsed": "last used {date}",
2485
2485
  "neverUsed": "never used",
2486
+ "createdBy": "created by {user}",
2487
+ "createdByYou": "you",
2486
2488
  "revoke": "Revoke token"
2487
2489
  },
2488
2490
  "add": {
@@ -2298,6 +2298,8 @@
2298
2298
  "created": "Creado el {date}",
2299
2299
  "lastUsed": "usado por última vez el {date}",
2300
2300
  "neverUsed": "nunca usado",
2301
+ "createdBy": "creado por {user}",
2302
+ "createdByYou": "ti",
2301
2303
  "revoke": "Revocar token"
2302
2304
  },
2303
2305
  "add": {
@@ -2298,6 +2298,8 @@
2298
2298
  "created": "Créé le {date}",
2299
2299
  "lastUsed": "dernière utilisation le {date}",
2300
2300
  "neverUsed": "jamais utilisé",
2301
+ "createdBy": "créé par {user}",
2302
+ "createdByYou": "vous",
2301
2303
  "revoke": "Révoquer le jeton"
2302
2304
  },
2303
2305
  "add": {
@@ -2419,6 +2419,8 @@
2419
2419
  "created": "נוצר בתאריך {date}",
2420
2420
  "lastUsed": "שימוש אחרון בתאריך {date}",
2421
2421
  "neverUsed": "מעולם לא היה בשימוש",
2422
+ "createdBy": "נוצר על ידי {user}",
2423
+ "createdByYou": "אתה",
2422
2424
  "revoke": "בטל אסימון"
2423
2425
  },
2424
2426
  "add": {
@@ -534,6 +534,8 @@
534
534
  "created": "Creato il {date}",
535
535
  "lastUsed": "ultimo utilizzo il {date}",
536
536
  "neverUsed": "mai utilizzato",
537
+ "createdBy": "creato da {user}",
538
+ "createdByYou": "te",
537
539
  "revoke": "Revoca token"
538
540
  },
539
541
  "add": {
@@ -2420,6 +2420,8 @@
2420
2420
  "created": "{date} に作成",
2421
2421
  "lastUsed": "最終使用 {date}",
2422
2422
  "neverUsed": "未使用",
2423
+ "createdBy": "作成者: {user}",
2424
+ "createdByYou": "あなた",
2423
2425
  "revoke": "トークンを取り消す"
2424
2426
  },
2425
2427
  "add": {
@@ -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": {
@@ -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": {
@@ -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.128.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.0"
37
+ "@cat-factory/contracts": "0.147.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@toad-contracts/testing": "0.3.2",