diff options
author | bobzel <zzzman@gmail.com> | 2022-03-31 12:01:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-03-31 12:01:37 -0400 |
commit | 85c24ec4dcc39551e8c7de83d3482ec15472c030 (patch) | |
tree | d522dd509ccc0f02cc00515d3b15fc34ed9f6880 /src/client/util/CurrentUserUtils.ts | |
parent | 24c4443cc097694a12c26b1e5aa1c7a7930625c1 (diff) |
added autoLinks to formattedTextBoxes. Set auto link target by titling documents with a prefix '@'.
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 22ab4beb8..e51abf63b 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1141,6 +1141,17 @@ export class CurrentUserUtils { // Sharing sidebar is where shared documents are contained static async setupSharingSidebar(doc: Doc, sharingDocumentId: string, linkDatabaseId: string) { + if (doc.myPublishedDocs === undefined) { + let pubDocs = Docs.newAccount ? undefined : Cast((await doc.myPublishedDocs), Doc, null); + if (!pubDocs) { + pubDocs = new Doc(linkDatabaseId, true); + (pubDocs as Doc).title = "LINK DATABASE: " + Doc.CurrentUserEmail; + (pubDocs as Doc).author = Doc.CurrentUserEmail; + (pubDocs as Doc).data = new List<Doc>([]); + (pubDocs as Doc)["acl-Public"] = SharingPermissions.Augment; + doc.myPublishedDocs = new PrefetchProxy(pubDocs); + } + } if (doc.myLinkDatabase === undefined) { let linkDocs = Docs.newAccount ? undefined : await DocServer.GetRefField(linkDatabaseId); if (!linkDocs) { |