enhance: db init

This commit is contained in:
Jacky 2025-05-06 22:40:29 +08:00
parent 1a21c8406a
commit 40e8d6c40a
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
7 changed files with 15 additions and 41 deletions

View file

@ -4,7 +4,6 @@ export interface InstallRequest {
email: string
username: string
password: string
database: string
}
export interface InstallLockResponse {

View file

@ -231,9 +231,8 @@ msgid "API Base Url"
msgstr "URL de base de l'API"
#: src/views/certificate/components/DNSChallenge.vue:83
#, fuzzy
msgid "API Document"
msgstr "Documentation API"
msgstr "Document API"
#: src/views/preference/tabs/OpenAISettings.vue:46
msgid "API Proxy"

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import install from '@/api/install'
import { DatabaseOutlined, LockOutlined, MailOutlined, UserOutlined } from '@ant-design/icons-vue'
import { LockOutlined, MailOutlined, UserOutlined } from '@ant-design/icons-vue'
import { Form, message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
@ -15,7 +15,6 @@ const modelRef = reactive({
email: '',
username: '',
password: '',
database: '',
})
const rulesRef = reactive({
@ -31,6 +30,10 @@ const rulesRef = reactive({
required: true,
message: () => $gettext('Please input your username!'),
},
{
max: 255,
message: () => $gettext('Username length cannot exceed 255 characters'),
},
],
password: [
{
@ -42,12 +45,6 @@ const rulesRef = reactive({
message: () => $gettext('Password length cannot exceed 20 characters'),
},
],
database: [
{
message: () =>
$gettext('The filename cannot contain the following characters: %{c}', { c: '& &quot; ? < > # {} % ~ / \\' }),
},
],
})
const { validate, validateInfos } = Form.useForm(modelRef, rulesRef)
@ -102,17 +99,6 @@ function onSubmit() {
</template>
</AInputPassword>
</AFormItem>
<AFormItem>
<AInput
v-bind="validateInfos.database"
v-model:value="modelRef.database"
:placeholder="$gettext('Database (Optional, default: database)')"
>
<template #prefix>
<DatabaseOutlined />
</template>
</AInput>
</AFormItem>
<AFormItem>
<AButton
type="primary"