@dxos/shell 0.4.5 → 0.4.6-main.20d1ec4
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/bundle/shell.mjs +3152 -3151
- package/dist/bundle/shell.mjs.map +1 -1
- package/dist/bundle/shell.umd.js +25 -25
- package/dist/bundle/shell.umd.js.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +3 -1
- package/dist/lib/browser/react.mjs.map +3 -3
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/DeviceList.js +6 -1
- package/dist/types/src/components/IdentityList/DeviceList.js.map +1 -1
- package/package.json +19 -19
- package/src/components/IdentityList/DeviceList.tsx +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"DeviceList.d.ts","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,yBAAyB,CAAC;AAMlE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,eAAO,MAAM,UAAU,0BAA2B,eAAe,gBA6BhE,CAAC"}
|
|
@@ -9,14 +9,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.DeviceList = void 0;
|
|
10
10
|
const react_1 = __importDefault(require("react"));
|
|
11
11
|
const display_name_1 = require("@dxos/display-name");
|
|
12
|
+
const halo_1 = require("@dxos/react-client/halo");
|
|
12
13
|
const react_ui_1 = require("@dxos/react-ui");
|
|
13
14
|
const react_ui_theme_1 = require("@dxos/react-ui-theme");
|
|
14
15
|
const IdentityListItem_1 = require("./IdentityListItem");
|
|
15
16
|
const DeviceList = ({ devices, onSelect }) => {
|
|
16
17
|
const { t } = (0, react_ui_1.useTranslation)('os');
|
|
17
18
|
return devices.length > 0 ? (react_1.default.createElement(react_ui_1.List, { classNames: 'flex flex-col gap-2' }, devices.map((device) => {
|
|
19
|
+
var _a, _b;
|
|
18
20
|
// TODO(wittjosiah): Render this better. Consider communicating these as apps rather than devices.
|
|
19
|
-
const
|
|
21
|
+
const deviceType = ((_a = device.profile) === null || _a === void 0 ? void 0 : _a.type) || halo_1.DeviceType.UNKNOWN;
|
|
22
|
+
const displayName = ((_b = device.profile) === null || _b === void 0 ? void 0 : _b.label)
|
|
23
|
+
? `${device.profile.label} (${halo_1.DeviceType[deviceType]})`
|
|
24
|
+
: (0, display_name_1.generateName)(device.deviceKey.toHex());
|
|
20
25
|
const identity = {
|
|
21
26
|
identityKey: device.deviceKey,
|
|
22
27
|
profile: { displayName },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,kDAA0B;AAE1B,qDAAkD;
|
|
1
|
+
{"version":3,"file":"DeviceList.js","sourceRoot":"","sources":["../../../../../src/components/IdentityList/DeviceList.tsx"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;AAEF,kDAA0B;AAE1B,qDAAkD;AAClD,kDAAkE;AAClE,6CAAsD;AACtD,yDAA2D;AAE3D,yDAAsD;AAO/C,MAAM,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAmB,EAAE,EAAE;IACnE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,yBAAc,EAAC,IAAI,CAAC,CAAC;IACnC,OAAO,OAAO,CAAC,MAAM,GAAG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",
|
|
4
4
|
"description": "DXOS’s OS experiences",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"react-qr-rounded": "^1.0.0",
|
|
40
40
|
"url-join": "^5.0.0",
|
|
41
41
|
"xstate": "^4.37.0",
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/debug": "0.4.
|
|
45
|
-
"@dxos/display-name": "0.4.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/react-ui": "0.4.
|
|
51
|
-
"@dxos/react-
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
42
|
+
"@dxos/client-services": "0.4.6-main.20d1ec4",
|
|
43
|
+
"@dxos/async": "0.4.6-main.20d1ec4",
|
|
44
|
+
"@dxos/debug": "0.4.6-main.20d1ec4",
|
|
45
|
+
"@dxos/display-name": "0.4.6-main.20d1ec4",
|
|
46
|
+
"@dxos/client-protocol": "0.4.6-main.20d1ec4",
|
|
47
|
+
"@dxos/invariant": "0.4.6-main.20d1ec4",
|
|
48
|
+
"@dxos/log": "0.4.6-main.20d1ec4",
|
|
49
|
+
"@dxos/react-ui-theme": "0.4.6-main.20d1ec4",
|
|
50
|
+
"@dxos/react-ui": "0.4.6-main.20d1ec4",
|
|
51
|
+
"@dxos/react-client": "0.4.6-main.20d1ec4",
|
|
52
|
+
"@dxos/rpc-tunnel": "0.4.6-main.20d1ec4",
|
|
53
|
+
"@dxos/util": "0.4.6-main.20d1ec4",
|
|
54
|
+
"@dxos/react-ui-types": "0.4.6-main.20d1ec4"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@phosphor-icons/react": "^2.0.5",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"react-dom": "^18.2.0",
|
|
64
64
|
"vite": "^5.1.3",
|
|
65
65
|
"vite-plugin-turbosnap": "^1.0.2",
|
|
66
|
-
"@dxos/random": "0.4.
|
|
67
|
-
"@dxos/config": "0.4.
|
|
68
|
-
"@dxos/react-async": "0.4.
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
66
|
+
"@dxos/random": "0.4.6-main.20d1ec4",
|
|
67
|
+
"@dxos/config": "0.4.6-main.20d1ec4",
|
|
68
|
+
"@dxos/react-async": "0.4.6-main.20d1ec4",
|
|
69
|
+
"@dxos/storybook-utils": "0.4.6-main.20d1ec4",
|
|
70
|
+
"@dxos/react-ui-theme": "0.4.6-main.20d1ec4"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@phosphor-icons/react": "^2.0.5",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { generateName } from '@dxos/display-name';
|
|
8
|
-
import { type Device } from '@dxos/react-client/halo';
|
|
8
|
+
import { type Device, DeviceType } from '@dxos/react-client/halo';
|
|
9
9
|
import { List, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { descriptionText, mx } from '@dxos/react-ui-theme';
|
|
11
11
|
|
|
@@ -22,7 +22,10 @@ export const DeviceList = ({ devices, onSelect }: DeviceListProps) => {
|
|
|
22
22
|
<List classNames='flex flex-col gap-2'>
|
|
23
23
|
{devices.map((device) => {
|
|
24
24
|
// TODO(wittjosiah): Render this better. Consider communicating these as apps rather than devices.
|
|
25
|
-
const
|
|
25
|
+
const deviceType = device.profile?.type || DeviceType.UNKNOWN;
|
|
26
|
+
const displayName = device.profile?.label
|
|
27
|
+
? `${device.profile.label} (${DeviceType[deviceType]})`
|
|
28
|
+
: generateName(device.deviceKey.toHex());
|
|
26
29
|
|
|
27
30
|
const identity = {
|
|
28
31
|
identityKey: device.deviceKey,
|