From daf6c3eb00bec549947db9c5fdbcec09a9251bf0 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 14 Sep 2020 13:16:29 -0400 Subject: added a default user color and used it within custom note template --- src/client/util/SettingsManager.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/client/util/SettingsManager.tsx') diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx index c9605c620..d4c92b20f 100644 --- a/src/client/util/SettingsManager.tsx +++ b/src/client/util/SettingsManager.tsx @@ -55,7 +55,8 @@ export class SettingsManager extends React.Component<{}> { @undoBatch changeShowTitle = action((e: React.ChangeEvent) => Doc.UserDoc().showTitle = (e.currentTarget as any).value); @undoBatch changeFontFamily = action((e: React.ChangeEvent) => Doc.UserDoc().fontFamily = (e.currentTarget as any).value); @undoBatch changeFontSize = action((e: React.ChangeEvent) => Doc.UserDoc().fontSize = (e.currentTarget as any).value); - @undoBatch switchColor = action((color: ColorState) => Doc.UserDoc().activeCollectionBackground = String(color.hex)); + @undoBatch switchActiveBackgroundColor = action((color: ColorState) => Doc.UserDoc().activeCollectionBackground = String(color.hex)); + @undoBatch switchUserColor = action((color: ColorState) => Doc.UserDoc().userColor = String(color.hex)); @undoBatch playgroundModeToggle = action(() => { this.playgroundMode = !this.playgroundMode; @@ -67,13 +68,20 @@ export class SettingsManager extends React.Component<{}> { }); @computed get preferencesContent() { - const colorBox = void) => ; const colorFlyout =
- + +
e.stopPropagation()} > + +
+
+
; + const userColorFlyout =
+
e.stopPropagation()} >
@@ -88,6 +96,10 @@ export class SettingsManager extends React.Component<{}> {
Back. Color
{colorFlyout}
+
+
User Color
+ {userColorFlyout} +
Font