(core) Hide workspace in breadcrumbs if doc is unsaved

Summary:
Hides the workspace in the breadcrumbs menu if
the doc is unsaved and is not a fork. In practice,
this should usually be when an anonymous user creates a new
document.

Test Plan: Browser tests.

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2967
This commit is contained in:
George Gevoian
2021-08-05 14:22:50 -07:00
parent 4a23b964ed
commit 07bf250592
2 changed files with 25 additions and 17 deletions

View File

@@ -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)),