feat: update create account flow
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { LumeStorage } from "@lume/storage";
|
||||
import { type NDKEventWithReplies, type NIP05 } from "@lume/types";
|
||||
import NDK, {
|
||||
NDKAppHandlerEvent,
|
||||
NDKEvent,
|
||||
NDKFilter,
|
||||
NDKKind,
|
||||
@@ -513,7 +512,6 @@ export class Ark {
|
||||
const data: NIP05 = await res.json();
|
||||
|
||||
if (!data.names) return false;
|
||||
|
||||
if (data.names[localPath.toLowerCase()] === pubkey) return true;
|
||||
if (data.names[localPath] === pubkey) return true;
|
||||
|
||||
@@ -542,4 +540,28 @@ export class Ark {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async getOAuthServices() {
|
||||
const trusted: NDKEvent[] = [];
|
||||
|
||||
const services = await this.ndk.fetchEvents({
|
||||
kinds: [NDKKind.AppHandler],
|
||||
"#k": ["24133"],
|
||||
});
|
||||
|
||||
for (const service of services) {
|
||||
const nip05 = JSON.parse(service.content).nip05 as string;
|
||||
try {
|
||||
const validate = await this.validateNIP05({
|
||||
pubkey: service.pubkey,
|
||||
nip05,
|
||||
});
|
||||
if (validate) trusted.push(service);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
return trusted;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export function AuthLayout({ platform }: { platform: Platform }) {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const canGoBack = location.key === "default";
|
||||
const canGoBack = location.pathname.length > 6;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col w-screen h-screen bg-black text-neutral-50">
|
||||
|
||||
@@ -182,11 +182,11 @@ export const User = memo(function User({
|
||||
/>
|
||||
</Avatar.Fallback>
|
||||
</Avatar.Root>
|
||||
<div className="flex flex-col items-start text-start">
|
||||
<p className="max-w-[15rem] truncate text-lg font-semibold">
|
||||
<div className="flex flex-col items-start text-start gap-1">
|
||||
<p className="max-w-[15rem] truncate text-lg font-semibold leadning-tight">
|
||||
{user?.name || user?.display_name || user?.displayName}
|
||||
</p>
|
||||
<p className="break-p prose prose-neutral max-w-none select-text whitespace-pre-line leading-normal dark:prose-invert">
|
||||
<p className="break-p text-neutral-500 max-w-none select-text whitespace-pre-line">
|
||||
{user?.about || user?.bio || "No bio"}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user