mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-18 21:19:44 +00:00
chore: update setting styles
This commit is contained in:
parent
5fb9b67a53
commit
a27457c4d3
@ -11,10 +11,13 @@ const AccountSection: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-4">
|
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-2">
|
||||||
<p className="text-gray-400">Account</p>
|
<p className="text-gray-400 mb-2">Account</p>
|
||||||
<p className="text-3xl my-2">{user.nickname}</p>
|
<p className="flex flex-row justify-start items-center">
|
||||||
<p className="leading-8 flex flex-row justify-start items-center">
|
<span className="mr-3 text-gray-500 font-mono">Nickname: </span>
|
||||||
|
{user.nickname}
|
||||||
|
</p>
|
||||||
|
<p className="flex flex-row justify-start items-center">
|
||||||
<span className="mr-3 text-gray-500 font-mono">Email: </span>
|
<span className="mr-3 text-gray-500 font-mono">Email: </span>
|
||||||
{user.email}
|
{user.email}
|
||||||
</p>
|
</p>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Switch } from "@mui/joy";
|
import { Checkbox } from "@mui/joy";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { getSystemStatus, upsertWorkspaceSetting } from "../../helpers/api";
|
import { getSystemStatus, upsertWorkspaceSetting } from "../../helpers/api";
|
||||||
|
|
||||||
@ -20,9 +20,14 @@ const WorkspaceSection: React.FC = () => {
|
|||||||
<>
|
<>
|
||||||
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-4">
|
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-4">
|
||||||
<p className="text-gray-400">Workspace settings</p>
|
<p className="text-gray-400">Workspace settings</p>
|
||||||
<div className="w-full flex flex-row justify-between items-center">
|
<div className="w-full flex flex-col justify-start items-start">
|
||||||
<span>Allow sign up</span>
|
<Checkbox
|
||||||
<Switch checked={disallowSignUp} onChange={(event) => handleDisallowSignUpChange(event.target.checked)} />
|
className="font-medium"
|
||||||
|
label="Disable self-service signup"
|
||||||
|
checked={disallowSignUp}
|
||||||
|
onChange={(event) => handleDisallowSignUpChange(event.target.checked)}
|
||||||
|
/>
|
||||||
|
<p className="mt-2 text-gray-500">Once disabled, other users cannot signup.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
@ -27,7 +27,7 @@ const Auth: React.FC = () => {
|
|||||||
setPassword(text);
|
setPassword(text);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSigninBtnsClick = async () => {
|
const handleSigninBtnClick = async () => {
|
||||||
if (actionBtnLoadingState.isLoading) {
|
if (actionBtnLoadingState.isLoading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ const Auth: React.FC = () => {
|
|||||||
actionBtnLoadingState.setFinish();
|
actionBtnLoadingState.setFinish();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSignupBtnsClick = async () => {
|
const handleSignupBtnClick = async () => {
|
||||||
if (actionBtnLoadingState.isLoading) {
|
if (actionBtnLoadingState.isLoading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -95,10 +95,10 @@ const Auth: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full flex flex-row justify-end items-center mt-4 space-x-2">
|
<div className="w-full flex flex-row justify-end items-center mt-4 space-x-2">
|
||||||
<Button variant="plain" disabled={actionBtnLoadingState.isLoading} onClick={() => handleSignupBtnsClick()}>
|
<Button variant="plain" disabled={actionBtnLoadingState.isLoading} onClick={() => handleSignupBtnClick()}>
|
||||||
Sign up
|
Sign up
|
||||||
</Button>
|
</Button>
|
||||||
<Button color="primary" disabled={actionBtnLoadingState.isLoading} onClick={() => handleSigninBtnsClick()}>
|
<Button color="primary" disabled={actionBtnLoadingState.isLoading} onClick={() => handleSigninBtnClick()}>
|
||||||
Sign in
|
Sign in
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user