diff --git a/app/client/ui/TopBar.ts b/app/client/ui/TopBar.ts index 8bad3a47..a310ce81 100644 --- a/app/client/ui/TopBar.ts +++ b/app/client/ui/TopBar.ts @@ -47,6 +47,7 @@ export function createTopBarDoc(owner: MultiHolder, appModel: AppModel, pageMode isPageNameReadOnly: (use) => use(gristDoc.isReadonly) || typeof use(gristDoc.activeViewId) !== 'number', isDocNameReadOnly: (use) => use(gristDoc.isReadonly) || use(pageModel.isFork), isFork: pageModel.isFork, + isBareFork: pageModel.isBareFork, isRecoveryMode: pageModel.isRecoveryMode, userOverride: pageModel.userOverride, isFiddle: Computed.create(owner, (use) => use(pageModel.isPrefork)), diff --git a/app/client/ui2018/breadcrumbs.ts b/app/client/ui2018/breadcrumbs.ts index 34f61e97..df046a1e 100644 --- a/app/client/ui2018/breadcrumbs.ts +++ b/app/client/ui2018/breadcrumbs.ts @@ -106,6 +106,7 @@ export function docBreadcrumbs( isDocNameReadOnly?: BindableValue, isPageNameReadOnly?: BindableValue, isFork: Observable, + isBareFork: Observable, isFiddle: Observable, isRecoveryMode: Observable, userOverride: Observable, @@ -114,25 +115,31 @@ export function docBreadcrumbs( } ): Element { return cssBreadcrumbs( - cssIcon('Home', + dom.domComputed<[boolean, PartialWorkspace|null]>( + (use) => [use(options.isBareFork), use(workspace)], + ([isBareFork, ws]) => { + if (isBareFork || !ws) { return null; } + return [ + cssIcon('Home', testId('bc-home'), cssHideForNarrowScreen.cls('')), - dom.maybe(workspace, _workspace => [ - cssWorkspaceName( - urlState().setLinkUrl({ws: _workspace.id}), - dom.text(_workspace.name), - testId('bc-workspace'), - cssHideForNarrowScreen.cls('') - ), - cssWorkspaceNarrowScreen( - 'Expand', - urlState().setLinkUrl({ws: _workspace.id}), - testId('bc-workspace-ns') - ), - separator(' / ', - testId('bc-separator'), - cssHideForNarrowScreen.cls('')) - ]), + cssWorkspaceName( + urlState().setLinkUrl({ws: ws.id}), + dom.text(ws.name), + testId('bc-workspace'), + cssHideForNarrowScreen.cls('') + ), + cssWorkspaceNarrowScreen( + 'Expand', + urlState().setLinkUrl({ws: ws.id}), + testId('bc-workspace-ns') + ), + separator(' / ', + testId('bc-separator'), + cssHideForNarrowScreen.cls('')) + ]; + } + ), editableLabel( docName, options.docNameSave, testId('bc-doc'), cssEditableName.cls(''), dom.boolAttr('disabled', options.isDocNameReadOnly || false),