diff options
author | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-12 10:45:40 -0700 |
---|---|---|
committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-12 10:45:40 -0700 |
commit | 7e2bece0dc01363932ea603da8c2326186681e0c (patch) | |
tree | cfcf9badfe77eb5a514b58abd6ef269f0baea780 /src/client/util/SettingsManager.tsx | |
parent | e8a697bfc45b5eefeaf1585973e5d11a8c965068 (diff) | |
parent | f9c189d6a602e0b0d9f342e72aed70bd894efe5e (diff) |
merge with master
Diffstat (limited to 'src/client/util/SettingsManager.tsx')
-rw-r--r-- | src/client/util/SettingsManager.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx index 8b58880d4..ea449e23d 100644 --- a/src/client/util/SettingsManager.tsx +++ b/src/client/util/SettingsManager.tsx @@ -40,7 +40,7 @@ export default class SettingsManager extends React.Component<{}> { } public close = action(() => this.isOpen = false); - public open = action(() => (this.isOpen = true) && SelectionManager.DeselectAll()); + public open = action(() => this.isOpen = true); private googleAuthorize = action(() => GoogleAuthenticationManager.Instance.fetchOrGenerateAccessToken(true)); private changePassword = async () => { @@ -56,7 +56,7 @@ export default class SettingsManager extends React.Component<{}> { @undoBatch selectUserMode = action((e: React.ChangeEvent) => Doc.UserDoc().noviceMode = (e.currentTarget as any)?.value === "Novice"); @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().defaultColor = String(color.hex)); + @undoBatch switchColor = action((color: ColorState) => Doc.UserDoc().activeCollectionBackground = String(color.hex)); @undoBatch playgroundModeToggle = action(() => { this.playgroundMode = !this.playgroundMode; @@ -136,13 +136,17 @@ export default class SettingsManager extends React.Component<{}> { <input className="playground-check" type="checkbox" checked={this.playgroundMode} onChange={this.playgroundModeToggle} /> <div className="playground-text">Playground Mode</div> </div> + <div className="default-acl"> + <input className="acl-check" type="checkbox" checked={BoolCast(Doc.UserDoc()?.defaultAclPrivate)} onChange={action(() => Doc.UserDoc().defaultAclPrivate = !Doc.UserDoc().defaultAclPrivate)} /> + <div className="acl-text">Default access private</div> + </div> </div>; } @computed get accountsContent() { return <div className="accounts-content"> <button onClick={this.googleAuthorize} value="data">Link to Google</button> - <button onClick={GroupManager.Instance?.open}>Manage groups</button> + <button onClick={() => GroupManager.Instance?.open()}>Manage groups</button> </div>; } |