File tree Expand file tree Collapse file tree 1 file changed +0
-32
lines changed
src/routes/(console)/organization-[organization] Expand file tree Collapse file tree 1 file changed +0
-32
lines changed Original file line number Diff line number Diff line change 4
4
import { organization } from ' $lib/stores/organization' ;
5
5
import { calculateEnterpriseTrial , hideBillingHeaderRoutes } from ' $lib/stores/billing' ;
6
6
import { base } from ' $app/paths' ;
7
-
8
- import { onDestroy , onMount } from ' svelte' ;
9
7
import { isTabletViewport } from ' $lib/stores/viewport' ;
10
8
import GradientBanner from ' $lib/components/billing/gradientBanner.svelte' ;
11
9
import { Layout , Typography } from ' @appwrite.io/pink-svelte' ;
12
10
13
- let container: HTMLElement | null = null ;
14
-
15
- function setNavigationHeight() {
16
- const alertHeight = container ? container .getBoundingClientRect ().height : 0 ;
17
- const header: HTMLHeadingElement = document .querySelector (' main > header' );
18
- const sidebar: HTMLElement = document .querySelector (' main > div > nav' );
19
- const contentSection: HTMLElement = document .querySelector (' main > div > section' );
20
-
21
- if (header ) {
22
- header .style .top = ` ${alertHeight }px ` ;
23
- }
24
- if (sidebar ) {
25
- sidebar .style .top = ` ${alertHeight + ($isTabletViewport ? 0 : header .getBoundingClientRect ().height )}px ` ;
26
- sidebar .style .height = ` calc(100vh - (${alertHeight + ($isTabletViewport ? 0 : header .getBoundingClientRect ().height )}px)) ` ;
27
- }
28
- if (contentSection ) {
29
- contentSection .style .paddingBlockStart = ` ${alertHeight }px ` ;
30
- }
31
- }
32
-
33
- onMount (() => {
34
- setNavigationHeight ();
35
- });
36
-
37
- onDestroy (() => {
38
- container = null ;
39
- setNavigationHeight ();
40
- });
41
-
42
11
$ : upgradeUrl = ` ${base }/organization-${$organization ?.$id }/change-plan ` ;
43
12
$ : remainingDays = calculateEnterpriseTrial ($organization );
44
13
</script >
45
14
46
- <svelte:window on:resize ={setNavigationHeight } />
47
15
{#if $organization ?.$id && remainingDays > 0 && ! hideBillingHeaderRoutes .includes (page .url .pathname )}
48
16
<GradientBanner >
49
17
<Layout .Stack
You can’t perform that action at this time.
0 commit comments