@setoelkahfi / svara / commits / 058e550

feat: added progress bar for file loading

mellbacon committed Jul 15, 2023 at 18:12 UTC 058e550b13f6755fd5c1fdc8e80e8ed3025267e4
1 file changed +17
src/lib/SidebarView.svelte
+17
@@ -1,4 +1,7 @@
1 <script lang="ts">
2 + import { treeLoading, dirToLoad, dirLoadFail } from "./File";
3 + import ProgressBar from "./utility/ProgressBar.svelte";
4 +
5 export let content = null;
6 </script>
7 <div id="sidebarview">
@@ -7,6 +10,11 @@
10 <svelte:component this={content}></svelte:component>
11 </div>
12 {/if}
13 + {#if $treeLoading}
14 + <div class="loading-container">
15 + <ProgressBar label="{$dirToLoad}..." fail={$dirLoadFail}></ProgressBar>
16 + </div>
17 + {/if}
18 </div>
19
20 <style lang="scss">
@@ -15,6 +23,15 @@
23 display: flex;
24 flex-direction: column;
25 align-items: center;
26 + .loading-container {
27 + width: 100%;
28 + height: 15%;
29 + justify-self: end;
30 + background-color: #171717;
31 + border-top: #414040 1px solid;
32 + border-left: #414040 1px solid;
33 + border-bottom: #414040 1px solid;
34 + }
35 }
36 #tool-view {
37 width: 100%;