mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
parent
d94cc601e0
commit
090984deae
@ -134,7 +134,7 @@ function createLoadedDocMenu(owner: IDisposableOwner, home: HomeModel) {
|
|||||||
hasFeaturedTemplates ? t("More Examples and Templates") : t("Examples and Templates")
|
hasFeaturedTemplates ? t("More Examples and Templates") : t("Examples and Templates")
|
||||||
) :
|
) :
|
||||||
page === 'trash' ? t("Trash") :
|
page === 'trash' ? t("Trash") :
|
||||||
workspace && [css.docHeaderIcon(workspace.shareType === 'private' ? 'FolderPrivate' : 'Folder'), workspaceName(home.app, workspace)]
|
workspace && [css.docHeaderIcon(workspace.shareType === 'public' ? 'Folder' : 'FolderPrivate'), workspaceName(home.app, workspace)]
|
||||||
),
|
),
|
||||||
testId('doc-header'),
|
testId('doc-header'),
|
||||||
)
|
)
|
||||||
@ -198,8 +198,7 @@ function buildAllDocsBlock(
|
|||||||
if (showIntro) { return null; }
|
if (showIntro) { return null; }
|
||||||
return css.docBlock(
|
return css.docBlock(
|
||||||
css.docBlockHeaderLink(
|
css.docBlockHeaderLink(
|
||||||
css.wsLeft(
|
css.wsLeft(css.docHeaderIcon(ws.shareType === 'public' ? 'Folder' : 'FolderPrivate'),
|
||||||
css.wsLeft(css.docHeaderIcon(ws.shareType === 'private' ? 'FolderPrivate' : 'Folder'),
|
|
||||||
workspaceName(home.app, ws),
|
workspaceName(home.app, ws),
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -276,7 +275,7 @@ function buildAllTemplates(home: HomeModel, templateWorkspaces: Observable<Works
|
|||||||
return css.templatesDocBlock(
|
return css.templatesDocBlock(
|
||||||
css.templateBlockHeader(
|
css.templateBlockHeader(
|
||||||
css.wsLeft(
|
css.wsLeft(
|
||||||
css.docHeaderIcon(workspace.shareType === 'private' ? 'FolderPrivate' : 'Folder'),
|
css.docHeaderIcon(workspace.shareType === 'public' ? 'Folder' : 'FolderPrivate'),
|
||||||
workspace.name,
|
workspace.name,
|
||||||
),
|
),
|
||||||
testId('templates-header'),
|
testId('templates-header'),
|
||||||
|
@ -70,7 +70,7 @@ export function createHomeLeftPane(leftPanelOpen: Observable<boolean>, home: Hom
|
|||||||
// TODO: Introduce a "SwitchSelector" pattern to avoid the need for N computeds (and N
|
// TODO: Introduce a "SwitchSelector" pattern to avoid the need for N computeds (and N
|
||||||
// recalculations) to select one of N items.
|
// recalculations) to select one of N items.
|
||||||
const isRenaming = computed((use) => use(renaming) === ws);
|
const isRenaming = computed((use) => use(renaming) === ws);
|
||||||
const iconName = ws.shareType === 'private' ? 'FolderPrivate' : 'Folder';
|
const iconName = ws.shareType === 'public' ? 'Folder' : 'FolderPrivate';
|
||||||
return cssPageEntry(
|
return cssPageEntry(
|
||||||
dom.autoDispose(isRenaming),
|
dom.autoDispose(isRenaming),
|
||||||
dom.autoDispose(isTrivial),
|
dom.autoDispose(isTrivial),
|
||||||
|
@ -703,9 +703,9 @@ export class HomeDBManager extends EventEmitter {
|
|||||||
roles.getWeakestRole(<roles.Role>user.parentAccess, <roles.Role>maxInheritedRole));
|
roles.getWeakestRole(<roles.Role>user.parentAccess, <roles.Role>maxInheritedRole));
|
||||||
});
|
});
|
||||||
if (permissionDataUsers?.length > 1) {
|
if (permissionDataUsers?.length > 1) {
|
||||||
ws.shareType = permissionDataUsers.find((user) => user.email !== EVERYONE_EMAIL && user.email !== ANONYMOUS_USER_EMAIL && user.id === scope.userId)
|
ws.shareType = permissionDataUsers.find((user) => user.email === EVERYONE_EMAIL || user.email === ANONYMOUS_USER_EMAIL || user.id !== scope.userId)
|
||||||
? 'private'
|
? 'public'
|
||||||
: 'public';
|
: 'private';
|
||||||
|
|
||||||
for(const doc of ws.docs) {
|
for(const doc of ws.docs) {
|
||||||
const permissionDataUsersDoc = this.unwrapQueryResult(
|
const permissionDataUsersDoc = this.unwrapQueryResult(
|
||||||
|
Loading…
Reference in New Issue
Block a user