|
30 | 30 | ConnectDialogStates, |
31 | 31 | connectionDialogState, |
32 | 32 | } from './script/stores/connectDialogStore'; |
| 33 | + import { isLoading } from 'svelte-i18n'; |
33 | 34 |
|
34 | 35 | onMount(() => { |
35 | 36 | const { bluetooth, usb } = $compatibility; |
|
51 | 52 | } |
52 | 53 | </script> |
53 | 54 |
|
54 | | -<Router> |
55 | | - <div class="sr-only" bind:this={routeAnnouncementEl} aria-live="polite" /> |
56 | | - {#if !$compatibility.platformAllowed} |
57 | | - <!-- Denies mobile users access to the platform --> |
58 | | - <IncompatiblePlatformView /> |
59 | | - {:else} |
60 | | - <div class="h-full w-full m-0 relative flex"> |
61 | | - <OverlayView /> |
62 | | - <!-- Wait for consent dialog to avoid a clash --> |
63 | | - {#if $consent} |
64 | | - <CompatibilityWarningDialog /> |
65 | | - {/if} |
66 | | - |
67 | | - <div class="w-full flex flex-col bg-backgrounddark"> |
68 | | - <ControlBar> |
69 | | - <div class="flex items-center divide-x h-full"> |
70 | | - <div class="h-32px flex items-center"> |
71 | | - <img class="pr-3 w-166px" src={microbitLogoImage} alt="micro:bit" /> |
| 55 | +{#if !$isLoading} |
| 56 | + <Router> |
| 57 | + <div class="sr-only" bind:this={routeAnnouncementEl} aria-live="polite" /> |
| 58 | + {#if !$compatibility.platformAllowed} |
| 59 | + <!-- Denies mobile users access to the platform --> |
| 60 | + <IncompatiblePlatformView /> |
| 61 | + {:else} |
| 62 | + <div class="h-full w-full m-0 relative flex"> |
| 63 | + <OverlayView /> |
| 64 | + <!-- Wait for consent dialog to avoid a clash --> |
| 65 | + {#if $consent} |
| 66 | + <CompatibilityWarningDialog /> |
| 67 | + {/if} |
| 68 | + <div class="w-full flex flex-col bg-backgrounddark"> |
| 69 | + <ControlBar> |
| 70 | + <div class="flex items-center divide-x h-full"> |
| 71 | + <div class="h-32px flex items-center"> |
| 72 | + <img class="pr-3 w-166px" src={microbitLogoImage} alt="micro:bit" /> |
| 73 | + </div> |
| 74 | + <div class="h-32px flex items-center"> |
| 75 | + <img |
| 76 | + class="pl-3 mt-2px w-253px" |
| 77 | + src={appNameImage} |
| 78 | + alt={$t('content.index.title')} /> |
| 79 | + </div> |
72 | 80 | </div> |
73 | | - <div class="h-32px flex items-center"> |
74 | | - <img |
75 | | - class="pl-3 mt-2px w-253px" |
76 | | - src={appNameImage} |
77 | | - alt={$t('content.index.title')} /> |
| 81 | + <div class="flex gap-5"> |
| 82 | + <a |
| 83 | + class="text-xl p-2 rounded-full outline-none focus-visible:ring-ringBright focus-visible:ring-4 focus-visible:ring-offset-1" |
| 84 | + href={Paths.HOME} |
| 85 | + on:click|preventDefault={() => navigate(Paths.HOME)}> |
| 86 | + <span class="sr-only">{$t('homepage.Link')}</span> |
| 87 | + <HomeIcon class="text-white" aria-hidden /> |
| 88 | + </a> |
| 89 | + <SettingsMenu /> |
| 90 | + <HelpMenu /> |
78 | 91 | </div> |
79 | | - </div> |
80 | | - <div class="flex gap-5"> |
81 | | - <a |
82 | | - class="text-xl p-2 rounded-full outline-none focus-visible:ring-ringBright focus-visible:ring-4 focus-visible:ring-offset-1" |
83 | | - href={Paths.HOME} |
84 | | - on:click|preventDefault={() => navigate(Paths.HOME)}> |
85 | | - <span class="sr-only">{$t('homepage.Link')}</span> |
86 | | - <HomeIcon class="text-white" aria-hidden /> |
87 | | - </a> |
88 | | - <SettingsMenu /> |
89 | | - <HelpMenu /> |
90 | | - </div> |
91 | | - </ControlBar> |
| 92 | + </ControlBar> |
92 | 93 |
|
93 | | - <div class="relative flex-1 flex-row"> |
94 | | - <PageContentView /> |
| 94 | + <div class="relative flex-1 flex-row"> |
| 95 | + <PageContentView /> |
| 96 | + </div> |
95 | 97 | </div> |
96 | 98 | </div> |
97 | | - </div> |
98 | | - {/if} |
99 | | -</Router> |
100 | | -<ConnectDialogContainer /> |
| 99 | + {/if} |
| 100 | + </Router> |
| 101 | + <ConnectDialogContainer /> |
| 102 | +{/if} |
0 commit comments