修复主题错误

修复主题错误
This commit is contained in:
wangdan-fit2cloud 2024-07-18 03:21:52 -07:00 committed by GitHub
commit 2616360159
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 26 additions and 27 deletions

View File

@ -1,5 +1,13 @@
<template>
<div class="app-header" :class="!isDefaultTheme ? 'custom-header' : ''">
<el-alert
v-if="user.isExpire()"
title="未上传 License 或 License 已过期。"
type="warning"
class="border-b"
show-icon
:closable="false"
/>
<TopBar />
</div>
</template>

View File

@ -17,7 +17,7 @@
<span class="label">ISV</span><span>{{ licenseInfo?.isv || '-' }}</span>
</div>
<div class="flex">
<span class="label">期时间</span>
<span class="label">期时间</span>
<span
>{{ licenseInfo?.expired || '-' }}
<span class="danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
@ -28,8 +28,8 @@
<div class="flex">
<span class="label">版本</span
><span>{{
licenseInfo?.edition
? EditionType[licenseInfo.edition as keyof typeof EditionType]
user.isXPack
? EditionType[licenseInfo.edition as keyof typeof EditionType] || '专业版'
: '社区版'
}}</span>
</div>
@ -44,10 +44,7 @@
<span class="label">备注</span><span>{{ licenseInfo?.remark || '-' }}</span>
</div>
<div
class="mt-16 flex align-center"
v-hasPermission="new ComplexPermission(['ADMIN'], ['x-pack'], 'AND')"
>
<div class="mt-16 flex align-center" v-if="user.isXPack">
<el-upload
ref="uploadRef"
action="#"
@ -80,7 +77,7 @@ const loading = ref(false)
const licenseInfo = ref<any>(null)
const open = () => {
if (user.isEnterprise()) {
if (user.isXPack) {
getLicenseInfo()
}

View File

@ -1,13 +1,5 @@
·
<template>
<el-alert
v-if="user.isExpire()"
title="未上传 License 或 License 已过期。"
type="warning"
class="border-b"
show-icon
:closable="false"
/>
<div class="top-bar-container border-b flex-between">
<div class="flex-center h-full">
<div class="app-title-container cursor" @click="router.push('/')">
@ -71,11 +63,8 @@ import Avatar from './avatar/index.vue'
import { useRouter } from 'vue-router'
import { langList } from '@/locales/index'
import { useLocale } from '@/locales/useLocale'
import useStore from '@/stores'
const router = useRouter()
const { user } = useStore()
const { changeLocale } = useLocale()
const changeLang = (lang: string) => {
changeLocale(lang)

View File

@ -1,11 +1,13 @@
<script setup lang="ts">
import { AppHeader, AppMain } from '../components'
import useStore from '@/stores'
const { user } = useStore()
</script>
<template>
<div class="app-layout">
<AppHeader />
<div class="app-main">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
<AppMain />
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="app-layout">
<AppHeader />
<div class="app-main">
<div class="app-main" :class="user.isExpire() ? 'isExpire' : ''">
<div class="main-layout h-full flex">
<div class="sidebar-container">
<Sidebar />
@ -16,6 +16,8 @@
<script setup lang="ts">
import { AppHeader, Sidebar, AppMain } from '../components'
import useStore from '@/stores'
const { user } = useStore()
</script>
<style lang="scss" scoped>
@import './index.scss';

View File

@ -9,6 +9,9 @@
padding: var(--app-header-height) 0 0 !important;
box-sizing: border-box;
overflow: auto;
&.isExpire {
padding-top: calc(var(--app-header-height) + 40px) !important;
}
}
.sidebar-container {

View File

@ -82,6 +82,7 @@ const useUserStore = defineStore({
this.version = ok.data?.version || '-'
this.isXPack = ok.data?.IS_XPACK
this.XPACK_LICENSE_IS_VALID = ok.data?.XPACK_LICENSE_IS_VALID
if (this.isEnterprise()) {
await this.theme()
}

View File

@ -14,11 +14,6 @@ export const themeList = [
value: '#00B69D',
loginBackground: 'green'
},
{
label: '商务蓝',
value: '#4954E6',
loginBackground: 'default'
},
{
label: '神秘紫',
value: '#7F3BF5',

View File

@ -134,7 +134,9 @@ const login = () => {
}
onMounted(() => {
user.theme()
if (user.isEnterprise()) {
user.theme()
}
user.asyncGetProfile().then((res) => {
if (user.isXPack) {
loading.value = true