@axium/server 0.3.10 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -75,3 +75,11 @@ button:hover {
75
75
  color: #bbbb;
76
76
  font-size: 0.9em;
77
77
  }
78
+
79
+ .flex-content {
80
+ display: flex;
81
+ align-items: center;
82
+ flex-direction: column;
83
+ gap: 1em;
84
+ overflow-y: scroll;
85
+ }
@@ -1,20 +1,12 @@
1
1
  <script lang="ts">
2
+ import { goto } from '$app/navigation';
2
3
  import { getUserImage } from '@axium/core';
4
+ import '../lib/account.css';
3
5
  import Icon from '../lib/Icon.svelte';
4
6
  import '../lib/styles.css';
5
- import '../lib/account.css';
6
7
  import type { PageData } from './$types.js';
7
- import { goto } from '$app/navigation';
8
8
 
9
- const {
10
- data,
11
- children = () => {},
12
- prefix,
13
- }: {
14
- data: PageData;
15
- children?: () => any;
16
- prefix?: string;
17
- } = $props();
9
+ const { data, children = () => {} }: { data: PageData; children?: () => any } = $props();
18
10
 
19
11
  const { user } = data;
20
12
  if (!user) goto('/auth/signin');
@@ -26,39 +18,31 @@
26
18
  <title>Account</title>
27
19
  </svelte:head>
28
20
 
29
- <div id="content">
30
- <img id="pfp" src={image} alt="User profile" />
31
- <p id="greeting">Welcome, {user.name}</p>
21
+ <div class="flex-content">
22
+ <img class="pfp" src={image} alt="User profile" />
23
+ <p class="greeting">Welcome, {user.name}</p>
32
24
  <div class="account-section main">
33
25
  <div class="account-item">
34
26
  <p class="subtle">Name</p>
35
27
  <p>{user.name}</p>
36
- <a class="change" href="{prefix}/name"><Icon id="chevron-right" /></a>
28
+ <a class="change" href="{data.prefix}/name"><Icon id="chevron-right" /></a>
37
29
  </div>
38
30
  <div class="account-item">
39
31
  <p class="subtle">Email</p>
40
32
  <p>{user.email}</p>
41
- <a class="change" href="{prefix}/email"><Icon id="chevron-right" /></a>
33
+ <a class="change" href="{data.prefix}/email"><Icon id="chevron-right" /></a>
42
34
  </div>
43
35
  <div class="account-item">
44
36
  <p class="subtle">User ID <dfn title="This is your UUID."><Icon id="regular/circle-info" /></dfn></p>
45
37
  <p>{user.id}</p>
46
38
  </div>
47
- <a id="signout" href="/auth/signout"><button>Sign out</button></a>
39
+ <a class="signout" href="/auth/signout"><button>Sign out</button></a>
48
40
  </div>
49
41
  {@render children()}
50
42
  </div>
51
43
 
52
44
  <style>
53
- #content {
54
- display: flex;
55
- align-items: center;
56
- flex-direction: column;
57
- gap: 1em;
58
- overflow-y: scroll;
59
- }
60
-
61
- #pfp {
45
+ .pfp {
62
46
  width: 100px;
63
47
  height: 100px;
64
48
  border-radius: 50%;
@@ -66,11 +50,11 @@
66
50
  margin-top: 3em;
67
51
  }
68
52
 
69
- #greeting {
53
+ .greeting {
70
54
  font-size: 2em;
71
55
  }
72
56
 
73
- #signout {
57
+ .signout {
74
58
  margin-top: 2em;
75
59
  }
76
60
  </style>