feat(flow): auto-resolve authentik sub and improve admin dropdown UX

This commit is contained in:
Chris
2026-03-30 03:33:50 +08:00
parent 0582b00f5f
commit 5dd759d2cb
4 changed files with 32 additions and 13 deletions

View File

@@ -199,7 +199,9 @@ const grantModuleOptions = computed(() => {
return modules.value
.filter(m => m.system_key === grantForm.system && !m.module_key.endsWith('.__system__'))
.map(m => ({
value: m.module_key.split('.', 2)[1] || m.module_key,
value: m.module_key.startsWith(`${grantForm.system}.`)
? m.module_key.slice(grantForm.system.length + 1)
: m.module_key,
label: `${m.name} (${m.module_key})`
}))
})
@@ -268,7 +270,9 @@ const revokeModuleOptions = computed(() => {
return modules.value
.filter(m => m.system_key === revokeForm.system && !m.module_key.endsWith('.__system__'))
.map(m => ({
value: m.module_key.split('.', 2)[1] || m.module_key,
value: m.module_key.startsWith(`${revokeForm.system}.`)
? m.module_key.slice(revokeForm.system.length + 1)
: m.module_key,
label: `${m.name} (${m.module_key})`
}))
})