mirror of https://github.com/nocodb/nocodb
Pranav C
2 years ago
8 changed files with 875 additions and 39 deletions
@ -0,0 +1,29 @@
|
||||
<script setup lang="ts"> |
||||
import { useSidebar } from '#imports' |
||||
|
||||
const rightSidebar = useSidebar('nc-right-sidebar') |
||||
const leftSidebar = useSidebar('nc-left-sidebar') |
||||
|
||||
const isFullScreen = computed({ |
||||
get: () => !(rightSidebar.isOpen.value || leftSidebar.isOpen.value), |
||||
set: (value) => { |
||||
rightSidebar.toggle(!value) |
||||
leftSidebar.toggle(!value) |
||||
}, |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<a-tooltip> |
||||
<!-- todo: i18n --> |
||||
<template #title> {{ isFullScreen ? 'Exit full width' : 'Full width' }}</template> |
||||
<div |
||||
v-e="['c:toolbar:fullscreen']" |
||||
class="nc-fullscreen-btn cursor-pointer flex align-center self-center px-2 py-2 mr-2" |
||||
@click="isFullScreen = !isFullScreen" |
||||
> |
||||
<IcTwotoneWidthNormal v-if="isFullScreen" class="text-gray-300" /> |
||||
<IcTwotoneWidthFull v-else class="text-gray-300" /> |
||||
</div> |
||||
</a-tooltip> |
||||
</template> |
@ -1,34 +0,0 @@
|
||||
<template> |
||||
<a-tooltip placement="bottom"> |
||||
<!-- todo: i18n --> |
||||
<template #title> {{ isFullScreen ? 'Exit fullscreen' : 'Fullscreen' }}</template> |
||||
<div |
||||
v-e="['c:toolbar:fullscreen']" |
||||
class="nc-fullscreen-btn cursor-pointer flex align-center" |
||||
> |
||||
<MdiFullscreenExit v-if="isFullScreen" @click="isFullScreen = false" /> |
||||
<MdiFullscreen v-else @click="isFullScreen = true" /> |
||||
</div> |
||||
</a-tooltip> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
|
||||
// provide the sidebar injection state |
||||
import { useSidebar } from '~/composables' |
||||
|
||||
const rightSidebar = useSidebar('nc-right-sidebar') |
||||
const leftSidebar = useSidebar('nc-left-sidebar') |
||||
|
||||
const isFullScreen = computed({ |
||||
get: () => !(rightSidebar.isOpen.value || leftSidebar.isOpen.value), |
||||
set: (value) => { |
||||
rightSidebar.toggle(!value) |
||||
leftSidebar.toggle(!value) |
||||
}, |
||||
}) |
||||
</script> |
||||
|
||||
<style scoped> |
||||
|
||||
</style> |
Loading…
Reference in new issue