mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: 新增License过期提示
feat: 新增License过期提示
This commit is contained in:
commit
655586bc86
|
|
@ -1,5 +1,13 @@
|
|||
·
|
||||
<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('/')">
|
||||
|
|
@ -63,8 +71,10 @@ 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 defaultTitle = import.meta.env.VITE_APP_TITLE
|
||||
|
||||
const { user } = useStore()
|
||||
|
||||
const { changeLocale } = useLocale()
|
||||
const changeLang = (lang: string) => {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ const useUserStore = defineStore({
|
|||
isXPack: false
|
||||
}),
|
||||
actions: {
|
||||
isExpire() {
|
||||
return this.isXPack && !this.XPACK_LICENSE_IS_VALID
|
||||
},
|
||||
isEnterprise() {
|
||||
return this.isXPack && this.XPACK_LICENSE_IS_VALID
|
||||
},
|
||||
|
|
|
|||
|
|
@ -361,3 +361,13 @@
|
|||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
// 提示横幅
|
||||
.el-alert--warning.is-light {
|
||||
background-color: #ffe7cc;
|
||||
color: var(--app-text-color);
|
||||
font-weight: 400;
|
||||
.el-alert__icon {
|
||||
color: #ff8800;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue