mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: Optimize login page (#3805)
* perf: icon optimize * perf: Optimize login page --------- Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
This commit is contained in:
parent
bbf321fc96
commit
c1c0c6a5a5
|
|
@ -713,4 +713,30 @@ export default {
|
|||
])
|
||||
},
|
||||
},
|
||||
|
||||
'app-clock': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
style: { height: '100%', width: '100%' },
|
||||
viewBox: '0 0 1024 1024',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M469.333333 320a21.333333 21.333333 0 0 1 21.333334-21.333333h42.666666a21.333333 21.333333 0 0 1 21.333334 21.333333V469.333333h149.333333a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334h-213.333333a21.333333 21.333333 0 0 1-21.333334-21.333334v-213.333333z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
h('path', {
|
||||
d: 'M512 981.333333c259.2 0 469.333333-210.133333 469.333333-469.333333S771.2 42.666667 512 42.666667 42.666667 252.8 42.666667 512s210.133333 469.333333 469.333333 469.333333z m0-85.333333a384 384 0 1 1 0-768 384 384 0 0 1 0 768z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
],
|
||||
),
|
||||
])
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,4 +60,25 @@ export default {
|
|||
])
|
||||
},
|
||||
},
|
||||
|
||||
'app-operate-log': {
|
||||
iconReader: () => {
|
||||
return h('i', [
|
||||
h(
|
||||
'svg',
|
||||
{
|
||||
viewBox: '0 0 1024 1024',
|
||||
version: '1.1',
|
||||
xmlns: 'http://www.w3.org/2000/svg',
|
||||
},
|
||||
[
|
||||
h('path', {
|
||||
d: 'M213.333333 128v768h597.333334V128H213.333333zM170.666667 42.666667h682.666666c23.552 0 42.666667 20.010667 42.666667 44.714666v849.237334c0 24.704-19.114667 44.714667-42.666667 44.714666H170.666667c-23.552 0-42.666667-20.010667-42.666667-44.714666V87.381333C128 62.677333 147.114667 42.666667 170.666667 42.666667z m149.333333 256h170.666667a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-170.666667a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z m0 170.666666h384a21.333333 21.333333 0 0 1 21.333333 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333333 21.333334h-384a21.333333 21.333333 0 0 1-21.333333-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333333-21.333334z m0 170.666667h384a21.333333 21.333333 0 0 1 21.333333 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333333 21.333333h-384a21.333333 21.333333 0 0 1-21.333333-21.333333v-42.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z',
|
||||
fill: 'currentColor',
|
||||
}),
|
||||
],
|
||||
),
|
||||
])
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<template #default="{ node, data }">
|
||||
<div class="flex-between w-full" @mouseenter.stop="handleMouseEnter(data)">
|
||||
<div class="flex align-center">
|
||||
<AppIcon iconName="app-folder" style="font-size: 16px"></AppIcon>
|
||||
<AppIcon iconName="app-folder" style="font-size: 20px"></AppIcon>
|
||||
<span class="ml-8 ellipsis" style="max-width: 110px" :title="node.label">{{
|
||||
node.label
|
||||
}}</span>
|
||||
|
|
|
|||
|
|
@ -219,9 +219,8 @@
|
|||
{{ $t('views.application.status.published') }}
|
||||
</span>
|
||||
<el-divider direction="vertical" />
|
||||
<el-icon class="mr-8">
|
||||
<Clock />
|
||||
</el-icon>
|
||||
<AppIcon iconName="app-clock" class="color-secondary mr-8"></AppIcon>
|
||||
|
||||
<span class="color-secondary">{{ dateFormat(item.update_time) }}</span>
|
||||
</div>
|
||||
<div v-else class="flex align-center">
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ const loginHandle = () => {
|
|||
.asyncLdapLogin(loginForm.value)
|
||||
.then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
@ -203,7 +202,6 @@ const loginHandle = () => {
|
|||
.then(() => {
|
||||
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
|
||||
localStorage.setItem('workspace_id', 'default')
|
||||
loading.value = false
|
||||
router.push({ name: 'home' })
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
|
|||
|
|
@ -230,12 +230,14 @@
|
|||
{{ datetimeFormat(row.create_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common.operation')" width="110" align="left" fixed="right">
|
||||
<el-table-column :label="$t('common.operation')" width="60" align="left" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<span class="mr-4">
|
||||
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
|
||||
{{ $t('views.operateLog.table.opt.label') }}
|
||||
</el-button>
|
||||
<el-tooltip effect="dark" :content="$t('views.operateLog.table.opt.label')" placement="top">
|
||||
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
|
||||
<AppIcon iconName="app-operate-log"></AppIcon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@
|
|||
:class="isSuccess ? '' : 'color-danger'"
|
||||
class="pre-wrap"
|
||||
shadow="never"
|
||||
style="max-height: 350px; overflow: scroll"
|
||||
>
|
||||
{{ String(result) == '0' ? 0 : result || '-' }}
|
||||
</el-card>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-card shadow="always" style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px">
|
||||
<el-button link @click="zoomOut">
|
||||
<el-button link @click="zoomOut" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.zoomOut')"
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button link @click="zoomIn">
|
||||
<el-button link @click="zoomIn" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.zoomIn')"
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
/></el-icon>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button link @click="fitView">
|
||||
<el-button link @click="fitView" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.fitView')"
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-divider direction="vertical" />
|
||||
<el-button link @click="retract">
|
||||
<el-button link @click="retract" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.retract')"
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
></AppIcon>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button link @click="extend">
|
||||
<el-button link @click="extend" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.extend')"
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
></AppIcon>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button link @click="layout">
|
||||
<el-button link @click="layout" style="border: none">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('views.applicationWorkflow.control.beautify')"
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps({
|
||||
lf: Object || String || null
|
||||
lf: Object || String || null,
|
||||
})
|
||||
|
||||
function zoomIn() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue