chore: updates
This commit is contained in:
@@ -49,7 +49,7 @@ const handler = (data: ChatEvent, dispatch: AppDispatch, currState: CurrentState
|
||||
dispatch(updateAfterMid(mid));
|
||||
break;
|
||||
}
|
||||
const { ready, loginUid, readUsers = {}, readChannels = {} } = currState;
|
||||
const { loginUid, readUsers = {}, readChannels = {} } = currState;
|
||||
const to = "gid" in target ? "channel" : "user";
|
||||
const appendMessage = to == "user" ? addUserMsg : addChannelMsg;
|
||||
const self = from_uid == loginUid;
|
||||
|
||||
@@ -56,12 +56,12 @@ function ChatPage() {
|
||||
{usersModalVisible && <UsersModal closeModal={toggleUsersModalVisible} />}
|
||||
<div className={clsx(`flex h-screen md:h-full md:pt-2 md:pb-2.5 md:pr-1`, isGuest ? "guest-container md:px-1" : "md:pr-12")}>
|
||||
{sessionListVisible && <div onClick={toggleSessionList} className="z-30 fixed top-0 left-4 w-screen h-screen bg-black/50 transition-all backdrop-blur-sm"></div>}
|
||||
<div className={clsx("left-container pb-14 md:pb-0 flex-col md:rounded-l-2xl w-full h-screen md:max-w-[250px] md:min-w-[268px] shadow-[rgb(0_0_0_/_10%)_-1px_0px_0px_inset] bg-white dark:!bg-gray-800",
|
||||
<div className={clsx("left-container pb-14 md:pb-0 flex-col md:rounded-l-2xl w-full h-screen md:h-full md:max-w-[250px] md:min-w-[268px] shadow-[rgb(0_0_0_/_10%)_-1px_0px_0px_inset] bg-white dark:!bg-gray-800",
|
||||
isMainPath ? "flex" : "hidden md:flex"
|
||||
)}>
|
||||
<Server readonly={isGuest} />
|
||||
{isGuest ? <GuestSessionList /> : <SessionList tempSession={tmpSession} />}
|
||||
{isGuest && <footer className="hidden md:block text-xs text-gray-300 dark:text-gray-700 text-center">
|
||||
{isGuest && <footer className="hidden md:block py-1 text-xs text-gray-300 dark:text-gray-700 text-center">
|
||||
Host your own <a href="https://voce.chat" target="_blank" rel="noopener noreferrer" className="text-gray-400 dark:text-gray-600">voce.chat</a>
|
||||
</footer>}
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function ExpiredTip() {
|
||||
const { t } = useTranslation("auth", { keyPrefix: "magic_link_expire" });
|
||||
return (
|
||||
<div className="flex flex-col items-center">
|
||||
<div className="font-bold text-3xl text-gray-800 dark:text-white mt-3">Magic link expired</div>
|
||||
<p className="text-center text-gray-400 mb-6">Go back to your original VoceChat tab and request a new magic link.</p>
|
||||
<p className="text-center text-gray-400">You can close this window now.</p>
|
||||
<div className="font-bold text-3xl text-gray-800 dark:text-white mt-3">{t("title")}</div>
|
||||
<p className="text-center text-gray-400 mb-6">{t("desc")}</p>
|
||||
<p className="text-center text-gray-400">{t("desc_close")}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,9 +10,11 @@ import { useTranslation } from "react-i18next";
|
||||
import SocialLoginButtons from "../login/SocialLoginButtons";
|
||||
import Divider from "../../common/component/Divider";
|
||||
import SignInLink from "../reg/SignInLink";
|
||||
import { useAppSelector } from "../../app/store";
|
||||
|
||||
export default function SendMagicLinkPage() {
|
||||
const { t } = useTranslation("auth");
|
||||
const serverName = useAppSelector(store => store.server.name);
|
||||
const [sent, setSent] = useState(false);
|
||||
const [sendMagicLink, { isSuccess, isLoading, error }] = useSendLoginMagicLinkMutation();
|
||||
const navigateTo = useNavigate();
|
||||
@@ -72,7 +74,7 @@ export default function SendMagicLinkPage() {
|
||||
<>
|
||||
<div className="flex flex-col items-center">
|
||||
<img src={`${BASE_URL}/resource/organization/logo`} alt="logo" className="w-14 h-14 mb-7 rounded-full" />
|
||||
<h2 className="font-semibold text-2xl text-gray-800 dark:text-gray-200 mb-2">{t("enter")}VoceChat</h2>
|
||||
<h2 className="font-semibold text-2xl text-gray-800 dark:text-gray-200 mb-2">{t("enter")} {serverName} </h2>
|
||||
<span className="text-center text-gray-500 mb-6">{t("placeholder_email")}</span>
|
||||
</div>
|
||||
<form onSubmit={handleLogin} className="flex flex-col gap-5 w-[360px]">
|
||||
@@ -92,7 +94,7 @@ export default function SendMagicLinkPage() {
|
||||
</Button>
|
||||
</form>
|
||||
<Divider content="OR" />
|
||||
<Button onClick={handlePwdPath} className="flex">{t("login.password")}</Button>
|
||||
<Button onClick={handlePwdPath} className="w-full" >{t("login.password")}</Button>
|
||||
<div className="flex flex-col gap-3 py-3">
|
||||
<SocialLoginButtons />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user