From 1a6156ecfae249ee7ed142fab3cb048d761811ce Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 11 Sep 2023 17:53:03 -0700 Subject: [PATCH 1/3] removed loading skeleton from password authentication modal background --- frontend/src/pages/Main/index.jsx | 17 +++++------------ frontend/src/pages/WorkspaceChat/index.jsx | 17 +++++------------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/frontend/src/pages/Main/index.jsx b/frontend/src/pages/Main/index.jsx index d65881812a1..62c2013fee3 100644 --- a/frontend/src/pages/Main/index.jsx +++ b/frontend/src/pages/Main/index.jsx @@ -1,23 +1,16 @@ import React from "react"; import DefaultChatContainer from "../../components/DefaultChat"; import Sidebar from "../../components/Sidebar"; -import SidebarPlaceholder from "../../components/Sidebar/Placeholder"; -import ChatPlaceholder from "../../components/WorkspaceChat/LoadingChat"; -import PasswordModal, { - usePasswordModal, -} from "../../components/Modals/Password"; +import PasswordModal, { usePasswordModal } from "../../components/Modals/Password"; import { isMobile } from "react-device-detect"; export default function Main() { const { requiresAuth, mode } = usePasswordModal(); - if (requiresAuth === null || requiresAuth) { + + if (requiresAuth !== false) { return ( <> - {requiresAuth && } -
- {!isMobile && } - -
+ {requiresAuth !== null && } ); } @@ -28,4 +21,4 @@ export default function Main() { ); -} +} \ No newline at end of file diff --git a/frontend/src/pages/WorkspaceChat/index.jsx b/frontend/src/pages/WorkspaceChat/index.jsx index 612b51a0be6..66854a212e1 100644 --- a/frontend/src/pages/WorkspaceChat/index.jsx +++ b/frontend/src/pages/WorkspaceChat/index.jsx @@ -3,23 +3,16 @@ import { default as WorkspaceChatContainer } from "../../components/WorkspaceCha import Sidebar from "../../components/Sidebar"; import { useParams } from "react-router-dom"; import Workspace from "../../models/workspace"; -import SidebarPlaceholder from "../../components/Sidebar/Placeholder"; -import ChatPlaceholder from "../../components/WorkspaceChat/LoadingChat"; -import PasswordModal, { - usePasswordModal, -} from "../../components/Modals/Password"; +import PasswordModal, { usePasswordModal } from "../../components/Modals/Password"; import { isMobile } from "react-device-detect"; export default function WorkspaceChat() { const { requiresAuth, mode } = usePasswordModal(); - if (requiresAuth === null || requiresAuth) { + + if (requiresAuth !== false) { return ( <> - {requiresAuth && } -
- {!isMobile && } - -
+ {requiresAuth !== null && } ); } @@ -48,4 +41,4 @@ function ShowWorkspaceChat() { ); -} +} \ No newline at end of file From bff2faffcbde7314b300fa58462966a6360952a5 Mon Sep 17 00:00:00 2001 From: shatfield4 Date: Mon, 11 Sep 2023 18:27:46 -0700 Subject: [PATCH 2/3] added logo to login modals --- .../src/components/Modals/Password/MultiUserAuth.jsx | 11 ++++++++--- .../components/Modals/Password/SingleUserAuth.jsx | 11 ++++++++--- frontend/src/pages/Main/index.jsx | 12 +++++------- frontend/src/pages/WorkspaceChat/index.jsx | 12 +++++------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/Modals/Password/MultiUserAuth.jsx b/frontend/src/components/Modals/Password/MultiUserAuth.jsx index 630c01caa8b..f088266d335 100644 --- a/frontend/src/components/Modals/Password/MultiUserAuth.jsx +++ b/frontend/src/components/Modals/Password/MultiUserAuth.jsx @@ -1,10 +1,12 @@ import React, { useState } from "react"; import System from "../../../models/system"; import { AUTH_TOKEN, AUTH_USER } from "../../../utils/constants"; +import useLogo from "../../../hooks/useLogo"; export default function MultiUserAuth() { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); + const { logo: _initLogo } = useLogo(); const handleLogin = async (e) => { setError(null); setLoading(true); @@ -29,9 +31,12 @@ export default function MultiUserAuth() {
-

- This instance is password protected. -

+
+ Logo +

+ This instance is password protected. +

+
diff --git a/frontend/src/components/Modals/Password/SingleUserAuth.jsx b/frontend/src/components/Modals/Password/SingleUserAuth.jsx index c930289a655..1327a278764 100644 --- a/frontend/src/components/Modals/Password/SingleUserAuth.jsx +++ b/frontend/src/components/Modals/Password/SingleUserAuth.jsx @@ -1,10 +1,12 @@ import React, { useState } from "react"; import System from "../../../models/system"; import { AUTH_TOKEN } from "../../../utils/constants"; +import useLogo from "../../../hooks/useLogo"; export default function SingleUserAuth() { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); + const { logo: _initLogo } = useLogo(); const handleLogin = async (e) => { setError(null); setLoading(true); @@ -28,9 +30,12 @@ export default function SingleUserAuth() {
-

- This workspace is password protected. -

+
+ Logo +

+ This instance is password protected. +

+
diff --git a/frontend/src/pages/Main/index.jsx b/frontend/src/pages/Main/index.jsx index 62c2013fee3..bfef421f4ca 100644 --- a/frontend/src/pages/Main/index.jsx +++ b/frontend/src/pages/Main/index.jsx @@ -1,18 +1,16 @@ import React from "react"; import DefaultChatContainer from "../../components/DefaultChat"; import Sidebar from "../../components/Sidebar"; -import PasswordModal, { usePasswordModal } from "../../components/Modals/Password"; +import PasswordModal, { + usePasswordModal, +} from "../../components/Modals/Password"; import { isMobile } from "react-device-detect"; export default function Main() { const { requiresAuth, mode } = usePasswordModal(); if (requiresAuth !== false) { - return ( - <> - {requiresAuth !== null && } - - ); + return <>{requiresAuth !== null && }; } return ( @@ -21,4 +19,4 @@ export default function Main() {
); -} \ No newline at end of file +} diff --git a/frontend/src/pages/WorkspaceChat/index.jsx b/frontend/src/pages/WorkspaceChat/index.jsx index 66854a212e1..db065cd2a6e 100644 --- a/frontend/src/pages/WorkspaceChat/index.jsx +++ b/frontend/src/pages/WorkspaceChat/index.jsx @@ -3,18 +3,16 @@ import { default as WorkspaceChatContainer } from "../../components/WorkspaceCha import Sidebar from "../../components/Sidebar"; import { useParams } from "react-router-dom"; import Workspace from "../../models/workspace"; -import PasswordModal, { usePasswordModal } from "../../components/Modals/Password"; +import PasswordModal, { + usePasswordModal, +} from "../../components/Modals/Password"; import { isMobile } from "react-device-detect"; export default function WorkspaceChat() { const { requiresAuth, mode } = usePasswordModal(); if (requiresAuth !== false) { - return ( - <> - {requiresAuth !== null && } - - ); + return <>{requiresAuth !== null && }; } return ; @@ -41,4 +39,4 @@ function ShowWorkspaceChat() {
); -} \ No newline at end of file +} From 77404131d8fd9e65943f0eb87051557744776e7e Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Wed, 13 Sep 2023 13:44:04 -0700 Subject: [PATCH 3/3] change BG colors for dark/light mode support --- frontend/src/components/Modals/Password/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Modals/Password/index.jsx b/frontend/src/components/Modals/Password/index.jsx index ec5a0b44e54..6be4b3f6aa9 100644 --- a/frontend/src/components/Modals/Password/index.jsx +++ b/frontend/src/components/Modals/Password/index.jsx @@ -6,7 +6,7 @@ import { AUTH_TOKEN, AUTH_USER } from "../../../utils/constants"; export default function PasswordModal({ mode = "single" }) { return ( -
+
{mode === "single" ? : }