1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-17 21:44:05 +00:00

Preserve state between tabs (cc #37) (fixes #56)

This commit is contained in:
2023-07-08 13:07:55 +02:00
parent 64fb9ed173
commit 5476df5fe9
12 changed files with 106 additions and 110 deletions

View File

@ -1,9 +1,9 @@
<script>
import Icon from '$components/icon.svelte';
import ObjectGrid from '$components/objectgrid.svelte';
import { onMount } from 'svelte';
export let collection;
export let visible = false;
let activePath = [];
let _indexes = [];
@ -11,6 +11,10 @@
let busy = false;
async function refresh() {
if (!visible) {
return;
}
busy = 'Fetching indexes…';
error = await collection.getIndexes();
@ -49,7 +53,7 @@
}
}
onMount(refresh);
$: visible && refresh();
</script>
<div class="indexes">