Skip to content

Commit

Permalink
Re-introduced loading screen for entire app. Changed loading flag to …
Browse files Browse the repository at this point in the history
…use sidebar arrows instead
  • Loading branch information
JonAlexandra committed Jul 3, 2023
1 parent fee452e commit 7369b68
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
<!-- Denies mobile users access to the platform -->
<IncompatiblePlatformView />
{:else}
<!-- {#if $state.isLoading}
{#if $state.isLoading}
<main class="h-screen w-screen bg-primary flex absolute z-10" transition:fade>
<LoadingSpinner />
</main>
{/if} -->
{/if}
<!-- Here we use the hidden class, to allow for it to load in. -->
<!-- <main class="h-screen w-screen m-0 relative flex" class:hidden={$state.isLoading}> -->
<main class="h-screen w-screen m-0 relative flex">
Expand Down
7 changes: 0 additions & 7 deletions src/pages/Homepage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,12 @@
import SelectLanguageControlBarDropdown from '../components/control-bar/control-bar-items/SelectLanguageControlBarDropdown.svelte';
import { t } from '../i18n';
import { state } from '../script/stores/uiStore';
import { fade } from 'svelte/transition';
import LoadingSpinner from '../components/LoadingSpinner.svelte';
// Just add the content titles you wish to put on front page, in the order you wish them to be there
const contentTiles = [DoItYourselfMachineLearningTile, IntroVideoTile];
</script>

<main class="h-full flex flex-col">
{#if $state.isLoading}
<div class="h-full w-full bg-primary flex absolute z-10" transition:fade>
<LoadingSpinner />
</div>
{/if}
<div class:hidden={$state.isLoading}>
<div>
<ControlBar>
Expand Down
6 changes: 6 additions & 0 deletions src/views/SideBarMenuView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { get } from 'svelte/store';
import Environment from '../script/Environment.js';
import { Paths, currentPath, navigate } from '../router/paths';
import { state } from '../script/stores/uiStore';
$: shouldBeExpanded = (menuProps: MenuProperties) => {
let path = $currentPath;
Expand All @@ -16,6 +17,10 @@
}
return menuProps.additionalExpandPaths.includes(path);
};
const onLoad = () => {
$state.isLoading = false;
};
</script>

<div
Expand Down Expand Up @@ -60,6 +65,7 @@
{#if id !== get(Menus.getMenuStore()).length - 1}
<div class="text-center ml-auto mr-auto mb-1 mt-1">
<img
on:load={onLoad}
class="m-auto"
src="/imgs/down_arrow.svg"
alt="down arrow icon"
Expand Down

0 comments on commit 7369b68

Please sign in to comment.