1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-02-12 19:40:06 +08:00

style: Optimize the styles of dashboard, container, and other pages (#7811)

This commit is contained in:
ssongliu 2025-02-06 18:17:36 +08:00 committed by GitHub
parent 46967db3ae
commit b2fa0aa2d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 212 additions and 164 deletions

View File

@ -1,8 +1,9 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 4776196 */ font-family: "iconfont"; /* Project id 4776196 */
src: url('iconfont.woff2?t=1734689625014') format('woff2'), src: url('iconfont.woff2?t=1738832240410') format('woff2'),
url('iconfont.woff?t=1734689625014') format('woff'), url('iconfont.woff?t=1738832240410') format('woff'),
url('iconfont.ttf?t=1734689625014') format('truetype'); url('iconfont.ttf?t=1738832240410') format('truetype'),
url('iconfont.svg?t=1738832240410#iconfont') format('svg');
} }
.iconfont { .iconfont {
@ -13,6 +14,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.p-terminal3:before {
content: "\eace";
}
.p-tuijian:before {
content: "\e627";
}
.p-node-1:before { .p-node-1:before {
content: "\e61a"; content: "\e61a";
} }
@ -61,6 +70,14 @@
content: "\e638"; content: "\e638";
} }
.p-terminal:before {
content: "\e864";
}
.p-terminal1:before {
content: "\e663";
}
.p-arrow-right:before { .p-arrow-right:before {
content: "\e665"; content: "\e665";
} }
@ -361,10 +378,6 @@
content: "\e76a"; content: "\e76a";
} }
.p-zhongduan:before {
content: "\e731";
}
.p-alert-1:before { .p-alert-1:before {
content: "\e615"; content: "\e615";
} }
@ -373,7 +386,7 @@
content: "\e701"; content: "\e701";
} }
.p-minglinghang:before { .p-zhongduan:before {
content: "\e61e"; content: "\e61e";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,20 @@
"css_prefix_text": "p-", "css_prefix_text": "p-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "40071541",
"name": "terminal",
"font_class": "terminal3",
"unicode": "eace",
"unicode_decimal": 60110
},
{
"icon_id": "34213658",
"name": "推荐",
"font_class": "tuijian",
"unicode": "e627",
"unicode_decimal": 58919
},
{ {
"icon_id": "17895547", "icon_id": "17895547",
"name": "node-1", "name": "node-1",
@ -89,6 +103,20 @@
"unicode": "e638", "unicode": "e638",
"unicode_decimal": 58936 "unicode_decimal": 58936
}, },
{
"icon_id": "6172786",
"name": "terminal",
"font_class": "terminal",
"unicode": "e864",
"unicode_decimal": 59492
},
{
"icon_id": "14772948",
"name": "terminal",
"font_class": "terminal1",
"unicode": "e663",
"unicode_decimal": 58979
},
{ {
"icon_id": "15838431", "icon_id": "15838431",
"name": "arrow-right", "name": "arrow-right",
@ -614,13 +642,6 @@
"unicode": "e76a", "unicode": "e76a",
"unicode_decimal": 59242 "unicode_decimal": 59242
}, },
{
"icon_id": "30053592",
"name": "终端",
"font_class": "zhongduan",
"unicode": "e731",
"unicode_decimal": 59185
},
{ {
"icon_id": "29851742", "icon_id": "29851742",
"name": "短信告警", "name": "短信告警",
@ -638,7 +659,7 @@
{ {
"icon_id": "11052436", "icon_id": "11052436",
"name": "命令行", "name": "命令行",
"font_class": "minglinghang", "font_class": "zhongduan",
"unicode": "e61e", "unicode": "e61e",
"unicode_decimal": 58910 "unicode_decimal": 58910
}, },

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

@ -2,7 +2,8 @@
<div> <div>
<el-card :style="{ height: height }" class="home-card"> <el-card :style="{ height: height }" class="home-card">
<div class="header"> <div class="header">
<span>{{ header }}</span> <span class="header-span">{{ header }}</span>
<slot name="header-l" />
<slot name="header-r" /> <slot name="header-r" />
</div> </div>
@ -24,7 +25,7 @@ defineProps({
<style scoped lang="scss"> <style scoped lang="scss">
.home-card { .home-card {
.header { .header {
span { .header-span {
position: relative; position: relative;
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;

View File

@ -382,7 +382,6 @@ const message = {
used: 'Used', used: 'Used',
free: 'Free', free: 'Free',
percent: 'Percent', percent: 'Percent',
app: 'Recommended Apps',
goInstall: 'Go install', goInstall: 'Go install',
networkCard: 'NetworkCard', networkCard: 'NetworkCard',

View File

@ -374,7 +374,6 @@ const message = {
used: '使用済み', used: '使用済み',
free: '無料', free: '無料',
percent: '利用', percent: '利用',
app: '推奨アプリケーション',
goInstall: 'インストールします', goInstall: 'インストールします',
networkCard: 'ネットワークカード', networkCard: 'ネットワークカード',

View File

@ -376,7 +376,6 @@ const message = {
used: '사용 ', used: '사용 ',
free: '여유', free: '여유',
percent: '사용률', percent: '사용률',
app: '추천 애플리케이션',
goInstall: 'Go 설치', goInstall: 'Go 설치',
networkCard: '네트워크 카드', networkCard: '네트워크 카드',

View File

@ -382,7 +382,6 @@ const message = {
used: 'Digunakan', used: 'Digunakan',
free: 'Percuma', free: 'Percuma',
percent: 'Penggunaan', percent: 'Penggunaan',
app: 'Aplikasi Disyorkan',
goInstall: 'Pergi pasang', goInstall: 'Pergi pasang',
networkCard: 'Kad rangkaian', networkCard: 'Kad rangkaian',

View File

@ -380,7 +380,6 @@ const message = {
used: 'Usado', used: 'Usado',
free: 'Livre', free: 'Livre',
percent: 'Utilização', percent: 'Utilização',
app: 'Aplicações recomendadas',
goInstall: 'Ir para instalação', goInstall: 'Ir para instalação',
networkCard: 'Placa de rede', networkCard: 'Placa de rede',

View File

@ -376,7 +376,6 @@ const message = {
used: 'Использовано', used: 'Использовано',
free: 'Свободно', free: 'Свободно',
percent: 'Утилизация', percent: 'Утилизация',
app: 'Рекомендуемые приложения',
goInstall: 'Установить', goInstall: 'Установить',
networkCard: 'Интерфейс', networkCard: 'Интерфейс',

View File

@ -374,7 +374,6 @@ const message = {
used: '已用', used: '已用',
free: '可用', free: '可用',
percent: '使用率', percent: '使用率',
app: '推薦應用',
goInstall: '去安裝', goInstall: '去安裝',
networkCard: '網卡', networkCard: '網卡',

View File

@ -372,7 +372,6 @@ const message = {
used: '已用', used: '已用',
free: '可用', free: '可用',
percent: '使用率', percent: '使用率',
app: '推荐应用',
goInstall: '去安装', goInstall: '去安装',
networkCard: '网卡', networkCard: '网卡',

View File

@ -1,13 +1,13 @@
import { Layout } from '@/routers/constant'; import { Layout } from '@/routers/constant';
const terminalRouter = { const terminalRouter = {
sort: 8, sort: 7,
path: '/terminal', path: '/terminal',
component: Layout, component: Layout,
redirect: '/terminal', redirect: '/terminal',
meta: { meta: {
icon: 'p-zhongduan',
title: 'menu.terminal', title: 'menu.terminal',
icon: 'p-terminal3',
}, },
children: [ children: [
{ {

View File

@ -1,7 +1,7 @@
import { Layout } from '@/routers/constant'; import { Layout } from '@/routers/constant';
const toolboxRouter = { const toolboxRouter = {
sort: 7, sort: 8,
path: '/toolbox', path: '/toolbox',
component: Layout, component: Layout,
redirect: '/toolbox/supervisor', redirect: '/toolbox/supervisor',

View File

@ -302,7 +302,7 @@ const onTerminal = (row: any) => {
const buttons = [ const buttons = [
{ {
label: i18n.global.t('file.terminal'), label: i18n.global.t('menu.terminal'),
disabled: (row: Container.ContainerInfo) => { disabled: (row: Container.ContainerInfo) => {
return row.state !== 'running'; return row.state !== 'running';
}, },

View File

@ -75,9 +75,10 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
if (!formEl) return; if (!formEl) return;
formEl.validate(async (valid) => { formEl.validate(async (valid) => {
if (!valid) return; if (!valid) return;
ElMessageBox.confirm(i18n.global.t('container.commandHelper'), { ElMessageBox.confirm(i18n.global.t('container.commandHelper'), i18n.global.t('container.createByCommand'), {
confirmButtonText: i18n.global.t('commons.button.confirm'), confirmButtonText: i18n.global.t('commons.button.confirm'),
cancelButtonText: i18n.global.t('commons.button.cancel'), cancelButtonText: i18n.global.t('commons.button.cancel'),
type: 'info',
}).then(async () => { }).then(async () => {
loading.value = true; loading.value = true;
let taskID = newUUID(); let taskID = newUUID();

View File

@ -714,7 +714,7 @@ const onOperate = async (op: string, row: Container.ContainerInfo | null) => {
const buttons = [ const buttons = [
{ {
label: i18n.global.t('file.terminal'), label: i18n.global.t('menu.terminal'),
disabled: (row: Container.ContainerInfo) => { disabled: (row: Container.ContainerInfo) => {
return row.state !== 'running'; return row.state !== 'running';
}, },

View File

@ -120,7 +120,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button class="ml-3" @click="handlePortsAdd()"> <el-button class="ml-3 mt-2" @click="handlePortsAdd()">
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -185,7 +185,7 @@
</template> </template>
</el-input> </el-input>
</div> </div>
<el-button @click="form.dns.push('')"> <el-button class="mt-2" @click="form.dns.push('')">
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -259,7 +259,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button @click="handleVolumesAdd()"> <el-button class="ml-3 mt-2" @click="handleVolumesAdd()">
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -366,7 +366,7 @@
</template> </template>
</el-input> </el-input>
</div> </div>
<el-button @click="form.labels.push('')"> <el-button class="mt-2" @click="form.labels.push('')">
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -388,7 +388,7 @@
</template> </template>
</el-input> </el-input>
</div> </div>
<el-button @click="form.env.push('')"> <el-button class="mt-2" @click="form.env.push('')">
{{ $t('commons.button.add') }} {{ $t('commons.button.add') }}
</el-button> </el-button>
</el-form-item> </el-form-item>

View File

@ -3,32 +3,32 @@
<CardWithHeader :header="$t('menu.container')" class="mt-5"> <CardWithHeader :header="$t('menu.container')" class="mt-5">
<template #body> <template #body>
<span class="count" @click="goRouter('Container')">{{ countItem.containerCount }}</span> <span class="count" @click="goRouter('Container')">{{ countItem.containerCount }}</span>
<div class="float-right"> </template>
<el-tag v-if="countItem.all" effect="plain"> <template #header-l>
<el-tag size="small" class="ml-5" v-if="countItem.all" effect="plain">
{{ $t('commons.table.all') }} * {{ countItem.all }} {{ $t('commons.table.all') }} * {{ countItem.all }}
</el-tag> </el-tag>
<el-tag v-if="countItem.running" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.running" effect="plain" class="ml-2">
{{ $t('commons.status.running') }} * {{ countItem.running }} {{ $t('commons.status.running') }} * {{ countItem.running }}
</el-tag> </el-tag>
<el-tag v-if="countItem.created" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.created" effect="plain" class="ml-2">
{{ $t('commons.status.created') }} * {{ countItem.created }} {{ $t('commons.status.created') }} * {{ countItem.created }}
</el-tag> </el-tag>
<el-tag v-if="countItem.paused" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.paused" effect="plain" class="ml-2">
{{ $t('commons.status.paused') }} * {{ countItem.paused }} {{ $t('commons.status.paused') }} * {{ countItem.paused }}
</el-tag> </el-tag>
<el-tag v-if="countItem.restarting" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.restarting" effect="plain" class="ml-2">
{{ $t('commons.status.restarting') }} * {{ countItem.restarting }} {{ $t('commons.status.restarting') }} * {{ countItem.restarting }}
</el-tag> </el-tag>
<el-tag v-if="countItem.removing" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.removing" effect="plain" class="ml-2">
{{ $t('commons.status.removing') }} * {{ countItem.removing }} {{ $t('commons.status.removing') }} * {{ countItem.removing }}
</el-tag> </el-tag>
<el-tag v-if="countItem.exited" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.exited" effect="plain" class="ml-2">
{{ $t('commons.status.exited') }} * {{ countItem.exited }} {{ $t('commons.status.exited') }} * {{ countItem.exited }}
</el-tag> </el-tag>
<el-tag v-if="countItem.dead" effect="plain" class="ml-2"> <el-tag size="small" v-if="countItem.dead" effect="plain" class="ml-2">
{{ $t('commons.status.dead') }} * {{ countItem.dead }} {{ $t('commons.status.dead') }} * {{ countItem.dead }}
</el-tag> </el-tag>
</div>
</template> </template>
</CardWithHeader> </CardWithHeader>
<el-row :gutter="20" class="mt-5"> <el-row :gutter="20" class="mt-5">
@ -52,11 +52,11 @@
<CardWithHeader :header="$t('container.image')"> <CardWithHeader :header="$t('container.image')">
<template #body> <template #body>
<span class="count" @click="goRouter('Image')">{{ countItem.imageCount }}</span> <span class="count" @click="goRouter('Image')">{{ countItem.imageCount }}</span>
<div class="float-right"> </template>
<el-tag v-if="countItem.imageSize" effect="plain" class="ml-2"> <template #header-l>
<span v-if="countItem.imageSize" effect="plain" class="ml-2 text-xs">
{{ $t('commons.status.used') }}: {{ computeSize(countItem.imageSize) }} {{ $t('commons.status.used') }}: {{ computeSize(countItem.imageSize) }}
</el-tag> </span>
</div>
</template> </template>
</CardWithHeader> </CardWithHeader>
</el-col> </el-col>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<CardWithHeader :header="$t('home.app')" class="mt-5" :loading="loading"> <CardWithHeader :header="$t('app.app')" class="mt-5" :loading="loading">
<template #header-r> <template #header-r>
<el-popover placement="left" :width="226" trigger="click"> <el-popover placement="left" :width="226" trigger="click">
<el-input size="small" v-model="filter" clearable @input="loadOption()" /> <el-input size="small" v-model="filter" clearable @input="loadOption()" />
@ -29,11 +29,13 @@
<el-col :span="5"> <el-col :span="5">
<div> <div>
<el-badge <el-badge
badge-style="background-color: transparent; color: #646a73; font-size: 12px; border: none" badge-style="background-color: transparent; font-size: 10px; border: none"
:value="$t('home.recommend')"
v-if="app.isRecommend" v-if="app.isRecommend"
:offset="[-60, 0]" :offset="[-60, 0]"
> >
<template #content>
<svg-icon iconName="p-tuijian"></svg-icon>
</template>
<el-avatar <el-avatar
shape="square" shape="square"
:size="55" :size="55"

View File

@ -54,7 +54,7 @@
<el-alert type="info" :closable="false"> <el-alert type="info" :closable="false">
<template #title> <template #title>
<span class="input-help whitespace-break-spaces"> <span class="input-help whitespace-break-spaces">
{{ $t('file.fileHeper') }} {{ $t('file.fileHelper') }}
</span> </span>
</template> </template>
</el-alert> </el-alert>

View File

@ -31,7 +31,7 @@
<OpDialog ref="opRef" @search="getContent" /> <OpDialog ref="opRef" @search="getContent" />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onUnmounted, reactive, ref, watch } from 'vue'; import { onUnmounted, reactive, ref } from 'vue';
import { operateSupervisorProcessFile } from '@/api/modules/host-tool'; import { operateSupervisorProcessFile } from '@/api/modules/host-tool';
import i18n from '@/lang'; import i18n from '@/lang';
import { TabsPaneContext } from 'element-plus'; import { TabsPaneContext } from 'element-plus';