aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SettingsManager.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/SettingsManager.tsx')
-rw-r--r--src/client/util/SettingsManager.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index a9c2d5e15..d438ec971 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -9,17 +9,18 @@ import "./SettingsManager.scss";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Networking } from "../Network";
import { CurrentUserUtils } from "./CurrentUserUtils";
-import { Utils } from "../../Utils";
+import { Utils, addStyleSheet, addStyleSheetRule, removeStyleSheetRule } from "../../Utils";
import { Doc } from "../../fields/Doc";
import GroupManager from "./GroupManager";
import GoogleAuthenticationManager from "../apis/GoogleAuthenticationManager";
-import { togglePlaygroundMode } from "../../fields/util";
+import { DocServer } from "../DocServer";
library.add(fa.faTimes);
@observer
export default class SettingsManager extends React.Component<{}> {
public static Instance: SettingsManager;
+ static _settingsStyle = addStyleSheet();
@observable private isOpen = false;
@observable private dialogueBoxOpacity = 1;
@observable private overlayOpacity = 0.4;
@@ -94,8 +95,11 @@ export default class SettingsManager extends React.Component<{}> {
@action
togglePlaygroundMode = () => {
- togglePlaygroundMode();
this.playgroundMode = !this.playgroundMode;
+ if (this.playgroundMode) DocServer.Control.makeReadOnly();
+ else DocServer.Control.makeEditable();
+
+ addStyleSheetRule(SettingsManager._settingsStyle, "lm_header", { background: "pink !important" });
}
private get settingsInterface() {
@@ -126,7 +130,7 @@ export default class SettingsManager extends React.Component<{}> {
{this.errorText ? <div className="error-text">{this.errorText}</div> : undefined}
{this.successText ? <div className="success-text">{this.successText}</div> : undefined}
<button onClick={this.dispatchRequest}>submit</button>
- <a href="/forgotPassword">forgot password?</a>
+ <a style={{ marginLeft: 65, marginTop: -20 }} href="/forgotPassword">forgot password?</a>
</div>
: undefined}