base ui
This commit is contained in:
64
ui/src/layouts/panelLayout.vue
Normal file
64
ui/src/layouts/panelLayout.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<q-layout view="lHh Lpr lFf" style="background-color: #f8fafc;">
|
||||
<q-header class="bg-white q-py-sm" bordered>
|
||||
<q-toolbar>
|
||||
|
||||
<q-toolbar-title>
|
||||
<q-img src="logo.png" width="120px" fit="contain"/>
|
||||
</q-toolbar-title>
|
||||
|
||||
<q-btn
|
||||
:label="`${langs[locale.locale.value].flag} ${langs[locale.locale.value].short}`"
|
||||
no-caps
|
||||
color="grey-5"
|
||||
rounded
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 100px">
|
||||
<q-item v-for="(v, k) in langs" :key="k"
|
||||
clickable v-close-popup @click="locale.locale.value=k">
|
||||
<q-item-section>{{ v.flag }} {{ v.title }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
round
|
||||
flat
|
||||
class="on-right"
|
||||
icon="logout"
|
||||
color="pcolor3"
|
||||
@click="logout"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
|
||||
<q-page-container>
|
||||
<router-view/>
|
||||
</q-page-container>
|
||||
</q-layout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useLoginStore } from 'stores/login'
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { langs } from 'src/lib/langlist'
|
||||
|
||||
const loginStore = useLoginStore()
|
||||
const locale = useI18n({ useScope: 'global' })
|
||||
|
||||
|
||||
|
||||
const logout = function () {
|
||||
loginStore.logout()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user