diff --git a/src/lib/api/index.ts b/src/lib/api/index.ts index 99ed65db..0f54819b 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/Container.svelte b/src/lib/components/Container.svelte index d8a15ad6..3924a300 100644 --- a/src/lib/components/Container.svelte +++ b/src/lib/components/Container.svelte @@ -12,7 +12,7 @@
diff --git a/src/lib/components/PageHeader.svelte b/src/lib/components/PageHeader.svelte index f1819e47..ac4e05d6 100644 --- a/src/lib/components/PageHeader.svelte +++ b/src/lib/components/PageHeader.svelte @@ -16,12 +16,12 @@
-
-

+
+

{title}

{#if children} -
+
{@render children()}
{/if} diff --git a/src/lib/components/Table/DataTableTemplate.svelte b/src/lib/components/Table/DataTableTemplate.svelte index d37bf0f8..2f8c9a13 100644 --- a/src/lib/components/Table/DataTableTemplate.svelte +++ b/src/lib/components/Table/DataTableTemplate.svelte @@ -81,7 +81,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 43485917..8ba1b4d0 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 7143ce57..aa4d2c22 100644 --- a/src/routes/(app)/settings/api-tokens/new/+page.svelte +++ b/src/routes/(app)/settings/api-tokens/new/+page.svelte @@ -183,7 +183,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 b182939d..ee6ec4b7 100644 --- a/src/routes/(app)/settings/connections/+page.svelte +++ b/src/routes/(app)/settings/connections/+page.svelte @@ -8,8 +8,8 @@ import type { OAuthConnectionResponse } from '$lib/api'; import { GetOAuthAuthorizeUrl } from '$lib/api/next/oauth'; import Container from '$lib/components/Container.svelte'; + import PageHeader from '$lib/components/PageHeader.svelte'; import { Button } from '$lib/components/ui/button'; - import * as Card from '$lib/components/ui/card'; import * as Dropdown from '$lib/components/ui/dropdown-menu'; import * as Separator from '$lib/components/ui/separator'; import { handleApiError } from '$lib/errorhandling/apiErrorHandling'; @@ -96,22 +96,17 @@ - - - OAuth Connections -
- -
-
- - Link or unlink third-party accounts to sign in faster and keep your profile in sync. - -
- - + + + + +
@@ -194,7 +189,7 @@ {/each}
{/if} - +
diff --git a/src/routes/(app)/settings/sessions/+page.svelte b/src/routes/(app)/settings/sessions/+page.svelte index 7f49d3e9..f02c8efa 100644 --- a/src/routes/(app)/settings/sessions/+page.svelte +++ b/src/routes/(app)/settings/sessions/+page.svelte @@ -1,72 +1,51 @@ - - - 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 470c31c1..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..283e0fb0 --- /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 de7147fe..2373a92f 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 a7d77a10..027beba4 100644 --- a/src/routes/(app)/shares/user/incoming/+page.svelte +++ b/src/routes/(app)/shares/user/incoming/+page.svelte @@ -32,7 +32,7 @@
{:then} -
+
{#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 53aaeb6e..4b471bd4 100644 --- a/src/routes/(app)/shares/user/invites/+page.svelte +++ b/src/routes/(app)/shares/user/invites/+page.svelte @@ -23,7 +23,7 @@
{:then} -
+
{#each userSharesState.outgoingInvites as invite (invite.id)} @@ -43,7 +43,7 @@
{:then} -
+
{#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 b98eaf0c..03c9b2d0 100644 --- a/src/routes/(app)/shares/user/outgoing/+page.svelte +++ b/src/routes/(app)/shares/user/outgoing/+page.svelte @@ -31,7 +31,7 @@
{:then} -
+
{#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 116d6a22..cc52c61a 100644 --- a/src/routes/(app)/shockers/own/+page.svelte +++ b/src/routes/(app)/shockers/own/+page.svelte @@ -188,7 +188,7 @@
{:else}
-

Shockers

+

Shockers

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