Skip to content

Commit c1c0c6a

Browse files
perf: Optimize login page (#3805)
* perf: icon optimize * perf: Optimize login page --------- Co-authored-by: wangdan-fit2cloud <[email protected]>
1 parent bbf321f commit c1c0c6a

File tree

8 files changed

+63
-18
lines changed

8 files changed

+63
-18
lines changed

ui/src/components/app-icon/icons/application.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,4 +713,30 @@ export default {
713713
])
714714
},
715715
},
716+
717+
'app-clock': {
718+
iconReader: () => {
719+
return h('i', [
720+
h(
721+
'svg',
722+
{
723+
style: { height: '100%', width: '100%' },
724+
viewBox: '0 0 1024 1024',
725+
version: '1.1',
726+
xmlns: 'http://www.w3.org/2000/svg',
727+
},
728+
[
729+
h('path', {
730+
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',
731+
fill: 'currentColor',
732+
}),
733+
h('path', {
734+
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',
735+
fill: 'currentColor',
736+
}),
737+
],
738+
),
739+
])
740+
},
741+
},
716742
}

ui/src/components/app-icon/icons/system.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,25 @@ export default {
6060
])
6161
},
6262
},
63+
64+
'app-operate-log': {
65+
iconReader: () => {
66+
return h('i', [
67+
h(
68+
'svg',
69+
{
70+
viewBox: '0 0 1024 1024',
71+
version: '1.1',
72+
xmlns: 'http://www.w3.org/2000/svg',
73+
},
74+
[
75+
h('path', {
76+
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',
77+
fill: 'currentColor',
78+
}),
79+
],
80+
),
81+
])
82+
},
83+
},
6384
}

ui/src/components/folder-tree/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<template #default="{ node, data }">
4040
<div class="flex-between w-full" @mouseenter.stop="handleMouseEnter(data)">
4141
<div class="flex align-center">
42-
<AppIcon iconName="app-folder" style="font-size: 16px"></AppIcon>
42+
<AppIcon iconName="app-folder" style="font-size: 20px"></AppIcon>
4343
<span class="ml-8 ellipsis" style="max-width: 110px" :title="node.label">{{
4444
node.label
4545
}}</span>

ui/src/views/application/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,8 @@
219219
{{ $t('views.application.status.published') }}
220220
</span>
221221
<el-divider direction="vertical" />
222-
<el-icon class="mr-8">
223-
<Clock />
224-
</el-icon>
222+
<AppIcon iconName="app-clock" class="color-secondary mr-8"></AppIcon>
223+
225224
<span class="color-secondary">{{ dateFormat(item.update_time) }}</span>
226225
</div>
227226
<div v-else class="flex align-center">

ui/src/views/login/index.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ const loginHandle = () => {
191191
.asyncLdapLogin(loginForm.value)
192192
.then(() => {
193193
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
194-
loading.value = false
195194
router.push({ name: 'home' })
196195
})
197196
.catch(() => {
@@ -203,7 +202,6 @@ const loginHandle = () => {
203202
.then(() => {
204203
locale.value = localStorage.getItem('MaxKB-locale') || getBrowserLang() || 'en-US'
205204
localStorage.setItem('workspace_id', 'default')
206-
loading.value = false
207205
router.push({ name: 'home' })
208206
})
209207
.catch(() => {

ui/src/views/system/operate-log/index.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,14 @@
230230
{{ datetimeFormat(row.create_time) }}
231231
</template>
232232
</el-table-column>
233-
<el-table-column :label="$t('common.operation')" width="110" align="left" fixed="right">
233+
<el-table-column :label="$t('common.operation')" width="60" align="left" fixed="right">
234234
<template #default="{ row }">
235235
<span class="mr-4">
236-
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
237-
{{ $t('views.operateLog.table.opt.label') }}
238-
</el-button>
236+
<el-tooltip effect="dark" :content="$t('views.operateLog.table.opt.label')" placement="top">
237+
<el-button type="primary" text @click.stop="showDetails(row)" class="text-button">
238+
<AppIcon iconName="app-operate-log"></AppIcon>
239+
</el-button>
240+
</el-tooltip>
239241
</span>
240242
</template>
241243
</el-table-column>

ui/src/views/tool/ToolDebugDrawer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
:class="isSuccess ? '' : 'color-danger'"
100100
class="pre-wrap"
101101
shadow="never"
102-
style="max-height: 350px; overflow: scroll"
103102
>
104103
{{ String(result) == '0' ? 0 : result || '-' }}
105104
</el-card>

ui/src/workflow/common/NodeControl.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<el-card shadow="always" style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px">
3-
<el-button link @click="zoomOut">
3+
<el-button link @click="zoomOut" style="border: none">
44
<el-tooltip
55
effect="dark"
66
:content="$t('views.applicationWorkflow.control.zoomOut')"
@@ -11,7 +11,7 @@
1111
/></el-icon>
1212
</el-tooltip>
1313
</el-button>
14-
<el-button link @click="zoomIn">
14+
<el-button link @click="zoomIn" style="border: none">
1515
<el-tooltip
1616
effect="dark"
1717
:content="$t('views.applicationWorkflow.control.zoomIn')"
@@ -22,7 +22,7 @@
2222
/></el-icon>
2323
</el-tooltip>
2424
</el-button>
25-
<el-button link @click="fitView">
25+
<el-button link @click="fitView" style="border: none">
2626
<el-tooltip
2727
effect="dark"
2828
:content="$t('views.applicationWorkflow.control.fitView')"
@@ -35,7 +35,7 @@
3535
</el-tooltip>
3636
</el-button>
3737
<el-divider direction="vertical" />
38-
<el-button link @click="retract">
38+
<el-button link @click="retract" style="border: none">
3939
<el-tooltip
4040
effect="dark"
4141
:content="$t('views.applicationWorkflow.control.retract')"
@@ -48,7 +48,7 @@
4848
></AppIcon>
4949
</el-tooltip>
5050
</el-button>
51-
<el-button link @click="extend">
51+
<el-button link @click="extend" style="border: none">
5252
<el-tooltip
5353
effect="dark"
5454
:content="$t('views.applicationWorkflow.control.extend')"
@@ -61,7 +61,7 @@
6161
></AppIcon>
6262
</el-tooltip>
6363
</el-button>
64-
<el-button link @click="layout">
64+
<el-button link @click="layout" style="border: none">
6565
<el-tooltip
6666
effect="dark"
6767
:content="$t('views.applicationWorkflow.control.beautify')"
@@ -79,7 +79,7 @@
7979

8080
<script setup lang="ts">
8181
const props = defineProps({
82-
lf: Object || String || null
82+
lf: Object || String || null,
8383
})
8484
8585
function zoomIn() {

0 commit comments

Comments
 (0)