mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 19:43:58 +00:00
redis loading keys UX
This commit is contained in:
@@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
let reloadToken2 = 0;
|
let reloadToken2 = 0;
|
||||||
let maxShowCount = SHOW_INCREMENT;
|
let maxShowCount = SHOW_INCREMENT;
|
||||||
let loading = true;
|
let loading = false;
|
||||||
|
let loadingWhole = false;
|
||||||
let items = [];
|
let items = [];
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
});
|
});
|
||||||
items = result;
|
items = result;
|
||||||
loading = false;
|
loading = false;
|
||||||
|
loadingWhole = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
@@ -50,6 +52,10 @@
|
|||||||
maxShowCount;
|
maxShowCount;
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: {
|
||||||
|
loadingWhole = true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if loading && items.length == 0}
|
{#if loading && items.length == 0}
|
||||||
@@ -71,12 +77,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
{#if loading}
|
{#if loading}
|
||||||
<AppObjectCore
|
<AppObjectCore {indentLevel} title="Loading keys..." icon="icon loading" expandIcon="icon invisible-box" />
|
||||||
{indentLevel}
|
|
||||||
title="Loading next keys..."
|
|
||||||
icon="icon loading"
|
|
||||||
expandIcon="icon invisible-box"
|
|
||||||
/>
|
|
||||||
{:else if items.length > maxShowCount}
|
{:else if items.length > maxShowCount}
|
||||||
<AppObjectCore
|
<AppObjectCore
|
||||||
{indentLevel}
|
{indentLevel}
|
||||||
|
|||||||
Reference in New Issue
Block a user