mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: Open international professional features (#7472)
This commit is contained in:
parent
a77ebd3eb6
commit
50c01762e7
@ -5,8 +5,8 @@
|
|||||||
<el-link type="primary" :underline="false" @click="toForum">
|
<el-link type="primary" :underline="false" @click="toForum">
|
||||||
<span class="font-normal">{{ $t('setting.forum') }}</span>
|
<span class="font-normal">{{ $t('setting.forum') }}</span>
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical" v-if="!globalStore.isIntl" />
|
<el-divider direction="vertical" />
|
||||||
<el-link type="primary" :underline="false" @click="toDoc" v-if="!globalStore.isIntl">
|
<el-link type="primary" :underline="false" @click="toDoc">
|
||||||
<span class="font-normal">{{ $t('setting.doc2') }}</span>
|
<span class="font-normal">{{ $t('setting.doc2') }}</span>
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap items-center">
|
<div class="flex flex-wrap items-center">
|
||||||
<el-link :underline="false" class="-ml-2" type="primary" @click="toLxware">
|
<el-link :underline="false" class="-ml-2" type="primary" @click="toLxware">
|
||||||
{{ $t(globalStore.isIntl || !isProductPro ? 'license.community' : 'license.pro') }}
|
{{ $t(!isProductPro ? 'license.community' : 'license.pro') }}
|
||||||
</el-link>
|
</el-link>
|
||||||
<el-link :underline="false" class="version" type="primary" @click="copyText(version)">
|
<el-link :underline="false" class="version" type="primary" @click="copyText(version)">
|
||||||
{{ version }}
|
{{ version }}
|
||||||
@ -125,6 +125,8 @@ const handleClose = () => {
|
|||||||
const toLxware = () => {
|
const toLxware = () => {
|
||||||
if (!globalStore.isIntl) {
|
if (!globalStore.isIntl) {
|
||||||
window.open('https://www.lxware.cn/1panel' + '', '_blank', 'noopener,noreferrer');
|
window.open('https://www.lxware.cn/1panel' + '', '_blank', 'noopener,noreferrer');
|
||||||
|
} else {
|
||||||
|
window.open('https://1panel.hk' + '', '_blank', 'noopener,noreferrer');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,11 +134,9 @@ function getCheckedLabels(json: Node): string[] {
|
|||||||
const search = async () => {
|
const search = async () => {
|
||||||
await checkIsSystemIntl();
|
await checkIsSystemIntl();
|
||||||
let checkedLabels: any[] = [];
|
let checkedLabels: any[] = [];
|
||||||
if (!globalStore.isIntl) {
|
|
||||||
const res = await getSettingInfo();
|
const res = await getSettingInfo();
|
||||||
const json: Node = JSON.parse(res.data.xpackHideMenu);
|
const json: Node = JSON.parse(res.data.xpackHideMenu);
|
||||||
checkedLabels = getCheckedLabels(json);
|
checkedLabels = getCheckedLabels(json);
|
||||||
}
|
|
||||||
|
|
||||||
let rstMenuList: RouteRecordRaw[] = [];
|
let rstMenuList: RouteRecordRaw[] = [];
|
||||||
menuStore.menuList.forEach((item) => {
|
menuStore.menuList.forEach((item) => {
|
||||||
@ -146,6 +144,9 @@ const search = async () => {
|
|||||||
let menuChildren: RouteRecordRaw[] = [];
|
let menuChildren: RouteRecordRaw[] = [];
|
||||||
if (menuItem.path === '/xpack') {
|
if (menuItem.path === '/xpack') {
|
||||||
if (checkedLabels.length) {
|
if (checkedLabels.length) {
|
||||||
|
menuItem.children = menuItem.children.filter((child: any) => {
|
||||||
|
return !(globalStore.isIntl && child.path.includes('/xpack/alert'));
|
||||||
|
});
|
||||||
menuItem.children.forEach((child: any) => {
|
menuItem.children.forEach((child: any) => {
|
||||||
for (const str of checkedLabels) {
|
for (const str of checkedLabels) {
|
||||||
if (child.name === str) {
|
if (child.name === str) {
|
||||||
|
@ -10,7 +10,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
axiosCanceler.removeAllPending();
|
axiosCanceler.removeAllPending();
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
|
|
||||||
if (globalStore.isIntl && to.path.includes('xpack')) {
|
if (globalStore.isIntl && to.path.includes('/xpack/alert')) {
|
||||||
next({ name: '404' });
|
next({ name: '404' });
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
return;
|
return;
|
||||||
|
@ -49,7 +49,7 @@ html {
|
|||||||
--panel-terminal-tag-hover-text-color: #575758;
|
--panel-terminal-tag-hover-text-color: #575758;
|
||||||
--panel-terminal-bg-color: #1e1e1e;
|
--panel-terminal-bg-color: #1e1e1e;
|
||||||
--panel-logs-bg-color: #1e1e1e;
|
--panel-logs-bg-color: #1e1e1e;
|
||||||
--panel-alert-bg-color: rgba(0, 94, 235, 0.03);;
|
--panel-alert-bg-color: rgba(0, 94, 235, 0.03);
|
||||||
|
|
||||||
--panel-alert-bg: #e2e4ec;
|
--panel-alert-bg: #e2e4ec;
|
||||||
--panel-path-bg: #ffffff;
|
--panel-path-bg: #ffffff;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<template #route-button>
|
<template #route-button>
|
||||||
<div class="router-button" v-if="!isProductPro && !globalStore.isIntl">
|
<div class="router-button" v-if="!isProductPro">
|
||||||
<el-button link type="primary" @click="toUpload">
|
<el-button link type="primary" @click="toUpload">
|
||||||
{{ $t('license.levelUpPro') }}
|
{{ $t('license.levelUpPro') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<SystemUpgrade />
|
<SystemUpgrade />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex w-full justify-center my-5 flex-wrap md:flex-row gap-4">
|
<div class="flex w-full justify-center my-5 flex-wrap md:flex-row gap-4">
|
||||||
<el-link @click="toDoc" class="system-link" v-if="!globalStore.isIntl">
|
<el-link @click="toDoc" class="system-link">
|
||||||
<el-icon><Document /></el-icon>
|
<el-icon><Document /></el-icon>
|
||||||
<span>{{ $t('setting.doc2') }}</span>
|
<span>{{ $t('setting.doc2') }}</span>
|
||||||
</el-link>
|
</el-link>
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { GlobalStore } from '@/store';
|
|
||||||
const globalStore = GlobalStore();
|
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
{
|
{
|
||||||
@ -38,8 +36,4 @@ const buttons = [
|
|||||||
path: '/settings/about',
|
path: '/settings/about',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (globalStore.isIntl) {
|
|
||||||
buttons.splice(4, 1);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="!globalStore.isIntl" :label="$t('setting.proxy')" prop="proxyShow">
|
<el-form-item :label="$t('setting.proxy')" prop="proxyShow">
|
||||||
<el-input disabled v-model="form.proxyShow">
|
<el-input disabled v-model="form.proxyShow">
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-button @click="onChangeProxy" icon="Setting">
|
<el-button @click="onChangeProxy" icon="Setting">
|
||||||
@ -166,7 +166,7 @@
|
|||||||
<span class="input-help">{{ $t('setting.developerModeHelper') }}</span>
|
<span class="input-help">{{ $t('setting.developerModeHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item v-if="!globalStore.isIntl" :label="$t('setting.advancedMenuHide')">
|
<el-form-item :label="$t('setting.advancedMenuHide')">
|
||||||
<el-input disabled v-model="form.proHideMenus">
|
<el-input disabled v-model="form.proHideMenus">
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-button v-show="!show" @click="onChangeHideMenus" icon="Setting">
|
<el-button v-show="!show" @click="onChangeHideMenus" icon="Setting">
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="!globalStore.isIntl">
|
|
||||||
<el-form-item prop="hasSpec">
|
<el-form-item prop="hasSpec">
|
||||||
<el-checkbox v-model="dialogData.rowData!.hasSpec" :label="$t('toolbox.clam.cron')" />
|
<el-checkbox v-model="dialogData.rowData!.hasSpec" :label="$t('toolbox.clam.cron')" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -125,6 +125,15 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<div v-if="globalStore.isIntl">
|
||||||
|
<el-form-item v-if="(dialogData.rowData!.hasSpec) && !isProductPro">
|
||||||
|
<span>{{ $t('toolbox.clam.alertHelper') }}</span>
|
||||||
|
<el-button link type="primary" @click="toUpload">
|
||||||
|
{{ $t('license.levelUpPro') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="!globalStore.isIntl">
|
||||||
<el-form-item prop="hasAlert">
|
<el-form-item prop="hasAlert">
|
||||||
<el-checkbox v-model="dialogData.rowData!.hasAlert" :label="$t('alert.isAlert')" />
|
<el-checkbox v-model="dialogData.rowData!.hasAlert" :label="$t('alert.isAlert')" />
|
||||||
<span class="input-help">{{ $t('alert.clamHelper') }}</span>
|
<span class="input-help">{{ $t('alert.clamHelper') }}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user