feat(web) add scrollbar with timeline information (#658)

- Implement a scrollbar with a timeline similar to Google Photos
- The scrollbar can also be dragged
This commit is contained in:
Alex
2022-09-09 15:55:20 -05:00
committed by GitHub
parent b6d025da09
commit d856b35afc
9 changed files with 194 additions and 69 deletions

View File

@@ -18,6 +18,7 @@
let showSharingCount = false;
let showAlbumsCount = false;
// let domCount = 0;
onMount(async () => {
if ($page.routeId == 'albums') {
selectedAction = AppSideBarSelection.ALBUMS;
@@ -26,6 +27,10 @@
} else if ($page.routeId == 'sharing') {
selectedAction = AppSideBarSelection.SHARING;
}
// setInterval(() => {
// domCount = document.getElementsByTagName('*').length;
// }, 500);
});
const getAssetCount = async () => {
@@ -48,6 +53,7 @@
</script>
<section id="sidebar" class="flex flex-col gap-1 pt-8 pr-6">
<!-- {domCount} -->
<a
sveltekit:prefetch
sveltekit:noscroll
@@ -110,7 +116,7 @@
<LoadingSpinner />
{:then data}
<div>
<p>{data.shared + data.sharing} albums</p>
<p>{data.shared + data.sharing} Albums</p>
</div>
{/await}
</div>
@@ -145,7 +151,7 @@
<LoadingSpinner />
{:then data}
<div>
<p>{data.owned} albums</p>
<p>{data.owned} Albums</p>
</div>
{/await}
</div>