mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 18:29:51 +00: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'
|
: 'account'
|
||||||
|
|
||||||
onMount(() => subscribeMobile(setTheme))
|
onMount(() => subscribeMobile(setTheme))
|
||||||
|
|
||||||
|
async function checkIsHeaderHidden () {
|
||||||
|
return (
|
||||||
|
currentApplication?.checkIsHeaderHidden && (await (await getResource(currentApplication.checkIsHeaderHidden))())
|
||||||
|
)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if employee?.active === true}
|
{#if employee?.active === true}
|
||||||
@ -487,7 +493,11 @@
|
|||||||
{#if currentApplication}
|
{#if currentApplication}
|
||||||
<NavHeader label={currentApplication.label} />
|
<NavHeader label={currentApplication.label} />
|
||||||
{#if currentApplication.navHeaderComponent}
|
{#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}
|
||||||
{/if}
|
{/if}
|
||||||
<Navigator
|
<Navigator
|
||||||
|
@ -35,6 +35,7 @@ export interface Application extends Doc {
|
|||||||
component?: AnyComponent
|
component?: AnyComponent
|
||||||
|
|
||||||
navHeaderComponent?: AnyComponent
|
navHeaderComponent?: AnyComponent
|
||||||
|
checkIsHeaderHidden?: Resource<() => Promise<boolean>>
|
||||||
navFooterComponent?: AnyComponent
|
navFooterComponent?: AnyComponent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user