user interface tweaks (#148)

This commit is contained in:
Michael Quigley 2024-02-16 11:21:13 -05:00
parent 2daed61849
commit 3cfdcd899a
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 11 additions and 11 deletions

View File

@ -14,6 +14,15 @@ const ActionsTab = (props) => {
return (
<div className={"actions-tab"}>
<div id={"change-password"} style={{"padding-top": "10px"}}>
<h3>Change Password?</h3>
<p>Note that this will <strong>not</strong> log out of any already logged in sessions.</p>
<Button variant={"danger"} onClick={openChangePasswordModal}>Change Password</Button>
<ChangePassword show={showChangePasswordModal} onHide={closeChangePasswordModal} user={props.user}/>
</div>
<hr/>
<div id={"token-regeneration"}>
<h3>Regenerate your account token <strong>(DANGER!)</strong>?</h3>
<p>
@ -34,16 +43,7 @@ const ActionsTab = (props) => {
<Button variant={"danger"} onClick={openResetTokenModal}>Regenerate Account Token</Button>
<ResetToken show={showResetTokenModal} onHide={closeResetTokenModal} user={props.user}/>
</div>
<div id={"change-password"} style={{"padding-top": "10px"}}>
<h3>Change Password</h3>
<p>
You can change your password to a new one here!
</p>
<p>Note that this will <strong>not</strong> log out of any already logged in sessions.</p>
<Button onClick={openChangePasswordModal}>Change Password</Button>
<ChangePassword show={showChangePasswordModal} onHide={closeChangePasswordModal} user={props.user}/>
</div>
</div>
)
}

View File

@ -8,7 +8,7 @@ import Modal from "react-bootstrap/Modal";
const ChangePassword = (props) => {
const [oldPassword, setOldPassword] = useState('');
const [newPassword, setNewPassword] = useState('');
const [message, setMessage] = useState();
const [message, setMessage] = useState('');
const [complete, setComplete] = useState(false);
const [passwordLength, setPasswordLength] = useState(10);
const [passwordRequireCapital, setPasswordRequireCapital] = useState(true);
@ -53,7 +53,7 @@ const ChangePassword = (props) => {
let hide = () => {
props.onHide();
setMessage();
setMessage("");
setComplete(false);
setOldPassword("");
setNewPassword("");