mirror of
https://github.com/jumpserver/lina.git
synced 2025-04-26 18:50:47 +00:00
feat: add xpack lock feat
This commit is contained in:
parent
caf34a96e6
commit
9933f68ba9
2
.gitignore
vendored
2
.gitignore
vendored
@ -17,3 +17,5 @@ tests/**/coverage/
|
||||
*.sln
|
||||
.env.development
|
||||
.python-version
|
||||
|
||||
helper.json
|
@ -94,6 +94,7 @@
|
||||
"@vue/cli-plugin-unit-jest": "3.6.3",
|
||||
"@vue/cli-service": "3.6.0",
|
||||
"@vue/test-utils": "1.0.0-beta.29",
|
||||
"@vue/runtime-dom": "3.5.13",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "10.0.1",
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-card :class="'ibox ' + type" shadow="never" v-bind="$attrs">
|
||||
<el-card :class="'ibox ' + type" :shadow="shadow" v-bind="$attrs">
|
||||
<template #header>
|
||||
<slot name="header">
|
||||
<div v-if="title" slot="header" class="clearfix ibox-title">
|
||||
@ -26,6 +26,10 @@ export default {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
shadow: {
|
||||
type: String,
|
||||
default: 'never'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -58,7 +58,7 @@ export default {
|
||||
.quick-actions ::v-deep button {
|
||||
padding: 4px 5px;
|
||||
font-size: 13px;
|
||||
width: 65px;
|
||||
min-width: 65px;
|
||||
|
||||
span {
|
||||
overflow: hidden;
|
||||
|
@ -12,7 +12,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- 默认插槽内容,全宽 -->
|
||||
<el-col :md="single" :offset="(24 - single)/2" :sm="24">
|
||||
<el-col :md="single" :sm="24">
|
||||
<slot />
|
||||
</el-col>
|
||||
</template>
|
||||
|
@ -29,7 +29,22 @@
|
||||
<slot name="headingRightSide" />
|
||||
</template>
|
||||
</PageHeading>
|
||||
<PageContent class="page-content">
|
||||
<PageContent :class="{'disabled': disabled}" class="page-content">
|
||||
<div v-if="disabled" class="content-disabled-mask">
|
||||
<IBox shadow="always">
|
||||
<div class="disabled-content">
|
||||
<div class="lock-icon">
|
||||
<i class="el-icon-unlock" />
|
||||
</div>
|
||||
<div class="disabled-text">
|
||||
{{ $t('UpgradeEnterpriseEditionHelpText') }}
|
||||
</div>
|
||||
<el-button class="upgrade-btn" type="primary">
|
||||
{{ $t('UpgradeEnterpriseEdition') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</IBox>
|
||||
</div>
|
||||
<el-alert v-if="helpMessage" type="success">
|
||||
<span v-sanitize="helpMessage" class="announcement-main" />
|
||||
</el-alert>
|
||||
@ -46,6 +61,7 @@ import UserConfirmDialog from '@/components/Apps/UserConfirmDialog/index.vue'
|
||||
import TagsView from '../TagsView/index.vue'
|
||||
import { toSentenceCase } from '@/utils/common'
|
||||
import { mapGetters } from 'vuex'
|
||||
import IBox from '@/components/IBox/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'Page',
|
||||
@ -53,9 +69,14 @@ export default {
|
||||
UserConfirmDialog,
|
||||
PageHeading,
|
||||
PageContent,
|
||||
TagsView
|
||||
TagsView,
|
||||
IBox
|
||||
},
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
@ -81,7 +102,13 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['inDrawer']),
|
||||
...mapGetters(['inDrawer', 'hasValidLicense']),
|
||||
iDisabled() {
|
||||
if (this.disabled !== null) {
|
||||
return this.disabled
|
||||
}
|
||||
return !this.hasValidLicense
|
||||
},
|
||||
noTitle() {
|
||||
return this.title === 'null' || this.title === null
|
||||
},
|
||||
@ -116,6 +143,10 @@ export default {
|
||||
},
|
||||
endLongPress() {
|
||||
clearTimeout(this.longPressTimer)
|
||||
},
|
||||
handleUpgrade() {
|
||||
const url = 'http://www.jumpserver.org/support/'
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,13 +166,6 @@ export default {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
&.no-title {
|
||||
}
|
||||
|
||||
.page-head {
|
||||
|
||||
}
|
||||
|
||||
.page-content {
|
||||
flex: 1; /* 占用剩余高度 */
|
||||
//height: calc(100% - 50px);
|
||||
@ -185,4 +209,59 @@ export default {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
.ibox {
|
||||
width: 500px;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
}
|
||||
|
||||
.content-disabled-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
backdrop-filter: blur(2px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
|
||||
.disabled-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.lock-icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 10px auto;
|
||||
|
||||
i {
|
||||
font-size: 40px;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled-text {
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.upgrade-btn {
|
||||
min-width: 120px;
|
||||
margin: 10px auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.page-content.disabled {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
@ -30,6 +31,9 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['hasValidLicense'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
@ -37,6 +38,9 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['hasValidLicense'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
@ -36,6 +37,9 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['hasValidLicense'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<TabPage
|
||||
:active-menu.sync="activeMenu"
|
||||
:submenu="tab.submenu"
|
||||
:disabled="true"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
@ -2,11 +2,13 @@
|
||||
<TabPage
|
||||
:active-menu.sync="activeMenu"
|
||||
:submenu="tab.submenu"
|
||||
:disabled="!hasValidLicense"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'IntegrationApplicationList',
|
||||
@ -41,9 +43,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
async mounted() {
|
||||
},
|
||||
methods: {}
|
||||
computed: {
|
||||
...mapGetters(['hasValidLicense'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" />
|
||||
<TabPage :active-menu.sync="config.activeMenu" :submenu="config.submenu" :disabled="!hasValidLicense" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { TabPage } from '@/layout/components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AccountCheck',
|
||||
@ -42,6 +43,9 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['hasValidLicense'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user