mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 22:44:13 +00:00
62 lines
1.7 KiB
Vue
62 lines
1.7 KiB
Vue
<template>
|
|
<el-dropdown :show-timeout="50" @command="handleCommand">
|
|
<span class="el-dropdown-link">
|
|
{{ $t('common.nav.Help') }}<i class="el-icon-arrow-down el-icon--right" />
|
|
</span>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item command="docs">{{ $t('common.nav.Docs') }}</el-dropdown-item>
|
|
<el-dropdown-item command="support">{{ $t('common.nav.TechnicalSupport') }}</el-dropdown-item>
|
|
<el-dropdown-item command="toolsDownload">{{ $t('common.nav.ToolsDownload') }}</el-dropdown-item>
|
|
<el-dropdown-item v-if="!hasLicence" command="enterprise">{{ $t('common.nav.EnterpriseEdition') }}</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'Help',
|
|
data() {
|
|
return {
|
|
URLSite: {
|
|
HELP_DOCUMENT_URL: '',
|
|
HELP_SUPPORT_URL: ''
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
hasLicence() {
|
|
return this.$store.getters.hasValidLicense
|
|
}
|
|
},
|
|
created() {
|
|
this.initHelpURL()
|
|
},
|
|
methods: {
|
|
initHelpURL() {
|
|
this.URLSite.HELP_DOCUMENT_URL = this.$store.getters.publicSettings.HELP_DOCUMENT_URL
|
|
this.URLSite.HELP_SUPPORT_URL = this.$store.getters.publicSettings.HELP_SUPPORT_URL
|
|
},
|
|
handleCommand(command) {
|
|
switch (command) {
|
|
case 'support':
|
|
window.open(this.URLSite.HELP_SUPPORT_URL, '_blank')
|
|
break
|
|
case 'enterprise':
|
|
window.open('https://jumpserver.org/enterprise.html', '_blank')
|
|
break
|
|
case 'toolsDownload':
|
|
window.open('/core/download/', '_blank')
|
|
break
|
|
default:
|
|
window.open(this.URLSite.HELP_DOCUMENT_URL, '_blank')
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|