mirror of
https://github.com/usememos/memos.git
synced 2025-03-18 03:30:07 +01:00
chore: tweak auth pages
This commit is contained in:
parent
6325b3eef9
commit
05c6edfe2f
@ -13,7 +13,7 @@ import LearnMore from "../LearnMore";
|
||||
|
||||
const listAccessTokens = async (name: string) => {
|
||||
const { accessTokens } = await userServiceClient.listUserAccessTokens({ name });
|
||||
return accessTokens;
|
||||
return accessTokens.sort((a, b) => (b.issuedAt?.getTime() ?? 0) - (a.issuedAt?.getTime() ?? 0));
|
||||
};
|
||||
|
||||
const AccessTokenSection = () => {
|
||||
|
@ -118,7 +118,7 @@ const SignIn = () => {
|
||||
</div>
|
||||
<form className="w-full mt-2" onSubmit={handleFormSubmit}>
|
||||
<div className="flex flex-col justify-start items-start w-full gap-4">
|
||||
<div className="w-full flex flex-col justify-start items-start gap-2">
|
||||
<div className="w-full flex flex-col justify-start items-start">
|
||||
<span className="leading-8 text-gray-600">{t("common.username")}</span>
|
||||
<Input
|
||||
className="w-full"
|
||||
@ -131,7 +131,7 @@ const SignIn = () => {
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="w-full flex flex-col justify-start items-start gap-2">
|
||||
<div className="w-full flex flex-col justify-start items-start">
|
||||
<span className="leading-8 text-gray-600">{t("common.password")}</span>
|
||||
<Input
|
||||
className="w-full"
|
||||
|
@ -88,7 +88,7 @@ const SignUp = () => {
|
||||
<p className="w-full text-2xl mt-2 dark:text-gray-500">{t("auth.create-your-account")}</p>
|
||||
<form className="w-full mt-2" onSubmit={handleFormSubmit}>
|
||||
<div className="flex flex-col justify-start items-start w-full gap-4">
|
||||
<div className="w-full flex flex-col justify-start items-start gap-2">
|
||||
<div className="w-full flex flex-col justify-start items-start">
|
||||
<span className="leading-8 text-gray-600">{t("common.username")}</span>
|
||||
<Input
|
||||
className="w-full"
|
||||
@ -101,7 +101,7 @@ const SignUp = () => {
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div className="w-full flex flex-col justify-start items-start gap-2">
|
||||
<div className="w-full flex flex-col justify-start items-start">
|
||||
<span className="leading-8 text-gray-600">{t("common.password")}</span>
|
||||
<Input
|
||||
className="w-full"
|
||||
@ -128,13 +128,16 @@ const SignUp = () => {
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
{!commonContext.profile.owner && <p className="w-full mt-4 text-sm font-medium dark:text-gray-500">{t("auth.host-tip")}</p>}
|
||||
<p className="w-full mt-4 text-sm">
|
||||
<span className="dark:text-gray-500">{t("auth.sign-in-tip")}</span>
|
||||
<Link to="/auth" className="cursor-pointer ml-2 text-blue-600 hover:underline" unstable_viewTransition>
|
||||
{t("common.sign-in")}
|
||||
</Link>
|
||||
</p>
|
||||
{!commonContext.profile.owner ? (
|
||||
<p className="w-full mt-4 text-sm font-medium dark:text-gray-500">{t("auth.host-tip")}</p>
|
||||
) : (
|
||||
<p className="w-full mt-4 text-sm">
|
||||
<span className="dark:text-gray-500">{t("auth.sign-in-tip")}</span>
|
||||
<Link to="/auth" className="cursor-pointer ml-2 text-blue-600 hover:underline" unstable_viewTransition>
|
||||
{t("common.sign-in")}
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-4 flex flex-row items-center justify-center w-full gap-2">
|
||||
<LocaleSelect value={commonContext.locale} onChange={handleLocaleSelectChange} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user