aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SettingsManager.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-26 09:51:39 -0400
committerbobzel <zzzman@gmail.com>2022-06-26 09:51:39 -0400
commit809a8f766640fe297a4019be52bb8fd4da81e4fe (patch)
tree8196e31d24ddd0d573e518362b27187e3f567f30 /src/client/util/SettingsManager.tsx
parent301f13ebcbc47bd04b56210620aafaaad5f2998e (diff)
parentdccf5909f4a4bec35559b23a2f355ab4c7a94086 (diff)
Merge branch 'master' into mainview-jenny
Diffstat (limited to 'src/client/util/SettingsManager.tsx')
-rw-r--r--src/client/util/SettingsManager.tsx24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index 382274462..080237649 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -10,7 +10,9 @@ import { GoogleAuthenticationManager } from "../apis/GoogleAuthenticationManager
import { DocServer } from "../DocServer";
import { Networking } from "../Network";
import { MainViewModal } from "../views/MainViewModal";
+import { FontIconBox } from "../views/nodes/button/FontIconBox";
import { CurrentUserUtils } from "./CurrentUserUtils";
+import { DragManager } from "./DragManager";
import { GroupManager } from "./GroupManager";
import "./SettingsManager.scss";
import { undoBatch } from "./UndoManager";
@@ -65,12 +67,11 @@ export class SettingsManager extends React.Component<{}> {
@undoBatch changeFontSize = action((e: React.ChangeEvent) => Doc.UserDoc().fontSize = (e.currentTarget as any).value);
@undoBatch switchActiveBackgroundColor = action((color: ColorState) => Doc.UserDoc().activeCollectionBackground = String(color.hex));
@undoBatch switchUserColor = action((color: ColorState) => { Doc.SharingDoc().userColor = undefined; Doc.GetProto(Doc.SharingDoc()).userColor = String(color.hex); });
- @undoBatch
- playgroundModeToggle = action(() => {
+ @undoBatch playgroundModeToggle = action(() => {
this.playgroundMode = !this.playgroundMode;
if (this.playgroundMode) {
DocServer.Control.makeReadOnly();
- addStyleSheetRule(SettingsManager._settingsStyle, "lm_header", { background: "pink !important" });
+ addStyleSheetRule(SettingsManager._settingsStyle, "topbar-inner-container", { background: "red !important" });
}
else DocServer.Control.makeEditable();
});
@@ -155,19 +156,14 @@ export class SettingsManager extends React.Component<{}> {
<div className="preferences-check">Show full toolbar</div>
</div>
<div>
- <input type="checkbox" onChange={e => Doc.UserDoc()._raiseWhenDragged = !Doc.UserDoc()._raiseWhenDragged}
- checked={BoolCast(Doc.UserDoc()._raiseWhenDragged)} />
+ <input type="checkbox" onChange={e => DragManager.SetRaiseWhenDragged(!DragManager.GetRaiseWhenDragged())}
+ checked={DragManager.GetRaiseWhenDragged()} />
<div className="preferences-check">Raise on drag</div>
</div>
<div>
- <input type="checkbox" onChange={e => Doc.UserDoc()._showLabel = !Doc.UserDoc()._showLabel}
- checked={BoolCast(Doc.UserDoc()._showLabel)} />
- <div className="preferences-check">Show tool button labels</div>
- </div>
- <div>
- <input type="checkbox" onChange={e => Doc.UserDoc()._showMenuLabel = !Doc.UserDoc()._showMenuLabel}
- checked={BoolCast(Doc.UserDoc()._showMenuLabel)} />
- <div className="preferences-check">Show menu button labels</div>
+ <input type="checkbox" onChange={e => FontIconBox.SetShowLabels(!FontIconBox.GetShowLabels())}
+ checked={FontIconBox.GetShowLabels()} />
+ <div className="preferences-check">Show button labels</div>
</div>
</div>;
}
@@ -271,7 +267,7 @@ export class SettingsManager extends React.Component<{}> {
<div className="tab-column-content">
<button onClick={() => GroupManager.Instance?.open()}>Manage groups</button>
<div className="default-acl">
- <input className="acl-check" type="checkbox" checked={BoolCast(Doc.UserDoc()?.defaultAclPrivate)}
+ <input className="acl-check" type="checkbox" checked={BoolCast(Doc.defaultAclPrivate)}
onChange={action(() => Doc.defaultAclPrivate = !Doc.defaultAclPrivate)} />
<div className="acl-text">Default access private</div>
</div>