mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
Add checkIsHeaderHidden func to Application model (#2690)
Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
This commit is contained in:
parent
2c1eea801e
commit
a089cb9198
@ -386,6 +386,12 @@
|
||||
: 'account'
|
||||
|
||||
onMount(() => subscribeMobile(setTheme))
|
||||
|
||||
async function checkIsHeaderHidden () {
|
||||
return (
|
||||
currentApplication?.checkIsHeaderHidden && (await (await getResource(currentApplication.checkIsHeaderHidden))())
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if employee?.active === true}
|
||||
@ -487,7 +493,11 @@
|
||||
{#if currentApplication}
|
||||
<NavHeader label={currentApplication.label} />
|
||||
{#if currentApplication.navHeaderComponent}
|
||||
<Component is={currentApplication.navHeaderComponent} props={{ currentSpace }} shrink />
|
||||
{#await checkIsHeaderHidden() then isHidden}
|
||||
{#if !isHidden}
|
||||
<Component is={currentApplication.navHeaderComponent} props={{ currentSpace }} shrink />
|
||||
{/if}
|
||||
{/await}
|
||||
{/if}
|
||||
{/if}
|
||||
<Navigator
|
||||
|
@ -35,6 +35,7 @@ export interface Application extends Doc {
|
||||
component?: AnyComponent
|
||||
|
||||
navHeaderComponent?: AnyComponent
|
||||
checkIsHeaderHidden?: Resource<() => Promise<boolean>>
|
||||
navFooterComponent?: AnyComponent
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user