@lobb-js/lobb-ext-auth 0.11.2 → 0.12.0
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/dist/index.js +1 -1
- package/dist/lib/components/pages/settings/index.svelte +9 -0
- package/dist/lib/components/pages/userSettings/index.svelte +1 -1
- package/extensions/auth/studio/index.ts +1 -1
- package/extensions/auth/studio/lib/components/pages/settings/index.svelte +9 -0
- package/extensions/auth/studio/lib/components/pages/userSettings/index.svelte +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
const { Icons } = components;
|
|
11
11
|
const auth_settings_page = $derived(props.utils.page.url.pathname.split("/")[5]);
|
|
12
12
|
const isSmall = $derived(!props.utils.mediaQueries.sm.current);
|
|
13
|
+
|
|
14
|
+
// Bare /studio/extensions/auth/settings has no sub-page to render, which
|
|
15
|
+
// would leave the page blank. Redirect to the first sub-page (Users) so
|
|
16
|
+
// landing on the settings root always shows something useful.
|
|
17
|
+
$effect(() => {
|
|
18
|
+
if (!auth_settings_page) {
|
|
19
|
+
props.utils.goto("/studio/extensions/auth/settings/users");
|
|
20
|
+
}
|
|
21
|
+
});
|
|
13
22
|
</script>
|
|
14
23
|
|
|
15
24
|
<!-- TODO: add the sidebar in here to add these pages
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
async function handleSave() {
|
|
22
|
-
const response = await utils.lobb.updateOne("auth_users", "me", entry);
|
|
22
|
+
const response = await utils.lobb.updateOne("auth_users", "me", { data: entry });
|
|
23
23
|
if (response.status >= 400) {
|
|
24
24
|
const result = await response.json();
|
|
25
25
|
utils.toast.error(result.message);
|
|
@@ -62,7 +62,7 @@ export default function extension(utils: ExtensionUtils): Extension {
|
|
|
62
62
|
{
|
|
63
63
|
label: "Auth",
|
|
64
64
|
icon: utils.components.Icons.Key,
|
|
65
|
-
href: "/studio/extensions/auth/settings
|
|
65
|
+
href: "/studio/extensions/auth/settings",
|
|
66
66
|
represents: "auth_users",
|
|
67
67
|
},
|
|
68
68
|
],
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
const { Icons } = components;
|
|
11
11
|
const auth_settings_page = $derived(props.utils.page.url.pathname.split("/")[5]);
|
|
12
12
|
const isSmall = $derived(!props.utils.mediaQueries.sm.current);
|
|
13
|
+
|
|
14
|
+
// Bare /studio/extensions/auth/settings has no sub-page to render, which
|
|
15
|
+
// would leave the page blank. Redirect to the first sub-page (Users) so
|
|
16
|
+
// landing on the settings root always shows something useful.
|
|
17
|
+
$effect(() => {
|
|
18
|
+
if (!auth_settings_page) {
|
|
19
|
+
props.utils.goto("/studio/extensions/auth/settings/users");
|
|
20
|
+
}
|
|
21
|
+
});
|
|
13
22
|
</script>
|
|
14
23
|
|
|
15
24
|
<!-- TODO: add the sidebar in here to add these pages
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
async function handleSave() {
|
|
22
|
-
const response = await utils.lobb.updateOne("auth_users", "me", entry);
|
|
22
|
+
const response = await utils.lobb.updateOne("auth_users", "me", { data: entry });
|
|
23
23
|
if (response.status >= 400) {
|
|
24
24
|
const result = await response.json();
|
|
25
25
|
utils.toast.error(result.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobb-js/lobb-ext-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"package": "svelte-package --input extensions/auth/studio"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@lobb-js/core": "^0.
|
|
35
|
+
"@lobb-js/core": "^0.33.0",
|
|
36
36
|
"argon2": "^0.40.3",
|
|
37
37
|
"hono": "^4.7.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lobb-js/studio": "^0.
|
|
40
|
+
"@lobb-js/studio": "^0.32.0",
|
|
41
41
|
"@lucide/svelte": "^0.563.1",
|
|
42
42
|
"@sveltejs/adapter-node": "^5.5.4",
|
|
43
43
|
"@sveltejs/kit": "^2.60.1",
|