mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: build
This commit is contained in:
parent
10eac10404
commit
1f8cffb189
|
|
@ -1,4 +1,5 @@
|
|||
/// <reference types="vite/client" />
|
||||
declare module 'katex'
|
||||
interface Window {
|
||||
sendMessage: ?((message: string, other_params_data: any) => void)
|
||||
MaxKB: {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.9.10",
|
||||
"file-saver": "^2.0.5",
|
||||
"katex": "^0.16.10",
|
||||
"highlight.js": "^11.11.1",
|
||||
"katex": "^0.16.22",
|
||||
"md-editor-v3": "^5.6.1",
|
||||
"mermaid": "^11.6.0",
|
||||
"moment": "^2.30.1",
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node22": "^22.0.1",
|
||||
"@types/file-saver": "^2.0.7",
|
||||
"@types/node": "^22.14.0",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@vitejs/plugin-vue": "^5.2.3",
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ const playDemoText: (application_id: string, data: any, loading?: Ref<boolean>)
|
|||
/**
|
||||
* 文本转语音
|
||||
*/
|
||||
const textToSpeech: (
|
||||
const postTextToSpeech: (
|
||||
application_id: String,
|
||||
data: any,
|
||||
loading?: Ref<boolean>,
|
||||
|
|
@ -318,7 +318,7 @@ export default {
|
|||
publish,
|
||||
updatePlatformConfig,
|
||||
playDemoText,
|
||||
textToSpeech,
|
||||
postTextToSpeech,
|
||||
speechToText,
|
||||
getMcpTools,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ const getSpeechToTextAPI = () => {
|
|||
return chatAPI.speechToText(data, loading)
|
||||
}
|
||||
} else {
|
||||
return applicationApi.textToSpeech
|
||||
return applicationApi.postTextToSpeech
|
||||
}
|
||||
}
|
||||
const speechToTextAPI = getSpeechToTextAPI()
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ const getTextToSpeechAPI = () => {
|
|||
return chatAPI.textToSpeech(data, loading)
|
||||
}
|
||||
} else {
|
||||
return applicationApi.textToSpeech
|
||||
return applicationApi.postTextToSpeech
|
||||
}
|
||||
}
|
||||
const textToSpeechAPI = getTextToSpeechAPI()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ const {
|
|||
} = route as any
|
||||
|
||||
const isShared = computed(() => {
|
||||
return folderId === 'shared' || route.name?.includes('ResourceManagement')
|
||||
return folderId === 'shared'
|
||||
})
|
||||
const { theme } = useStore()
|
||||
const isDefaultTheme = computed(() => {
|
||||
|
|
|
|||
|
|
@ -122,11 +122,12 @@ function submit() {
|
|||
} else if (radioType.value === 'custom' && iconFile.value) {
|
||||
const fd = new FormData()
|
||||
fd.append('file', iconFile.value.raw)
|
||||
overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => {
|
||||
emit('refresh')
|
||||
MsgSuccess(t('common.saveSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
// todo
|
||||
// overviewApi.putAppIcon(id as string, fd, loading).then((res: any) => {
|
||||
// emit('refresh')
|
||||
// MsgSuccess(t('common.saveSuccess'))
|
||||
// dialogVisible.value = false
|
||||
// })
|
||||
} else {
|
||||
MsgError(t('common.EditAvatarDialog.uploadImagePrompt'))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ watch(dialogVisible, (bool) => {
|
|||
}
|
||||
})
|
||||
watch(
|
||||
() => form.authentication,
|
||||
() => form.value.authentication,
|
||||
(b) => {
|
||||
if (b) {
|
||||
applicationApi.getChatUserAuthType().then((ok) => {
|
||||
|
|
|
|||
|
|
@ -10,19 +10,15 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
import useStore from '@/stores'
|
||||
import { t } from '@/locales'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
const route = useRoute()
|
||||
const FormRef = ref()
|
||||
|
||||
const { chatUser } = useStore()
|
||||
const props = defineProps<{ applicationProfile: any; modelValue: boolean }>()
|
||||
const loading = ref<boolean>(false)
|
||||
const router = useRouter()
|
||||
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const auth = () => {
|
||||
return chatUser.passwordAuthentication(form.value.password).then((ok) => {
|
||||
router.push({ name: 'chat', params: { accessToken: chatUser.accessToken } })
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form ref="FormRef" :model="form" @submit.prevent="validator">
|
||||
<el-form-item prop="value" :rules="rules.value">
|
||||
<el-form-item prop="value" :rules="rules">
|
||||
<el-input show-password v-model="form.value" />
|
||||
</el-form-item>
|
||||
<el-button class="w-full mt-8" type="primary" @click="validator" :loading="loading">
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import useStore from '@/stores'
|
||||
import { t } from '@/locales'
|
||||
|
|
@ -38,9 +38,9 @@ const validator = () => {
|
|||
FormRef.value.validate()
|
||||
}
|
||||
|
||||
const rules = {
|
||||
const rules = reactive({
|
||||
value: [{ required: true, validator: validator_auth, trigger: 'manual' }],
|
||||
}
|
||||
})
|
||||
|
||||
const form = ref({
|
||||
type: 'password',
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ export default defineConfig((conf: any) => {
|
|||
const ENV = loadEnv(mode, envDir)
|
||||
const proxyConf: Record<string, string | ProxyOptions> = {}
|
||||
proxyConf['/admin/api'] = {
|
||||
// target: 'http://47.92.195.88:8080/',
|
||||
target: 'http://127.0.0.1:8080',
|
||||
target: 'http://47.92.195.88:8080/',
|
||||
// target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
}
|
||||
proxyConf['/oss'] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue