-
-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): support real name authentication (#1450)
* feat(web): add real name authentication * refactor(web): add comfirm to restart and pause app & adjust dashboard empty page * refactor(web): remove auth detail * fix(web): change sitesetting id_verify value * fix(web): fix location
- Loading branch information
1 parent
924e0fa
commit 4b3126d
Showing
15 changed files
with
349 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React, { useState } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { WarningTwoIcon } from "@chakra-ui/icons"; | ||
|
||
import SettingModal from "@/pages/app/setting"; | ||
import useTabMatch from "@/pages/app/setting/UserSetting/useTabMatch"; | ||
import useGlobalStore from "@/pages/globalStore"; | ||
import useSiteSettingStore from "@/pages/siteSetting"; | ||
|
||
export default function Warn() { | ||
const { t } = useTranslation(); | ||
const { userInfo, showError } = useGlobalStore((state) => state); | ||
const [openModal, setOpenModal] = useState(false); | ||
const { siteSettings } = useSiteSettingStore((state) => state); | ||
|
||
return ( | ||
<div className="absolute left-1/2 top-10 flex h-16 translate-x-[-50%] items-center justify-between rounded-lg bg-white px-4 text-lg drop-shadow-md"> | ||
<span className="flex items-center pr-9"> | ||
<WarningTwoIcon className="mr-2 !text-error-600" /> | ||
<p>{siteSettings.id_verify?.metadata.message}</p> | ||
</span> | ||
<p | ||
className="cursor-pointer font-semibold text-[#219BF4]" | ||
onClick={() => { | ||
if (userInfo?.phone) { | ||
const w = window.open("about:blank"); | ||
w!.location.href = `${ | ||
siteSettings.id_verify?.metadata.authenticateSite | ||
}?token=${localStorage.getItem("token")}`; | ||
} else { | ||
showError(t("UserInfo.PleaseBindPhone")); | ||
setOpenModal(true); | ||
} | ||
}} | ||
> | ||
{t("UserInfo.GotoAuth")} | ||
</p> | ||
|
||
<SettingModal | ||
headerTitle={t("SettingPanel.UserCenter")} | ||
currentTab={"user-info"} | ||
tabMatch={useTabMatch("user")} | ||
openModal={openModal} | ||
setOpenModal={setOpenModal} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 0 additions & 124 deletions
124
web/src/pages/app/setting/UserInfo/AuthDetail/index.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.