From 2b8fd3bbc922fdb9b82ed5cabe6308b37077fb9e Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Wed, 5 Aug 2020 13:23:47 +0530 Subject: comments and minor changes --- .../collections/collectionFreeForm/PropertiesView.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/client/views/collections') diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx index f5e0cd077..31962837c 100644 --- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx +++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx @@ -266,11 +266,17 @@ export class PropertiesView extends React.Component { } } + /** + * Handles the changing of a user's permissions from the permissions panel. + */ @undoBatch changePermissions = (e: any, user: string) => { SharingManager.Instance.shareFromPropertiesSidebar(user, e.currentTarget.value as SharingPermissions, this.selectedDoc!); } + /** + * @returns the options for the permissions dropdown. + */ getPermissionsSelect(user: string) { return ; } + /** + * @returns the notification icon. On clicking, it should notify someone of a document been shared with them. + */ @computed get notifyIcon() { return
Notify with message
}>
@@ -291,6 +300,9 @@ export class PropertiesView extends React.Component { ; } + /** + * ... next to the owner that opens the main SharingManager interface on click. + */ @computed get expansionIcon() { return
{"Show more permissions"}
}>
{ @@ -303,6 +315,9 @@ export class PropertiesView extends React.Component { ; } + /** + * @returns a row of the permissions panel + */ sharingItem(name: string, effectiveAcl: symbol, permission?: string) { return
{name}
@@ -314,6 +329,9 @@ export class PropertiesView extends React.Component {
; } + /** + * @returns the sharing and permissiosn panel. + */ @computed get sharingTable() { const AclMap = new Map([ [AclPrivate, SharingPermissions.None], @@ -333,6 +351,7 @@ export class PropertiesView extends React.Component { } } + // shifts the current user and the owner to the top of the doc. tableEntries.unshift(this.sharingItem("Me", effectiveAcl, Doc.CurrentUserEmail === this.selectedDoc!.author ? "Owner" : StrCast(this.selectedDoc![`ACL-${Doc.CurrentUserEmail.replace(".", "_")}`]))); if (Doc.CurrentUserEmail !== this.selectedDoc!.author) tableEntries.unshift(this.sharingItem(StrCast(this.selectedDoc!.author), effectiveAcl, "Owner")); -- cgit v1.2.3-70-g09d2