Skip to content

Commit ee7cc80

Browse files
fix: [xpack]After replacing the logo,The original logo will flash(1Panel-dev#2270)
* perf: Top N Segments increase to 10000 * fix: [xpack]After replacing the logo,The original logo will flash(1Panel-dev#2270)
1 parent dd84da4 commit ee7cc80

File tree

7 files changed

+19
-9
lines changed

7 files changed

+19
-9
lines changed

ui/src/components/logo/LogoFull.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/>
5656
</g>
5757
</svg>
58-
<img v-else src="@/assets/logo/MaxKB-logo.svg" :height="height" />
58+
<img src="@/assets/logo/MaxKB-logo.svg" :height="height" />
5959
</template>
6060
</template>
6161
<script setup lang="ts">
@@ -75,7 +75,7 @@ const isDefaultTheme = computed(() => {
7575
})
7676
7777
const fileURL = computed(() => {
78-
if (user.themeInfo?.loginLogo) {
78+
if (user.themeInfo) {
7979
if (typeof user.themeInfo?.loginLogo === 'string') {
8080
return user.themeInfo?.loginLogo
8181
} else {

ui/src/router/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { hasPermission } from '@/utils/permission/index'
2+
import NProgress from 'nprogress'
23
import {
34
createRouter,
45
createWebHistory,
@@ -9,6 +10,7 @@ import {
910
} from 'vue-router'
1011
import useStore from '@/stores'
1112
import { routes } from '@/router/routes'
13+
NProgress.configure({ showSpinner: false, speed: 500, minimum: 0.3 })
1214
const router = createRouter({
1315
history: createWebHistory(import.meta.env.BASE_URL),
1416
routes: routes
@@ -17,6 +19,7 @@ const router = createRouter({
1719
// 路由前置拦截器
1820
router.beforeEach(
1921
async (to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
22+
NProgress.start()
2023
if (to.name === '404') {
2124
next()
2225
return
@@ -48,6 +51,9 @@ router.beforeEach(
4851
}
4952
}
5053
)
54+
router.afterEach(() => {
55+
NProgress.done()
56+
})
5157

5258
export const getChildRouteListByPathAndName = (path: any, name?: RouteRecordName | any) => {
5359
return getChildRouteList(routes, path, name)

ui/src/styles/app.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
margin: 0;
1212
padding: 0;
1313
}
14-
14+
[v-cloak] {
15+
display: none !important;
16+
}
1517
html {
1618
height: 100%;
1719
box-sizing: border-box;

ui/src/views/application/component/ParamSettingDialog.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
<el-input-number
9797
v-model="form.dataset_setting.top_n"
9898
:min="1"
99-
:max="100"
99+
:max="10000"
100100
:value-on-clear="1"
101101
controls-position="right"
102102
class="w-full"

ui/src/views/hit-test/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
<el-input-number
171171
v-model="cloneForm.top_number"
172172
:min="1"
173-
:max="100"
173+
:max="10000"
174174
controls-position="right"
175175
class="w-full"
176176
/>

ui/src/views/login/index.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<login-layout v-if="user.isEnterprise() ? user.themeInfo : true" v-loading="loading">
2+
<login-layout v-if="!loading" v-loading="loading">
33
<LoginContainer :subTitle="user.themeInfo?.slogan || $t('views.system.theme.defaultSlogan')">
44
<h2 class="mb-24" v-if="!showQrCodeTab">{{ loginMode || $t('views.login.title') }}</h2>
55
<div v-if="!showQrCodeTab">
@@ -225,10 +225,10 @@ const login = () => {
225225
})
226226
}
227227
228-
onMounted(() => {
228+
onBeforeMount(() => {
229+
loading.value = true
229230
user.asyncGetProfile().then((res) => {
230231
if (user.isEnterprise()) {
231-
loading.value = true
232232
user
233233
.getAuthType()
234234
.then((res) => {
@@ -261,6 +261,8 @@ onMounted(() => {
261261
}
262262
})
263263
.finally(() => (loading.value = false))
264+
} else {
265+
loading.value = false
264266
}
265267
})
266268
})

ui/src/workflow/nodes/reranker-node/ParamSettingDialog.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<el-input-number
5050
v-model="form.top_n"
5151
:min="1"
52-
:max="100"
52+
:max="10000"
5353
:value-on-clear="1"
5454
controls-position="right"
5555
class="w-full"

0 commit comments

Comments
 (0)