Skip to content

Commit

Permalink
shows splash screen during app boot
Browse files Browse the repository at this point in the history
  • Loading branch information
soaresa committed May 23, 2024
1 parent aaaed2d commit 9c1ae89
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Binary file added public/libra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import UpgradeApp from './components/about/UpgradeApp.svelte'
import { tryUpdate } from './modules/updater'
import { isLoading } from 'svelte-i18n'
import { isBooted } from './modules/boot'
import SplashScreen from './components/layout/SplashScreen.svelte'
// black magic with I18n here
// temporarily set up here otherwise... issues
Expand Down Expand Up @@ -117,6 +119,10 @@
<Style />
<UpgradeApp />

{#if !$isBooted}
<SplashScreen />
{/if}

{#if $isInit}
<SearchingFullnodes />
<KeyError/>
Expand Down
36 changes: 36 additions & 0 deletions src/components/layout/SplashScreen.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script>
export let loading = true;
</script>

<style>
.splash-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
background-color: #ffffff;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.logo {
width: 150px;
height: 150px;
}
h1 {
margin-top: 20px;
font-size: 2rem;
}
</style>

{#if loading}
<div class="splash-container">
<img src="/libra.png" alt="Libra Logo" class="logo" />
<h1 class="uk-text-muted">Carpe Libra</h1>
</div>
{/if}

0 comments on commit 9c1ae89

Please sign in to comment.