-
- {currentValue}
- {currentUnit}
+ {#if currentValue !== undefined && currentUnit !== undefined && progress !== undefined && maxValue !== undefined && maxUnit !== undefined}
+
+
+
+ {currentValue}
+ {currentUnit}
+
+
{progress}%
+
+
+
+ {maxValue}
+ {maxUnit}
-
{progress}%
-
- {maxValue}
- {maxUnit}
-
-
= 75 && progress < 100}
- class:is-danger={progress >= 100}
- style:--graph-size={Math.max(Math.min(progress, maximum), minimum) + '%'} />
+ {/if}
+ {#if showBar && progressBarData.length > 0}
+
{/if}
diff --git a/src/lib/components/progressBar.svelte b/src/lib/components/progressBarDeprecated.svelte
similarity index 100%
rename from src/lib/components/progressBar.svelte
rename to src/lib/components/progressBarDeprecated.svelte
diff --git a/src/lib/components/progressbar/ProgressBar.svelte b/src/lib/components/progressbar/ProgressBar.svelte
new file mode 100644
index 000000000..575c782c0
--- /dev/null
+++ b/src/lib/components/progressbar/ProgressBar.svelte
@@ -0,0 +1,92 @@
+
+
+
+ {#each $$props.data as item}
+ ${item.tooltip.title} ${item.tooltip.label}`
+ }}>
+
+ {/each}
+ {#if remainder > 0}
+
+ {/if}
+
+
+
diff --git a/src/lib/components/progressbar/index.ts b/src/lib/components/progressbar/index.ts
new file mode 100644
index 000000000..48c2711b8
--- /dev/null
+++ b/src/lib/components/progressbar/index.ts
@@ -0,0 +1,17 @@
+export type ProgressbarData = {
+ size: number;
+ color: string;
+ tooltip?: {
+ title: string;
+ label: string;
+ // linkTitle?: string;
+ // linkPath?: string;
+ };
+};
+
+export type ProgressbarProps = {
+ maxSize: number;
+ data: Array
;
+};
+
+export { default as ProgressBar } from './ProgressBar.svelte';
diff --git a/src/lib/elements/forms/inputDigits.svelte b/src/lib/elements/forms/inputDigits.svelte
index c822d50bb..71b330027 100644
--- a/src/lib/elements/forms/inputDigits.svelte
+++ b/src/lib/elements/forms/inputDigits.svelte
@@ -38,6 +38,21 @@
}
});
+ /**
+ * Clears the input fields and moves the focus to the first input.
+ * Usually used when resetting fields on auth fails, etc.
+ */
+ export function clearInputsAndRefocus() {
+ value = '';
+ autoSubmitted = false;
+
+ if (element) {
+ const inputs = element.querySelectorAll('input');
+ inputs.forEach((input) => (input.value = ''));
+ if (autofocus) inputs[0].focus();
+ }
+ }
+
onMount(() => {
const interval = setInterval(() => {
const input = element.querySelector('input');
diff --git a/src/lib/layout/footer.svelte b/src/lib/layout/footer.svelte
index 89e130d74..9e92cff65 100644
--- a/src/lib/layout/footer.svelte
+++ b/src/lib/layout/footer.svelte
@@ -1,6 +1,4 @@
-
+
Are you sure you want to redeploy {$func.name}? Redeploying may affect your
production code.
diff --git a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
index 265b063c1..828c5d019 100644
--- a/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
+++ b/src/routes/(console)/project-[project]/settings/usage/[[invoice]]/+page.svelte
@@ -1,6 +1,6 @@