mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat(install-user-template): Install a user template * Review feedback * Review feedback v2
23 lines
772 B
JavaScript
23 lines
772 B
JavaScript
import { inject, provide, ref } from 'vue'
|
|
|
|
export const workspaceSidebarVisibleKey = Symbol('workspaceSidebarVisible')
|
|
|
|
/**
|
|
* Tells the components of the `app` layout whether the sidebar lists the
|
|
* applications and the pending jobs of the selected workspace, which it only
|
|
* does when it's the workspace sidebar and it isn't collapsed.
|
|
*
|
|
* @param {import('vue').Ref<boolean>} visible
|
|
*/
|
|
export function provideWorkspaceSidebarVisible(visible) {
|
|
provide(workspaceSidebarVisibleKey, visible)
|
|
}
|
|
|
|
/**
|
|
* @returns {import('vue').Ref<boolean>} Whether the sidebar of the selected
|
|
* workspace shows. Always false outside of the `app` layout.
|
|
*/
|
|
export function injectWorkspaceSidebarVisible() {
|
|
return inject(workspaceSidebarVisibleKey, () => ref(false), true)
|
|
}
|