aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-05 12:59:07 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-05 12:59:07 -0500
commit0d6a6991ae39406f80530bcaaa6e5b328bd64b67 (patch)
treefde9ff99f8cf5982aff5f40785b30959fab5b50f /src/client/util
parent6028a6f6c87b793d0ea87f9e05a07fa094a4745b (diff)
UI changes and bug fixes found with UV
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/CurrentUserUtils.ts3
-rw-r--r--src/client/util/SettingsManager.scss20
-rw-r--r--src/client/util/SettingsManager.tsx13
3 files changed, 24 insertions, 12 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 95e02b5fd..630952ccf 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -8,7 +8,7 @@ import { Doc, DocListCast, DocListCastAsync, DataSym } from "../../fields/Doc";
import { List } from "../../fields/List";
import { listSpec } from "../../fields/Schema";
import { ScriptField, ComputedField } from "../../fields/ScriptField";
-import { Cast, PromiseValue, StrCast, NumCast } from "../../fields/Types";
+import { Cast, PromiseValue, StrCast, NumCast, BoolCast } from "../../fields/Types";
import { nullAudio } from "../../fields/URLField";
import { DragManager } from "./DragManager";
import { Scripting } from "./Scripting";
@@ -891,6 +891,7 @@ export class CurrentUserUtils {
doc.fontColor = StrCast(doc.fontColor, "black");
doc.fontHighlight = StrCast(doc.fontHighlight, "");
doc.defaultColor = StrCast(doc.defaultColor, "white");
+ doc.noviceMode = BoolCast(doc.noviceMode, true);
doc["constants-snapThreshold"] = NumCast(doc["constants-snapThreshold"], 10); //
doc["constants-dragThreshold"] = NumCast(doc["constants-dragThreshold"], 4); //
Utils.DRAG_THRESHOLD = NumCast(doc["constants-dragThreshold"]);
diff --git a/src/client/util/SettingsManager.scss b/src/client/util/SettingsManager.scss
index 2a4a4241c..41bce8a1b 100644
--- a/src/client/util/SettingsManager.scss
+++ b/src/client/util/SettingsManager.scss
@@ -25,8 +25,15 @@
.settings-title {
font-size: 25px;
font-weight: bold;
+ padding-right: 10px;
+ color: black;
+}
+
+.settings-username {
+ font-size: 14px;
padding-right: 15px;
color: black;
+ margin-top: 10px;
}
.settings-section {
@@ -94,7 +101,7 @@
color: black;
border-radius: 5px;
- &:hover{
+ &:hover {
cursor: pointer;
}
}
@@ -104,7 +111,8 @@
.playground-check {
margin-right: 5px;
- &:hover{
+
+ &:hover {
cursor: pointer;
}
}
@@ -119,7 +127,7 @@
margin-top: 2px;
margin-right: 25px;
- &:hover{
+ &:hover {
cursor: pointer;
}
@@ -162,7 +170,8 @@
font-size: 9;
margin-right: 6;
border-radius: 5px;
- &:hover{
+
+ &:hover {
cursor: pointer;
}
}
@@ -172,7 +181,8 @@
color: black;
font-size: 9;
border-radius: 5px;
- &:hover{
+
+ &:hover {
cursor: pointer;
}
}
diff --git a/src/client/util/SettingsManager.tsx b/src/client/util/SettingsManager.tsx
index a12cc2cb6..fce28a466 100644
--- a/src/client/util/SettingsManager.tsx
+++ b/src/client/util/SettingsManager.tsx
@@ -147,9 +147,9 @@ export default class SettingsManager extends React.Component<{}> {
const passwordContent = <div className="password-content">
<div className="password-content-inputs">
- <input className="password-inputs" placeholder="current password" ref={this.curr_password_ref} />
- <input className="password-inputs" placeholder="new password" ref={this.new_password_ref} />
- <input className="password-inputs" placeholder="confirm new password" ref={this.new_confirm_ref} />
+ <input className="password-inputs" type="password" placeholder="current password" ref={this.curr_password_ref} />
+ <input className="password-inputs" type="password" placeholder="new password" ref={this.new_password_ref} />
+ <input className="password-inputs" type="password" placeholder="confirm new password" ref={this.new_confirm_ref} />
</div>
<div className="password-content-buttons">
{this.errorText ? <div className="error-text">{this.errorText}</div> : undefined}
@@ -233,7 +233,9 @@ export default class SettingsManager extends React.Component<{}> {
return (<div className="settings-interface">
<div className="settings-top">
<div className="settings-title">Settings</div>
- <button onClick={() => window.location.assign(Utils.prepend("/logout"))}>
+ <div className="settings-username">{Doc.CurrentUserEmail}</div>
+ <button onClick={() => window.location.assign(Utils.prepend("/logout"))}
+ style={{ right: 35, position: "absolute" }} >
{CurrentUserUtils.GuestWorkspace ? "Exit" : "Log Out"}
</button>
<div className="close-button" onClick={this.close}>
@@ -268,8 +270,7 @@ export default class SettingsManager extends React.Component<{}> {
isDisplayed={this.isOpen}
interactive={true}
closeOnExternalClick={this.close}
- width={600}
- height={340}
+ dialogueBoxStyle={{ width: "600px", height: "340px" }}
/>
);
}