@jskit-ai/users-web 0.2.23 → 0.2.25
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Account settings read their operations from users-core's `userProfileContract` and `userSettingsContract`.
|
|
5
6
|
- Account settings sections are pages in Material 3's list-detail layout (shell-web's `ShellListDetail`): `/account` lists the sections and `/account/<section>` opens one, instead of `?section=` on one page. `AccountSettingsClientElement` reads the route's `section` param and links each section to its path, keeping `returnTo`; on compact and medium windows it shows the list or one section, whose Up returns to the list, and on expanded and large windows the list beside the open section (or the first section on the list's own page), where Done replaces Up as the way out. The `users/account-settings` pattern adds `src/pages/account/[section].vue`, with parent `"/"`. Upgrading: add that page beside `src/pages/account/index.vue`, and change links to `/account?section=<value>` into `/account/<value>`.
|
|
6
7
|
- Account settings have one way out: on a page with the shell's Up arrow (one that declares a parent) there is no Done action beside it, which read as a second back control. Done shows only where Up can't go back: a page without a parent, or a `returnTo` on another of the app's origins.
|
|
7
8
|
- Account settings use Material 3's label type and single-column form: the section list's labels are label-large (14px/500) instead of Vuetify's 13px nav title, and `ProfileClientElement`'s and the pattern's display name and email each take the form's full width, so a long email no longer truncates in a half-width column.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/users-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jskit test"
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"./locales/en.json": "./locales/en.json"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@jskit-ai/uploads-image-web": "0.2.
|
|
17
|
-
"@jskit-ai/users-core": "0.2.
|
|
16
|
+
"@jskit-ai/uploads-image-web": "0.2.15",
|
|
17
|
+
"@jskit-ai/users-core": "0.2.17"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@jskit-ai/auth-web": "0.2.
|
|
21
|
-
"@jskit-ai/http-runtime": "0.2.
|
|
22
|
-
"@jskit-ai/http-web": "0.2.
|
|
23
|
-
"@jskit-ai/kernel": "0.2.
|
|
24
|
-
"@jskit-ai/shell-web": "0.2.
|
|
20
|
+
"@jskit-ai/auth-web": "0.2.20",
|
|
21
|
+
"@jskit-ai/http-runtime": "0.2.15",
|
|
22
|
+
"@jskit-ai/http-web": "0.2.23",
|
|
23
|
+
"@jskit-ai/kernel": "0.2.15",
|
|
24
|
+
"@jskit-ai/shell-web": "0.2.18",
|
|
25
25
|
"@tanstack/vue-query": "^5.90.5",
|
|
26
26
|
"vue": "^3.5.13",
|
|
27
27
|
"vue-router": "^5.0.4",
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
} from "@jskit-ai/shell-web/client/placement";
|
|
11
11
|
import { useShellWebErrorRuntime } from "@jskit-ai/shell-web/client/error";
|
|
12
12
|
import { ROUTE_VISIBILITY_PUBLIC } from "@jskit-ai/kernel/shared/support/visibility";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { userProfileContract } from "@jskit-ai/users-core/shared/resources/userProfileResource";
|
|
14
|
+
import { userSettingsContract } from "@jskit-ai/users-core/shared/resources/userSettingsResource";
|
|
15
15
|
import { useAddEdit } from "@jskit-ai/http-web/client/composables/useAddEdit";
|
|
16
16
|
import { useCommand } from "@jskit-ai/http-web/client/composables/useCommand";
|
|
17
17
|
import { useView } from "@jskit-ai/http-web/client/composables/useView";
|
|
@@ -250,7 +250,7 @@ function useAccountSettingsRuntime() {
|
|
|
250
250
|
|
|
251
251
|
const profileAddEdit = useAddEdit({
|
|
252
252
|
ownershipFilter: OWNERSHIP_PUBLIC,
|
|
253
|
-
resource:
|
|
253
|
+
resource: userProfileContract,
|
|
254
254
|
apiSuffix: "/settings/profile",
|
|
255
255
|
queryKeyFactory: () => accountProfileWriteQueryKey,
|
|
256
256
|
readEnabled: false,
|
|
@@ -260,7 +260,7 @@ function useAccountSettingsRuntime() {
|
|
|
260
260
|
fieldErrorKeys: ["displayName"],
|
|
261
261
|
model: profileForm,
|
|
262
262
|
mapLoadedToModel: mapAccountSettingsPayload,
|
|
263
|
-
input:
|
|
263
|
+
input: userProfileContract.operations.patch.body,
|
|
264
264
|
buildRawPayload: (model) => ({
|
|
265
265
|
displayName: String(model.displayName || "").trim()
|
|
266
266
|
}),
|
|
@@ -289,7 +289,7 @@ function useAccountSettingsRuntime() {
|
|
|
289
289
|
|
|
290
290
|
const preferencesAddEdit = useAddEdit({
|
|
291
291
|
ownershipFilter: OWNERSHIP_PUBLIC,
|
|
292
|
-
resource:
|
|
292
|
+
resource: userSettingsContract,
|
|
293
293
|
apiSuffix: "/settings/preferences",
|
|
294
294
|
queryKeyFactory: () => accountPreferencesWriteQueryKey,
|
|
295
295
|
readEnabled: false,
|
|
@@ -299,7 +299,7 @@ function useAccountSettingsRuntime() {
|
|
|
299
299
|
fieldErrorKeys: ["theme", "locale", "timeZone", "dateFormat", "numberFormat", "currencyCode", "avatarSize"],
|
|
300
300
|
model: preferencesForm,
|
|
301
301
|
mapLoadedToModel: mapAccountSettingsPayload,
|
|
302
|
-
input:
|
|
302
|
+
input: userSettingsContract.operations.preferencesUpdate.body,
|
|
303
303
|
buildRawPayload: (model) => ({
|
|
304
304
|
theme: model.theme,
|
|
305
305
|
locale: model.locale,
|
|
@@ -317,7 +317,7 @@ function useAccountSettingsRuntime() {
|
|
|
317
317
|
|
|
318
318
|
const notificationsAddEdit = useAddEdit({
|
|
319
319
|
ownershipFilter: OWNERSHIP_PUBLIC,
|
|
320
|
-
resource:
|
|
320
|
+
resource: userSettingsContract,
|
|
321
321
|
apiSuffix: "/settings/notifications",
|
|
322
322
|
queryKeyFactory: () => accountNotificationsWriteQueryKey,
|
|
323
323
|
readEnabled: false,
|
|
@@ -326,7 +326,7 @@ function useAccountSettingsRuntime() {
|
|
|
326
326
|
fallbackSaveError: t("jskit.users.accountSettings.notifications.saveFailed"),
|
|
327
327
|
model: notificationsForm,
|
|
328
328
|
mapLoadedToModel: mapAccountSettingsPayload,
|
|
329
|
-
input:
|
|
329
|
+
input: userSettingsContract.operations.notificationsUpdate.body,
|
|
330
330
|
buildRawPayload: (model) => ({
|
|
331
331
|
productUpdates: Boolean(model.productUpdates),
|
|
332
332
|
accountActivity: Boolean(model.accountActivity),
|