feat: 保存并显示OAuth账号邮箱地址

This commit is contained in:
shaw
2026-01-23 15:17:47 +08:00
parent d27b847442
commit f9ab1daa3c
4 changed files with 27 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ export interface OAuthState {
export interface TokenInfo {
org_uuid?: string
account_uuid?: string
email_address?: string
[key: string]: unknown
}
@@ -160,6 +161,9 @@ export function useAccountOAuth() {
if (tokenInfo.account_uuid) {
extra.account_uuid = tokenInfo.account_uuid
}
if (tokenInfo.email_address) {
extra.email_address = tokenInfo.email_address
}
return Object.keys(extra).length > 0 ? extra : undefined
}

View File

@@ -113,8 +113,17 @@
<template #cell-select="{ row }">
<input type="checkbox" :checked="selIds.includes(row.id)" @change="toggleSel(row.id)" class="rounded border-gray-300 text-primary-600 focus:ring-primary-500" />
</template>
<template #cell-name="{ value }">
<span class="font-medium text-gray-900 dark:text-white">{{ value }}</span>
<template #cell-name="{ row, value }">
<div class="flex flex-col">
<span class="font-medium text-gray-900 dark:text-white">{{ value }}</span>
<span
v-if="row.extra?.email_address"
class="text-xs text-gray-500 dark:text-gray-400 truncate max-w-[200px]"
:title="row.extra.email_address"
>
{{ row.extra.email_address }}
</span>
</div>
</template>
<template #cell-notes="{ value }">
<span v-if="value" :title="value" class="block max-w-xs truncate text-sm text-gray-600 dark:text-gray-300">{{ value }}</span>