179 lines
4.3 KiB
Vue
179 lines
4.3 KiB
Vue
<template>
|
|
<q-layout view="lHh Lpr lFf">
|
|
<q-header elevated>
|
|
<q-toolbar>
|
|
<q-btn flat dense round icon="menu" aria-label="Menu" @click="toggleLeftDrawer" />
|
|
<q-toolbar-title>
|
|
{{ productName }}
|
|
<q-badge align="top" outline>V{{ version }}</q-badge>
|
|
</q-toolbar-title>
|
|
<domain-selector></domain-selector>
|
|
<q-btn flat round dense icon="logout" @click="authStore.logout()" />
|
|
</q-toolbar>
|
|
</q-header>
|
|
|
|
<q-drawer :model-value="authStore.LeftDrawer" :show-if-above="false" bordered>
|
|
<q-list>
|
|
<q-item-label header>
|
|
メニュー
|
|
</q-item-label>
|
|
|
|
<EssentialLink v-for="link in essentialLinks" :key="link.title" v-bind="link" />
|
|
<div v-if="isAdmin">
|
|
<EssentialLink v-for="link in adminLinks" :key="link.title" v-bind="link" />
|
|
</div>
|
|
</q-list>
|
|
</q-drawer>
|
|
|
|
<q-page-container>
|
|
<router-view />
|
|
</q-page-container>
|
|
</q-layout>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { onMounted } from 'vue';
|
|
import EssentialLink, { EssentialLinkProps } from 'components/EssentialLink.vue';
|
|
import DomainSelector from 'components/DomainSelector.vue';
|
|
import { useAuthStore } from 'stores/useAuthStore';
|
|
|
|
const authStore = useAuthStore();
|
|
|
|
const essentialLinks: EssentialLinkProps[] = [
|
|
{
|
|
title: 'ホーム',
|
|
caption: '設計書から導入する',
|
|
icon: 'home',
|
|
link: '/',
|
|
target: '_self'
|
|
},
|
|
{
|
|
title: 'フローエディター',
|
|
caption: 'イベントを設定する',
|
|
icon: 'account_tree',
|
|
link: '/#/FlowChart',
|
|
target: '_self'
|
|
},
|
|
// {
|
|
// title: '条件エディター',
|
|
// caption: 'condition',
|
|
// icon: 'tune',
|
|
// link: '/#/condition',
|
|
// target:'_self'
|
|
// },
|
|
{
|
|
title: '',
|
|
isSeparator: true
|
|
},
|
|
// {
|
|
// title:'Kintone ポータル',
|
|
// caption:'Kintone',
|
|
// icon:'cloud_queue',
|
|
// link:'https://mfu07rkgnb7c.cybozu.com/k/#/portal'
|
|
// },
|
|
// {
|
|
// title:'CUSTOMINE',
|
|
// caption:'gusuku',
|
|
// link:'https://app-customine.gusuku.io/drive.html',
|
|
// icon:'settings_suggest'
|
|
// },
|
|
// {
|
|
// title:'Kintone API ドキュメント',
|
|
// caption:'Kintone API',
|
|
// link:'https://cybozu.dev/ja/kintone/docs/',
|
|
// icon:'help_outline'
|
|
// },
|
|
// {
|
|
// title:'',
|
|
// isSeparator:true
|
|
// },
|
|
// {
|
|
// title: 'Docs',
|
|
// caption: 'quasar.dev',
|
|
// icon: 'school',
|
|
// link: 'https://quasar.dev'
|
|
// },
|
|
// {
|
|
// title: 'Icons',
|
|
// caption: 'Material Icons',
|
|
// icon: 'insert_emoticon',
|
|
// link: 'https://fonts.google.com/icons?selected=Material+Icons:insert_emoticon:'
|
|
// },
|
|
// {
|
|
// title: 'Github',
|
|
// caption: 'github.com/quasarframework',
|
|
// icon: 'code',
|
|
// link: 'https://github.com/quasarframework'
|
|
// },
|
|
// {
|
|
// title: 'Discord Chat Channel',
|
|
// caption: 'chat.quasar.dev',
|
|
// icon: 'chat',
|
|
// link: 'https://chat.quasar.dev'
|
|
// },
|
|
// {
|
|
// title: 'Forum',
|
|
// caption: 'forum.quasar.dev',
|
|
// icon: 'record_voice_over',
|
|
// link: 'https://forum.quasar.dev'
|
|
// },
|
|
// {
|
|
// title: 'Twitter',
|
|
// caption: '@quasarframework',
|
|
// icon: 'rss_feed',
|
|
// link: 'https://twitter.quasar.dev'
|
|
// },
|
|
// {
|
|
// title: 'Facebook',
|
|
// caption: '@QuasarFramework',
|
|
// icon: 'public',
|
|
// link: 'https://facebook.quasar.dev'
|
|
// },
|
|
// {
|
|
// title: 'Quasar Awesome',
|
|
// caption: 'Community Quasar projects',
|
|
// icon: 'favorite',
|
|
// link: 'https://awesome.quasar.dev'
|
|
// }
|
|
];
|
|
|
|
const adminLinks: EssentialLinkProps[] = [
|
|
{
|
|
title: 'ユーザー',
|
|
caption: 'ユーザー設定する',
|
|
icon: 'manage_accounts',
|
|
link: '/#/user',
|
|
target: '_self'
|
|
},
|
|
{
|
|
title: 'テナント',
|
|
caption: 'テナント設定',
|
|
icon: 'domain',
|
|
link: '/#/domain',
|
|
target: '_self'
|
|
},
|
|
{
|
|
title: 'アカウント',
|
|
caption: 'アカウント設定',
|
|
icon: 'assignment_ind',
|
|
link: '/#/userDomain',
|
|
target: '_self'
|
|
},
|
|
]
|
|
|
|
const version = process.env.version;
|
|
const productName = process.env.productName;
|
|
|
|
onMounted(() => {
|
|
authStore.toggleLeftMenu();
|
|
});
|
|
|
|
function toggleLeftDrawer() {
|
|
authStore.toggleLeftMenu();
|
|
}
|
|
function isAdmin(){
|
|
const permission = authStore.permissions;
|
|
return permission === 'admin'
|
|
}
|
|
</script>
|