diff --git a/app/javascript/pages/Users/Settings/Data.svelte b/app/javascript/pages/Users/Settings/Data.svelte index f766530..d0a009b 100644 --- a/app/javascript/pages/Users/Settings/Data.svelte +++ b/app/javascript/pages/Users/Settings/Data.svelte @@ -325,370 +325,346 @@ {#if ui.show_imports_and_mirrors} -
-

- Imports & Mirrors -

-

- Connect WakaTime-compatible sources and destinations. -

+
+
+

+ Import from WakaTime +

-
-
-

- Import from WakaTime -

+ {#if importSource} +
+

+ Status: {importSource.status} +

+

+ Last synced: {importSource.last_synced_ago || "Never"} +

+

+ Imported: {importSource.imported_count.toLocaleString()} +

+ {#if importSource.last_error_message} +

+ Last error: {importSource.last_error_message} +

+ {/if} +
+ {/if} +
+ {#if importSource} -
-

- Status: {importSource.status} -

-

- Last synced: {importSource.last_synced_ago || "Never"} -

-

- Imported: {importSource.imported_count.toLocaleString()} -

- {#if importSource.last_error_message} -

- Last error: {importSource.last_error_message} -

- {/if} -
+ {/if} - +
+ +
+ +
+ + {#if importSource} - - {/if} - -
- - -
- -
- - - {#if importSource} -

- Leave blank to keep the existing key. -

- {/if} -
- -
-

- Backfill scope +

+ Leave blank to keep the existing key.

-
- - -
+ {/if} +
- {#if backfillMode === "all_time"} +
+

+ Backfill scope +

+
+ +
-
+ {#if backfillMode === "all_time"} + + {:else} +
+
+ + +
+
+ + +
+
+ {/if} +
+ +
+ + + {#if importSource} - {#if importSource} -
+ +
+

+ Mirror to WakaTime +

+ + {#if mirrors.length > 0} +
+ {#each mirrors as mirror} +
+

+ {mirror.endpoint_url} +

+

+ Status: {mirror.enabled ? "enabled" : "paused"} +

+

+ Last synced: {mirror.last_synced_ago} +

+ {#if mirror.last_error_message} +

+ Last error: {mirror.last_error_message} +

+ {/if} + {#if mirror.consecutive_failures && mirror.consecutive_failures > 0} +

+ Consecutive failures: {mirror.consecutive_failures} +

+ {/if} +
{ + if (!window.confirm("Delete this mirror endpoint?")) { + event.preventDefault(); + } + }} > + - Re-run backfill - - {/if} -
+ + +
+ {/each} +
+ {/if} -
- -
- - - {#if importSource} -
-
- - -
-
{ - if ( - !window.confirm("Remove import source configuration?") - ) { - event.preventDefault(); - } - }} - > - - - -
-
- {/if} -
- -
-

- Mirror to WakaTime -

- - {#if mirrors.length > 0} -
- {#each mirrors as mirror} -
-

- {mirror.endpoint_url} -

-

- Status: {mirror.enabled ? "enabled" : "paused"} -

-

- Last synced: {mirror.last_synced_ago} -

- {#if mirror.last_error_message} -

- Last error: {mirror.last_error_message} -

- {/if} - {#if mirror.consecutive_failures && mirror.consecutive_failures > 0} -

- Consecutive failures: {mirror.consecutive_failures} -

- {/if} -
{ - if (!window.confirm("Delete this mirror endpoint?")) { - event.preventDefault(); - } - }} - > - - - -
-
- {/each} -
- {/if} - -
+ + +
+ -
- - -
-
- - -
- - -
-
-
+ +
+ + +
+ + + + {/if}