feat: disable login with nostr-connect
This commit is contained in:
@@ -93,7 +93,7 @@ function Screen() {
|
||||
{isPending ? <Spinner /> : "Continue"}
|
||||
</button>
|
||||
<GoBack className="mt-2 w-full text-sm text-neutral-600 dark:text-neutral-400 inline-flex items-center justify-center">
|
||||
Back
|
||||
Go back to previous screen
|
||||
</GoBack>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -115,7 +115,7 @@ function Screen() {
|
||||
{isPending ? <Spinner /> : "Continue"}
|
||||
</button>
|
||||
<GoBack className="mt-2 w-full text-sm text-neutral-600 dark:text-neutral-400 inline-flex items-center justify-center">
|
||||
Back
|
||||
Go back to previous screen
|
||||
</GoBack>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,9 +31,7 @@ function Screen() {
|
||||
const loginWith = async (npub: string) => {
|
||||
setValue(npub);
|
||||
startTransition(async () => {
|
||||
const bunker: string = localStorage.getItem(`${npub}_bunker`);
|
||||
const verifyBunker = bunker?.length && bunker?.startsWith("bunker://");
|
||||
const res = await commands.login(npub, verifyBunker ? bunker : null);
|
||||
const res = await commands.login(npub);
|
||||
|
||||
if (res.status === "ok") {
|
||||
navigate({
|
||||
|
||||
@@ -13,7 +13,7 @@ function Screen() {
|
||||
<div className="w-[320px] flex flex-col gap-8">
|
||||
<div className="flex flex-col gap-1 text-center">
|
||||
<h1 className="leading-tight text-xl font-semibold">
|
||||
Direct Message client for Nostr.
|
||||
Direct Message on Nostr.
|
||||
</h1>
|
||||
</div>
|
||||
<div className="flex flex-col gap-3">
|
||||
@@ -24,17 +24,19 @@ function Screen() {
|
||||
Create a new identity
|
||||
</Link>
|
||||
<Link
|
||||
to="/nostr-connect"
|
||||
to="/import-key"
|
||||
className="w-full h-10 bg-white hover:bg-neutral-100 dark:hover:bg-neutral-100 dark:bg-white dark:text-black rounded-lg inline-flex items-center justify-center"
|
||||
>
|
||||
Login with Nostr Connect
|
||||
Login with Private Key
|
||||
</Link>
|
||||
{/*
|
||||
<Link
|
||||
to="/import-key"
|
||||
className="w-full text-sm text-neutral-600 dark:text-neutral-400 inline-flex items-center justify-center"
|
||||
>
|
||||
Login with Private Key (not recommended)
|
||||
</Link>
|
||||
*/}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,13 +35,6 @@ function Screen() {
|
||||
const res = await commands.connectAccount(uri);
|
||||
|
||||
if (res.status === "ok") {
|
||||
const npub = res.data;
|
||||
const parsed = new URL(uri);
|
||||
parsed.searchParams.delete("secret");
|
||||
|
||||
// save connection string
|
||||
localStorage.setItem(`${npub}_bunker`, parsed.toString());
|
||||
|
||||
navigate({ to: "/", replace: true });
|
||||
} else {
|
||||
await message(res.error, { title: "Nostr Connect", kind: "error" });
|
||||
@@ -103,7 +96,7 @@ function Screen() {
|
||||
</p>
|
||||
) : (
|
||||
<GoBack className="mt-2 w-full text-sm text-neutral-600 dark:text-neutral-400 inline-flex items-center justify-center">
|
||||
Back
|
||||
Go back to previous screen
|
||||
</GoBack>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user