@jskit-ai/users-web 0.2.110 → 0.2.111
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
|
+
- The account settings know `push-web`'s section, `push`: its icon (`$notifications`) and its line in the list, "Notifications on your phones and browsers" (`jskit.users.accountSettings.summary.push`).
|
|
5
6
|
- The open section's row in the account settings section list keeps an icon tile on its Material 3 active indicator, the `secondary-container` pill as tall as the row with its label bold and in `on-secondary-container`, which no other row has: the open section's tile is filled `primary` with its icon in `on-primary`, and every other row's stays `primary-container` with its icon in `on-primary-container`. `primary-container` shares the pill's tone (90 in light, 30 in dark), so it would show on the pill only where a seed's hues differ (1.01:1 for the default seed in light); `primary` (40, 80 in dark) stands out of it at least 3:1 for any seed, in light and dark. In 0.2.140 the open section's tile had no fill of its own and its icon was in `on-secondary-container`, so the tile disappeared into the pill (#504). The `users/account-settings` pattern says the same.
|
|
6
7
|
- Account settings' forms follow the guide's edit-form rule (#504). **Behaviour change:** leaving a section's form with edits the person has not saved asks first: its close, Done, another section and the browser's Back open a "Discard unsaved changes?" dialog (Keep editing stays; Discard gives the form its saved values back and goes on; new message keys `jskit.users.accountSettings.discard.title`, `.text`, `.keepEditing` and `.confirm`), and closing or reloading the tab asks through the browser. The runtime answers `hasUnsavedEdits` and `discardEdits()` for its three forms, and each of `profile`, `preferences` and `notifications` its own `hasUnsavedEdits` (a ref; http-web's new `useAddEdit()` `hasUnsavedEdits`). The `users/account-settings` pattern's Profile, Preferences and Notifications sections are edit forms: each calls shell-web's `useShellPageClose()`, so the bar's Up arrow is its close (X), Cancel, which leaves for the list (Sign-in methods, no form, keeps the arrow), and its Save says what it saves (**Save profile**, **Save preferences**, **Save notifications**) and stays off until a field changes. Upgrading: an app's copy of the pattern's sections keeps working and already asks before unsaved edits are left; copy the sections' `useShellPageClose()` call and their Save's `label` and `disabled` for the close and the named Save that waits for a change. The question names the section ("Your changes to Profile will be lost."), its text 16dp under its headline. The section list's account header shows the account as saved (the runtime's new `account.saved` and `account.initials`), not the name the person is typing. On an expanded or large window, the list's own page (`/account`, the first section beside the list) draws the same bar as that section's page: no Up arrow, and Done as the way out, where it had Up to the list's parent and no Done.
|
|
7
8
|
- Each entry of the account settings section list is headed by its icon on a tonal tile (`primary-container`, the icon in `on-primary-container`), on every window. An `account-settings:sections` placement names its icon in `props.icon`, an icon alias such as `"$mail"`; users-web's own sections have theirs (Profile `$person`, Preferences `$tune`, Notifications `$notifications`, Sign-in methods `$key`) and any other section without one has the settings icon, so an app that names none sees a tile on every entry. Under its title each entry says what the section holds, the link's accessible description: a placement names it in `props.summary` (plain text, a message key or `{ key, fallback }`), users-web's own sections have theirs (new message keys `jskit.users.accountSettings.summary.profile`, `.preferences`, `.notifications` and `.signInMethods`), and any other section without one shows its title alone. Where the list is alone, on compact and medium windows, each entry ends in a chevron, as it opens a page. `resolveAccountSettingsSections()` and `normalizeAccountSettingsSectionEntry()` answer each section's `icon` and `summary` (#504).
|
package/locales/en.json
CHANGED
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.111",
|
|
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.41",
|
|
17
|
+
"@jskit-ai/users-core": "0.2.84"
|
|
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.80",
|
|
21
|
+
"@jskit-ai/http-runtime": "0.2.42",
|
|
22
|
+
"@jskit-ai/http-web": "0.2.83",
|
|
23
|
+
"@jskit-ai/kernel": "0.2.41",
|
|
24
|
+
"@jskit-ai/shell-web": "0.2.72",
|
|
25
25
|
"@tanstack/vue-query": "^5.90.5",
|
|
26
26
|
"vue": "^3.5.13",
|
|
27
27
|
"vue-router": "^5.0.4",
|
|
@@ -18,6 +18,8 @@ const ACCOUNT_SETTINGS_SECTION_ICONS = Object.freeze({
|
|
|
18
18
|
profile: "$person",
|
|
19
19
|
preferences: "$tune",
|
|
20
20
|
notifications: "$notifications",
|
|
21
|
+
// push-web's notifications on phones and browsers (push.web.settings.section).
|
|
22
|
+
push: "$notifications",
|
|
21
23
|
"sign-in-methods": "$key"
|
|
22
24
|
});
|
|
23
25
|
const ACCOUNT_SETTINGS_SECTION_ICON = "$settings";
|
|
@@ -27,6 +29,7 @@ const ACCOUNT_SETTINGS_SECTION_SUMMARIES = Object.freeze({
|
|
|
27
29
|
profile: "jskit.users.accountSettings.summary.profile",
|
|
28
30
|
preferences: "jskit.users.accountSettings.summary.preferences",
|
|
29
31
|
notifications: "jskit.users.accountSettings.summary.notifications",
|
|
32
|
+
push: "jskit.users.accountSettings.summary.push",
|
|
30
33
|
"sign-in-methods": "jskit.users.accountSettings.summary.signInMethods"
|
|
31
34
|
});
|
|
32
35
|
|
|
@@ -123,6 +123,7 @@ test("each section has its icon: the placement's own, else users-web's for its o
|
|
|
123
123
|
section("profile"),
|
|
124
124
|
section("preferences"),
|
|
125
125
|
section("notifications"),
|
|
126
|
+
section("push"),
|
|
126
127
|
section("sign-in-methods"),
|
|
127
128
|
section("billing"),
|
|
128
129
|
section("invites", "$mail"),
|
|
@@ -132,6 +133,7 @@ test("each section has its icon: the placement's own, else users-web's for its o
|
|
|
132
133
|
profile: "$person",
|
|
133
134
|
preferences: "$tune",
|
|
134
135
|
notifications: "$notifications",
|
|
136
|
+
push: "$notifications",
|
|
135
137
|
"sign-in-methods": "$key",
|
|
136
138
|
billing: "$settings",
|
|
137
139
|
invites: "$mail",
|
|
@@ -158,6 +160,7 @@ test("each section has its one-line summary: the placement's own, else users-web
|
|
|
158
160
|
section("profile"),
|
|
159
161
|
section("preferences"),
|
|
160
162
|
section("notifications"),
|
|
163
|
+
section("push"),
|
|
161
164
|
section("sign-in-methods"),
|
|
162
165
|
section("billing"),
|
|
163
166
|
section("invites", " People you invited "),
|
|
@@ -167,6 +170,7 @@ test("each section has its one-line summary: the placement's own, else users-web
|
|
|
167
170
|
profile: "jskit.users.accountSettings.summary.profile",
|
|
168
171
|
preferences: "jskit.users.accountSettings.summary.preferences",
|
|
169
172
|
notifications: "jskit.users.accountSettings.summary.notifications",
|
|
173
|
+
push: "jskit.users.accountSettings.summary.push",
|
|
170
174
|
"sign-in-methods": "jskit.users.accountSettings.summary.signInMethods",
|
|
171
175
|
billing: "",
|
|
172
176
|
invites: "People you invited",
|