Skip to content

Commit

Permalink
update greetings while sign-in
Browse files Browse the repository at this point in the history
  • Loading branch information
koko37 committed Oct 29, 2024
1 parent f46a9bc commit f2c873e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/lib/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,12 @@ export const REFRESH_STATUS_DURATION = 15_000;
// The hidden balances will be displayed as shown below
export const BALANCE_PLACEHOLDER = "*****";
export const LOADING_PLACEHOLDER = "-----";

export const UNKNOWN_FACTS = [
"🌟 Brute-forcing takes millions of years!",
"🔐 It runs only in your browser. Your password stays safe!",
"📂 We never store or transmit your password.",
"🤫 Your account's origin remains anonymous.",
"💼 Feel free to transfer your wallet anytime.",
"⚠️ Don't forget your password! There's no reset or recovery option.",
];
8 changes: 7 additions & 1 deletion src/pages/Signin/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
PASSCODE_MIN_LENGTH,
PASSWORD_MAX_LENGTH,
PASSWORD_MIN_LENGTH,
UNKNOWN_FACTS,
} from "@mybucks/lib/conf";
import media from "@mybucks/styles/media";

Expand Down Expand Up @@ -179,6 +180,11 @@ const SignIn = () => {
[[password, passwordConfirm, passcode, disabled]]
);

const unknownFact = useMemo(
() => UNKNOWN_FACTS[Math.floor(Math.random() * UNKNOWN_FACTS.length)],
[]
);

const onSubmit = async () => {
setDisabled(true);
try {
Expand Down Expand Up @@ -303,7 +309,7 @@ const SignIn = () => {
<Modal show={!!progress} width="20rem">
<ProgressWrapper>
<img src="/logo-72x72.png" alt="mybucks.online" />
<Notice>Hang on, it takes millions of years to brute force!</Notice>
<Notice>{unknownFact}</Notice>
<Progress value={progress} max="100" />
</ProgressWrapper>
</Modal>
Expand Down

0 comments on commit f2c873e

Please sign in to comment.