mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
feat: Permission
This commit is contained in:
parent
1b5d0f78ef
commit
310fd12e87
|
|
@ -4,8 +4,12 @@
|
|||
<div class="logo mt-4">
|
||||
<LogoFull />
|
||||
</div>
|
||||
<el-divider direction="vertical" class="ml-24 mr-24" />
|
||||
<Workspace />
|
||||
<el-divider
|
||||
direction="vertical"
|
||||
class="ml-24 mr-24"
|
||||
v-if="hasPermission(EditionConst.IS_EE, 'OR')"
|
||||
/>
|
||||
<WorkspaceDropdown v-if="hasPermission(EditionConst.IS_EE, 'OR')" />
|
||||
<div class="flex-between w-full">
|
||||
<div></div>
|
||||
<TopMenu></TopMenu>
|
||||
|
|
@ -18,10 +22,14 @@
|
|||
import TopMenu from './top-menu/index.vue'
|
||||
import Avatar from './avatar/index.vue'
|
||||
import TopAbout from './top-about/index.vue'
|
||||
import Workspace from './workspace/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { EditionConst } from '@/utils/permission/data'
|
||||
import { hasPermission } from '@/utils/permission/index'
|
||||
import WorkspaceDropdown from './workspace-dropdown/index.vue'
|
||||
|
||||
import { useRouter } from 'vue-router'
|
||||
import useStore from '@/stores'
|
||||
const router = useRouter()
|
||||
const { user } = useStore()
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-top-bar-container {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ async function getWorkspaceList() {
|
|||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
// await getWorkspaceList()
|
||||
await getWorkspaceList()
|
||||
const id = localStorage.getItem('workspace_id') ?? 'default'
|
||||
currentWorkspace.value = workspaceList.value.find(item => item.id === id)
|
||||
})
|
||||
|
|
@ -77,7 +77,7 @@ const useUserStore = defineStore('user', {
|
|||
this.edition = ok.data.edition
|
||||
|
||||
if (this.isEE() || this.isPE()) {
|
||||
// await this.theme()
|
||||
await this.theme()
|
||||
} else {
|
||||
this.themeInfo = {
|
||||
...defaultPlatformSetting,
|
||||
|
|
|
|||
Loading…
Reference in New Issue