1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00

style: 统一app状态栏样式

This commit is contained in:
zhengkunwang223 2023-02-07 18:06:27 +08:00 committed by zhengkunwang223
parent 24b3d21204
commit 62709bcec6
4 changed files with 71 additions and 77 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="a-card" v-if="data.isExist">
<div class="app-status" v-if="data.isExist">
<el-card>
<div>
<el-tag effect="dark" type="success">{{ data.app }}</el-tag>
@ -142,33 +142,11 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped>
.a-card {
font-size: 12px;
.el-card {
--el-card-padding: 12px;
.buttons {
margin-left: 100px;
}
}
}
// body {
// margin: 0;
// }
.status-content {
margin-left: 50px;
}
<style lang="scss">
.app-warn {
text-align: center;
margin-top: 100px;
span:first-child {
// font-weight: 500;
// font-size: 16px;
color: #bbbfc4;
}

View File

@ -248,3 +248,19 @@
border-color: var(--el-button-hover-border-color);
}
}
.app-status {
font-size: 12px;
.el-card {
--el-card-padding: 12px;
.buttons {
margin-left: 100px;
}
.status-content {
margin-left: 50px;
}
}
}

View File

@ -1,34 +1,44 @@
<template>
<LayoutContent :title="$t('website.websiteConfig')" :back-name="'Website'" v-loading="loading">
<template #app>
<WebsiteStatus
v-if="website.id > 0"
:primary-domain="website.primaryDomain"
:status="website.status"
:expire-date="website.expireDate"
/>
</template>
<template #buttons>
<el-button type="primary" :plain="index !== 'basic'" @click="changeTab('basic')">
{{ $t('website.basic') }}
</el-button>
<el-button type="primary" :plain="index !== 'safety'" @click="changeTab('safety')">
{{ $t('website.security') }}
</el-button>
<el-button type="primary" :plain="index !== 'log'" @click="changeTab('log')">
{{ $t('website.log') }}
</el-button>
<el-button type="primary" :plain="index !== 'resource'" @click="changeTab('resource')">
{{ $t('website.source') }}
</el-button>
</template>
<template #main>
<Basic :id="id" v-if="index === 'basic'"></Basic>
<Safety :id="id" v-if="index === 'safety'"></Safety>
<Log :id="id" v-if="index === 'log'"></Log>
<Resource :id="id" v-if="index === 'resource'"></Resource>
</template>
</LayoutContent>
<div>
<RouterButton
:buttons="[
{
label: $t('website.website'),
path: '/websites',
},
]"
/>
<LayoutContent :title="$t('website.websiteConfig')" :back-name="'Website'" v-loading="loading">
<template #app>
<WebsiteStatus
v-if="website.id > 0"
:primary-domain="website.primaryDomain"
:status="website.status"
:expire-date="website.expireDate"
/>
</template>
<template #buttons>
<el-button type="primary" :plain="index !== 'basic'" @click="changeTab('basic')">
{{ $t('website.basic') }}
</el-button>
<el-button type="primary" :plain="index !== 'safety'" @click="changeTab('safety')">
{{ $t('website.security') }}
</el-button>
<el-button type="primary" :plain="index !== 'log'" @click="changeTab('log')">
{{ $t('website.log') }}
</el-button>
<el-button type="primary" :plain="index !== 'resource'" @click="changeTab('resource')">
{{ $t('website.source') }}
</el-button>
</template>
<template #main>
<Basic :id="id" v-if="index === 'basic'"></Basic>
<Safety :id="id" v-if="index === 'safety'"></Safety>
<Log :id="id" v-if="index === 'log'"></Log>
<Resource :id="id" v-if="index === 'resource'"></Resource>
</template>
</LayoutContent>
</div>
</template>
<script setup lang="ts">

View File

@ -1,29 +1,23 @@
<template>
<el-card>
<el-row :gutter="20">
<el-col :lg="3" :xl="2">
<div>
<el-tag effect="dark" type="success">{{ props.primaryDomain }}</el-tag>
</div>
</el-col>
<el-col :lg="4" :xl="2">
<div class="span-font">
<div class="app-status">
<el-card>
<div>
<el-tag effect="dark" type="success">{{ props.primaryDomain }}</el-tag>
<span class="status-content">
<Status class="span-font" :key="props.status" :status="props.status"></Status>
</div>
</el-col>
<el-col :lg="4" :xl="4">
<div class="span-font">
<el-tag>
</span>
<span class="status-content">
<el-tag type="info">
{{ $t('website.expireDate') }}:
<span v-if="isEver(props.expireDate)">
{{ $t('website.neverExpire') }}
</span>
<span v-else>{{ dateFormatSimple(props.expireDate) }}</span>
</el-tag>
</div>
</el-col>
</el-row>
</el-card>
</span>
</div>
</el-card>
</div>
</template>
<script lang="ts" setup>
import Status from '@/components/status/index.vue';
@ -49,8 +43,4 @@ const isEver = (time: string) => {
};
</script>
<style lang="scss">
.span-font {
font-size: 14px;
}
</style>
<style lang="scss"></style>