wip: multi account
This commit is contained in:
@@ -66,7 +66,7 @@ export function CreateStep2Screen() {
|
||||
if (!db.secureDB) db.secureDB = stronghold;
|
||||
|
||||
// save privkey to secure storage
|
||||
await db.secureSave(pubkey, privkey);
|
||||
await db.secureSave(pubkey, privkey, pubkey);
|
||||
|
||||
// redirect to next step
|
||||
navigate('/auth/create/step-3', { replace: true });
|
||||
|
||||
@@ -66,7 +66,7 @@ export function ImportStep2Screen() {
|
||||
if (!db.secureDB) db.secureDB = stronghold;
|
||||
|
||||
// save privkey to secure storage
|
||||
await db.secureSave(pubkey, privkey);
|
||||
await db.secureSave(pubkey, privkey, pubkey);
|
||||
|
||||
// redirect to next step
|
||||
navigate('/auth/import/step-3', { replace: true });
|
||||
|
||||
10
src/app/auth/lock.tsx
Normal file
10
src/app/auth/lock.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
export function LockScreen() {
|
||||
return (
|
||||
<div
|
||||
className="h-full w-full bg-cover bg-center"
|
||||
style={{ backgroundImage: 'url(/wallpapers/1.png)' }}
|
||||
>
|
||||
<p>TODO</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -33,6 +33,7 @@ export function UnlockScreen() {
|
||||
const navigate = useNavigate();
|
||||
const setPrivkey = useStronghold((state) => state.setPrivkey);
|
||||
const setWalletConnectURL = useStronghold((state) => state.setWalletConnectURL);
|
||||
const resetStronghold = useStronghold((state) => state.reset);
|
||||
|
||||
const [showPassword, setShowPassword] = useState<boolean>(false);
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
@@ -73,6 +74,8 @@ export function UnlockScreen() {
|
||||
const logout = async () => {
|
||||
// remove account
|
||||
db.accountLogout();
|
||||
// reset stronghold
|
||||
resetStronghold();
|
||||
// redirect to welcome screen
|
||||
navigate('/auth/welcome');
|
||||
};
|
||||
@@ -146,7 +149,7 @@ export function UnlockScreen() {
|
||||
to="/auth/reset"
|
||||
className="inline-flex h-10 w-full items-center justify-center rounded-lg text-center text-sm font-medium text-white/70 hover:bg-white/20"
|
||||
>
|
||||
Reset password if you still have private key
|
||||
Reset password if you still have a private key
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -68,7 +68,7 @@ export function SplashScreen() {
|
||||
</h3>
|
||||
{ndk ? (
|
||||
<p className="text-sm text-white/50">
|
||||
Ensure all your data is sync across all Nostr clients, it may take a few
|
||||
Ensure all your data is sync across all Nostr clients. It may take a few
|
||||
seconds, please don't close app.
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user