简化应用安装界面
This commit is contained in:
parent
ee9fa7e20a
commit
ad5129497e
@ -68,16 +68,6 @@
|
|||||||
</n-alert>
|
</n-alert>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="app-name-input" v-if="fileList.length > 0">
|
|
||||||
<n-form-item :label="t('App Name (Optional)')">
|
|
||||||
<n-input
|
|
||||||
v-model:value="appName"
|
|
||||||
:placeholder="t('Leave empty to auto-detect from package')"
|
|
||||||
:disabled="uploading"
|
|
||||||
/>
|
|
||||||
</n-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="upload-actions" v-if="fileList.length > 0">
|
<div class="upload-actions" v-if="fileList.length > 0">
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-button @click="clearFiles" :disabled="uploading">
|
<n-button @click="clearFiles" :disabled="uploading">
|
||||||
@ -134,7 +124,7 @@
|
|||||||
import { ref, onMounted, h } from 'vue'
|
import { ref, onMounted, h } from 'vue'
|
||||||
import {
|
import {
|
||||||
NIcon, NButton, NSpace, NCard, NUpload, NUploadDragger, NText, NP,
|
NIcon, NButton, NSpace, NCard, NUpload, NUploadDragger, NText, NP,
|
||||||
NFormItem, NInput, NModal, NProgress, NDataTable, useMessage, NAlert,
|
NModal, NProgress, NDataTable, useMessage, NAlert,
|
||||||
type UploadFileInfo, type DataTableColumns
|
type UploadFileInfo, type DataTableColumns
|
||||||
} from 'naive-ui'
|
} from 'naive-ui'
|
||||||
import { Icon } from '@iconify/vue'
|
import { Icon } from '@iconify/vue'
|
||||||
@ -144,7 +134,6 @@ import { get_session_api_headers } from '@/shared/api/auth'
|
|||||||
import { t } from '@/shared/i18n'
|
import { t } from '@/shared/i18n'
|
||||||
|
|
||||||
const fileList = ref<UploadFileInfo[]>([])
|
const fileList = ref<UploadFileInfo[]>([])
|
||||||
const appName = ref('')
|
|
||||||
const uploading = ref(false)
|
const uploading = ref(false)
|
||||||
const installing = ref(false)
|
const installing = ref(false)
|
||||||
const installProgress = ref(0)
|
const installProgress = ref(0)
|
||||||
@ -249,9 +238,6 @@ const startUpload = async () => {
|
|||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', file)
|
formData.append('file', file)
|
||||||
if (appName.value.trim()) {
|
|
||||||
formData.append('app_name', appName.value.trim())
|
|
||||||
}
|
|
||||||
|
|
||||||
installProgress.value = 30
|
installProgress.value = 30
|
||||||
installMessage.value = t('Uploading file...')
|
installMessage.value = t('Uploading file...')
|
||||||
@ -300,7 +286,6 @@ const startUpload = async () => {
|
|||||||
|
|
||||||
const clearFiles = () => {
|
const clearFiles = () => {
|
||||||
fileList.value = []
|
fileList.value = []
|
||||||
appName.value = ''
|
|
||||||
uploadRef.value?.clear()
|
uploadRef.value?.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,12 +412,6 @@ onMounted(() => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-name-input {
|
|
||||||
margin-top: 20px;
|
|
||||||
padding-top: 20px;
|
|
||||||
border-top: 1px solid #e5e7eb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.upload-actions {
|
.upload-actions {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user