aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication/models/current_user_utils.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-02-25 00:57:37 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-02-25 00:57:37 -0500
commit05399b3916df7311d07e7c375f90261e9c8ead80 (patch)
treefbd560346d50245ce7a5b17337c6849d82a2a4bb /src/server/authentication/models/current_user_utils.ts
parente93a5c7e3fa62ac7dfe324276c7b0bff5b44a1da (diff)
added optional display templates for metadata field values
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r--src/server/authentication/models/current_user_utils.ts18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts
index 8fe2257fc..aaf3a3eb6 100644
--- a/src/server/authentication/models/current_user_utils.ts
+++ b/src/server/authentication/models/current_user_utils.ts
@@ -37,13 +37,19 @@ export class CurrentUserUtils {
static setupDefaultDocTemplates(doc: Doc, buttons?: string[]) {
const noteTemplates = [
- Docs.Create.TextDocument("", { title: "Note", backgroundColor: "yellow", isTemplateDoc: true }),
- Docs.Create.TextDocument("", { title: "Idea", backgroundColor: "pink", isTemplateDoc: true }),
- Docs.Create.TextDocument("", { title: "Topic", backgroundColor: "lightBlue", isTemplateDoc: true }),
- Docs.Create.TextDocument("", { title: "Person", backgroundColor: "lightGreen", isTemplateDoc: true }),
- Docs.Create.TextDocument("", { title: "Todo", backgroundColor: "orange", isTemplateDoc: true })
+ Docs.Create.TextDocument("", { title: "Note", backgroundColor: "yellow" }),
+ Docs.Create.TextDocument("", { title: "Idea", backgroundColor: "pink" }),
+ Docs.Create.TextDocument("", { title: "Topic", backgroundColor: "lightBlue" }),
+ Docs.Create.TextDocument("", { title: "Person", backgroundColor: "lightGreen" }),
+ Docs.Create.TextDocument("", { title: "Todo", backgroundColor: "orange" })
];
- doc.noteTypes = new PrefetchProxy(Docs.Create.TreeDocument(noteTemplates, { title: "Note Types", _height: 75 }));
+ const modes = [
+ Docs.Create.TextDocument("", { title: "todo", _backgroundColor: "blue", color: "white" }),
+ Docs.Create.TextDocument("", { title: "in progress", _backgroundColor: "yellow", color: "black" }),
+ Docs.Create.TextDocument("", { title: "completed", _backgroundColor: "green", color: "white" })
+ ]
+ Doc.enumeratedTextTemplate(Doc.GetProto(noteTemplates[4]), FormattedTextBox.LayoutString("Todo"), "Todo", "taskStatus", modes);
+ doc.noteTypes = new PrefetchProxy(Docs.Create.TreeDocument(noteTemplates.map(nt => makeTemplate(nt) ? nt : nt), { title: "Note Types", _height: 75 }));
}
// setup the "creator" buttons for the sidebar-- eg. the default set of draggable document creation tools