Skip to content

Commit

Permalink
Add a loading icon to the columns. Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
breyten committed Mar 10, 2021
1 parent 46105e0 commit 9c26786
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,10 @@ h6 {
#add-column-content input {
width: 500px;
}

.loading {
background: url("/images/loading.svg") no-repeat;
width: 32px;
height: 32px;
margin: 0 auto;
}
1 change: 1 addition & 0 deletions public/images/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/column/Column.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ let show_marker = false;
let scroll_marker;
let virtual_list;
let show_sources = false;
let loading = true;
function getLocations() {
column_locations = $locations.filter((l) => inquiry.locations.includes(l.id));
Expand Down Expand Up @@ -139,6 +140,7 @@ onMount(function () {
}
});
items_.set(real_items);
loading = false;
});
});
// var entry_idx = $items.length + 10;
Expand Down Expand Up @@ -191,6 +193,9 @@ onDestroy(function () {
</div>
{/if}
<div id="column-contents-{column_id}" class="column-contents">
{#if loading}
<div class="loading"></div>
{/if}
{#if show_marker}
<Fab on:click={doGoToEntry} extended><Label>Nieuwe entries!</Label></Fab>
{/if}
Expand Down

0 comments on commit 9c26786

Please sign in to comment.