@kolkrabbi/kol-shell 0.87.1 → 0.87.2
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 +4 -4
- package/src/AppHub.jsx +7 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kolkrabbi/kol-framework": "^0.62.2",
|
|
25
|
-
"@kolkrabbi/kol-icons": "^0.52.0",
|
|
26
24
|
"@kolkrabbi/kol-component": "^0.311.2",
|
|
27
|
-
"@kolkrabbi/kol-
|
|
25
|
+
"@kolkrabbi/kol-framework": "^0.62.2",
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.196.0",
|
|
27
|
+
"@kolkrabbi/kol-icons": "^0.52.0"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src",
|
package/src/AppHub.jsx
CHANGED
|
@@ -97,7 +97,8 @@ import { Avatar, CommandOverlay, LabeledControlSection, MediaLibrary, ModalProvi
|
|
|
97
97
|
* and we will treat me THE ONLY USER as a proper user"* · *"why does it say password for library
|
|
98
98
|
* sync? … stupid."*): with `user: { name, avatar? }` the row is an account — signed out it reads
|
|
99
99
|
* Sign in and the DS dialog asks Email and Password, then `onPress({ email, password })`; signed
|
|
100
|
-
* in it draws the
|
|
100
|
+
* in it draws the picture (`avatar`) or, with none, the outline `user` glyph like every other
|
|
101
|
+
* row (AccountRowNoPictureIsTheIcon — *"if no image then just use outline"*), and the name, and opens `onProfile()` (the
|
|
101
102
|
* app's profile page, which owns sign-out). Without `user` it is the shared-password row it was:
|
|
102
103
|
* a `user` glyph and "Sign in" out, `cloud` and "Signed in" in; the password prompt, then
|
|
103
104
|
* `onPress(password)`; signed in, the sign-out confirm, then `onPress(null)`
|
|
@@ -120,8 +121,9 @@ const SETTINGS_ROW = (path) => [{ icon: 'nav-settings', path, label: 'Settings'
|
|
|
120
121
|
/* the foot's two sentinels (fxr's `#media` and `#sign-in`, made the Hub's) — a press opens, never routes */
|
|
121
122
|
const MEDIA_PATH = '#media'
|
|
122
123
|
const SIGN_IN_PATH = '#sign-in'
|
|
123
|
-
/* the signed-in account row's glyph
|
|
124
|
-
*
|
|
124
|
+
/* the signed-in account row's glyph (HubAccountRow): a name no set ships, drawn by the rail's icon component as the
|
|
125
|
+
* picture at the glyph's 20 when the user has one, else the outline `user` glyph (AccountRowNoPictureIsTheIcon, 2026-10-29 —
|
|
126
|
+
* the initial disc read as a foreign icon set); a phone's pill and More draw the `user` glyph in its place */
|
|
125
127
|
const ACCOUNT_GLYPH = '__hub-account'
|
|
126
128
|
/* the drawer tier's Settings row — a sentinel too: it opens the drawer, it never routes */
|
|
127
129
|
const SETTINGS_DRAWER = '#settings'
|
|
@@ -349,9 +351,9 @@ function HubFrame({
|
|
|
349
351
|
const railIcon = useMemo(() => {
|
|
350
352
|
if (!user) return iconComponent
|
|
351
353
|
const Base = iconComponent ?? Icon
|
|
352
|
-
const initial = (user.name ?? '?').trim().charAt(0).toUpperCase()
|
|
353
354
|
return function HubRailIcon({ name, ...rest }) {
|
|
354
|
-
|
|
355
|
+
if (name !== ACCOUNT_GLYPH) return <Base name={name} {...rest} />
|
|
356
|
+
return user.avatar ? <Avatar src={user.avatar} alt="" size="xs" /> : <Base name="user" {...rest} />
|
|
355
357
|
}
|
|
356
358
|
}, [iconComponent, user?.name, user?.avatar]) // eslint-disable-line react-hooks/exhaustive-deps
|
|
357
359
|
/* the two sentinels open, everything else routes — the rail, the bar, ⌥-digits and ⌘K all come through here */
|