@axium/client 0.9.4 → 0.9.5
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/assets/styles.css +47 -0
- package/lib/SessionList.svelte +12 -6
- package/package.json +1 -1
- package/styles/account.css +45 -5
- package/styles/list.css +6 -1
package/assets/styles.css
CHANGED
|
@@ -189,3 +189,50 @@ h6 {
|
|
|
189
189
|
content: 'v';
|
|
190
190
|
color: #888;
|
|
191
191
|
}
|
|
192
|
+
|
|
193
|
+
.inline-button {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
width: fit-content;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.inline-button-container {
|
|
199
|
+
margin-top: 2em;
|
|
200
|
+
display: flex;
|
|
201
|
+
gap: 1em;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@media (width >= 700px) {
|
|
205
|
+
.mobile-only {
|
|
206
|
+
display: none;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (width < 700px) {
|
|
211
|
+
.mobile-hide {
|
|
212
|
+
display: none !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.mobile-button {
|
|
216
|
+
border-radius: 0.5em;
|
|
217
|
+
border: 1px solid var(--border-accent);
|
|
218
|
+
background-color: var(--bg-normal);
|
|
219
|
+
padding: 0.5em 1em;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mobile-button:hover {
|
|
224
|
+
background-color: hsl(var(--hue) 15 calc(var(--bg-light) + (var(--light-step) * 2)));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.inline-button {
|
|
228
|
+
width: 80%;
|
|
229
|
+
align-self: center;
|
|
230
|
+
display: flex;
|
|
231
|
+
justify-content: center;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.inline-button-container {
|
|
235
|
+
flex-direction: column;
|
|
236
|
+
align-items: center;
|
|
237
|
+
}
|
|
238
|
+
}
|
package/lib/SessionList.svelte
CHANGED
|
@@ -23,10 +23,11 @@
|
|
|
23
23
|
<span class="elevated">Elevated</span>
|
|
24
24
|
{/if}
|
|
25
25
|
</p>
|
|
26
|
-
<p>Created {session.created.toLocaleString()}</p>
|
|
27
|
-
<p>Expires {session.expires.toLocaleString()}</p>
|
|
28
|
-
<button
|
|
26
|
+
<p class="timestamp">Created {session.created.toLocaleString()}</p>
|
|
27
|
+
<p class="timestamp">Expires {session.expires.toLocaleString()}</p>
|
|
28
|
+
<button command="show-modal" commandfor={'logout-session:' + session.id} class="logout icon-text">
|
|
29
29
|
<Icon i="right-from-bracket" --size="16px" />
|
|
30
|
+
<span class="mobile-only">Logout</span>
|
|
30
31
|
</button>
|
|
31
32
|
</div>
|
|
32
33
|
<FormDialog
|
|
@@ -41,9 +42,7 @@
|
|
|
41
42
|
<p>Are you sure you want to log out this session?</p>
|
|
42
43
|
</FormDialog>
|
|
43
44
|
{/each}
|
|
44
|
-
<
|
|
45
|
-
<button command="show-modal" commandfor="logout-all" class="danger">Logout All</button>
|
|
46
|
-
</span>
|
|
45
|
+
<button command="show-modal" commandfor="logout-all" class="danger inline-button">Logout All</button>
|
|
47
46
|
<FormDialog
|
|
48
47
|
id="logout-all"
|
|
49
48
|
submit={() => logoutAll(user.id).then(() => (redirectAfterLogoutAll ? (window.location.href = '/') : null))}
|
|
@@ -52,3 +51,10 @@
|
|
|
52
51
|
>
|
|
53
52
|
<p>Are you sure you want to log out all sessions?</p>
|
|
54
53
|
</FormDialog>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
button.logout {
|
|
57
|
+
width: fit-content;
|
|
58
|
+
text-align: center;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
package/package.json
CHANGED
package/styles/account.css
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
.section {
|
|
2
2
|
width: 50%;
|
|
3
|
-
padding-top:
|
|
3
|
+
padding-top: 2em;
|
|
4
4
|
|
|
5
5
|
/* This is causing duplicate separators when removing sessions/passkeys
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
> div:has(+ div) {
|
|
7
|
+
border-bottom: 1px solid #8888;
|
|
8
|
+
}
|
|
9
|
+
*/
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.section:last-child {
|
|
13
|
+
margin-bottom: 2em;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
.section .item {
|
|
@@ -54,4 +58,40 @@
|
|
|
54
58
|
padding: 0 0.5em;
|
|
55
59
|
background-color: #733;
|
|
56
60
|
}
|
|
61
|
+
|
|
62
|
+
.logout {
|
|
63
|
+
display: contents;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@media (width < 700px) {
|
|
68
|
+
.inline-button-container {
|
|
69
|
+
margin-top: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.section {
|
|
73
|
+
width: calc(100% - 2em);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.session.item {
|
|
77
|
+
grid-template-columns: 1fr 2fr;
|
|
78
|
+
gap: 1em 2em;
|
|
79
|
+
padding-top: 1em;
|
|
80
|
+
|
|
81
|
+
p {
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.timestamp {
|
|
86
|
+
grid-column: 2;
|
|
87
|
+
text-align: right;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.logout {
|
|
91
|
+
margin-top: 0;
|
|
92
|
+
display: flex;
|
|
93
|
+
grid-row: 2;
|
|
94
|
+
grid-column: 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
57
97
|
}
|
package/styles/list.css
CHANGED
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
|
|
28
28
|
.list-item {
|
|
29
29
|
display: grid;
|
|
30
|
-
grid-template-columns: 1em 4fr 15em 5em repeat(3, 1em);
|
|
31
30
|
align-items: center;
|
|
32
31
|
gap: 1em;
|
|
33
32
|
padding: 0.5em;
|
|
@@ -59,3 +58,9 @@ p.list-empty {
|
|
|
59
58
|
visibility: visible;
|
|
60
59
|
cursor: pointer;
|
|
61
60
|
}
|
|
61
|
+
|
|
62
|
+
@media (width < 700px) {
|
|
63
|
+
.list-header {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
}
|