diff --git a/src/lib/api/index.ts b/src/lib/api/index.ts index 9b621900..de30d4db 100644 --- a/src/lib/api/index.ts +++ b/src/lib/api/index.ts @@ -56,6 +56,7 @@ export { publicGetOnlineDevicesStatistics, publicGetPublicShare, sessionsDeleteSession, + sessionsGetSelfSession, sessionsListSessions, shareLinksAddShocker, shareLinksCreatePublicShare, diff --git a/src/lib/components/Table/DataTableTemplate.svelte b/src/lib/components/Table/DataTableTemplate.svelte index 246fb8eb..a49324ec 100644 --- a/src/lib/components/Table/DataTableTemplate.svelte +++ b/src/lib/components/Table/DataTableTemplate.svelte @@ -84,7 +84,7 @@ }); -
+
{#each table.getHeaderGroups() as headerGroup (headerGroup.id)} diff --git a/src/routes/(app)/home/+page.svelte b/src/routes/(app)/home/+page.svelte index 40b55940..b09ba415 100644 --- a/src/routes/(app)/home/+page.svelte +++ b/src/routes/(app)/home/+page.svelte @@ -33,7 +33,7 @@
-
+
Shockers @@ -83,7 +83,7 @@

Quick Links

-
+
- -
- - API Tokens are used to authenticate with the OpenShock API - - - - + + + + + diff --git a/src/routes/(app)/settings/api-tokens/new/+page.svelte b/src/routes/(app)/settings/api-tokens/new/+page.svelte index fb337217..308c8f54 100644 --- a/src/routes/(app)/settings/api-tokens/new/+page.svelte +++ b/src/routes/(app)/settings/api-tokens/new/+page.svelte @@ -195,7 +195,7 @@ - + {#if parseError} API Token Request diff --git a/src/routes/(app)/settings/connections/+page.svelte b/src/routes/(app)/settings/connections/+page.svelte index a3e43d73..15af740b 100644 --- a/src/routes/(app)/settings/connections/+page.svelte +++ b/src/routes/(app)/settings/connections/+page.svelte @@ -7,10 +7,8 @@ import { page } from '$app/state'; import type { OAuthConnectionResponse } from '$lib/api'; import { GetOAuthAuthorizeUrl } from '$lib/api/next/oauth'; - import { Container } from '@openshock/svelte-core/components/index.js'; + import { Container, PageHeader, EmptyState } from '@openshock/svelte-core/components/index.js'; import { Button } from '@openshock/svelte-core/components/ui/button/index.js'; - import * as Card from '@openshock/svelte-core/components/ui/card/index.js'; - import { EmptyState } from '@openshock/svelte-core/components/index.js'; import * as Dropdown from '@openshock/svelte-core/components/ui/dropdown-menu/index.js'; import * as Separator from '@openshock/svelte-core/components/ui/separator/index.js'; import { handleApiError } from '$lib/errorhandling/apiErrorHandling'; @@ -97,22 +95,17 @@ - - - OAuth Connections -
- -
-
- - Link or unlink third-party accounts to sign in faster and keep your profile in sync. - -
- - + + + + +
@@ -194,7 +187,7 @@ {/each}
{/if} - +
diff --git a/src/routes/(app)/settings/sessions/+page.svelte b/src/routes/(app)/settings/sessions/+page.svelte index 962f40b3..eb9e3262 100644 --- a/src/routes/(app)/settings/sessions/+page.svelte +++ b/src/routes/(app)/settings/sessions/+page.svelte @@ -1,72 +1,50 @@ - - - Sessions - - - - This is a list of all active sessions of your account. Revoke any sessions you do not - recognize. - - - - - + + +
+ {#each sortedSessions as session (session.id)} + + {/each} +
diff --git a/src/routes/(app)/settings/sessions/data-table-actions.svelte b/src/routes/(app)/settings/sessions/data-table-actions.svelte deleted file mode 100644 index 646bd8a7..00000000 --- a/src/routes/(app)/settings/sessions/data-table-actions.svelte +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - Session - - - - Copy ID - - - (revokeDialogOpen = true)} - > - - Revoke - - - diff --git a/src/routes/(app)/settings/sessions/session-card.svelte b/src/routes/(app)/settings/sessions/session-card.svelte new file mode 100644 index 00000000..dce0cd4c --- /dev/null +++ b/src/routes/(app)/settings/sessions/session-card.svelte @@ -0,0 +1,109 @@ + + + + +
+ +
+
+ +
+ +
+
+ {readableName} + {#if isCurrent} + + This device + + {/if} +
+
{session.ip}
+
+ + {#if !isCurrent} + + {/if} +
+ + +
+ {#if !isCurrent} + Last seen {lastSeenText} + {/if} + + Created {createdText} + {#if !isCurrent} + · Expires {expiresText}{/if} + +
+
diff --git a/src/routes/(app)/shares/public/[shareId=guid]/edit/+page.svelte b/src/routes/(app)/shares/public/[shareId=guid]/edit/+page.svelte index 9c6d3b30..086fb119 100644 --- a/src/routes/(app)/shares/public/[shareId=guid]/edit/+page.svelte +++ b/src/routes/(app)/shares/public/[shareId=guid]/edit/+page.svelte @@ -109,19 +109,35 @@
-
-
-

- Public Share: {publicShareData?.name ?? 'Loading...'} -

-

Editing — changes apply when you save.

+
+
+
+

+ Public Share: {publicShareData?.name ?? 'Loading...'} +

+

Editing — changes apply when you save.

+
+ {#if publicShareData} + + + + + + {publicShareData.author.name.charAt(0)} + + + + +

Shared by {publicShareData.author.name}

+
+ {/if}
-
- -
+ -
+
- - {#if publicShareData} - - - - - - - {publicShareData.author.name.charAt(0)} - - -

{publicShareData.author.name}

-
-
- -

Shared by

-
-
- {/if}
diff --git a/src/routes/(app)/shares/user/incoming/+page.svelte b/src/routes/(app)/shares/user/incoming/+page.svelte index 69d8d2b2..16ef6252 100644 --- a/src/routes/(app)/shares/user/incoming/+page.svelte +++ b/src/routes/(app)/shares/user/incoming/+page.svelte @@ -41,7 +41,7 @@ description="No one has shared a shocker with you yet." /> {:else} -
+
{#each userSharesState.shares.incoming as incomingShare, i (incomingShare.id)} diff --git a/src/routes/(app)/shares/user/invites/+page.svelte b/src/routes/(app)/shares/user/invites/+page.svelte index 7960fdd4..09d955c9 100644 --- a/src/routes/(app)/shares/user/invites/+page.svelte +++ b/src/routes/(app)/shares/user/invites/+page.svelte @@ -44,7 +44,7 @@ class="mb-6" /> {:else} -
+
{#each userSharesState.outgoingInvites as invite (invite.id)} @@ -65,7 +65,7 @@ class="mb-6" /> {:else} -
+
{#each userSharesState.incomingInvites as invite (invite.id)} diff --git a/src/routes/(app)/shares/user/outgoing/+page.svelte b/src/routes/(app)/shares/user/outgoing/+page.svelte index 1cbf69f6..c9cfc9de 100644 --- a/src/routes/(app)/shares/user/outgoing/+page.svelte +++ b/src/routes/(app)/shares/user/outgoing/+page.svelte @@ -40,7 +40,7 @@ description="You haven't shared any shockers with other users yet." /> {:else} -
+
{#each userSharesState.shares.outgoing as userShare, i (userShare.id)} diff --git a/src/routes/(app)/shockers/own/+page.svelte b/src/routes/(app)/shockers/own/+page.svelte index a9aecea5..2674b6b0 100644 --- a/src/routes/(app)/shockers/own/+page.svelte +++ b/src/routes/(app)/shockers/own/+page.svelte @@ -193,7 +193,7 @@
{:else}
-

Shockers

+

Shockers

+ + + {/if} +{/snippet} +
-
+ +
+ {#if parent?.href} + + + + {:else} + + {/if} + + {currentLabel} + + {@render userMenu()} +
+ + +