chore: updates
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
"clear_local": "Clear local data"
|
||||
},
|
||||
"continue": "Continue with Email",
|
||||
"placeholder_name": "Enter your Name",
|
||||
"placeholder_email": "Enter your Email",
|
||||
"placeholder_pwd": "Enter Password",
|
||||
"placeholder_confirm_pwd": "Confirm Password",
|
||||
@@ -40,5 +41,10 @@
|
||||
"signing_up": "Signing Up",
|
||||
"github_login_success": "GitHub Login Success!",
|
||||
"github_logging_in": "GitHub Logging in...",
|
||||
"github_cb_tip": "Please close this window and return widget window"
|
||||
"github_cb_tip": "Please close this window and return widget window",
|
||||
"magic_link_expire": {
|
||||
"title": "Magic link expired",
|
||||
"desc": "Go back to your original VoceChat tab and request a new magic link.",
|
||||
"desc_close": "You can close this window now."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
"tip": {
|
||||
"update": "Update Successfully!",
|
||||
"delete": "Delete Successfully!",
|
||||
"reg": "Register Successfully!",
|
||||
"login": "Login Successfully!",
|
||||
"logout": "Logout Successfully!",
|
||||
"pin": "Pin Message Successfully!",
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"check_email": "检查你的邮箱",
|
||||
"check_email_desc": "我们将链接已发送到你的邮箱:{{email}},请前往查收",
|
||||
"use_different": "使用其它邮箱",
|
||||
"placeholder_name": "输入用户名",
|
||||
"placeholder_email": "输入邮箱地址",
|
||||
"placeholder_pwd": "输入密码",
|
||||
"placeholder_confirm_pwd": "确认密码",
|
||||
@@ -40,5 +41,10 @@
|
||||
"signing_up": "注册中",
|
||||
"github_login_success": "Github授权成功!",
|
||||
"github_logging_in": "Github授权中...",
|
||||
"github_cb_tip": "请关闭该窗口,并返回原界面"
|
||||
"github_cb_tip": "请关闭该窗口,并返回原界面",
|
||||
"magic_link_expire": {
|
||||
"title": "邀请链接已过期!",
|
||||
"desc": "请重新生成邀请链接",
|
||||
"desc_close": "该网页可关闭"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
"tip": {
|
||||
"update": "更新成功!",
|
||||
"delete": "删除成功!",
|
||||
"reg": "注册成功!",
|
||||
"login": "登录成功!",
|
||||
"logout": "退出成功!",
|
||||
"pin": "消息置顶成功!",
|
||||
|
||||
@@ -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