diff --git a/src/lib/actions/timer.ts b/src/lib/actions/timer.ts index 1f6bff7e1..07d589a8b 100644 --- a/src/lib/actions/timer.ts +++ b/src/lib/actions/timer.ts @@ -21,13 +21,16 @@ export const timer: Action = (node, props) => { } function step() { - const diffInSeconds = Math.floor((new Date().getTime() - startDate.getTime()) / 1000); - const minutes = Math.floor(diffInSeconds / 60); + const elapsedSeconds = Math.max( + 0, + Math.floor((new Date().getTime() - startDate.getTime()) / 1000) + ); + const minutes = Math.floor(elapsedSeconds / 60); if (minutes > 0) { - const seconds = diffInSeconds % 60; + const seconds = elapsedSeconds % 60; node.textContent = `${minutes}m ${seconds}s`; } else { - node.textContent = calculateTime(diffInSeconds); + node.textContent = calculateTime(elapsedSeconds); } frame = window.requestAnimationFrame(step); } diff --git a/src/lib/components/csvImportBox.svelte b/src/lib/components/csvImportBox.svelte index 8ff2838ab..ec7a2c9a3 100644 --- a/src/lib/components/csvImportBox.svelte +++ b/src/lib/components/csvImportBox.svelte @@ -62,7 +62,7 @@ if (isSuccess) { await invalidate(Dependencies.ROWS); - $spreadsheetRenderKey = hash(Date.now().toString()); + spreadsheetRenderKey.set(hash(Date.now().toString())); } } @@ -90,6 +90,15 @@ } } + if (tableId && tableName === null) { + importItems.update((items) => { + const next = new Map(items); + next.delete(importData.$id); + return next; + }); + return; + } + importItems.update((items) => { const existing = items.get(importData.$id); diff --git a/src/lib/data/testimonials.ts b/src/lib/data/testimonials.ts index 3a4181ead..47b0b8883 100644 --- a/src/lib/data/testimonials.ts +++ b/src/lib/data/testimonials.ts @@ -44,7 +44,7 @@ export const testimonials: Testimonial[] = [ { id: 'phil-majikkids', logo: Phil, - headline: 'Just like a Swiss Army Knife - choose and use the tools you need', + headline: 'With Appwrite, Majik Kids built an entire app with one developer.', blurb: 'Just like a Swiss Army Knife you can choose and use the tools that you need with Appwrite.', name: 'Phil McCluskey', title: 'App Manager, Majik Kids', diff --git a/src/routes/(console)/account/payments/addressModal.svelte b/src/routes/(console)/account/payments/addressModal.svelte index 9bdcc2784..5b058dbfb 100644 --- a/src/routes/(console)/account/payments/addressModal.svelte +++ b/src/routes/(console)/account/payments/addressModal.svelte @@ -89,25 +89,34 @@ id="address" label="Street address" placeholder="Enter street address" + autocomplete required /> - + diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/sheet.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/sheet.svelte index af47ba07c..48a313d48 100644 --- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/sheet.svelte +++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/sheet.svelte @@ -21,6 +21,7 @@ import { Copy } from '$lib/components'; import { logStatusConverter } from './store'; import { LogsRequest, LogsResponse } from '$lib/components/logs'; + import { timer } from '$lib/actions/timer'; export let selectedLogId: string; export let logs: Models.Execution[]; @@ -139,7 +140,11 @@ Duration - {calculateTime(selectedLog.duration)} + {#if ['processing', 'waiting'].includes(selectedLog.status)} + + {:else} + {calculateTime(selectedLog.duration)} + {/if} diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/table.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/table.svelte index bc4573006..b73c0a7f6 100644 --- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/table.svelte +++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/table.svelte @@ -25,6 +25,7 @@ import { invalidate } from '$app/navigation'; import { Dependencies } from '$lib/constants'; import { Button } from '$lib/elements/forms'; + import { timer } from '$lib/actions/timer'; export let columns: Column[]; export let executions: Models.ExecutionList; @@ -121,7 +122,11 @@ {:else if column.id === 'duration'} - {calculateTime(log.duration)} + {#if ['processing', 'waiting'].includes(log.status)} + + {:else} + {calculateTime(log.duration)} + {/if} {/if} {/each} diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/sheet.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/sheet.svelte index a0c6f9b81..8adf821c3 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/sheet.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/sheet.svelte @@ -19,6 +19,7 @@ import { Copy } from '$lib/components'; import { LogsRequest, LogsResponse } from '$lib/components/logs'; import { site } from '../store'; + import { timer } from '$lib/actions/timer'; export let open = false; export let selectedLogId: string; @@ -112,7 +113,12 @@ Duration - {calculateTime(selectedLog.duration)} + {#if ['processing', 'waiting'].includes(selectedLog.status)} + + {:else} + {calculateTime(selectedLog.duration)} + {/if} diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/table.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/table.svelte index 1d5011dd2..9d74a095d 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/table.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/logs/table.svelte @@ -14,6 +14,7 @@ import { calculateTime } from '$lib/helpers/timeConversion'; import { getBadgeTypeFromStatusCode } from '$lib/helpers/httpStatus'; import { Button } from '$lib/elements/forms'; + import { timer } from '$lib/actions/timer'; export let columns: Column[]; export let logs: Models.ExecutionList; @@ -83,7 +84,11 @@ {log.requestMethod} {:else if column.id === 'duration'} - {calculateTime(log.duration)} + {#if ['processing', 'waiting'].includes(log.status)} + + {:else} + {calculateTime(log.duration)} + {/if} {:else if column.id === 'responseStatusCode'}