feat(flow): auto-resolve authentik sub and improve admin dropdown UX
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
|
||||
<el-dialog v-model="showCreateDialog" title="新增會員" @close="resetCreateForm">
|
||||
<el-form ref="createFormRef" :model="createForm" :rules="createRules" label-width="120px">
|
||||
<el-form-item label="Authentik Sub" prop="authentik_sub"><el-input v-model="createForm.authentik_sub" /></el-form-item>
|
||||
<el-form-item label="Email" prop="email"><el-input v-model="createForm.email" /></el-form-item>
|
||||
<el-form-item label="顯示名稱" prop="display_name"><el-input v-model="createForm.display_name" /></el-form-item>
|
||||
<el-form-item label="啟用"><el-switch v-model="createForm.is_active" /></el-form-item>
|
||||
@@ -71,14 +70,13 @@ const showCreateDialog = ref(false)
|
||||
const createFormRef = ref()
|
||||
const creating = ref(false)
|
||||
const createForm = ref({
|
||||
authentik_sub: '',
|
||||
email: '',
|
||||
display_name: '',
|
||||
is_active: true,
|
||||
sync_to_authentik: true
|
||||
})
|
||||
const createRules = {
|
||||
authentik_sub: [{ required: true, message: '請輸入 Authentik Sub', trigger: 'blur' }]
|
||||
email: [{ required: true, message: '請輸入 Email', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const showEditDialog = ref(false)
|
||||
@@ -107,7 +105,6 @@ async function load() {
|
||||
|
||||
function resetCreateForm() {
|
||||
createForm.value = {
|
||||
authentik_sub: '',
|
||||
email: '',
|
||||
display_name: '',
|
||||
is_active: true,
|
||||
|
||||
Reference in New Issue
Block a user