@1agh/maude 2.0.4 → 2.0.8
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/apps/hub/src/project-transactions/kernel.mjs +10 -1
- package/apps/studio/access/closure.ts +156 -16
- package/apps/studio/access/filters.ts +39 -5
- package/apps/studio/access/known-canvases.ts +24 -1
- package/apps/studio/access/refused-inputs.ts +89 -0
- package/apps/studio/actions/agents.ts +59 -0
- package/apps/studio/actions/ctx.ts +3 -0
- package/apps/studio/actions/defs/app.ts +12 -0
- package/apps/studio/actions/defs/sync.ts +13 -0
- package/apps/studio/actions/defs/view.ts +59 -3
- package/apps/studio/actions/keymap.gen.ts +35 -0
- package/apps/studio/actions/menu.ts +2 -0
- package/apps/studio/actions/types.ts +3 -1
- package/apps/studio/actions.manifest.json +148 -1
- package/apps/studio/actions.parity.json +31 -1
- package/apps/studio/annotations/ui/ai-seen.tsx +4 -3
- package/apps/studio/annotations/ui/element-node.tsx +139 -54
- package/apps/studio/annotations/ui/lod.tsx +1 -1
- package/apps/studio/annotations/ui/ride.ts +2 -1
- package/apps/studio/annotations/ui/text-style.ts +1 -1
- package/apps/studio/annotations-context-toolbar.tsx +5 -4
- package/apps/studio/annotations-layer.tsx +4 -15
- package/apps/studio/api.ts +425 -128
- package/apps/studio/artboard-activity-overlay.tsx +4 -4
- package/apps/studio/artboard-ai-copies.tsx +4 -4
- package/apps/studio/artboard-freeze.ts +108 -0
- package/apps/studio/artboard-live-gate.tsx +636 -0
- package/apps/studio/artboard-live.ts +831 -0
- package/apps/studio/artboard-placeholder.ts +197 -0
- package/apps/studio/artboard-still-raster.ts +485 -0
- package/apps/studio/artboard-still-warmup.ts +221 -0
- package/apps/studio/artboard-still.ts +1188 -0
- package/apps/studio/artboard-webgl.ts +669 -0
- package/apps/studio/asset-placeholder.tsx +237 -132
- package/apps/studio/asset-upload-bars.tsx +4 -4
- package/apps/studio/bin/_agent-browser-bin.mjs +8 -0
- package/apps/studio/bin/_agent-browser-safe.mjs +2 -1
- package/apps/studio/bin/_canvas-reasons.mjs +34 -0
- package/apps/studio/bin/_ds-check-live.mjs +37 -0
- package/apps/studio/bin/_ds-check.mjs +4 -1
- package/apps/studio/bin/_ds-prove-judge.mjs +167 -0
- package/apps/studio/bin/_ds-prove-playwright.mjs +183 -105
- package/apps/studio/bin/_import-asset.mjs +2 -1
- package/apps/studio/bin/_perf-probe-open.mjs +364 -0
- package/apps/studio/bin/_perf-probe.mjs +2 -1
- package/apps/studio/bin/_perf-shared.mjs +12 -7
- package/apps/studio/bin/_pw-launch.mjs +26 -1
- package/apps/studio/bin/_studio-verb.mjs +24 -3
- package/apps/studio/bin/_thumb-blank.mjs +70 -0
- package/apps/studio/bin/_thumb-cover.mjs +35 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +89 -12
- package/apps/studio/bin/ds-check.sh +5 -1
- package/apps/studio/bin/perf.sh +30 -1
- package/apps/studio/bin/server-up.sh +7 -2
- package/apps/studio/bin/smoke.sh +19 -0
- package/apps/studio/bridge/dgn-protocol.ts +35 -0
- package/apps/studio/canvas-build-sandbox.ts +69 -13
- package/apps/studio/canvas-camera.ts +90 -0
- package/apps/studio/canvas-comment-mount.tsx +9 -9
- package/apps/studio/canvas-lib.tsx +289 -44
- package/apps/studio/canvas-pages-view.tsx +465 -0
- package/apps/studio/canvas-pages.ts +305 -0
- package/apps/studio/canvas-rows.ts +62 -0
- package/apps/studio/canvas-shell.tsx +62 -16
- package/apps/studio/canvas-theme-icons.tsx +41 -0
- package/apps/studio/canvas-theme-pill.tsx +15 -6
- package/apps/studio/canvas-theme.ts +12 -11
- package/apps/studio/client/app.jsx +7 -0
- package/apps/studio/client/canvas-url.js +36 -1
- package/apps/studio/client/home/HomeAccounts.jsx +262 -0
- package/apps/studio/client/home/Shelves.jsx +4 -3
- package/apps/studio/client/home/home-accounts-model.js +121 -0
- package/apps/studio/client/home/home-api.js +6 -0
- package/apps/studio/client/home/home-app.jsx +141 -40
- package/apps/studio/client/home/home-model.js +172 -6
- package/apps/studio/client/home/home.css +169 -5
- package/apps/studio/client/home/shell-mode.js +8 -1
- package/apps/studio/client/hooks/canvas-origin-probe.js +34 -0
- package/apps/studio/client/hooks/use-action-keys.jsx +3 -1
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +1 -1
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +23 -6
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +16 -8
- package/apps/studio/client/hooks/use-project-data.jsx +13 -2
- package/apps/studio/client/hooks/use-shell-core.jsx +19 -9
- package/apps/studio/client/index-loader.ts +41 -21
- package/apps/studio/client/inspector/inspector-panel.jsx +35 -14
- package/apps/studio/client/panels/ChatPanel.jsx +27 -20
- package/apps/studio/client/panels/CreateProject.jsx +19 -5
- package/apps/studio/client/panels/caps-cache.js +46 -0
- package/apps/studio/client/shell/viewport.jsx +66 -22
- package/apps/studio/client/tree/tree.jsx +17 -0
- package/apps/studio/client/v2/access/access-client.js +2 -0
- package/apps/studio/client/v2/access/access-host.jsx +12 -1
- package/apps/studio/client/v2/access/trashed-banner.jsx +6 -3
- package/apps/studio/client/v2/ai/Advanced.jsx +12 -0
- package/apps/studio/client/v2/ai/Composer.jsx +27 -10
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +24 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +24 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +14 -2
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +19 -14
- package/apps/studio/client/v2/code/canvas-imports-words.js +60 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +59 -5
- package/apps/studio/client/v2/code/canvas-waiting.js +18 -1
- package/apps/studio/client/v2/code/code-bus.js +5 -0
- package/apps/studio/client/v2/code/code-consent-sheet.jsx +87 -0
- package/apps/studio/client/v2/code/code-consent.js +67 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +62 -10
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +314 -5
- package/apps/studio/client/v2/ds/advanced-host.jsx +11 -26
- package/apps/studio/client/v2/ds/ds-refresh.js +161 -0
- package/apps/studio/client/v2/ds/library-host.jsx +45 -45
- package/apps/studio/client/v2/ds/make-host.jsx +13 -15
- package/apps/studio/client/v2/ds/off-system-host.jsx +18 -19
- package/apps/studio/client/v2/ds/review-host.jsx +7 -1
- package/apps/studio/client/v2/ds/truth-host.jsx +15 -17
- package/apps/studio/client/v2/ds/upgrade-host.jsx +26 -10
- package/apps/studio/client/v2/history/branch-actions.js +13 -9
- package/apps/studio/client/v2/history/git-advanced.jsx +8 -1
- package/apps/studio/client/v2/history/git-model.js +3 -1
- package/apps/studio/client/v2/history/git-parts.jsx +16 -1
- package/apps/studio/client/v2/layers/artboard-layers.jsx +24 -5
- package/apps/studio/client/v2/layers/layers-request.js +49 -0
- package/apps/studio/client/v2/left-panel/canvases-pinned.jsx +93 -3
- package/apps/studio/client/v2/left-panel/ds-boards.js +39 -0
- package/apps/studio/client/v2/left-panel/left-panel-model.js +13 -0
- package/apps/studio/client/v2/left-panel/left-panel.css +24 -0
- package/apps/studio/client/v2/presence/faces.jsx +42 -14
- package/apps/studio/client/v2/shell/account-card.jsx +10 -4
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +172 -0
- package/apps/studio/client/v2/shell/canvas-mode.js +17 -1
- package/apps/studio/client/v2/shell/floating-panels.css +37 -1
- package/apps/studio/client/v2/shell/github-signin-host.jsx +42 -0
- package/apps/studio/client/v2/shell/menu-runner.js +11 -0
- package/apps/studio/client/v2/shell/mode-switch.jsx +14 -3
- package/apps/studio/client/v2/shell/opening-skeleton.js +118 -0
- package/apps/studio/client/v2/shell/opening-skeleton.jsx +103 -0
- package/apps/studio/client/v2/shell/pages-pick.js +49 -0
- package/apps/studio/client/v2/shell/project-account-card.jsx +203 -0
- package/apps/studio/client/v2/shell/project-account-model.js +182 -0
- package/apps/studio/client/v2/shell/project-menu-model.js +3 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +140 -11
- package/apps/studio/client/v2/shell/share-cluster.css +58 -0
- package/apps/studio/client/v2/shell/share-cluster.jsx +26 -7
- package/apps/studio/client/v2/shell/shell-parity.json +8 -0
- package/apps/studio/client/v2/shell/team-switch.js +94 -0
- package/apps/studio/client/v2/shell/too-heavy-card.jsx +38 -0
- package/apps/studio/client/v2/shell/use-account.js +8 -1
- package/apps/studio/client/v2/shell/use-canvas-mode-lane.js +30 -0
- package/apps/studio/collab/persistence.ts +9 -1
- package/apps/studio/collab/registry.ts +32 -0
- package/apps/studio/collab/room.ts +8 -0
- package/apps/studio/comments-overlay.tsx +12 -11
- package/apps/studio/config-reload-wire.ts +56 -0
- package/apps/studio/config.schema.json +6 -0
- package/apps/studio/context.ts +37 -1
- package/apps/studio/dist/client.bundle.js +1198 -1198
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/board.css +6 -0
- package/apps/studio/ds/board/ds-bar.tsx +21 -3
- package/apps/studio/ds/board/specimen.tsx +16 -2
- package/apps/studio/ds/board/template.ts +39 -19
- package/apps/studio/ds/canvas-cli.ts +58 -2
- package/apps/studio/ds/check.ts +26 -1
- package/apps/studio/ds/cli.ts +14 -4
- package/apps/studio/ds/component-list.ts +2 -1
- package/apps/studio/ds/convert.ts +34 -6
- package/apps/studio/ds/default.ts +6 -1
- package/apps/studio/ds/ds-resolver.ts +58 -8
- package/apps/studio/ds/ds-verb.ts +13 -0
- package/apps/studio/ds/engine.ts +3 -1
- package/apps/studio/ds/folder-systems.ts +199 -0
- package/apps/studio/ds/pairing-css.ts +2 -1
- package/apps/studio/ds/post-build.ts +38 -0
- package/apps/studio/ds/rename.ts +10 -3
- package/apps/studio/ds/shell-fallbacks.ts +2 -1
- package/apps/studio/ds/upgrade-apply.ts +27 -5
- package/apps/studio/ds/upgrade-cli.ts +22 -2
- package/apps/studio/ds/upgrade-prove.ts +198 -15
- package/apps/studio/ds/upgrade-stage.ts +10 -3
- package/apps/studio/editing/ai-point-ring.tsx +4 -4
- package/apps/studio/editing/ai-scope-outline.tsx +4 -4
- package/apps/studio/editing/align-bar.tsx +4 -4
- package/apps/studio/editing/anchor-report.ts +3 -2
- package/apps/studio/editing/artboard-handles.tsx +4 -4
- package/apps/studio/editing/corner-dots.tsx +4 -4
- package/apps/studio/editing/crop-mode.tsx +4 -4
- package/apps/studio/editing/drop-chip.tsx +4 -4
- package/apps/studio/editing/empty-report.ts +3 -2
- package/apps/studio/editing/focus-model.tsx +4 -4
- package/apps/studio/editing/gap-bands.tsx +3 -3
- package/apps/studio/editing/hold-rings.tsx +4 -4
- package/apps/studio/editing/lock-badge.tsx +3 -3
- package/apps/studio/editing/long-page.ts +23 -1
- package/apps/studio/editing/nudge.tsx +2 -2
- package/apps/studio/editing/page-activity.ts +4 -3
- package/apps/studio/editing/paste-bar.tsx +4 -4
- package/apps/studio/editing/pen/overlay.tsx +4 -3
- package/apps/studio/editing/place-freely.tsx +3 -3
- package/apps/studio/editing/reorder-slot.tsx +3 -3
- package/apps/studio/editing/selection.tsx +4 -4
- package/apps/studio/editing/size-ghost.tsx +4 -4
- package/apps/studio/editing/tab-order.tsx +4 -4
- package/apps/studio/editing/text-in-place.tsx +4 -4
- package/apps/studio/editing/undo-preview.tsx +3 -3
- package/apps/studio/equal-spacing-handles.tsx +3 -3
- package/apps/studio/frame-clock.ts +89 -0
- package/apps/studio/history/trash.ts +6 -0
- package/apps/studio/home/accounts.ts +87 -0
- package/apps/studio/home/index-reader.ts +24 -2
- package/apps/studio/home/routes.ts +19 -0
- package/apps/studio/http.ts +80 -34
- package/apps/studio/index/ds-usage.ts +4 -1
- package/apps/studio/index-cache.ts +272 -0
- package/apps/studio/inspect-overlay.tsx +4 -3
- package/apps/studio/inspect.ts +7 -2
- package/apps/studio/link-chip-overlay.tsx +4 -3
- package/apps/studio/measure-overlay.tsx +4 -3
- package/apps/studio/present/pointer-dot.tsx +3 -2
- package/apps/studio/present/present-media.ts +6 -2
- package/apps/studio/present/present-stage.tsx +3 -2
- package/apps/studio/preview/preview-camera.tsx +3 -2
- package/apps/studio/routes/ds-convert.ts +18 -0
- package/apps/studio/routes/sync.ts +176 -0
- package/apps/studio/routes/trash.ts +16 -1
- package/apps/studio/safe-zones-overlay.tsx +3 -2
- package/apps/studio/server.ts +8 -10
- package/apps/studio/skip-dirs.ts +103 -47
- package/apps/studio/studio-page-host.ts +70 -0
- package/apps/studio/sync/accepted-cold-start.ts +28 -13
- package/apps/studio/sync/asset-push.ts +146 -23
- package/apps/studio/sync/asset-state.ts +3 -2
- package/apps/studio/sync/code-module-consent.ts +86 -0
- package/apps/studio/sync/file-ledger.ts +24 -0
- package/apps/studio/sync/file-membership.ts +28 -3
- package/apps/studio/sync/file-plane.ts +497 -61
- package/apps/studio/sync/file-pull.ts +304 -33
- package/apps/studio/sync/held-deletes.ts +230 -0
- package/apps/studio/sync/hub-link.ts +1 -2
- package/apps/studio/sync/hubs-config.ts +59 -2
- package/apps/studio/sync/index.ts +405 -163
- package/apps/studio/sync/journal-client.ts +94 -5
- package/apps/studio/sync/pending-deletes.ts +100 -0
- package/apps/studio/sync/projection.ts +77 -12
- package/apps/studio/sync/seed-progress.ts +104 -3
- package/apps/studio/sync/settings.ts +36 -1
- package/apps/studio/sync/status.ts +17 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/text-caret.ts +5 -3
- package/apps/studio/thumbs/service.ts +12 -2
- package/apps/studio/thumbs/validate.ts +7 -0
- package/apps/studio/toolbars/toolbar-rect.ts +3 -2
- package/apps/studio/ui-prefs-migrate.ts +4 -0
- package/apps/studio/use-annotation-resize.tsx +4 -3
- package/apps/studio/use-artboard-drag.tsx +3 -2
- package/apps/studio/use-element-resize.tsx +7 -6
- package/apps/studio/use-grid-track-handles.tsx +5 -4
- package/apps/studio/use-selection-set.tsx +64 -4
- package/apps/studio/use-spacing-handles.tsx +7 -6
- package/apps/studio/video-comp.tsx +75 -39
- package/apps/studio/video-play-overlay.tsx +4 -3
- package/apps/studio/whats-new.json +99 -0
- package/cli/commands/design.mjs +5 -2
- package/cli/commands/hub.mjs +10 -1
- package/cli/lib/bash-guard.mjs +27 -1
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-hook.mjs +20 -0
- package/cli/lib/design-link.mjs +42 -17
- package/cli/lib/hub-purge.mjs +183 -0
- package/cli/lib/studio-locate.mjs +35 -10
- package/package.json +8 -8
- package/plugins/design/templates/_shell.html +164 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// client/v2/shell/project-account-model.js — 2.0.5 W4: which account THIS project uses, and how.
|
|
2
|
+
//
|
|
3
|
+
// PURE: what the avatar's card says and which existing path each of its buttons runs. Michal's rule
|
|
4
|
+
// after 2.0.4 — every button does something, nothing fails — so a row exists only where its path does:
|
|
5
|
+
//
|
|
6
|
+
// kind team server · Maude Cloud · GitHub · nothing (this Mac only)
|
|
7
|
+
// profile `/_config.profile` — the account slot this project is bound to (V2-3.1; the server
|
|
8
|
+
// learns it from env only, MAUDE_PROFILE_ID / _LABEL)
|
|
9
|
+
// where the team server's host, or the cloud project's name
|
|
10
|
+
// who the signed-in login / e-mail, only where the page already holds it (the hub's recorded
|
|
11
|
+
// account from `/_api/connections/hub`, the cloud e-mail from `/_api/cloud/status`, the
|
|
12
|
+
// GitHub login from `/_api/github/identity`, a cloud tab's `cfg.cloud.user.email`)
|
|
13
|
+
//
|
|
14
|
+
// Sign out, per kind — each the path its Settings › Connections row already runs, never a new one:
|
|
15
|
+
// cloud-signout POST /_api/cloud/signout — clears this project's PROFILE cloud credential (V2-3.8)
|
|
16
|
+
// hub-detach POST /_api/cloud/detach — Settings' team-server "Sign out": the link + its sign-in
|
|
17
|
+
// github-signout the shell's `github_sign_out` — the calling project's profile keychain slot
|
|
18
|
+
// Switch, per kind — through the bind-on-sign-in rule (decision v2-3.8-bind-on-sign-in):
|
|
19
|
+
// cloud `account.switch` → `cloud_sign_in_prepare` (a fresh profile bound to this project)
|
|
20
|
+
// github `account.github-signin` → `github_sign_in` (settle_sign_in rebinds on another login)
|
|
21
|
+
// team server W4b: `hub-switch` → `team_sign_in_prepare` (this project moves to a fresh profile
|
|
22
|
+
// of its own when its profile is shared — the shell restarts it, the page reloads,
|
|
23
|
+
// the person signs in there) → `/_api/hub-signin/start` + the server's own page.
|
|
24
|
+
// A browser tab on this Mac has no shell: it says what is known and offers no button. A cloud tab's
|
|
25
|
+
// account is the hub's browser session: `account.switch` ends it (the v1 menubar's Sign out).
|
|
26
|
+
|
|
27
|
+
import { ACTIONS_BY_ID } from '../../../actions/index.ts';
|
|
28
|
+
import { isCloudHub } from '../settings/connections-model.js';
|
|
29
|
+
|
|
30
|
+
// host, plus the port when it is not the scheme's default (URL.host drops 443/80) — as the Home card says it
|
|
31
|
+
const hostOf = (url) => {
|
|
32
|
+
try {
|
|
33
|
+
return new URL(String(url)).host.toLowerCase();
|
|
34
|
+
} catch {
|
|
35
|
+
return '';
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const str = (v) => (typeof v === 'string' && v.trim() ? v.trim() : null);
|
|
39
|
+
const labelOf = (id) => ACTIONS_BY_ID.get(id)?.label ?? '';
|
|
40
|
+
|
|
41
|
+
export const KIND_LABELS = Object.freeze({
|
|
42
|
+
team: 'Team server',
|
|
43
|
+
cloud: 'Maude Cloud',
|
|
44
|
+
github: 'GitHub',
|
|
45
|
+
local: 'This Mac only',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const GITHUB_NEEDS_APP = 'Signing in with GitHub needs the Maude desktop app.';
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param in.native the desktop app (a Tauri shell)
|
|
52
|
+
* @param in.cloudTab `cfg.cloud` of a cloud tab, else null
|
|
53
|
+
* @param in.profile `/_config.profile` { id, label? }
|
|
54
|
+
* @param in.project this project's name
|
|
55
|
+
* @param in.linkedHub { url, credentialed } from `/_api/cloud/status`
|
|
56
|
+
* @param in.hubAccount the hub sign-in's recorded account (`/_api/connections/hub` `account`)
|
|
57
|
+
* @param in.cloudUrl the Maude Cloud address this Mac signs in against
|
|
58
|
+
* @param in.cloudConnected this profile holds a Maude Cloud sign-in
|
|
59
|
+
* @param in.cloudEmail its e-mail
|
|
60
|
+
* @param in.github { state: 'loading'|'in'|'out', login }
|
|
61
|
+
*/
|
|
62
|
+
export function projectAccount(input = {}) {
|
|
63
|
+
const {
|
|
64
|
+
native = false,
|
|
65
|
+
cloudTab = null,
|
|
66
|
+
profile = null,
|
|
67
|
+
project = null,
|
|
68
|
+
linkedHub = null,
|
|
69
|
+
hubAccount = null,
|
|
70
|
+
cloudUrl = '',
|
|
71
|
+
cloudConnected = false,
|
|
72
|
+
cloudEmail = null,
|
|
73
|
+
github = null,
|
|
74
|
+
} = input;
|
|
75
|
+
const profileLabel = str(profile?.label) || str(profile?.id) || (native ? 'default' : null);
|
|
76
|
+
|
|
77
|
+
if (cloudTab) {
|
|
78
|
+
// A browser on a cell: a hub with a dashboard is Maude Cloud, one that serves a single project is a
|
|
79
|
+
// team's own server. No Mac, no keychain, no GitHub.
|
|
80
|
+
const email = str(cloudTab.user?.email);
|
|
81
|
+
return {
|
|
82
|
+
kind: cloudTab.dashboardUrl ? 'cloud' : 'team',
|
|
83
|
+
kindLabel: KIND_LABELS[cloudTab.dashboardUrl ? 'cloud' : 'team'],
|
|
84
|
+
profileLabel: null,
|
|
85
|
+
where: str(cloudTab.projectName) || str(project),
|
|
86
|
+
who: email,
|
|
87
|
+
signOut: null,
|
|
88
|
+
// the registry hides account.switch in a cloud tab without a user (app.jsx); so does the card
|
|
89
|
+
switch: email ? { id: 'account.switch', label: labelOf('account.switch') } : null,
|
|
90
|
+
github: null,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const hubUrl = str(linkedHub?.url);
|
|
95
|
+
const cloudHub = hubUrl ? isCloudHub(hubUrl, cloudUrl) : false;
|
|
96
|
+
const ghIn = github?.state === 'in';
|
|
97
|
+
const ghLogin = ghIn ? str(github?.login) : null;
|
|
98
|
+
let kind = 'local';
|
|
99
|
+
if (hubUrl && !cloudHub) kind = 'team';
|
|
100
|
+
else if (cloudConnected || (hubUrl && cloudHub)) kind = 'cloud';
|
|
101
|
+
else if (ghIn) kind = 'github';
|
|
102
|
+
|
|
103
|
+
const who =
|
|
104
|
+
kind === 'team'
|
|
105
|
+
? str(hubAccount)
|
|
106
|
+
: kind === 'cloud'
|
|
107
|
+
? str(cloudEmail)
|
|
108
|
+
: kind === 'github' && ghLogin
|
|
109
|
+
? `@${ghLogin}`
|
|
110
|
+
: null;
|
|
111
|
+
const where = kind === 'team' ? hostOf(hubUrl) || hubUrl : kind === 'cloud' ? str(project) : null;
|
|
112
|
+
|
|
113
|
+
let signOut = null;
|
|
114
|
+
let sw = null;
|
|
115
|
+
if (native) {
|
|
116
|
+
if (kind === 'cloud' && cloudConnected) {
|
|
117
|
+
const name = who || profileLabel;
|
|
118
|
+
// The account card's words (account-card-model.js), unchanged: one confirm on every surface.
|
|
119
|
+
signOut = {
|
|
120
|
+
path: 'cloud-signout',
|
|
121
|
+
label: `Sign out of ${name}…`,
|
|
122
|
+
confirm: {
|
|
123
|
+
title: `Sign out of ${name}?`,
|
|
124
|
+
body: 'Every project on it is signed out. Your work stays on this Mac.',
|
|
125
|
+
primary: 'Sign out',
|
|
126
|
+
cancel: 'Cancel',
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
sw = { id: 'account.switch', label: labelOf('account.switch') };
|
|
130
|
+
} else if (kind === 'team') {
|
|
131
|
+
const host = where || 'this server';
|
|
132
|
+
// 2.0.5 W4b — Switch through `team_sign_in_prepare`: a project on a profile other projects
|
|
133
|
+
// share first moves to its own (the shell restarts it); then the team server's own page.
|
|
134
|
+
sw = {
|
|
135
|
+
path: 'hub-switch',
|
|
136
|
+
url: hubUrl,
|
|
137
|
+
label: linkedHub?.credentialed ? 'Sign in as someone else…' : `Sign in to ${host}…`,
|
|
138
|
+
};
|
|
139
|
+
if (linkedHub?.credentialed)
|
|
140
|
+
signOut = {
|
|
141
|
+
path: 'hub-detach',
|
|
142
|
+
label: `Sign out of ${host}…`,
|
|
143
|
+
confirm: {
|
|
144
|
+
title: `Sign out of ${host}?`,
|
|
145
|
+
body: 'This folder stops syncing with it. Your work stays on this Mac.',
|
|
146
|
+
primary: 'Sign out',
|
|
147
|
+
cancel: 'Cancel',
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
} else if (kind === 'github' && ghLogin) {
|
|
151
|
+
signOut = {
|
|
152
|
+
path: 'github-signout',
|
|
153
|
+
label: `Sign out of @${ghLogin}…`,
|
|
154
|
+
confirm: {
|
|
155
|
+
title: `Sign out of @${ghLogin}?`,
|
|
156
|
+
body: 'Every project on it is signed out of GitHub. Your work stays on this Mac.',
|
|
157
|
+
primary: 'Sign out',
|
|
158
|
+
cancel: 'Cancel',
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
sw = { id: 'account.github-signin', label: 'Sign in as another GitHub account…' };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
kind,
|
|
167
|
+
kindLabel: KIND_LABELS[kind],
|
|
168
|
+
profileLabel,
|
|
169
|
+
where,
|
|
170
|
+
who,
|
|
171
|
+
signOut,
|
|
172
|
+
switch: sw,
|
|
173
|
+
// The GitHub line: sign in where the app can, sign out where it is the second account of the card.
|
|
174
|
+
github: native
|
|
175
|
+
? {
|
|
176
|
+
login: ghLogin,
|
|
177
|
+
canSignIn: !ghIn && github?.state !== 'loading',
|
|
178
|
+
canSignOut: ghIn && kind !== 'github',
|
|
179
|
+
}
|
|
180
|
+
: { login: null, canSignIn: false, canSignOut: false, note: GITHUB_NEEDS_APP },
|
|
181
|
+
};
|
|
182
|
+
}
|
|
@@ -193,8 +193,11 @@ export function menuCtx({
|
|
|
193
193
|
online = true,
|
|
194
194
|
// p8-v1-drop — a design system here is below Conformant (client/v2/ds/upgrade-offers.js)
|
|
195
195
|
dsUpgradeOffered = false,
|
|
196
|
+
// 2.0.7 B2 — the active canvas shows Pages: Preview and Present grey out, Next / Previous page come on
|
|
197
|
+
pagesView = false,
|
|
196
198
|
} = {}) {
|
|
197
199
|
const facts = new Set();
|
|
200
|
+
if (pagesView) facts.add('pagesView');
|
|
198
201
|
if (dsUpgradeOffered) facts.add('dsUpgradeOffered');
|
|
199
202
|
if (native) facts.add('native');
|
|
200
203
|
// S3.7b — a desktop project linked to a cloud hub (Copy presentation link is enabled there).
|
|
@@ -53,13 +53,66 @@ import { normalizeOpenPath } from '../../share-link.js';
|
|
|
53
53
|
import { useAccount } from './use-account.js';
|
|
54
54
|
import { useCanvasModeLane } from './use-canvas-mode-lane.js';
|
|
55
55
|
import { usePanelLayout } from './use-panel-layout.js';
|
|
56
|
-
import { isNativeApp } from '../../github.js';
|
|
56
|
+
import { invoke as shellInvoke, isNativeApp, openTeamServerSignIn } from '../../github.js';
|
|
57
57
|
import {
|
|
58
58
|
chosenDisplay,
|
|
59
59
|
presenterAvailable,
|
|
60
60
|
usePresenterDisplays,
|
|
61
61
|
} from '../present/presenter-store.js';
|
|
62
62
|
import { servedFetch } from './served-routes.js';
|
|
63
|
+
import { CLOUD_CHANGED_EVENT } from '../../panels/CloudBar.jsx';
|
|
64
|
+
import { GitHubSignInSheet, useGitHubSignInHost } from './github-signin-host.jsx';
|
|
65
|
+
import { ProjectAccountCard, ProjectAccountPopover } from './project-account-card.jsx';
|
|
66
|
+
import { projectAccount } from './project-account-model.js';
|
|
67
|
+
import { runTeamSwitch } from './team-switch.js';
|
|
68
|
+
|
|
69
|
+
/** 2.0.5 W4 — the team server sign-in's recorded account (`GET /_api/connections/hub`, Settings' own read). */
|
|
70
|
+
function useHubAccount(enabled, url) {
|
|
71
|
+
const [account, setAccount] = useState(null);
|
|
72
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `url` re-reads when the folder's link moves
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!enabled) {
|
|
75
|
+
setAccount(null);
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
let live = true;
|
|
79
|
+
fetch('/_api/connections/hub')
|
|
80
|
+
.then((r) => (r.ok ? r.json() : null))
|
|
81
|
+
.then((j) => {
|
|
82
|
+
if (live) setAccount(typeof j?.hub?.account === 'string' ? j.hub.account : null);
|
|
83
|
+
})
|
|
84
|
+
.catch(() => {});
|
|
85
|
+
return () => {
|
|
86
|
+
live = false;
|
|
87
|
+
};
|
|
88
|
+
}, [enabled, url]);
|
|
89
|
+
return account;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Settings' team-server "Sign out": POST /_api/cloud/detach — the link and its sign-in, this profile only. */
|
|
93
|
+
async function detachHub(host) {
|
|
94
|
+
try {
|
|
95
|
+
const r = await fetch('/_api/cloud/detach', { method: 'POST' });
|
|
96
|
+
const j = await r.json().catch(() => ({}));
|
|
97
|
+
if (!r.ok || !j?.ok) throw new Error(j?.error || String(r.status));
|
|
98
|
+
window.dispatchEvent(
|
|
99
|
+
new CustomEvent(CLOUD_CHANGED_EVENT, { detail: { from: 'account-card' } })
|
|
100
|
+
);
|
|
101
|
+
shellToast(`Signed out of ${host || 'the team server'}. Your work stays on this Mac.`, true);
|
|
102
|
+
} catch {
|
|
103
|
+
shellToast('Could not sign out. Nothing changed — try again.');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** `{ ok, status, json }` of a same-origin JSON call (team-switch.js's `api`). */
|
|
108
|
+
async function jsonFetch(path, init) {
|
|
109
|
+
try {
|
|
110
|
+
const r = await fetch(path, init);
|
|
111
|
+
return { ok: r.ok, status: r.status, json: await r.json().catch(() => null) };
|
|
112
|
+
} catch {
|
|
113
|
+
return { ok: false, status: 0, json: null };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
63
116
|
|
|
64
117
|
const subscribeOnline = (fn) => {
|
|
65
118
|
window.addEventListener('online', fn);
|
|
@@ -205,8 +258,9 @@ export function ShellShareCluster() {
|
|
|
205
258
|
readOnly: !!viewerMode,
|
|
206
259
|
observer: role === 'observer',
|
|
207
260
|
canvasOpen,
|
|
261
|
+
pagesView: lane.pages,
|
|
208
262
|
}),
|
|
209
|
-
[viewerMode, canvasOpen, role]
|
|
263
|
+
[viewerMode, canvasOpen, role, lane.pages]
|
|
210
264
|
);
|
|
211
265
|
|
|
212
266
|
// S3.2a — the first Present row names the artboard a click would start from: the labels come from the
|
|
@@ -249,7 +303,8 @@ export function ShellShareCluster() {
|
|
|
249
303
|
// S1.22a — the account chip (desktop): which Mac account this project tab is bound to. A cloud tab's
|
|
250
304
|
// account is the hub's, a browser tab has none: both get no chip.
|
|
251
305
|
const native = isNativeApp();
|
|
252
|
-
|
|
306
|
+
// 2.0.5 W4 — every non-cloud tab reads its account (a browser tab on this Mac shows the facts too)
|
|
307
|
+
const acct = useAccount(!cfg?.cloud);
|
|
253
308
|
const projectName = cfg?.cloud?.projectName || project;
|
|
254
309
|
const chip = useMemo(
|
|
255
310
|
() =>
|
|
@@ -275,6 +330,61 @@ export function ShellShareCluster() {
|
|
|
275
330
|
: null,
|
|
276
331
|
[chip, projectName, cfg?.profile, acct.email, acct.accounts]
|
|
277
332
|
);
|
|
333
|
+
// 2.0.5 W4 — the avatar (your face, or the chip) opens THIS project's account: kind, profile, hub or
|
|
334
|
+
// cloud project, the login; Sign out on the kind's existing path, Switch through bind-on-sign-in.
|
|
335
|
+
const gh = useGitHubSignInHost();
|
|
336
|
+
const [acctOpen, setAcctOpen] = useState(false);
|
|
337
|
+
const closeAcct = useCallback(() => setAcctOpen(false), []);
|
|
338
|
+
// the account's own read once it answered (it follows a sign-out), the shell's link until then
|
|
339
|
+
const linkHub = acct.linkedHub !== undefined ? acct.linkedHub : (cloudLinkedHub ?? null);
|
|
340
|
+
const hubAccount = useHubAccount(!cfg?.cloud && !!linkHub?.credentialed, linkHub?.url);
|
|
341
|
+
const projectAcct = useMemo(
|
|
342
|
+
() =>
|
|
343
|
+
projectAccount({
|
|
344
|
+
native,
|
|
345
|
+
cloudTab: cfg?.cloud ?? null,
|
|
346
|
+
profile: cfg?.profile,
|
|
347
|
+
project: projectName,
|
|
348
|
+
linkedHub: linkHub,
|
|
349
|
+
hubAccount,
|
|
350
|
+
cloudUrl: acct.cloudUrl,
|
|
351
|
+
cloudConnected: acct.connected,
|
|
352
|
+
cloudEmail: acct.email,
|
|
353
|
+
github: { state: gh.state, login: gh.login },
|
|
354
|
+
}),
|
|
355
|
+
[native, cfg?.cloud, cfg?.profile, projectName, linkHub, hubAccount, acct, gh.state, gh.login]
|
|
356
|
+
);
|
|
357
|
+
const signOutPath = useCallback(
|
|
358
|
+
async (path) => {
|
|
359
|
+
if (path === 'cloud-signout') return acct.signOut();
|
|
360
|
+
if (path === 'github-signout') return gh.signOut();
|
|
361
|
+
if (path === 'hub-detach') return detachHub(projectAcct.where);
|
|
362
|
+
},
|
|
363
|
+
[acct, gh, projectAcct.where]
|
|
364
|
+
);
|
|
365
|
+
// 2.0.5 W4b — Switch / Sign in for a team server: `team_sign_in_prepare` first (bind-on-sign-in for
|
|
366
|
+
// a hub), then the server's own page. Words come back as one toast.
|
|
367
|
+
const switchPath = useCallback(
|
|
368
|
+
async (spec) => {
|
|
369
|
+
if (spec?.path !== 'hub-switch') return;
|
|
370
|
+
const r = await runTeamSwitch({
|
|
371
|
+
url: spec.url,
|
|
372
|
+
native,
|
|
373
|
+
invoke: shellInvoke,
|
|
374
|
+
api: jsonFetch,
|
|
375
|
+
openPage: openTeamServerSignIn,
|
|
376
|
+
wait: (ms) => new Promise((res) => setTimeout(res, ms)),
|
|
377
|
+
});
|
|
378
|
+
if (r.cancelled) return;
|
|
379
|
+
if (r.message) shellToast(r.message, true);
|
|
380
|
+
else if (r.error) shellToast(r.error);
|
|
381
|
+
if (r.ok && !r.moved)
|
|
382
|
+
window.dispatchEvent(
|
|
383
|
+
new CustomEvent(CLOUD_CHANGED_EVENT, { detail: { from: 'account-card' } })
|
|
384
|
+
);
|
|
385
|
+
},
|
|
386
|
+
[native]
|
|
387
|
+
);
|
|
278
388
|
// S9.23 — the faces' menu and people list: where people are, Follow / Go to / Bring everyone here.
|
|
279
389
|
const presence = usePresenceHost({
|
|
280
390
|
lane,
|
|
@@ -310,15 +420,32 @@ export function ShellShareCluster() {
|
|
|
310
420
|
<ShareCluster
|
|
311
421
|
cloud={!!cfg?.cloud}
|
|
312
422
|
accountSlot={
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
423
|
+
<>
|
|
424
|
+
<span className="sh-pa-anchor">
|
|
425
|
+
<ProjectAccountPopover open={acctOpen} onClose={closeAcct}>
|
|
426
|
+
<ProjectAccountCard
|
|
427
|
+
account={projectAcct}
|
|
428
|
+
run={(id) => menuRunner.run(id)}
|
|
429
|
+
onSignOut={signOutPath}
|
|
430
|
+
onSwitch={switchPath}
|
|
431
|
+
onClose={closeAcct}
|
|
432
|
+
/>
|
|
433
|
+
</ProjectAccountPopover>
|
|
434
|
+
</span>
|
|
435
|
+
{chip ? (
|
|
436
|
+
<AccountChip
|
|
437
|
+
chip={chip}
|
|
438
|
+
card={card}
|
|
439
|
+
onSwitch={() => menuRunner.run('account.switch')}
|
|
440
|
+
onSignOut={acct.signOut}
|
|
441
|
+
onOpen={() => setAcctOpen((o) => !o)}
|
|
442
|
+
opened={acctOpen}
|
|
443
|
+
/>
|
|
444
|
+
) : null}
|
|
445
|
+
</>
|
|
321
446
|
}
|
|
447
|
+
onAccount={() => setAcctOpen((o) => !o)}
|
|
448
|
+
accountOpen={acctOpen}
|
|
322
449
|
faces={faces}
|
|
323
450
|
onFollow={lane.follow}
|
|
324
451
|
presence={presence}
|
|
@@ -371,6 +498,7 @@ export function ShellShareCluster() {
|
|
|
371
498
|
presenterView={presenterView}
|
|
372
499
|
onPresenterView={() => menuRunner.run('present.presenter-view')}
|
|
373
500
|
canPresent={canvasOpen}
|
|
501
|
+
pages={lane.pages}
|
|
374
502
|
/>
|
|
375
503
|
}
|
|
376
504
|
/>
|
|
@@ -387,6 +515,7 @@ export function ShellShareCluster() {
|
|
|
387
515
|
run={(id) => menuRunner.run(id)}
|
|
388
516
|
onOpenTab={openTrashed}
|
|
389
517
|
/>
|
|
518
|
+
<GitHubSignInSheet gh={gh} />
|
|
390
519
|
</>
|
|
391
520
|
);
|
|
392
521
|
}
|
|
@@ -98,6 +98,21 @@
|
|
|
98
98
|
overflow: hidden;
|
|
99
99
|
text-overflow: ellipsis;
|
|
100
100
|
}
|
|
101
|
+
/* 2.0.5 W4 — the word is a button (Diagnostics › Sync): no chrome until hover/focus */
|
|
102
|
+
.sh-saved--btn {
|
|
103
|
+
appearance: none;
|
|
104
|
+
border: 0;
|
|
105
|
+
background: transparent;
|
|
106
|
+
font: inherit;
|
|
107
|
+
font-size: var(--type-xs, 12px);
|
|
108
|
+
border-radius: var(--radius-md, 8px);
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
}
|
|
111
|
+
.sh-saved--btn:hover,
|
|
112
|
+
.sh-saved--btn:focus-visible {
|
|
113
|
+
background: var(--accent-muted, var(--bg-3));
|
|
114
|
+
outline: none;
|
|
115
|
+
}
|
|
101
116
|
.sh-saved--warn {
|
|
102
117
|
color: var(--status-warn-text, var(--status-warn));
|
|
103
118
|
}
|
|
@@ -438,6 +453,49 @@
|
|
|
438
453
|
height: 32px;
|
|
439
454
|
font-size: var(--type-sm, 13px);
|
|
440
455
|
}
|
|
456
|
+
/* 2.0.5 W4 — this project's account (project-account-card.jsx), anchored at the cluster's start */
|
|
457
|
+
.sh-pa-anchor {
|
|
458
|
+
position: relative;
|
|
459
|
+
flex: none;
|
|
460
|
+
width: 0;
|
|
461
|
+
align-self: stretch;
|
|
462
|
+
}
|
|
463
|
+
.sh-pa {
|
|
464
|
+
display: flex;
|
|
465
|
+
flex-direction: column;
|
|
466
|
+
gap: 2px;
|
|
467
|
+
}
|
|
468
|
+
.sh-pa-h {
|
|
469
|
+
margin: 0;
|
|
470
|
+
padding: var(--space-1, 4px) var(--space-2, 8px);
|
|
471
|
+
font-size: var(--type-xs, 12px);
|
|
472
|
+
font-weight: var(--w-semibold, 600);
|
|
473
|
+
color: var(--fg-2);
|
|
474
|
+
}
|
|
475
|
+
.sh-pa-line {
|
|
476
|
+
display: flex;
|
|
477
|
+
justify-content: space-between;
|
|
478
|
+
gap: var(--space-3, 12px);
|
|
479
|
+
padding: 2px var(--space-2, 8px);
|
|
480
|
+
font-size: var(--type-xs, 12px);
|
|
481
|
+
}
|
|
482
|
+
.sh-pa-k {
|
|
483
|
+
color: var(--fg-2);
|
|
484
|
+
flex: none;
|
|
485
|
+
}
|
|
486
|
+
.sh-pa-v {
|
|
487
|
+
color: var(--fg-0);
|
|
488
|
+
min-width: 0;
|
|
489
|
+
overflow: hidden;
|
|
490
|
+
text-overflow: ellipsis;
|
|
491
|
+
white-space: nowrap;
|
|
492
|
+
}
|
|
493
|
+
.sh-pa-note {
|
|
494
|
+
margin: 0;
|
|
495
|
+
padding: 2px var(--space-2, 8px);
|
|
496
|
+
font-size: var(--type-xs, 12px);
|
|
497
|
+
color: var(--fg-2);
|
|
498
|
+
}
|
|
441
499
|
.sh-acct-card {
|
|
442
500
|
position: absolute;
|
|
443
501
|
top: calc(100% + var(--space-2, 8px));
|
|
@@ -69,6 +69,8 @@ const withKey = (label, def, ctx) => {
|
|
|
69
69
|
* @param present the Present spec while presenting (Artboards · Canvas are two columns of the table)
|
|
70
70
|
* @param accountSlot the account chip + card (S1.22a, account-card.jsx) — first, desktop only
|
|
71
71
|
* @param cloud this shell is a cloud tab: no sentence names a Mac (rc3-i)
|
|
72
|
+
* @param onAccount 2.0.5 W4 — your own face opens this project's account card (null: the face is a face)
|
|
73
|
+
* @param accountOpen the account card is showing (the face's aria-expanded)
|
|
72
74
|
*/
|
|
73
75
|
export function ShareCluster({
|
|
74
76
|
faces,
|
|
@@ -93,6 +95,8 @@ export function ShareCluster({
|
|
|
93
95
|
mode = null,
|
|
94
96
|
present = null,
|
|
95
97
|
accountSlot = null,
|
|
98
|
+
onAccount = null,
|
|
99
|
+
accountOpen = false,
|
|
96
100
|
cloud,
|
|
97
101
|
}) {
|
|
98
102
|
const cluster = mode ? modeCell('share-cluster', mode, present) : 'full';
|
|
@@ -133,7 +137,13 @@ export function ShareCluster({
|
|
|
133
137
|
data-zen={panelsHidden ? 'true' : undefined}
|
|
134
138
|
>
|
|
135
139
|
{accountSlot}
|
|
136
|
-
<PresenceFaces
|
|
140
|
+
<PresenceFaces
|
|
141
|
+
faces={faces}
|
|
142
|
+
onFollow={onFollow}
|
|
143
|
+
presence={presence}
|
|
144
|
+
onYou={onAccount}
|
|
145
|
+
youOpen={accountOpen}
|
|
146
|
+
/>
|
|
137
147
|
{access ? (
|
|
138
148
|
<span
|
|
139
149
|
className="sh-saved"
|
|
@@ -145,21 +155,30 @@ export function ShareCluster({
|
|
|
145
155
|
</span>
|
|
146
156
|
) : status ? (
|
|
147
157
|
<>
|
|
148
|
-
|
|
149
|
-
|
|
158
|
+
{/* 2.0.5 W4 — the word is a button in every sync state: Diagnostics › Sync (`diag.sync`, the
|
|
159
|
+
registry row the menu and ⌘K run), or — while a held conflict waits — that conflict's
|
|
160
|
+
Compare. The live region is the word inside, so a state change is still announced. */}
|
|
161
|
+
<button
|
|
162
|
+
type="button"
|
|
163
|
+
className={`sh-saved sh-saved--btn${status.tone ? ` sh-saved--${status.tone}` : ''}`}
|
|
150
164
|
data-testid="share-cluster-status"
|
|
151
165
|
data-status={status.kind}
|
|
152
166
|
// The old status-bar chip's detail (its tooltip and its short label — "3 to review",
|
|
153
167
|
// "1 refused", "12/40") rides on the word: hover for the sentence; `data-sync-label` is
|
|
154
168
|
// the short form for scenarios and scripts (V2-4.8b).
|
|
155
169
|
data-sync-label={status.syncLabel || undefined}
|
|
156
|
-
role="status"
|
|
157
|
-
aria-live="polite"
|
|
158
170
|
title={status.detail || status.title || undefined}
|
|
171
|
+
aria-label={`${status.word} — ${status.conflict ? 'Compare' : 'Sync details'}`}
|
|
172
|
+
onClick={() => {
|
|
173
|
+
if (status.conflict) onStatusAction?.('compare');
|
|
174
|
+
else run('diag.sync');
|
|
175
|
+
}}
|
|
159
176
|
>
|
|
160
177
|
<StIcon name={status.icon} size={16} />
|
|
161
|
-
<span className="sh-saved-w"
|
|
162
|
-
|
|
178
|
+
<span className="sh-saved-w" role="status" aria-live="polite">
|
|
179
|
+
{status.word}
|
|
180
|
+
</span>
|
|
181
|
+
</button>
|
|
163
182
|
{status.actions.map((a) => (
|
|
164
183
|
<button
|
|
165
184
|
key={a.id}
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"view.inspector-on-select",
|
|
96
96
|
"view.layers-panel",
|
|
97
97
|
"view.minimap",
|
|
98
|
+
"view.pages",
|
|
98
99
|
"view.panels",
|
|
99
100
|
"view.pin-panels",
|
|
100
101
|
"view.print-guides",
|
|
@@ -145,6 +146,7 @@
|
|
|
145
146
|
"view.assets": ["view"],
|
|
146
147
|
"view.exports": ["view"],
|
|
147
148
|
"view.annotations": ["view"],
|
|
149
|
+
"view.pages": ["view"],
|
|
148
150
|
"mode.preview": ["view"],
|
|
149
151
|
"present.from-selection": ["view"],
|
|
150
152
|
"present.from-start": ["view"],
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
"view.assets",
|
|
281
283
|
"view.exports",
|
|
282
284
|
"view.annotations",
|
|
285
|
+
"view.pages",
|
|
283
286
|
"mode.preview",
|
|
284
287
|
"present.from-selection",
|
|
285
288
|
"present.from-start",
|
|
@@ -663,6 +666,7 @@
|
|
|
663
666
|
"view.assets",
|
|
664
667
|
"view.exports",
|
|
665
668
|
"view.annotations",
|
|
669
|
+
"view.pages",
|
|
666
670
|
"mode.preview",
|
|
667
671
|
"present.from-selection",
|
|
668
672
|
"present.from-start",
|
|
@@ -1049,6 +1053,7 @@
|
|
|
1049
1053
|
"view.assets",
|
|
1050
1054
|
"view.exports",
|
|
1051
1055
|
"view.annotations",
|
|
1056
|
+
"view.pages",
|
|
1052
1057
|
"mode.preview",
|
|
1053
1058
|
"present.from-selection",
|
|
1054
1059
|
"present.from-start",
|
|
@@ -1317,6 +1322,7 @@
|
|
|
1317
1322
|
"view.assets",
|
|
1318
1323
|
"view.exports",
|
|
1319
1324
|
"view.annotations",
|
|
1325
|
+
"view.pages",
|
|
1320
1326
|
"mode.preview",
|
|
1321
1327
|
"present.from-selection",
|
|
1322
1328
|
"present.from-start",
|
|
@@ -1570,6 +1576,7 @@
|
|
|
1570
1576
|
"view.assets",
|
|
1571
1577
|
"view.exports",
|
|
1572
1578
|
"view.annotations",
|
|
1579
|
+
"view.pages",
|
|
1573
1580
|
"mode.preview",
|
|
1574
1581
|
"present.from-selection",
|
|
1575
1582
|
"present.from-start",
|
|
@@ -1828,6 +1835,7 @@
|
|
|
1828
1835
|
"view.assets",
|
|
1829
1836
|
"view.exports",
|
|
1830
1837
|
"view.annotations",
|
|
1838
|
+
"view.pages",
|
|
1831
1839
|
"mode.preview",
|
|
1832
1840
|
"present.from-selection",
|
|
1833
1841
|
"present.from-start",
|