feat: |Admin Portal| optimized UI (#632)

This commit is contained in:
Dream Hunter
2025-04-12 20:24:11 +08:00
committed by GitHub
parent 26995982af
commit ce0a10e6de
4 changed files with 28 additions and 12 deletions

View File

@@ -212,7 +212,8 @@ const columns = [
}
},
{ default: () => t('viewMails') }
)
),
show: row.mail_count > 0
},
{
label: () => h(NButton,
@@ -224,7 +225,8 @@ const columns = [
}
},
{ default: () => t('viewSendBox') }
)
),
show: row.send_count > 0
},
{
label: () => h(NButton,

View File

@@ -36,7 +36,7 @@ const { t } = useI18n({
prefix: 'Prefix',
domains: 'Domains',
roleDonotExist: 'Current Role does not exist',
userAddressManagement: 'User Address Management',
userAddressManagement: 'Address Management',
},
zh: {
success: '成功',
@@ -59,7 +59,7 @@ const { t } = useI18n({
prefix: '前缀',
domains: '域名',
roleDonotExist: '当前角色不存在',
userAddressManagement: '用户地址管理',
userAddressManagement: '地址管理',
}
}
});
@@ -219,12 +219,25 @@ const columns = [
title: t('address_count'),
key: "address_count",
render(row) {
return h(NBadge, {
value: row.address_count,
'show-zero': true,
max: 99,
type: "success"
})
return h(NButton,
{
text: true,
onClick: () => {
if (row.address_count <= 0) return;
curUserId.value = row.id;
showUserAddressManagement.value = true;
}
},
{
icon: () => h(NBadge, {
value: row.address_count,
'show-zero': true,
max: 99,
type: "success"
}),
default: () => row.address_count > 0 ? t('userAddressManagement') : ""
}
)
}
},
{
@@ -255,6 +268,7 @@ const columns = [
},
{ default: () => t('userAddressManagement') }
),
show: row.address_count > 0
},
{
label: () => h(NButton,

View File

@@ -74,7 +74,7 @@ const deleteAccount = async () => {
<n-modal v-model:show="showLogout" preset="dialog" :title="t('logout')">
<p>{{ t('logoutConfirm') }}</p>
<template #action>
<n-button :loading="loading" @click="logout" size="small" tertiary type="primary">
<n-button :loading="loading" @click="logout" size="small" tertiary type="warning">
{{ t('logout') }}
</n-button>
</template>

View File

@@ -232,7 +232,7 @@ const renamePasskey = async () => {
<n-modal v-model:show="showLogout" preset="dialog" :title="t('logout')">
<p>{{ t('logoutConfirm') }}</p>
<template #action>
<n-button :loading="loading" @click="logout" size="small" tertiary type="primary">
<n-button :loading="loading" @click="logout" size="small" tertiary type="warning">
{{ t('logout') }}
</n-button>
</template>