2
0
mirror of https://github.com/frappe/books.git synced 2025-01-10 10:16:22 +00:00
books/src/pages/Desk.vue
18alantom a9caf67236 fix(ux): don't spawn a new window for settings
- db changing in the sidebar
2021-11-24 14:38:13 +05:30

38 lines
877 B
Vue

<template>
<div class="flex overflow-hidden">
<Sidebar class="w-56 flex-shrink-0" @change-db-file="$emit('change-db-file')"/>
<div class="flex flex-1 overflow-y-hidden bg-white">
<keep-alive>
<router-view class="flex-1" :key="$route.path" />
</keep-alive>
<div class="flex" v-if="showQuickEdit">
<keep-alive>
<router-view
name="edit"
class="w-80 flex-1"
:key="$route.query.doctype + $route.query.name"
/>
</keep-alive>
</div>
</div>
</div>
</template>
<script>
import Sidebar from '../components/Sidebar';
export default {
name: 'Desk',
components: {
Sidebar
},
computed: {
showQuickEdit() {
return (
this.$route.query.edit &&
this.$route.query.doctype &&
this.$route.query.name
);
}
}
};
</script>