From 31368b599dee83ccd2538f33b760ae25f19073cc Mon Sep 17 00:00:00 2001 From: srichman333 Date: Thu, 20 Jul 2023 16:42:50 -0400 Subject: components + homepage --- src/client/views/DashboardView.tsx | 2 +- src/client/views/PropertiesView.scss | 44 ++++++++++----------------- src/client/views/PropertiesView.tsx | 59 +++++++++++++++++------------------- src/client/views/topbar/TopBar.tsx | 18 ++++++----- 4 files changed, 55 insertions(+), 68 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx index 1a5781df0..ae55c8ebf 100644 --- a/src/client/views/DashboardView.tsx +++ b/src/client/views/DashboardView.tsx @@ -199,7 +199,7 @@ export class DashboardView extends React.Component {
this.onContextMenu(dashboard, e)} onClick={e => this.clickDashboard(e, dashboard)}> { */ @computed get expansionIcon() { return ( - Show more permissions
}> -
{ +
+ } + size={Size.XSMALL} + color={StrCast(Doc.UserDoc().userColor)} + onClick={action(() => { if (this.selectedDocumentView || this.selectedDoc) { SharingManager.Instance.open(this.selectedDocumentView?.props.Document === this.selectedDoc ? this.selectedDocumentView : undefined, this.selectedDoc); } - }}> - -
- + })} + /> +
); } @@ -417,7 +418,7 @@ export class PropertiesView extends React.Component {
-
{admin && permission !== 'Owner' ? this.getPermissionsSelect(name, permission, showGuestOptions) : concat(shareImage, ' ', permission)}
+
{admin && permission !== 'Owner' ? this.getPermissionsSelect(name, permission, showGuestOptions) : concat(shareImage, ' ', permission)}
@@ -449,6 +450,7 @@ export class PropertiesView extends React.Component { const target = docs[0]; const showAdmin = GetEffectiveAcl(target) == AclAdmin; + console.log(GetEffectiveAcl(target), Doc.GetProto(target)[`acl-${normalizeEmail(Doc.CurrentUserEmail)}`]) const individualTableEntries = []; const usersAdded: string[] = []; // all shared users being added - organized by denormalized email @@ -512,25 +514,29 @@ export class PropertiesView extends React.Component { } }); - // public permission - const publicPermission = StrCast((this.layoutDocAcls ? target : Doc.GetProto(target))['acl-Guest']); + // guest permission + const guestPermission = StrCast((this.layoutDocAcls ? target : Doc.GetProto(target))['acl-Guest']); return (
-

Individual Users with Access to this Document +

Individuals with Access to this Document +
+
+ {
{individualTableEntries}
}
-
{
{individualTableEntries}
}
{groupTableEntries.length > 0 ? (


Groups with Access to this Document
-
{
{groupTableEntries}
}
+
+ {
{groupTableEntries}
} +
) : null}

Guest -
{this.colorACLDropDown('Guest', true, publicPermission!, true)}
+
{this.colorACLDropDown('Guest', showAdmin, guestPermission!, true)}
); } @@ -1142,26 +1148,17 @@ export class PropertiesView extends React.Component { return -
- {!Doc.noviceMode ? ( -
-
-
Show / Contol Layout Permissions
- (this.layoutDocAcls = !this.layoutDocAcls))} checked={this.layoutDocAcls} /> -
- {/*
{"Re-distribute sharing settings"}
}> - -
*/} -
- ) : null} + {/*
*/} +
+ Layout Permissions + (this.layoutDocAcls = !this.layoutDocAcls))} checked={this.layoutDocAcls} /> +
{/*
{"Re-distribute sharing settings"}
}>
*/} -
+ {/*
*/} {this.sharingTable} } isOpen={this.openSharing} diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index 79f41fe9d..ec4252eb8 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -134,14 +134,16 @@ export class TopBar extends React.Component { @computed get topbarRight() { return (
-