Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2b1458bd2 | |||
| 0d43c13928 | |||
| a42a2788ea | |||
| e30274dab3 |
@@ -2,7 +2,7 @@
|
|||||||
"name": "lume",
|
"name": "lume",
|
||||||
"description": "the communication app",
|
"description": "the communication app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.2.1",
|
"version": "2.2.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace",
|
|||||||
tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||||
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||||
tauri-plugin-theme = { git = "https://github.com/wyhaya/tauri-plugin-theme" }
|
tauri-plugin-theme = { git = "https://github.com/wyhaya/tauri-plugin-theme" }
|
||||||
tauri-plugin-sql = { git = "hhttps://github.com/tauri-apps/plugins-workspace", branch = "v2", features = [
|
tauri-plugin-sql = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2", features = [
|
||||||
"sqlite",
|
"sqlite",
|
||||||
] }
|
] }
|
||||||
sqlx-cli = { version = "0.7.0", default-features = false, features = [
|
sqlx-cli = { version = "0.7.0", default-features = false, features = [
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Lume",
|
"productName": "Lume",
|
||||||
"version": "2.2.1"
|
"version": "2.2.3"
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"fs": {
|
"fs": {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function ImportAccountScreen() {
|
|||||||
const localSigner = NDKPrivateKeySigner.generate();
|
const localSigner = NDKPrivateKeySigner.generate();
|
||||||
|
|
||||||
await db.createSetting('nsecbunker', '1');
|
await db.createSetting('nsecbunker', '1');
|
||||||
await db.secureSave(`${pubkey}-nsecbunker`, localSigner.privateKey);
|
await db.secureSave(`${npub}-nsecbunker`, localSigner.privateKey);
|
||||||
|
|
||||||
// open nsecbunker web app in default browser
|
// open nsecbunker web app in default browser
|
||||||
await open('https://app.nsecbunker.com/keys');
|
await open('https://app.nsecbunker.com/keys');
|
||||||
@@ -56,7 +56,7 @@ export function ImportAccountScreen() {
|
|||||||
const bunker = new NDK({
|
const bunker = new NDK({
|
||||||
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
||||||
});
|
});
|
||||||
bunker.connect();
|
await bunker.connect();
|
||||||
|
|
||||||
const remoteSigner = new NDKNip46Signer(bunker, npub, localSigner);
|
const remoteSigner = new NDKNip46Signer(bunker, npub, localSigner);
|
||||||
await remoteSigner.blockUntilReady();
|
await remoteSigner.blockUntilReady();
|
||||||
|
|||||||
@@ -31,16 +31,16 @@ export const NDKInstance = () => {
|
|||||||
try {
|
try {
|
||||||
// NIP-46 Signer
|
// NIP-46 Signer
|
||||||
if (nsecbunker) {
|
if (nsecbunker) {
|
||||||
const localSignerPrivkey = await db.secureLoad(`${db.account.pubkey}-nsecbunker`);
|
const localSignerPrivkey = await db.secureLoad(`${db.account.id}-nsecbunker`);
|
||||||
if (!localSignerPrivkey) return null;
|
if (!localSignerPrivkey) return null;
|
||||||
|
|
||||||
const localSigner = new NDKPrivateKeySigner(localSignerPrivkey);
|
const localSigner = new NDKPrivateKeySigner(localSignerPrivkey);
|
||||||
const bunker = new NDK({
|
const bunker = new NDK({
|
||||||
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
explicitRelayUrls: ['wss://relay.nsecbunker.com', 'wss://nostr.vulpem.com'],
|
||||||
});
|
});
|
||||||
bunker.connect();
|
await bunker.connect();
|
||||||
|
|
||||||
const remoteSigner = new NDKNip46Signer(bunker, db.account.id, localSigner);
|
const remoteSigner = new NDKNip46Signer(bunker, db.account.pubkey, localSigner);
|
||||||
await remoteSigner.blockUntilReady();
|
await remoteSigner.blockUntilReady();
|
||||||
|
|
||||||
return remoteSigner;
|
return remoteSigner;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function Logout() {
|
|||||||
|
|
||||||
// remove private key
|
// remove private key
|
||||||
await db.secureRemove(db.account.pubkey);
|
await db.secureRemove(db.account.pubkey);
|
||||||
await db.secureRemove(`${db.account.pubkey}-nsecbunker`);
|
await db.secureRemove(`${db.account.id}-nsecbunker`);
|
||||||
|
|
||||||
// logout
|
// logout
|
||||||
await db.accountLogout();
|
await db.accountLogout();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export function NewLayout() {
|
|||||||
<div className="col-span-1">
|
<div className="col-span-1">
|
||||||
<Link
|
<Link
|
||||||
to="/"
|
to="/"
|
||||||
className="inline-flex h-10 w-10 items-center justify-center rounded-lg bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-900"
|
className="inline-flex h-10 w-10 items-center justify-center rounded-lg bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800"
|
||||||
>
|
>
|
||||||
<ArrowLeftIcon className="h-5 w-5" />
|
<ArrowLeftIcon className="h-5 w-5" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -40,7 +40,11 @@ export const NIP05 = memo(function NIP05({
|
|||||||
|
|
||||||
const data: NIP05 = await res.json();
|
const data: NIP05 = await res.json();
|
||||||
if (data.names) {
|
if (data.names) {
|
||||||
if (data.names[localPath] !== pubkey) return false;
|
if (
|
||||||
|
data.names[localPath.toLowerCase()] !== pubkey ||
|
||||||
|
data.names[localPath] !== pubkey
|
||||||
|
)
|
||||||
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -60,17 +64,13 @@ export const NIP05 = memo(function NIP05({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="inline-flex items-center gap-1">
|
<div className="inline-flex items-center gap-1">
|
||||||
<p className={twMerge('text-sm font-medium', className)}>{nip05}</p>
|
<p className={twMerge('text-sm font-medium', className)}>
|
||||||
|
{nip05.startsWith('_@') ? nip05.replace('_@', '') : nip05}
|
||||||
|
</p>
|
||||||
{data === true ? (
|
{data === true ? (
|
||||||
<div className="inline-flex h-5 w-max shrink-0 items-center justify-center gap-1 rounded-full bg-teal-500 pl-0.5 pr-1.5 text-xs font-medium text-white">
|
<VerifiedIcon className="h-4 w-4 text-teal-500" />
|
||||||
<VerifiedIcon className="h-4 w-4" />
|
|
||||||
Verified
|
|
||||||
</div>
|
|
||||||
) : (
|
) : (
|
||||||
<div className="inline-flex h-5 w-max shrink-0 items-center justify-center gap-1.5 rounded-full bg-red-500 pl-0.5 pr-1.5 text-xs font-medium text-white">
|
<UnverifiedIcon className="h-4 w-4 text-red-500" />
|
||||||
<UnverifiedIcon className="h-4 w-4" />
|
|
||||||
Unverified
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -30,9 +30,7 @@ export function LiveUpdater({ status }: { status: QueryStatus }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let sub: NDKSubscription = undefined;
|
let sub: NDKSubscription = undefined;
|
||||||
|
|
||||||
if (status === 'success' && db.account && db.account?.follows?.length > 0) {
|
if (status === 'success' && db.account && db.account?.contacts?.length > 0) {
|
||||||
queryClient.fetchQuery({ queryKey: ['notification'] });
|
|
||||||
|
|
||||||
const filter: NDKFilter = {
|
const filter: NDKFilter = {
|
||||||
kinds: [NDKKind.Text, NDKKind.Repost],
|
kinds: [NDKKind.Text, NDKKind.Repost],
|
||||||
authors: db.account.contacts,
|
authors: db.account.contacts,
|
||||||
|
|||||||
Reference in New Issue
Block a user