Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c6c9c86d1 | |||
|
|
d989d6ffad | ||
| 5229458746 | |||
| 2bfa1db816 | |||
| 8439428ce1 | |||
| 34dceef4a3 | |||
|
|
619bfb8dff | ||
| 7759851541 | |||
| 9112c1c24a | |||
| 24b21a9451 | |||
| 31a53b9c48 | |||
| dc229f40cb | |||
| 54ad1e6e1d | |||
|
|
065ccbbea4 | ||
| 74738c36cd |
14
package.json
14
package.json
@@ -2,7 +2,7 @@
|
|||||||
"name": "lume",
|
"name": "lume",
|
||||||
"description": "the communication app",
|
"description": "the communication app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.1.3",
|
"version": "2.1.7",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@evilmartians/harmony": "^1.1.0",
|
"@evilmartians/harmony": "^1.1.0",
|
||||||
"@getalby/sdk": "^2.6.0",
|
"@getalby/sdk": "^2.7.0",
|
||||||
"@nostr-dev-kit/ndk": "^2.0.5",
|
"@nostr-dev-kit/ndk": "^2.1.1",
|
||||||
"@nostr-fetch/adapter-ndk": "^0.13.1",
|
"@nostr-fetch/adapter-ndk": "^0.13.1",
|
||||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||||
"@radix-ui/react-avatar": "^1.0.4",
|
"@radix-ui/react-avatar": "^1.0.4",
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
"@radix-ui/react-switch": "^1.0.3",
|
"@radix-ui/react-switch": "^1.0.3",
|
||||||
"@radix-ui/react-toolbar": "^1.0.4",
|
"@radix-ui/react-toolbar": "^1.0.4",
|
||||||
"@radix-ui/react-tooltip": "^1.0.7",
|
"@radix-ui/react-tooltip": "^1.0.7",
|
||||||
"@tanstack/react-query": "^5.8.4",
|
"@tanstack/react-query": "^5.8.7",
|
||||||
"@tauri-apps/api": "2.0.0-alpha.11",
|
"@tauri-apps/api": "2.0.0-alpha.11",
|
||||||
"@tauri-apps/cli": "2.0.0-alpha.17",
|
"@tauri-apps/cli": "2.0.0-alpha.17",
|
||||||
"@tauri-apps/plugin-autostart": "2.0.0-alpha.3",
|
"@tauri-apps/plugin-autostart": "2.0.0-alpha.3",
|
||||||
@@ -80,19 +80,19 @@
|
|||||||
"react-router-dom": "^6.20.0",
|
"react-router-dom": "^6.20.0",
|
||||||
"react-string-replace": "^1.1.1",
|
"react-string-replace": "^1.1.1",
|
||||||
"reactflow": "^11.10.1",
|
"reactflow": "^11.10.1",
|
||||||
"sonner": "^1.2.2",
|
"sonner": "^1.2.3",
|
||||||
"tailwind-scrollbar": "^3.0.5",
|
"tailwind-scrollbar": "^3.0.5",
|
||||||
"tauri-controls": "github:reyamir/tauri-controls",
|
"tauri-controls": "github:reyamir/tauri-controls",
|
||||||
"tippy.js": "^6.3.7",
|
"tippy.js": "^6.3.7",
|
||||||
"tiptap-markdown": "^0.8.4",
|
"tiptap-markdown": "^0.8.4",
|
||||||
"virtua": "^0.16.6",
|
"virtua": "^0.16.7",
|
||||||
"zustand": "^4.4.6"
|
"zustand": "^4.4.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||||
"@types/html-to-text": "^9.0.4",
|
"@types/html-to-text": "^9.0.4",
|
||||||
"@types/node": "^20.9.4",
|
"@types/node": "^20.10.0",
|
||||||
"@types/react": "^18.2.38",
|
"@types/react": "^18.2.38",
|
||||||
"@types/react-dom": "^18.2.17",
|
"@types/react-dom": "^18.2.17",
|
||||||
"@types/youtube-player": "^5.5.11",
|
"@types/youtube-player": "^5.5.11",
|
||||||
|
|||||||
105
pnpm-lock.yaml
generated
105
pnpm-lock.yaml
generated
@@ -9,14 +9,14 @@ dependencies:
|
|||||||
specifier: ^1.1.0
|
specifier: ^1.1.0
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
'@getalby/sdk':
|
'@getalby/sdk':
|
||||||
specifier: ^2.6.0
|
specifier: ^2.7.0
|
||||||
version: 2.6.0
|
version: 2.7.0(typescript@5.3.2)
|
||||||
'@nostr-dev-kit/ndk':
|
'@nostr-dev-kit/ndk':
|
||||||
specifier: ^2.0.5
|
specifier: ^2.1.1
|
||||||
version: 2.0.5(typescript@5.3.2)
|
version: 2.1.1(typescript@5.3.2)
|
||||||
'@nostr-fetch/adapter-ndk':
|
'@nostr-fetch/adapter-ndk':
|
||||||
specifier: ^0.13.1
|
specifier: ^0.13.1
|
||||||
version: 0.13.1(@nostr-dev-kit/ndk@2.0.5)(nostr-fetch@0.13.1)
|
version: 0.13.1(@nostr-dev-kit/ndk@2.1.1)(nostr-fetch@0.13.1)
|
||||||
'@radix-ui/react-alert-dialog':
|
'@radix-ui/react-alert-dialog':
|
||||||
specifier: ^1.0.5
|
specifier: ^1.0.5
|
||||||
version: 1.0.5(@types/react-dom@18.2.17)(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
version: 1.0.5(@types/react-dom@18.2.17)(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
||||||
@@ -48,8 +48,8 @@ dependencies:
|
|||||||
specifier: ^1.0.7
|
specifier: ^1.0.7
|
||||||
version: 1.0.7(@types/react-dom@18.2.17)(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
version: 1.0.7(@types/react-dom@18.2.17)(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@tanstack/react-query':
|
'@tanstack/react-query':
|
||||||
specifier: ^5.8.4
|
specifier: ^5.8.7
|
||||||
version: 5.8.4(react-dom@18.2.0)(react@18.2.0)
|
version: 5.8.7(react-dom@18.2.0)(react@18.2.0)
|
||||||
'@tauri-apps/api':
|
'@tauri-apps/api':
|
||||||
specifier: 2.0.0-alpha.11
|
specifier: 2.0.0-alpha.11
|
||||||
version: 2.0.0-alpha.11
|
version: 2.0.0-alpha.11
|
||||||
@@ -192,8 +192,8 @@ dependencies:
|
|||||||
specifier: ^11.10.1
|
specifier: ^11.10.1
|
||||||
version: 11.10.1(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
version: 11.10.1(@types/react@18.2.38)(react-dom@18.2.0)(react@18.2.0)
|
||||||
sonner:
|
sonner:
|
||||||
specifier: ^1.2.2
|
specifier: ^1.2.3
|
||||||
version: 1.2.2(react-dom@18.2.0)(react@18.2.0)
|
version: 1.2.3(react-dom@18.2.0)(react@18.2.0)
|
||||||
tailwind-scrollbar:
|
tailwind-scrollbar:
|
||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.0.5(tailwindcss@3.3.5)
|
version: 3.0.5(tailwindcss@3.3.5)
|
||||||
@@ -207,8 +207,8 @@ dependencies:
|
|||||||
specifier: ^0.8.4
|
specifier: ^0.8.4
|
||||||
version: 0.8.4(@tiptap/core@2.1.12)
|
version: 0.8.4(@tiptap/core@2.1.12)
|
||||||
virtua:
|
virtua:
|
||||||
specifier: ^0.16.6
|
specifier: ^0.16.7
|
||||||
version: 0.16.6(react-dom@18.2.0)(react@18.2.0)
|
version: 0.16.7(react-dom@18.2.0)(react@18.2.0)
|
||||||
zustand:
|
zustand:
|
||||||
specifier: ^4.4.6
|
specifier: ^4.4.6
|
||||||
version: 4.4.6(@types/react@18.2.38)(react@18.2.0)
|
version: 4.4.6(@types/react@18.2.38)(react@18.2.0)
|
||||||
@@ -224,8 +224,8 @@ devDependencies:
|
|||||||
specifier: ^9.0.4
|
specifier: ^9.0.4
|
||||||
version: 9.0.4
|
version: 9.0.4
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^20.9.4
|
specifier: ^20.10.0
|
||||||
version: 20.9.4
|
version: 20.10.0
|
||||||
'@types/react':
|
'@types/react':
|
||||||
specifier: ^18.2.38
|
specifier: ^18.2.38
|
||||||
version: 18.2.38
|
version: 18.2.38
|
||||||
@@ -303,7 +303,7 @@ devDependencies:
|
|||||||
version: 5.3.2
|
version: 5.3.2
|
||||||
vite:
|
vite:
|
||||||
specifier: ^4.5.0
|
specifier: ^4.5.0
|
||||||
version: 4.5.0(@types/node@20.9.4)
|
version: 4.5.0(@types/node@20.10.0)
|
||||||
vite-tsconfig-paths:
|
vite-tsconfig-paths:
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
version: 4.2.1(typescript@5.3.2)(vite@4.5.0)
|
version: 4.2.1(typescript@5.3.2)(vite@4.5.0)
|
||||||
@@ -731,13 +731,15 @@ packages:
|
|||||||
resolution: {integrity: sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==}
|
resolution: {integrity: sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@getalby/sdk@2.6.0:
|
/@getalby/sdk@2.7.0(typescript@5.3.2):
|
||||||
resolution: {integrity: sha512-klD1FrpGY39QldPf00KtzIveWj0dXtgGdZH6nLWdJ0Ness7FAqy2RkgSF7JQfKJeJSFek7Ip3AL/KCT5/lZgww==}
|
resolution: {integrity: sha512-4NoEgdjx0R8SYDmJfCAsgvuBs0w3d8wsOMGI4m0h2MVsSeCcWW93lrzCl8bRmHTF5N7EfleHwnieYwn5j9KZTA==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
crypto-js: 4.2.0
|
crypto-js: 4.2.0
|
||||||
events: 3.3.0
|
events: 3.3.0
|
||||||
nostr-tools: 1.13.1
|
nostr-tools: 1.17.0(typescript@5.3.2)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- typescript
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@humanwhocodes/config-array@0.11.13:
|
/@humanwhocodes/config-array@0.11.13:
|
||||||
@@ -833,17 +835,17 @@ packages:
|
|||||||
'@nodelib/fs.scandir': 2.1.5
|
'@nodelib/fs.scandir': 2.1.5
|
||||||
fastq: 1.15.0
|
fastq: 1.15.0
|
||||||
|
|
||||||
/@nostr-dev-kit/ndk@2.0.5(typescript@5.3.2):
|
/@nostr-dev-kit/ndk@2.1.1(typescript@5.3.2):
|
||||||
resolution: {integrity: sha512-EvVr43y+4N9lMSZIIe5V8jFWYlKTVkMyyJfbgRaDGCGiBZAm9iy0wcO2Yi+W57awOAlvr3mjT5fAwG9RDb6HSA==}
|
resolution: {integrity: sha512-sMD4re3QVpSVMzoyvJAFiftPxJBXkhjRInrK5DcjhSkkPTlJhI+oiVXCpcvCJ3PHT5PilhDgKkg3LyOvv135UQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@noble/hashes': 1.3.2
|
'@noble/hashes': 1.3.2
|
||||||
'@noble/secp256k1': 2.0.0
|
'@noble/secp256k1': 2.0.0
|
||||||
'@scure/base': 1.1.3
|
'@scure/base': 1.1.3
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
eventemitter3: 5.0.1
|
|
||||||
light-bolt11-decoder: 3.0.0
|
light-bolt11-decoder: 3.0.0
|
||||||
node-fetch: 3.3.2
|
node-fetch: 3.3.2
|
||||||
nostr-tools: 1.17.0(typescript@5.3.2)
|
nostr-tools: 1.17.0(typescript@5.3.2)
|
||||||
|
tseep: 1.1.3
|
||||||
typescript-lru-cache: 2.0.0
|
typescript-lru-cache: 2.0.0
|
||||||
utf8-buffer: 1.0.0
|
utf8-buffer: 1.0.0
|
||||||
websocket-polyfill: 0.0.3
|
websocket-polyfill: 0.0.3
|
||||||
@@ -852,13 +854,13 @@ packages:
|
|||||||
- typescript
|
- typescript
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@nostr-fetch/adapter-ndk@0.13.1(@nostr-dev-kit/ndk@2.0.5)(nostr-fetch@0.13.1):
|
/@nostr-fetch/adapter-ndk@0.13.1(@nostr-dev-kit/ndk@2.1.1)(nostr-fetch@0.13.1):
|
||||||
resolution: {integrity: sha512-B3xeFR/qZHOzyy68WZCL+v+OjOZHG9YBW6jEpp1b1hzogAkoqSYJfYHo55Heka/CUp8z7dteYV/tmabtTCVcPA==}
|
resolution: {integrity: sha512-B3xeFR/qZHOzyy68WZCL+v+OjOZHG9YBW6jEpp1b1hzogAkoqSYJfYHo55Heka/CUp8z7dteYV/tmabtTCVcPA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@nostr-dev-kit/ndk': ^0.8.4
|
'@nostr-dev-kit/ndk': ^0.8.4
|
||||||
nostr-fetch: ^0.13.1
|
nostr-fetch: ^0.13.1
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nostr-dev-kit/ndk': 2.0.5(typescript@5.3.2)
|
'@nostr-dev-kit/ndk': 2.1.1(typescript@5.3.2)
|
||||||
'@nostr-fetch/kernel': 0.13.1
|
'@nostr-fetch/kernel': 0.13.1
|
||||||
nostr-fetch: 0.13.1
|
nostr-fetch: 0.13.1
|
||||||
dev: false
|
dev: false
|
||||||
@@ -2005,12 +2007,12 @@ packages:
|
|||||||
tailwindcss: 3.3.5
|
tailwindcss: 3.3.5
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@tanstack/query-core@5.8.3:
|
/@tanstack/query-core@5.8.7:
|
||||||
resolution: {integrity: sha512-SWFMFtcHfttLYif6pevnnMYnBvxKf3C+MHMH7bevyYfpXpTMsLB9O6nNGBdWSoPwnZRXFNyNeVZOw25Wmdasow==}
|
resolution: {integrity: sha512-58xOSkxxZK4SGQ/uzX8MDZHLGZCkxlgkPxnfhxUOL2uchnNHyay2UVcR3mQNMgaMwH1e2l+0n+zfS7+UJ/MAJw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@tanstack/react-query@5.8.4(react-dom@18.2.0)(react@18.2.0):
|
/@tanstack/react-query@5.8.7(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-CD+AkXzg8J72JrE6ocmuBEJfGzEzu/bzkD6sFXFDDB5yji9N20JofXZlN6n0+CaPJuIi+e4YLCbGsyPFKkfNQA==}
|
resolution: {integrity: sha512-RYSSMmkhbJ7tPkf8w+MSRIXQLoUCm7DRnTLDcdf+uampupnriEsob3fVWTt9oaEj+AJWEKeCErDBdZeNcAzURQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^18.0.0
|
react: ^18.0.0
|
||||||
react-dom: ^18.0.0
|
react-dom: ^18.0.0
|
||||||
@@ -2021,7 +2023,7 @@ packages:
|
|||||||
react-native:
|
react-native:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tanstack/query-core': 5.8.3
|
'@tanstack/query-core': 5.8.7
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
dev: false
|
dev: false
|
||||||
@@ -2735,8 +2737,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==}
|
resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@types/node@20.9.4:
|
/@types/node@20.10.0:
|
||||||
resolution: {integrity: sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==}
|
resolution: {integrity: sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 5.26.5
|
undici-types: 5.26.5
|
||||||
dev: true
|
dev: true
|
||||||
@@ -2920,7 +2922,7 @@ packages:
|
|||||||
vite: ^4 || ^5
|
vite: ^4 || ^5
|
||||||
dependencies:
|
dependencies:
|
||||||
'@swc/core': 1.3.99
|
'@swc/core': 1.3.99
|
||||||
vite: 4.5.0(@types/node@20.9.4)
|
vite: 4.5.0(@types/node@20.10.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@swc/helpers'
|
- '@swc/helpers'
|
||||||
dev: true
|
dev: true
|
||||||
@@ -3146,7 +3148,7 @@ packages:
|
|||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
caniuse-lite: 1.0.30001564
|
caniuse-lite: 1.0.30001564
|
||||||
electron-to-chromium: 1.4.592
|
electron-to-chromium: 1.4.594
|
||||||
node-releases: 2.0.13
|
node-releases: 2.0.13
|
||||||
update-browserslist-db: 1.0.13(browserslist@4.22.1)
|
update-browserslist-db: 1.0.13(browserslist@4.22.1)
|
||||||
dev: true
|
dev: true
|
||||||
@@ -3156,7 +3158,7 @@ packages:
|
|||||||
engines: {node: '>=6.14.2'}
|
engines: {node: '>=6.14.2'}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
node-gyp-build: 4.7.0
|
node-gyp-build: 4.7.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/call-bind@1.0.5:
|
/call-bind@1.0.5:
|
||||||
@@ -3519,8 +3521,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/electron-to-chromium@1.4.592:
|
/electron-to-chromium@1.4.594:
|
||||||
resolution: {integrity: sha512-D3NOkROIlF+d5ixnz7pAf3Lu/AuWpd6AYgI9O67GQXMXTcCP1gJQRotOq35eQy5Sb4hez33XH1YdTtILA7Udww==}
|
resolution: {integrity: sha512-xT1HVAu5xFn7bDfkjGQi9dNpMqGchUkebwf1GL7cZN32NSwwlHRPMSDJ1KN6HkS0bWUtndbSQZqvpQftKG2uFQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/emoji-regex@9.2.2:
|
/emoji-regex@9.2.2:
|
||||||
@@ -3862,6 +3864,7 @@ packages:
|
|||||||
|
|
||||||
/eventemitter3@5.0.1:
|
/eventemitter3@5.0.1:
|
||||||
resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==}
|
resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/events@3.3.0:
|
/events@3.3.0:
|
||||||
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
|
resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
|
||||||
@@ -4757,8 +4760,8 @@ packages:
|
|||||||
formdata-polyfill: 4.0.10
|
formdata-polyfill: 4.0.10
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/node-gyp-build@4.7.0:
|
/node-gyp-build@4.7.1:
|
||||||
resolution: {integrity: sha512-PbZERfeFdrHQOOXiAKOY0VPbykZy90ndPKk0d+CFDegTKmWp1VgOTz2xACVbr1BjCWxrQp68CXtvNsveFhqDJg==}
|
resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -4781,16 +4784,6 @@ packages:
|
|||||||
'@nostr-fetch/kernel': 0.13.1
|
'@nostr-fetch/kernel': 0.13.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/nostr-tools@1.13.1:
|
|
||||||
resolution: {integrity: sha512-DTwpbxTH1/ar+afWd4gmVdpHH8CF290kdaxi00Llra88SHE6e38XuyzlRABVTcrBaceLMnoDdHmV3x16MoEFJg==}
|
|
||||||
dependencies:
|
|
||||||
'@noble/curves': 1.1.0
|
|
||||||
'@noble/hashes': 1.3.1
|
|
||||||
'@scure/base': 1.1.1
|
|
||||||
'@scure/bip32': 1.3.1
|
|
||||||
'@scure/bip39': 1.2.1
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/nostr-tools@1.17.0(typescript@5.3.2):
|
/nostr-tools@1.17.0(typescript@5.3.2):
|
||||||
resolution: {integrity: sha512-LZmR8GEWKZeElbFV5Xte75dOeE9EFUW/QLI1Ncn3JKn0kFddDKEfBbFN8Mu4TMs+L4HR/WTPha2l+PPuRnJcMw==}
|
resolution: {integrity: sha512-LZmR8GEWKZeElbFV5Xte75dOeE9EFUW/QLI1Ncn3JKn0kFddDKEfBbFN8Mu4TMs+L4HR/WTPha2l+PPuRnJcMw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -5672,8 +5665,8 @@ packages:
|
|||||||
is-fullwidth-code-point: 4.0.0
|
is-fullwidth-code-point: 4.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/sonner@1.2.2(react-dom@18.2.0)(react@18.2.0):
|
/sonner@1.2.3(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-EHxYBr5tLDQW4CqosTsX95/Qd5oxjDeQN/EbKBZcjdNp4Hjs6snXB6Lmu1kTL27M3su0oG9DxkllfvX+aSoI4Q==}
|
resolution: {integrity: sha512-LMr155izOFA8hudzuUVQT0H93VqmcF9ODP475YjjC/4INESYWN1/ioC5SYRG20jmDmwuQDR8ugP7y6ELghT6JQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^18.0.0
|
react: ^18.0.0
|
||||||
react-dom: ^18.0.0
|
react-dom: ^18.0.0
|
||||||
@@ -5915,6 +5908,10 @@ packages:
|
|||||||
typescript: 5.3.2
|
typescript: 5.3.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/tseep@1.1.3:
|
||||||
|
resolution: {integrity: sha512-deBIcIlXUMlr3xaN0UEochqjU/zXGaZGPqHPd1rxo4w6DklBdRM6WQQtsk7bekIF+qY6QTeen3nE6OA7BxL9rg==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/tslib@2.6.2:
|
/tslib@2.6.2:
|
||||||
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
||||||
dev: false
|
dev: false
|
||||||
@@ -6084,7 +6081,7 @@ packages:
|
|||||||
engines: {node: '>=6.14.2'}
|
engines: {node: '>=6.14.2'}
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
node-gyp-build: 4.7.0
|
node-gyp-build: 4.7.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/utf8-buffer@1.0.0:
|
/utf8-buffer@1.0.0:
|
||||||
@@ -6095,8 +6092,8 @@ packages:
|
|||||||
/util-deprecate@1.0.2:
|
/util-deprecate@1.0.2:
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
|
|
||||||
/virtua@0.16.6(react-dom@18.2.0)(react@18.2.0):
|
/virtua@0.16.7(react-dom@18.2.0)(react@18.2.0):
|
||||||
resolution: {integrity: sha512-I2vFlh7sCUTK4nVZzPj2IhgGRFtNVrVQD2nrpFPedotjcLjeE3Z9cJslGsU4Go2y65kBymwqT19Hwkycs4IFVQ==}
|
resolution: {integrity: sha512-n7fzGHm88lY+ZlYadqrWV/7uiwAxg58na1+LSnEnVZdVFH2EJVsF3QgAA9sP9J2/OeNhxHd6nhgVKNEslWSOMA==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: '>=16.14.0'
|
react: '>=16.14.0'
|
||||||
react-dom: '>=16.14.0'
|
react-dom: '>=16.14.0'
|
||||||
@@ -6116,13 +6113,13 @@ packages:
|
|||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
globrex: 0.1.2
|
globrex: 0.1.2
|
||||||
tsconfck: 2.1.2(typescript@5.3.2)
|
tsconfck: 2.1.2(typescript@5.3.2)
|
||||||
vite: 4.5.0(@types/node@20.9.4)
|
vite: 4.5.0(@types/node@20.10.0)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite@4.5.0(@types/node@20.9.4):
|
/vite@4.5.0(@types/node@20.10.0):
|
||||||
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
|
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
|
||||||
engines: {node: ^14.18.0 || >=16.0.0}
|
engines: {node: ^14.18.0 || >=16.0.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
@@ -6150,7 +6147,7 @@ packages:
|
|||||||
terser:
|
terser:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.9.4
|
'@types/node': 20.10.0
|
||||||
esbuild: 0.18.20
|
esbuild: 0.18.20
|
||||||
postcss: 8.4.31
|
postcss: 8.4.31
|
||||||
rollup: 3.29.4
|
rollup: 3.29.4
|
||||||
|
|||||||
177
src-tauri/Cargo.lock
generated
177
src-tauri/Cargo.lock
generated
@@ -183,12 +183,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-channel"
|
name = "async-channel"
|
||||||
version = "2.1.0"
|
version = "2.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e"
|
checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"event-listener 3.1.0",
|
"event-listener 4.0.0",
|
||||||
"event-listener-strategy",
|
"event-listener-strategy",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
@@ -196,11 +196,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-executor"
|
name = "async-executor"
|
||||||
version = "1.7.2"
|
version = "1.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d"
|
checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-lock 3.1.1",
|
"async-lock 3.1.2",
|
||||||
"async-task",
|
"async-task",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"fastrand 2.0.1",
|
"fastrand 2.0.1",
|
||||||
@@ -242,22 +242,21 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-io"
|
name = "async-io"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997"
|
checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-lock 3.1.1",
|
"async-lock 3.1.2",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"futures-io",
|
"futures-io",
|
||||||
"futures-lite 2.0.1",
|
"futures-lite 2.0.1",
|
||||||
"parking",
|
"parking",
|
||||||
"polling 3.3.0",
|
"polling 3.3.1",
|
||||||
"rustix 0.38.25",
|
"rustix 0.38.25",
|
||||||
"slab",
|
"slab",
|
||||||
"tracing",
|
"tracing",
|
||||||
"waker-fn",
|
"windows-sys 0.52.0",
|
||||||
"windows-sys 0.48.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -271,11 +270,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-lock"
|
name = "async-lock"
|
||||||
version = "3.1.1"
|
version = "3.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105"
|
checksum = "dea8b3453dd7cc96711834b75400d671b73e3656975fa68d9f277163b7f7e316"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"event-listener 3.1.0",
|
"event-listener 4.0.0",
|
||||||
"event-listener-strategy",
|
"event-listener-strategy",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
@@ -314,7 +313,7 @@ version = "0.2.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
|
checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-io 2.2.0",
|
"async-io 2.2.1",
|
||||||
"async-lock 2.8.0",
|
"async-lock 2.8.0",
|
||||||
"atomic-waker",
|
"atomic-waker",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -381,6 +380,16 @@ version = "1.1.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "atomic-write-file"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c232177ba50b16fe7a4588495bd474a62a9e45a8e4ca6fd7d0b7ac29d164631e"
|
||||||
|
dependencies = [
|
||||||
|
"nix 0.26.4",
|
||||||
|
"rand 0.8.5",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "auto-launch"
|
name = "auto-launch"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
@@ -501,7 +510,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
|
checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"async-lock 3.1.1",
|
"async-lock 3.1.2",
|
||||||
"async-task",
|
"async-task",
|
||||||
"fastrand 2.0.1",
|
"fastrand 2.0.1",
|
||||||
"futures-io",
|
"futures-io",
|
||||||
@@ -1108,9 +1117,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "data-url"
|
name = "data-url"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f"
|
checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "der"
|
name = "der"
|
||||||
@@ -1368,12 +1377,23 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "event-listener-strategy"
|
name = "event-listener"
|
||||||
version = "0.3.0"
|
version = "4.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160"
|
checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"event-listener 3.1.0",
|
"concurrent-queue",
|
||||||
|
"parking",
|
||||||
|
"pin-project-lite",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "event-listener-strategy"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3"
|
||||||
|
dependencies = [
|
||||||
|
"event-listener 4.0.0",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1511,9 +1531,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "form_urlencoded"
|
name = "form_urlencoded"
|
||||||
version = "1.2.0"
|
version = "1.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652"
|
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
]
|
]
|
||||||
@@ -1818,9 +1838,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gimli"
|
name = "gimli"
|
||||||
version = "0.28.0"
|
version = "0.28.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
|
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gio"
|
name = "gio"
|
||||||
@@ -2259,9 +2279,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c"
|
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-bidi",
|
"unicode-bidi",
|
||||||
"unicode-normalization",
|
"unicode-normalization",
|
||||||
@@ -2575,9 +2595,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libsqlite3-sys"
|
name = "libsqlite3-sys"
|
||||||
version = "0.26.0"
|
version = "0.27.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
|
checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@@ -2660,7 +2680,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lume"
|
name = "lume"
|
||||||
version = "2.1.3"
|
version = "2.1.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"keyring",
|
"keyring",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -2941,6 +2961,7 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"memoffset 0.7.1",
|
"memoffset 0.7.1",
|
||||||
|
"pin-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3180,9 +3201,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl"
|
name = "openssl"
|
||||||
version = "0.10.59"
|
version = "0.10.60"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33"
|
checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.1",
|
"bitflags 2.4.1",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -3221,9 +3242,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl-sys"
|
name = "openssl-sys"
|
||||||
version = "0.9.95"
|
version = "0.9.96"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9"
|
checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@@ -3369,9 +3390,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "percent-encoding"
|
name = "percent-encoding"
|
||||||
version = "2.3.0"
|
version = "2.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
|
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "phf"
|
name = "phf"
|
||||||
@@ -3602,16 +3623,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "polling"
|
name = "polling"
|
||||||
version = "3.3.0"
|
version = "3.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531"
|
checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"concurrent-queue",
|
"concurrent-queue",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"rustix 0.38.25",
|
"rustix 0.38.25",
|
||||||
"tracing",
|
"tracing",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4470,9 +4491,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx"
|
name = "sqlx"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0e50c216e3624ec8e7ecd14c6a6a6370aad6ee5d8cfc3ab30b5162eeeef2ed33"
|
checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sqlx-core",
|
"sqlx-core",
|
||||||
"sqlx-macros",
|
"sqlx-macros",
|
||||||
@@ -4483,9 +4504,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-cli"
|
name = "sqlx-cli"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e80bc07dfc7f258db72ae5d72d793aa87943690fc1b2afc87b4cabf87035bac0"
|
checksum = "1b941ddc37071bb01d001ec479885a493021f1ca39142d754a05a780a77fff99"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -4508,9 +4529,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-core"
|
name = "sqlx-core"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8d6753e460c998bbd4cd8c6f0ed9a64346fcca0723d6e75e52fdc351c5d2169d"
|
checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"atoi",
|
"atoi",
|
||||||
@@ -4549,9 +4570,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-macros"
|
name = "sqlx-macros"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9a793bb3ba331ec8359c1853bd39eed32cdd7baaf22c35ccf5c92a7e8d1189ec"
|
checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -4562,10 +4583,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-macros-core"
|
name = "sqlx-macros-core"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0a4ee1e104e00dedb6aa5ffdd1343107b0a4702e862a84320ee7cc74782d96fc"
|
checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"atomic-write-file",
|
||||||
"dotenvy",
|
"dotenvy",
|
||||||
"either",
|
"either",
|
||||||
"heck",
|
"heck",
|
||||||
@@ -4588,9 +4610,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-mysql"
|
name = "sqlx-mysql"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "864b869fdf56263f4c95c45483191ea0af340f9f3e3e7b4d57a61c7c87a970db"
|
checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atoi",
|
"atoi",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -4631,9 +4653,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-postgres"
|
name = "sqlx-postgres"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb7ae0e6a97fb3ba33b23ac2671a5ce6e3cabe003f451abd5a56e7951d975624"
|
checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atoi",
|
"atoi",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -4671,9 +4693,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx-sqlite"
|
name = "sqlx-sqlite"
|
||||||
version = "0.7.2"
|
version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d59dc83cf45d89c555a577694534fcd1b55c545a816c816ce51f20bbe56a4f3f"
|
checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atoi",
|
"atoi",
|
||||||
"flume",
|
"flume",
|
||||||
@@ -4690,6 +4712,7 @@ dependencies = [
|
|||||||
"time",
|
"time",
|
||||||
"tracing",
|
"tracing",
|
||||||
"url",
|
"url",
|
||||||
|
"urlencoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -5033,7 +5056,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-autostart"
|
name = "tauri-plugin-autostart"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"auto-launch",
|
"auto-launch",
|
||||||
"log",
|
"log",
|
||||||
@@ -5046,7 +5069,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-cli"
|
name = "tauri-plugin-cli"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"log",
|
"log",
|
||||||
@@ -5059,7 +5082,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-clipboard-manager"
|
name = "tauri-plugin-clipboard-manager"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arboard",
|
"arboard",
|
||||||
"log",
|
"log",
|
||||||
@@ -5073,7 +5096,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-dialog"
|
name = "tauri-plugin-dialog"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glib 0.16.9",
|
"glib 0.16.9",
|
||||||
"log",
|
"log",
|
||||||
@@ -5090,7 +5113,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-fs"
|
name = "tauri-plugin-fs"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"glob",
|
"glob",
|
||||||
@@ -5103,7 +5126,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-http"
|
name = "tauri-plugin-http"
|
||||||
version = "2.0.0-alpha.5"
|
version = "2.0.0-alpha.5"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"data-url",
|
"data-url",
|
||||||
"glob",
|
"glob",
|
||||||
@@ -5120,7 +5143,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-notification"
|
name = "tauri-plugin-notification"
|
||||||
version = "2.0.0-alpha.5"
|
version = "2.0.0-alpha.5"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"notify-rust",
|
"notify-rust",
|
||||||
@@ -5138,7 +5161,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-os"
|
name = "tauri-plugin-os"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gethostname 0.4.3",
|
"gethostname 0.4.3",
|
||||||
"log",
|
"log",
|
||||||
@@ -5154,7 +5177,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-process"
|
name = "tauri-plugin-process"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"tauri",
|
"tauri",
|
||||||
]
|
]
|
||||||
@@ -5162,7 +5185,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-shell"
|
name = "tauri-plugin-shell"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"log",
|
"log",
|
||||||
@@ -5179,7 +5202,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-sql"
|
name = "tauri-plugin-sql"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"log",
|
"log",
|
||||||
@@ -5195,7 +5218,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-store"
|
name = "tauri-plugin-store"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -5223,7 +5246,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-updater"
|
name = "tauri-plugin-updater"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"dirs-next",
|
"dirs-next",
|
||||||
@@ -5249,7 +5272,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-upload"
|
name = "tauri-plugin-upload"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"log",
|
"log",
|
||||||
@@ -5266,7 +5289,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-window-state"
|
name = "tauri-plugin-window-state"
|
||||||
version = "2.0.0-alpha.4"
|
version = "2.0.0-alpha.4"
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#445c1e6cb6971ef644a08d1224fc689923be301b"
|
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#f49b391f10515db4465da32d839c5cc43ebdb3d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"bitflags 2.4.1",
|
"bitflags 2.4.1",
|
||||||
@@ -5783,9 +5806,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "url"
|
name = "url"
|
||||||
version = "2.4.1"
|
version = "2.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5"
|
checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"form_urlencoded",
|
"form_urlencoded",
|
||||||
"idna",
|
"idna",
|
||||||
@@ -5793,6 +5816,12 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "urlencoding"
|
||||||
|
version = "2.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "utf-8"
|
name = "utf-8"
|
||||||
version = "0.7.6"
|
version = "0.7.6"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lume"
|
name = "lume"
|
||||||
version = "2.1.3"
|
version = "2.1.7"
|
||||||
description = "the communication app"
|
description = "the communication app"
|
||||||
authors = ["Ren Amamiya"]
|
authors = ["Ren Amamiya"]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Lume",
|
"productName": "Lume",
|
||||||
"version": "2.1.3"
|
"version": "2.1.7"
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"fs": {
|
"fs": {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function OutboxModel() {
|
|||||||
<div className="rounded-xl bg-neutral-100 p-3 text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200">
|
<div className="rounded-xl bg-neutral-100 p-3 text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200">
|
||||||
<div className="flex items-start justify-between gap-2">
|
<div className="flex items-start justify-between gap-2">
|
||||||
<div>
|
<div>
|
||||||
<h5 className="font-semibold">Enable Outbox (experiment)</h5>
|
<h5 className="font-semibold">Enable Outbox</h5>
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
When you request information about a user, Lume will automatically query the
|
When you request information about a user, Lume will automatically query the
|
||||||
user's outbox relays and subsequent queries will favour using those
|
user's outbox relays and subsequent queries will favour using those
|
||||||
|
|||||||
@@ -13,21 +13,13 @@ export function FollowList() {
|
|||||||
queryKey: ['follows'],
|
queryKey: ['follows'],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
||||||
const follows = await user.follows();
|
const follows = [...(await user.follows())].map((user) => user.pubkey);
|
||||||
const followsAsArr = [];
|
|
||||||
|
|
||||||
follows.forEach((user) => {
|
|
||||||
followsAsArr.push(user.pubkey);
|
|
||||||
});
|
|
||||||
|
|
||||||
// update db
|
// update db
|
||||||
await db.updateAccount('follows', JSON.stringify(followsAsArr));
|
await db.updateAccount('follows', JSON.stringify(follows));
|
||||||
await db.updateAccount('circles', JSON.stringify(followsAsArr));
|
db.account.follows = follows;
|
||||||
|
|
||||||
db.account.follows = followsAsArr;
|
return follows;
|
||||||
db.account.circles = followsAsArr;
|
|
||||||
|
|
||||||
return followsAsArr;
|
|
||||||
},
|
},
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -44,10 +44,11 @@ export function ImportAccountScreen() {
|
|||||||
try {
|
try {
|
||||||
const pubkey = nip19.decode(npub.split('#')[0]).data as string;
|
const pubkey = nip19.decode(npub.split('#')[0]).data as string;
|
||||||
const localSigner = NDKPrivateKeySigner.generate();
|
const localSigner = NDKPrivateKeySigner.generate();
|
||||||
await db.secureSave(pubkey + '-bunker', localSigner.privateKey);
|
await db.createSetting('nsecbunker', '1');
|
||||||
|
await db.secureSave(pubkey + '-nsecbunker', localSigner.privateKey);
|
||||||
|
|
||||||
const remoteSigner = new NDKNip46Signer(ndk, npub, localSigner);
|
const remoteSigner = new NDKNip46Signer(ndk, npub, localSigner);
|
||||||
await remoteSigner.blockUntilReady();
|
// await remoteSigner.blockUntilReady();
|
||||||
|
|
||||||
ndk.signer = remoteSigner;
|
ndk.signer = remoteSigner;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { useState } from 'react';
|
|||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { AllowNotification } from '@app/auth/components/features/allowNotification';
|
import { AllowNotification } from '@app/auth/components/features/allowNotification';
|
||||||
import { Circle } from '@app/auth/components/features/enableCircle';
|
|
||||||
import { OutboxModel } from '@app/auth/components/features/enableOutbox';
|
import { OutboxModel } from '@app/auth/components/features/enableOutbox';
|
||||||
import { FavoriteHashtag } from '@app/auth/components/features/favoriteHashtag';
|
import { FavoriteHashtag } from '@app/auth/components/features/favoriteHashtag';
|
||||||
import { FollowList } from '@app/auth/components/features/followList';
|
import { FollowList } from '@app/auth/components/features/followList';
|
||||||
@@ -41,7 +40,6 @@ export function OnboardingListScreen() {
|
|||||||
<div className="flex flex-col gap-3">
|
<div className="flex flex-col gap-3">
|
||||||
{newuser ? <SuggestFollow /> : <FollowList />}
|
{newuser ? <SuggestFollow /> : <FollowList />}
|
||||||
<FavoriteHashtag />
|
<FavoriteHashtag />
|
||||||
<Circle />
|
|
||||||
<OutboxModel />
|
<OutboxModel />
|
||||||
<AllowNotification />
|
<AllowNotification />
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Image from '@tiptap/extension-image';
|
|||||||
import Placeholder from '@tiptap/extension-placeholder';
|
import Placeholder from '@tiptap/extension-placeholder';
|
||||||
import { EditorContent, FloatingMenu, useEditor } from '@tiptap/react';
|
import { EditorContent, FloatingMenu, useEditor } from '@tiptap/react';
|
||||||
import StarterKit from '@tiptap/starter-kit';
|
import StarterKit from '@tiptap/starter-kit';
|
||||||
import { useMemo, useState } from 'react';
|
import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { twMerge } from 'tailwind-merge';
|
import { twMerge } from 'tailwind-merge';
|
||||||
@@ -27,12 +27,14 @@ import {
|
|||||||
export function NewArticleScreen() {
|
export function NewArticleScreen() {
|
||||||
const { ndk } = useNDK();
|
const { ndk } = useNDK();
|
||||||
|
|
||||||
|
const [height, setHeight] = useState(0);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [title, setTitle] = useState('');
|
const [title, setTitle] = useState('');
|
||||||
const [summary, setSummary] = useState({ open: false, content: '' });
|
const [summary, setSummary] = useState({ open: false, content: '' });
|
||||||
const [cover, setCover] = useState('');
|
const [cover, setCover] = useState('');
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const containerRef = useRef(null);
|
||||||
const ident = useMemo(() => String(Date.now()), []);
|
const ident = useMemo(() => String(Date.now()), []);
|
||||||
const editor = useEditor({
|
const editor = useEditor({
|
||||||
extensions: [
|
extensions: [
|
||||||
@@ -113,9 +115,18 @@ export function NewArticleScreen() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
setHeight(containerRef.current.clientHeight);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full flex-col justify-between">
|
<div className="flex flex-1 flex-col justify-between">
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex-1 overflow-y-auto">
|
||||||
|
<div
|
||||||
|
className="flex flex-col gap-4"
|
||||||
|
ref={containerRef}
|
||||||
|
style={{ height: `${height}px` }}
|
||||||
|
>
|
||||||
{cover ? (
|
{cover ? (
|
||||||
<img
|
<img
|
||||||
src={cover}
|
src={cover}
|
||||||
@@ -232,6 +243,7 @@ export function NewArticleScreen() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div className="mb-3 flex h-12 w-full items-center rounded-lg bg-yellow-100 px-3 text-yellow-700">
|
<div className="mb-3 flex h-12 w-full items-center rounded-lg bg-yellow-100 px-3 text-yellow-700">
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ export * from './articleCoverUploader';
|
|||||||
export * from './mediaUploader';
|
export * from './mediaUploader';
|
||||||
export * from './mentionPopup';
|
export * from './mentionPopup';
|
||||||
export * from './mentionPopupItem';
|
export * from './mentionPopupItem';
|
||||||
|
export * from './mentionList';
|
||||||
|
|||||||
104
src/app/new/components/mentionList.tsx
Normal file
104
src/app/new/components/mentionList.tsx
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
import * as Avatar from '@radix-ui/react-avatar';
|
||||||
|
import { minidenticon } from 'minidenticons';
|
||||||
|
import { Ref, forwardRef, useEffect, useImperativeHandle, useState } from 'react';
|
||||||
|
import { twMerge } from 'tailwind-merge';
|
||||||
|
|
||||||
|
import { NDKCacheUserProfile } from '@utils/types';
|
||||||
|
|
||||||
|
type MentionListRef = {
|
||||||
|
onKeyDown: (props: { event: Event }) => boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
const List = (
|
||||||
|
props: {
|
||||||
|
items: NDKCacheUserProfile[];
|
||||||
|
command: (arg0: { id: string }) => void;
|
||||||
|
},
|
||||||
|
ref: Ref<unknown>
|
||||||
|
) => {
|
||||||
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
||||||
|
|
||||||
|
const selectItem = (index) => {
|
||||||
|
const item = props.items[index];
|
||||||
|
if (item) {
|
||||||
|
props.command({ id: item.pubkey });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const upHandler = () => {
|
||||||
|
setSelectedIndex((selectedIndex + props.items.length - 1) % props.items.length);
|
||||||
|
};
|
||||||
|
|
||||||
|
const downHandler = () => {
|
||||||
|
setSelectedIndex((selectedIndex + 1) % props.items.length);
|
||||||
|
};
|
||||||
|
|
||||||
|
const enterHandler = () => {
|
||||||
|
selectItem(selectedIndex);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => setSelectedIndex(0), [props.items]);
|
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({
|
||||||
|
onKeyDown: ({ event }) => {
|
||||||
|
if (event.key === 'ArrowUp') {
|
||||||
|
upHandler();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'ArrowDown') {
|
||||||
|
downHandler();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
enterHandler();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex w-[200px] flex-col overflow-y-auto rounded-lg border border-neutral-200 bg-neutral-50 p-2 shadow-lg shadow-neutral-500/20 dark:border-neutral-800 dark:bg-neutral-950 dark:shadow-neutral-300/50">
|
||||||
|
{props.items.length ? (
|
||||||
|
props.items.map((item, index) => (
|
||||||
|
<button
|
||||||
|
key={index}
|
||||||
|
onClick={() => selectItem(index)}
|
||||||
|
className={twMerge(
|
||||||
|
'inline-flex h-11 items-center gap-2 rounded-md px-2',
|
||||||
|
index === selectedIndex ? 'bg-neutral-100 dark:bg-neutral-900' : ''
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<Avatar.Root className="h-8 w-8 shrink-0">
|
||||||
|
<Avatar.Image
|
||||||
|
src={item.image}
|
||||||
|
alt={item.name}
|
||||||
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
|
className="h-8 w-8 rounded-md"
|
||||||
|
/>
|
||||||
|
<Avatar.Fallback delayMs={150}>
|
||||||
|
<img
|
||||||
|
src={
|
||||||
|
'data:image/svg+xml;utf8,' +
|
||||||
|
encodeURIComponent(minidenticon(item.name, 90, 50))
|
||||||
|
}
|
||||||
|
alt={item.name}
|
||||||
|
className="h-8 w-8 rounded-md bg-black dark:bg-white"
|
||||||
|
/>
|
||||||
|
</Avatar.Fallback>
|
||||||
|
</Avatar.Root>
|
||||||
|
<h5 className="max-w-[150px] truncate text-sm font-medium">{item.name}</h5>
|
||||||
|
</button>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<div className="text-center text-sm font-medium">No result</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MentionList = forwardRef<MentionListRef>(List);
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk';
|
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk';
|
||||||
import CharacterCount from '@tiptap/extension-character-count';
|
import CharacterCount from '@tiptap/extension-character-count';
|
||||||
import Image from '@tiptap/extension-image';
|
import Image from '@tiptap/extension-image';
|
||||||
|
import Mention from '@tiptap/extension-mention';
|
||||||
import Placeholder from '@tiptap/extension-placeholder';
|
import Placeholder from '@tiptap/extension-placeholder';
|
||||||
import { EditorContent, useEditor } from '@tiptap/react';
|
import { EditorContent, useEditor } from '@tiptap/react';
|
||||||
import StarterKit from '@tiptap/starter-kit';
|
import StarterKit from '@tiptap/starter-kit';
|
||||||
import { convert } from 'html-to-text';
|
import { convert } from 'html-to-text';
|
||||||
import { useEffect, useState } from 'react';
|
import { nip19 } from 'nostr-tools';
|
||||||
|
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
||||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
@@ -18,16 +20,20 @@ import { MentionNote } from '@shared/notes';
|
|||||||
|
|
||||||
import { WIDGET_KIND } from '@stores/constants';
|
import { WIDGET_KIND } from '@stores/constants';
|
||||||
|
|
||||||
|
import { useSuggestion } from '@utils/hooks/useSuggestion';
|
||||||
import { useWidget } from '@utils/hooks/useWidget';
|
import { useWidget } from '@utils/hooks/useWidget';
|
||||||
|
|
||||||
export function NewPostScreen() {
|
export function NewPostScreen() {
|
||||||
const { ndk } = useNDK();
|
const { ndk } = useNDK();
|
||||||
const { addWidget } = useWidget();
|
const { addWidget } = useWidget();
|
||||||
|
const { suggestion } = useSuggestion();
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [height, setHeight] = useState(0);
|
||||||
const [searchParams, setSearchParams] = useSearchParams();
|
const [searchParams, setSearchParams] = useSearchParams();
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const containerRef = useRef(null);
|
||||||
const editor = useEditor({
|
const editor = useEditor({
|
||||||
extensions: [
|
extensions: [
|
||||||
StarterKit.configure(),
|
StarterKit.configure(),
|
||||||
@@ -39,6 +45,14 @@ export function NewPostScreen() {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
CharacterCount.configure(),
|
CharacterCount.configure(),
|
||||||
|
Mention.configure({
|
||||||
|
suggestion,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
renderLabel({ options, node }) {
|
||||||
|
const npub = nip19.npubEncode(node.attrs.id);
|
||||||
|
return `nostr:${npub}`;
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
content: JSON.parse(localStorage.getItem('editor-post') || '{}'),
|
content: JSON.parse(localStorage.getItem('editor-post') || '{}'),
|
||||||
editorProps: {
|
editorProps: {
|
||||||
@@ -115,13 +129,18 @@ export function NewPostScreen() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
setHeight(containerRef.current.clientHeight);
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (editor) editor.commands.focus('end');
|
if (editor) editor.commands.focus('end');
|
||||||
}, [editor]);
|
}, [editor]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full flex-col justify-between">
|
<div className="flex flex-1 flex-col gap-4">
|
||||||
<div>
|
<div className="flex-1 overflow-y-auto">
|
||||||
|
<div ref={containerRef} style={{ height: `${height}px` }}>
|
||||||
<EditorContent
|
<EditorContent
|
||||||
editor={editor}
|
editor={editor}
|
||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
@@ -142,7 +161,8 @@ export function NewPostScreen() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex h-16 w-full items-center justify-between border-t border-neutral-100 dark:border-neutral-900">
|
</div>
|
||||||
|
<div className="inline-flex h-16 w-full items-center justify-between border-t border-neutral-100 bg-neutral-50 dark:border-neutral-900 dark:bg-neutral-950">
|
||||||
<span className="text-sm font-medium tabular-nums text-neutral-600 dark:text-neutral-400">
|
<span className="text-sm font-medium tabular-nums text-neutral-600 dark:text-neutral-400">
|
||||||
{editor?.storage?.characterCount.characters()} characters
|
{editor?.storage?.characterCount.characters()} characters
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
||||||
import { message } from '@tauri-apps/plugin-dialog';
|
|
||||||
import { normalizeRelayUrl } from 'nostr-fetch';
|
import { normalizeRelayUrl } from 'nostr-fetch';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
import { toast } from 'sonner';
|
||||||
import { VList } from 'virtua';
|
import { VList } from 'virtua';
|
||||||
|
|
||||||
import { useStorage } from '@libs/storage/provider';
|
import { useStorage } from '@libs/storage/provider';
|
||||||
@@ -37,10 +37,14 @@ export function RelayList() {
|
|||||||
const url = normalizeRelayUrl(relayUrl);
|
const url = normalizeRelayUrl(relayUrl);
|
||||||
const res = await db.createRelay(url);
|
const res = await db.createRelay(url);
|
||||||
|
|
||||||
if (!res) await message("You're aldready connected to this relay");
|
if (res) {
|
||||||
|
toast.info('Connected. You need to restart app to take effect');
|
||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ['user-relay'],
|
queryKey: ['user-relay'],
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
toast.warning("You're aldready connected to this relay");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export function ProfileCard() {
|
|||||||
{user?.display_name || user?.name}
|
{user?.display_name || user?.name}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-lg text-neutral-700 dark:text-neutral-300">
|
<p className="text-lg text-neutral-700 dark:text-neutral-300">
|
||||||
{user.nip05 || displayNpub(db.account.pubkey, 16)}
|
{user?.nip05 || displayNpub(db.account.pubkey, 16)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -184,10 +184,7 @@ export function EditProfileScreen() {
|
|||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type={'text'}
|
type={'text'}
|
||||||
{...register('display_name', {
|
{...register('display_name')}
|
||||||
required: true,
|
|
||||||
minLength: 4,
|
|
||||||
})}
|
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
||||||
/>
|
/>
|
||||||
@@ -201,10 +198,7 @@ export function EditProfileScreen() {
|
|||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type={'text'}
|
type={'text'}
|
||||||
{...register('name', {
|
{...register('name')}
|
||||||
required: true,
|
|
||||||
minLength: 4,
|
|
||||||
})}
|
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
||||||
/>
|
/>
|
||||||
@@ -218,10 +212,7 @@ export function EditProfileScreen() {
|
|||||||
</label>
|
</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<input
|
<input
|
||||||
{...register('nip05', {
|
{...register('nip05')}
|
||||||
required: true,
|
|
||||||
minLength: 4,
|
|
||||||
})}
|
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
className="relative h-11 w-full rounded-lg bg-neutral-100 px-3 py-1 text-neutral-900 !outline-none backdrop-blur-xl placeholder:text-neutral-500 dark:bg-neutral-900 dark:text-neutral-100"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -21,49 +21,53 @@ export function UserProfile({ pubkey }: { pubkey: string }) {
|
|||||||
const { user } = useProfile(pubkey);
|
const { user } = useProfile(pubkey);
|
||||||
|
|
||||||
const [followed, setFollowed] = useState(false);
|
const [followed, setFollowed] = useState(false);
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
|
const navigate = useNavigate();
|
||||||
const svgURI =
|
const svgURI =
|
||||||
'data:image/svg+xml;utf8,' + encodeURIComponent(minidenticon(pubkey, 90, 50));
|
'data:image/svg+xml;utf8,' + encodeURIComponent(minidenticon(pubkey, 90, 50));
|
||||||
|
|
||||||
const follow = async (pubkey: string) => {
|
const follow = async () => {
|
||||||
try {
|
try {
|
||||||
|
if (!ndk.signer) return navigate('/new/privkey');
|
||||||
|
setFollowed(true);
|
||||||
|
|
||||||
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
||||||
const contacts = await user.follows();
|
const contacts = await user.follows();
|
||||||
const add = await user.follow(new NDKUser({ pubkey: pubkey }), contacts);
|
const add = await user.follow(new NDKUser({ pubkey: pubkey }), contacts);
|
||||||
|
|
||||||
if (add) {
|
if (!add) {
|
||||||
setFollowed(true);
|
toast.success('You already follow this user');
|
||||||
} else {
|
setFollowed(false);
|
||||||
toast('You already follow this user');
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
console.log(error);
|
toast.error(e);
|
||||||
|
setFollowed(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const unfollow = async (pubkey: string) => {
|
const unfollow = async () => {
|
||||||
try {
|
try {
|
||||||
if (!ndk.signer) return navigate('/new/privkey');
|
if (!ndk.signer) return navigate('/new/privkey');
|
||||||
|
setFollowed(false);
|
||||||
|
|
||||||
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
||||||
const contacts = await user.follows();
|
const contacts = await user.follows();
|
||||||
contacts.delete(new NDKUser({ pubkey: pubkey }));
|
contacts.delete(new NDKUser({ pubkey: pubkey }));
|
||||||
|
|
||||||
let list: string[][];
|
const list = [...contacts].map((item) => [
|
||||||
contacts.forEach((el) => list.push(['p', el.pubkey, el.relayUrls?.[0] || '', '']));
|
'p',
|
||||||
|
item.pubkey,
|
||||||
|
item.relayUrls?.[0] || '',
|
||||||
|
'',
|
||||||
|
]);
|
||||||
const event = new NDKEvent(ndk);
|
const event = new NDKEvent(ndk);
|
||||||
event.content = '';
|
event.content = '';
|
||||||
event.kind = NDKKind.Contacts;
|
event.kind = NDKKind.Contacts;
|
||||||
event.tags = list;
|
event.tags = list;
|
||||||
|
|
||||||
const publishedRelays = await event.publish();
|
await event.publish();
|
||||||
if (publishedRelays) {
|
} catch (e) {
|
||||||
setFollowed(false);
|
toast.error(e);
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,9 +82,9 @@ export function UserProfile({ pubkey }: { pubkey: string }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="h-56 w-full overflow-hidden rounded-tl-lg">
|
<div className="h-56 w-full overflow-hidden rounded-tl-lg">
|
||||||
{user.banner ? (
|
{user?.banner ? (
|
||||||
<img
|
<img
|
||||||
src={user.banner}
|
src={user?.banner}
|
||||||
alt="user banner"
|
alt="user banner"
|
||||||
className="h-full w-full rounded-tl-lg object-cover"
|
className="h-full w-full rounded-tl-lg object-cover"
|
||||||
/>
|
/>
|
||||||
@@ -112,10 +116,10 @@ export function UserProfile({ pubkey }: { pubkey: string }) {
|
|||||||
<h5 className="text-center text-xl font-semibold text-neutral-900 dark:text-neutral-100">
|
<h5 className="text-center text-xl font-semibold text-neutral-900 dark:text-neutral-100">
|
||||||
{user.name || user.display_name || user.displayName || 'No name'}
|
{user.name || user.display_name || user.displayName || 'No name'}
|
||||||
</h5>
|
</h5>
|
||||||
{user.nip05 ? (
|
{user?.nip05 ? (
|
||||||
<NIP05
|
<NIP05
|
||||||
pubkey={pubkey}
|
pubkey={pubkey}
|
||||||
nip05={user?.nip05}
|
nip05={user.nip05}
|
||||||
className="text-neutral-600 dark:text-neutral-400"
|
className="text-neutral-600 dark:text-neutral-400"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -125,7 +129,7 @@ export function UserProfile({ pubkey }: { pubkey: string }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-6">
|
<div className="flex flex-col gap-6">
|
||||||
{user.about || user.bio ? (
|
{user?.about || user?.bio ? (
|
||||||
<p className="mt-2 max-w-[500px] select-text break-words text-center text-neutral-900 dark:text-neutral-100">
|
<p className="mt-2 max-w-[500px] select-text break-words text-center text-neutral-900 dark:text-neutral-100">
|
||||||
{user.about || user.bio}
|
{user.about || user.bio}
|
||||||
</p>
|
</p>
|
||||||
@@ -139,23 +143,23 @@ export function UserProfile({ pubkey }: { pubkey: string }) {
|
|||||||
{followed ? (
|
{followed ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => unfollow(pubkey)}
|
onClick={unfollow}
|
||||||
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-600 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-500 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
||||||
>
|
>
|
||||||
Unfollow
|
Unfollow
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => follow(pubkey)}
|
onClick={follow}
|
||||||
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-600 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-500 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
||||||
>
|
>
|
||||||
Follow
|
Follow
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
<Link
|
<Link
|
||||||
to={`/chats/${pubkey}`}
|
to={`/chats/${pubkey}`}
|
||||||
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-600 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
className="inline-flex h-10 w-36 items-center justify-center rounded-md bg-neutral-200 text-sm font-medium text-neutral-900 backdrop-blur-xl hover:bg-blue-500 hover:text-neutral-100 dark:bg-neutral-800 dark:text-neutral-100 dark:hover:bg-blue-600 dark:hover:text-neutral-100"
|
||||||
>
|
>
|
||||||
Message
|
Message
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import NDK, { NDKNip46Signer, NDKPrivateKeySigner } from '@nostr-dev-kit/ndk';
|
import NDK, { NDKNip46Signer, NDKPrivateKeySigner } from '@nostr-dev-kit/ndk';
|
||||||
import { ndkAdapter } from '@nostr-fetch/adapter-ndk';
|
import { ndkAdapter } from '@nostr-fetch/adapter-ndk';
|
||||||
import { message } from '@tauri-apps/plugin-dialog';
|
import { ask } from '@tauri-apps/plugin-dialog';
|
||||||
import { fetch } from '@tauri-apps/plugin-http';
|
import { fetch } from '@tauri-apps/plugin-http';
|
||||||
|
import { relaunch } from '@tauri-apps/plugin-process';
|
||||||
import { NostrFetcher } from 'nostr-fetch';
|
import { NostrFetcher } from 'nostr-fetch';
|
||||||
import { useEffect, useMemo, useState } from 'react';
|
import { useEffect, useMemo, useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
@@ -61,29 +62,29 @@ export const NDKInstance = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSigner(instance: NDK) {
|
async function getSigner(nsecbunker?: boolean) {
|
||||||
if (!db.account) return null;
|
if (!db.account) return;
|
||||||
|
|
||||||
const localSignerPrivkey = await db.secureLoad(db.account.pubkey + '-bunker');
|
|
||||||
const userPrivkey = await db.secureLoad(db.account.pubkey);
|
|
||||||
|
|
||||||
// NIP-46 Signer
|
// NIP-46 Signer
|
||||||
if (localSignerPrivkey) {
|
if (nsecbunker) {
|
||||||
|
const localSignerPrivkey = await db.secureLoad(db.account.pubkey + '-nsecbunker');
|
||||||
const localSigner = new NDKPrivateKeySigner(localSignerPrivkey);
|
const localSigner = new NDKPrivateKeySigner(localSignerPrivkey);
|
||||||
const remoteSigner = new NDKNip46Signer(instance, db.account.id, localSigner);
|
if (!localSigner) return null;
|
||||||
await remoteSigner.blockUntilReady();
|
// await remoteSigner.blockUntilReady();
|
||||||
|
return new NDKNip46Signer(ndk, db.account.id, localSigner);
|
||||||
return remoteSigner;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Privkey Signer
|
// Private key Signer
|
||||||
if (userPrivkey) {
|
const userPrivkey = await db.secureLoad(db.account.pubkey);
|
||||||
|
if (!userPrivkey) return null;
|
||||||
return new NDKPrivateKeySigner(userPrivkey);
|
return new NDKPrivateKeySigner(userPrivkey);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async function initNDK() {
|
async function initNDK() {
|
||||||
|
try {
|
||||||
const outboxSetting = await db.getSettingValue('outbox');
|
const outboxSetting = await db.getSettingValue('outbox');
|
||||||
|
const bunkerSetting = await db.getSettingValue('nsecbunker');
|
||||||
|
const signer = await getSigner(!!parseInt(bunkerSetting));
|
||||||
const explicitRelayUrls = await getExplicitRelays();
|
const explicitRelayUrls = await getExplicitRelays();
|
||||||
|
|
||||||
const tauriAdapter = new NDKCacheAdapterTauri(db);
|
const tauriAdapter = new NDKCacheAdapterTauri(db);
|
||||||
@@ -91,51 +92,46 @@ export const NDKInstance = () => {
|
|||||||
explicitRelayUrls,
|
explicitRelayUrls,
|
||||||
cacheAdapter: tauriAdapter,
|
cacheAdapter: tauriAdapter,
|
||||||
outboxRelayUrls: ['wss://purplepag.es'],
|
outboxRelayUrls: ['wss://purplepag.es'],
|
||||||
enableOutboxModel: outboxSetting === '1',
|
blacklistRelayUrls: [],
|
||||||
|
enableOutboxModel: !!parseInt(outboxSetting),
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
// connect
|
|
||||||
await instance.connect(2000);
|
|
||||||
|
|
||||||
// add signer
|
|
||||||
const signer = await getSigner(instance);
|
|
||||||
instance.signer = signer;
|
instance.signer = signer;
|
||||||
|
|
||||||
|
// connect
|
||||||
|
await instance.connect();
|
||||||
|
|
||||||
// update account's metadata
|
// update account's metadata
|
||||||
if (db.account) {
|
if (db.account) {
|
||||||
const circleSetting = await db.getSettingValue('circles');
|
|
||||||
|
|
||||||
const user = instance.getUser({ pubkey: db.account.pubkey });
|
const user = instance.getUser({ pubkey: db.account.pubkey });
|
||||||
const follows = await user.follows();
|
if (user) {
|
||||||
|
const follows = [...(await user.follows())].map((user) => user.pubkey);
|
||||||
const relayList = await user.relayList();
|
const relayList = await user.relayList();
|
||||||
|
|
||||||
const followsAsArr = [];
|
|
||||||
follows.forEach((user) => {
|
|
||||||
followsAsArr.push(user.pubkey);
|
|
||||||
});
|
|
||||||
|
|
||||||
// update user's follows
|
// update user's follows
|
||||||
await db.updateAccount('follows', JSON.stringify(followsAsArr));
|
await db.updateAccount('follows', JSON.stringify(follows));
|
||||||
if (circleSetting !== '1')
|
|
||||||
await db.updateAccount('circles', JSON.stringify(followsAsArr));
|
|
||||||
|
|
||||||
// update user's relay list
|
if (relayList)
|
||||||
if (relayList) {
|
// update user's relays
|
||||||
for (const relay of relayList.relays) {
|
for (const relay of relayList.relays) {
|
||||||
await db.createRelay(relay);
|
await db.createRelay(relay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
await message(`NDK instance init failed: ${error}`, {
|
|
||||||
title: 'Lume',
|
|
||||||
type: 'error',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
setNDK(instance);
|
setNDK(instance);
|
||||||
setRelayUrls(explicitRelayUrls);
|
setRelayUrls(explicitRelayUrls);
|
||||||
|
} catch (e) {
|
||||||
|
const yes = await ask(
|
||||||
|
`Something wrong, Lume is not working as expected, do you want to relaunch app?`,
|
||||||
|
{
|
||||||
|
title: 'Lume',
|
||||||
|
type: 'error',
|
||||||
|
okLabel: 'Yes',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (yes) relaunch();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import type {
|
|||||||
NDKCacheEvent,
|
NDKCacheEvent,
|
||||||
NDKCacheEventTag,
|
NDKCacheEventTag,
|
||||||
NDKCacheUser,
|
NDKCacheUser,
|
||||||
|
NDKCacheUserProfile,
|
||||||
Relays,
|
Relays,
|
||||||
Widget,
|
Widget,
|
||||||
} from '@utils/types';
|
} from '@utils/types';
|
||||||
@@ -52,6 +53,20 @@ export class LumeStorage {
|
|||||||
return await invoke('secure_remove', { key });
|
return await invoke('secure_remove', { key });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async getAllCacheUsers() {
|
||||||
|
const results: Array<NDKCacheUser> = await this.db.select(
|
||||||
|
'SELECT * FROM ndk_users ORDER BY createdAt DESC;'
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!results.length) return [];
|
||||||
|
|
||||||
|
const users: NDKCacheUserProfile[] = results.map((item) => ({
|
||||||
|
pubkey: item.pubkey,
|
||||||
|
...JSON.parse(item.profile as string),
|
||||||
|
}));
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
public async getCacheUser(pubkey: string) {
|
public async getCacheUser(pubkey: string) {
|
||||||
const results: Array<NDKCacheUser> = await this.db.select(
|
const results: Array<NDKCacheUser> = await this.db.select(
|
||||||
'SELECT * FROM ndk_users WHERE pubkey = $1 ORDER BY pubkey DESC LIMIT 1;',
|
'SELECT * FROM ndk_users WHERE pubkey = $1 ORDER BY pubkey DESC LIMIT 1;',
|
||||||
@@ -423,7 +438,7 @@ export class LumeStorage {
|
|||||||
[relay, this.account.id]
|
[relay, this.account.id]
|
||||||
);
|
);
|
||||||
|
|
||||||
if (existRelays.length > 0) return false;
|
if (existRelays.length) return;
|
||||||
|
|
||||||
return await this.db.execute(
|
return await this.db.execute(
|
||||||
'INSERT OR IGNORE INTO relays (account_id, relay, purpose) VALUES ($1, $2, $3);',
|
'INSERT OR IGNORE INTO relays (account_id, relay, purpose) VALUES ($1, $2, $3);',
|
||||||
@@ -436,7 +451,7 @@ export class LumeStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async createSetting(key: string, value: string) {
|
public async createSetting(key: string, value: string) {
|
||||||
const currentSetting = await this.getSettingValue(key);
|
const currentSetting = await this.checkSettingValue(key);
|
||||||
|
|
||||||
if (!currentSetting)
|
if (!currentSetting)
|
||||||
return await this.db.execute(
|
return await this.db.execute(
|
||||||
@@ -460,12 +475,21 @@ export class LumeStorage {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async checkSettingValue(key: string) {
|
||||||
|
const results: { key: string; value: string }[] = await this.db.select(
|
||||||
|
'SELECT * FROM settings WHERE key = $1 ORDER BY id DESC LIMIT 1;',
|
||||||
|
[key]
|
||||||
|
);
|
||||||
|
if (!results.length) return false;
|
||||||
|
return results[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
public async getSettingValue(key: string) {
|
public async getSettingValue(key: string) {
|
||||||
const results: { key: string; value: string }[] = await this.db.select(
|
const results: { key: string; value: string }[] = await this.db.select(
|
||||||
'SELECT * FROM settings WHERE key = $1 ORDER BY id DESC LIMIT 1;',
|
'SELECT * FROM settings WHERE key = $1 ORDER BY id DESC LIMIT 1;',
|
||||||
[key]
|
[key]
|
||||||
);
|
);
|
||||||
if (results.length < 1) return null;
|
if (!results.length) return '0';
|
||||||
return results[0].value;
|
return results[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,10 @@ export function NewLayout() {
|
|||||||
{db.platform !== 'macos' ? (
|
{db.platform !== 'macos' ? (
|
||||||
<WindowTitlebar />
|
<WindowTitlebar />
|
||||||
) : (
|
) : (
|
||||||
<div data-tauri-drag-region className="h-9" />
|
<div data-tauri-drag-region className="h-9 shrink-0" />
|
||||||
)}
|
)}
|
||||||
<div data-tauri-drag-region className="h-6" />
|
<div data-tauri-drag-region className="h-4 shrink-0" />
|
||||||
<div className="flex h-full min-h-0 w-full">
|
<div className="container mx-auto grid flex-1 grid-cols-8 px-4">
|
||||||
<div className="container mx-auto grid grid-cols-8 px-4">
|
|
||||||
<div className="col-span-1">
|
<div className="col-span-1">
|
||||||
<Link
|
<Link
|
||||||
to="/"
|
to="/"
|
||||||
@@ -28,12 +27,13 @@ export function NewLayout() {
|
|||||||
<ArrowLeftIcon className="h-5 w-5" />
|
<ArrowLeftIcon className="h-5 w-5" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="relative col-span-6 flex flex-col">
|
<div className="col-span-6 flex flex-col">
|
||||||
<div className="mb-8 flex h-10 shrink-0 items-center gap-3">
|
<div className="mb-8 flex h-10 shrink-0 items-center gap-3">
|
||||||
{location.pathname !== '/new/privkey' ? (
|
{location.pathname !== '/new/privkey' ? (
|
||||||
<div className="flex h-10 items-center gap-2 rounded-lg bg-neutral-100 px-0.5 dark:bg-neutral-800">
|
<div className="flex h-10 items-center gap-2 rounded-lg bg-neutral-100 px-0.5 dark:bg-neutral-800">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/new/"
|
to="/new/"
|
||||||
|
end
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
twMerge(
|
twMerge(
|
||||||
'inline-flex h-9 w-20 items-center justify-center rounded-lg text-sm font-medium',
|
'inline-flex h-9 w-20 items-center justify-center rounded-lg text-sm font-medium',
|
||||||
@@ -68,13 +68,10 @@ export function NewLayout() {
|
|||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="h-full min-h-0 w-full">
|
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div className="col-span-1" />
|
<div className="col-span-1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Link, NavLink, Outlet, ScrollRestoration } from 'react-router-dom';
|
import { NavLink, Outlet, ScrollRestoration, useNavigate } from 'react-router-dom';
|
||||||
import { twMerge } from 'tailwind-merge';
|
import { twMerge } from 'tailwind-merge';
|
||||||
import { WindowTitlebar } from 'tauri-controls';
|
import { WindowTitlebar } from 'tauri-controls';
|
||||||
|
|
||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
|
|
||||||
export function SettingsLayout() {
|
export function SettingsLayout() {
|
||||||
const { db } = useStorage();
|
const { db } = useStorage();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen w-screen flex-col bg-neutral-50 dark:bg-neutral-950">
|
<div className="flex h-screen w-screen flex-col bg-neutral-50 dark:bg-neutral-950">
|
||||||
@@ -26,16 +27,17 @@ export function SettingsLayout() {
|
|||||||
<div className="flex h-full min-h-0 w-full flex-col gap-8 overflow-y-auto pb-10">
|
<div className="flex h-full min-h-0 w-full flex-col gap-8 overflow-y-auto pb-10">
|
||||||
<div className="flex h-20 w-full items-center justify-between border-b border-neutral-200 px-2 pb-2 dark:border-neutral-900">
|
<div className="flex h-20 w-full items-center justify-between border-b border-neutral-200 px-2 pb-2 dark:border-neutral-900">
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<button
|
||||||
to="/"
|
type="button"
|
||||||
|
onClick={() => navigate(-1)}
|
||||||
className="inline-flex h-12 w-12 items-center justify-center rounded-xl bg-neutral-100 dark:bg-neutral-900"
|
className="inline-flex h-12 w-12 items-center justify-center rounded-xl bg-neutral-100 dark:bg-neutral-900"
|
||||||
>
|
>
|
||||||
<ArrowLeftIcon className="h-5 w-5" />
|
<ArrowLeftIcon className="h-5 w-5" />
|
||||||
</Link>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-0.5">
|
<div className="flex items-center gap-0.5">
|
||||||
<NavLink
|
<NavLink
|
||||||
to="/settings"
|
to="/settings/"
|
||||||
end
|
end
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
twMerge(
|
twMerge(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import * as AlertDialog from '@radix-ui/react-alert-dialog';
|
import * as AlertDialog from '@radix-ui/react-alert-dialog';
|
||||||
|
import { useQueryClient } from '@tanstack/react-query';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ export function Logout() {
|
|||||||
const { ndk } = useNDK();
|
const { ndk } = useNDK();
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -22,6 +24,9 @@ export function Logout() {
|
|||||||
// logout
|
// logout
|
||||||
await db.accountLogout();
|
await db.accountLogout();
|
||||||
|
|
||||||
|
// clear cache
|
||||||
|
queryClient.clear();
|
||||||
|
|
||||||
// redirect to welcome screen
|
// redirect to welcome screen
|
||||||
navigate('/auth/welcome');
|
navigate('/auth/welcome');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export const NIP05 = memo(function NIP05({
|
|||||||
if (!res.ok) throw new Error(`Failed to fetch NIP-05 service: ${nip05}`);
|
if (!res.ok) throw new Error(`Failed to fetch NIP-05 service: ${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] !== pubkey) return false;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ export function TitleBar({
|
|||||||
<div className="col-span-1 flex justify-center">
|
<div className="col-span-1 flex justify-center">
|
||||||
{id === '9999' ? (
|
{id === '9999' ? (
|
||||||
<div className="isolate flex -space-x-2">
|
<div className="isolate flex -space-x-2">
|
||||||
{db.account.circles
|
{db.account.follows
|
||||||
?.slice(0, 8)
|
?.slice(0, 8)
|
||||||
.map((item) => <User key={item} pubkey={item} variant="ministacked" />)}
|
.map((item) => <User key={item} pubkey={item} variant="ministacked" />)}
|
||||||
{db.account.circles?.length > 8 ? (
|
{db.account.follows?.length > 8 ? (
|
||||||
<div className="inline-flex h-6 w-6 items-center justify-center rounded-full bg-neutral-300 text-neutral-900 ring-1 ring-white dark:bg-neutral-700 dark:text-neutral-100 dark:ring-black">
|
<div className="inline-flex h-6 w-6 items-center justify-center rounded-full bg-neutral-300 text-neutral-900 ring-1 ring-white dark:bg-neutral-700 dark:text-neutral-100 dark:ring-black">
|
||||||
<span className="text-[8px] font-medium">
|
<span className="text-[8px] font-medium">
|
||||||
+{db.account.circles?.length - 8}
|
+{db.account.follows?.length - 8}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ export const User = memo(function User({
|
|||||||
{user?.name || user?.display_name || user?.displayName}
|
{user?.name || user?.display_name || user?.displayName}
|
||||||
</h3>
|
</h3>
|
||||||
<p className="max-w-[10rem] truncate text-sm text-neutral-900 dark:text-neutral-100/70">
|
<p className="max-w-[10rem] truncate text-sm text-neutral-900 dark:text-neutral-100/70">
|
||||||
{user?.nip05 || user?.username || displayNpub(pubkey, 16)}
|
{user?.username || displayNpub(pubkey, 16)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -551,7 +551,7 @@ export const User = memo(function User({
|
|||||||
{user?.nip05 ? (
|
{user?.nip05 ? (
|
||||||
<NIP05
|
<NIP05
|
||||||
pubkey={pubkey}
|
pubkey={pubkey}
|
||||||
nip05={user?.nip05}
|
nip05={user.nip05}
|
||||||
className="max-w-[15rem] truncate text-sm text-neutral-500 dark:text-neutral-300"
|
className="max-w-[15rem] truncate text-sm text-neutral-500 dark:text-neutral-300"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function ArticleWidget({ widget }: { widget: Widget }) {
|
|||||||
} else {
|
} else {
|
||||||
filter = {
|
filter = {
|
||||||
kinds: [NDKKind.Article],
|
kinds: [NDKKind.Article],
|
||||||
authors: db.account.circles,
|
authors: db.account.follows,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function FileWidget({ widget }: { widget: Widget }) {
|
|||||||
} else {
|
} else {
|
||||||
filter = {
|
filter = {
|
||||||
kinds: [1063],
|
kinds: [1063],
|
||||||
authors: db.account.circles,
|
authors: db.account.follows,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export function NewsfeedWidget() {
|
|||||||
relayUrls,
|
relayUrls,
|
||||||
{
|
{
|
||||||
kinds: [NDKKind.Text, NDKKind.Repost],
|
kinds: [NDKKind.Text, NDKKind.Repost],
|
||||||
authors: db.account.circles,
|
authors: db.account.follows,
|
||||||
},
|
},
|
||||||
FETCH_LIMIT,
|
FETCH_LIMIT,
|
||||||
{ asOf: pageParam === 0 ? undefined : pageParam, abortSignal: signal }
|
{ asOf: pageParam === 0 ? undefined : pageParam, abortSignal: signal }
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export function AddGroupFeeds({ currentWidgetId }: { currentWidgetId: string })
|
|||||||
Users
|
Users
|
||||||
</span>
|
</span>
|
||||||
<div className="flex h-[420px] flex-col overflow-y-auto rounded-xl bg-neutral-100 py-2 dark:bg-neutral-900">
|
<div className="flex h-[420px] flex-col overflow-y-auto rounded-xl bg-neutral-100 py-2 dark:bg-neutral-900">
|
||||||
{db.account.circles.map((item: string) => (
|
{db.account.follows.map((item: string) => (
|
||||||
<button
|
<button
|
||||||
key={item}
|
key={item}
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ export function LiveUpdater({ status }: { status: QueryStatus }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let sub: NDKSubscription = undefined;
|
let sub: NDKSubscription = undefined;
|
||||||
|
|
||||||
if (status === 'success' && db.account && db.account.circles.length > 0) {
|
if (status === 'success' && db.account && db.account?.follows?.length > 0) {
|
||||||
queryClient.fetchQuery({ queryKey: ['notification'] });
|
queryClient.fetchQuery({ queryKey: ['notification'] });
|
||||||
|
|
||||||
const filter: NDKFilter = {
|
const filter: NDKFilter = {
|
||||||
kinds: [NDKKind.Text, NDKKind.Repost],
|
kinds: [NDKKind.Text, NDKKind.Repost],
|
||||||
authors: db.account.circles,
|
authors: db.account.follows,
|
||||||
since: Math.floor(Date.now() / 1000),
|
since: Math.floor(Date.now() / 1000),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { NDKEvent, NDKKind, NDKUser } from '@nostr-dev-kit/ndk';
|
import { NDKUser } from '@nostr-dev-kit/ndk';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
@@ -6,7 +6,7 @@ import { toast } from 'sonner';
|
|||||||
import { useNDK } from '@libs/ndk/provider';
|
import { useNDK } from '@libs/ndk/provider';
|
||||||
import { useStorage } from '@libs/storage/provider';
|
import { useStorage } from '@libs/storage/provider';
|
||||||
|
|
||||||
import { FollowIcon, UnfollowIcon } from '@shared/icons';
|
import { FollowIcon } from '@shared/icons';
|
||||||
|
|
||||||
import { shortenKey } from '@utils/shortenKey';
|
import { shortenKey } from '@utils/shortenKey';
|
||||||
|
|
||||||
@@ -16,53 +16,30 @@ export interface Profile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function NostrBandUserProfile({ data }: { data: Profile }) {
|
export function NostrBandUserProfile({ data }: { data: Profile }) {
|
||||||
const embedProfile = data.profile ? JSON.parse(data.profile.content) : null;
|
|
||||||
const profile = embedProfile;
|
|
||||||
|
|
||||||
const { db } = useStorage();
|
const { db } = useStorage();
|
||||||
const { ndk } = useNDK();
|
const { ndk } = useNDK();
|
||||||
|
|
||||||
const [followed, setFollowed] = useState(false);
|
const [followed, setFollowed] = useState(false);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const profile = data.profile ? JSON.parse(data.profile.content) : null;
|
||||||
|
|
||||||
const follow = async (pubkey: string) => {
|
const follow = async (pubkey: string) => {
|
||||||
try {
|
try {
|
||||||
|
if (!ndk.signer) return navigate('/new/privkey');
|
||||||
|
setFollowed(true);
|
||||||
|
|
||||||
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
||||||
const contacts = await user.follows();
|
const contacts = await user.follows();
|
||||||
const add = await user.follow(new NDKUser({ pubkey: pubkey }), contacts);
|
const add = await user.follow(new NDKUser({ pubkey: pubkey }), contacts);
|
||||||
|
|
||||||
if (add) {
|
if (!add) {
|
||||||
setFollowed(true);
|
toast.success('You already follow this user');
|
||||||
} else {
|
|
||||||
toast('You already follow this user');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const unfollow = async (pubkey: string) => {
|
|
||||||
try {
|
|
||||||
if (!ndk.signer) return navigate('/new/privkey');
|
|
||||||
|
|
||||||
const user = ndk.getUser({ pubkey: db.account.pubkey });
|
|
||||||
const contacts = await user.follows();
|
|
||||||
contacts.delete(new NDKUser({ pubkey: pubkey }));
|
|
||||||
|
|
||||||
let list: string[][];
|
|
||||||
contacts.forEach((el) => list.push(['p', el.pubkey, el.relayUrls?.[0] || '', '']));
|
|
||||||
|
|
||||||
const event = new NDKEvent(ndk);
|
|
||||||
event.content = '';
|
|
||||||
event.kind = NDKKind.Contacts;
|
|
||||||
event.tags = list;
|
|
||||||
|
|
||||||
const publishedRelays = await event.publish();
|
|
||||||
if (publishedRelays) {
|
|
||||||
setFollowed(false);
|
setFollowed(false);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
console.log(error);
|
toast.error(e);
|
||||||
|
setFollowed(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -100,15 +77,7 @@ export function NostrBandUserProfile({ data }: { data: Profile }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="inline-flex items-center gap-2">
|
<div className="inline-flex items-center gap-2">
|
||||||
{followed ? (
|
{!followed ? (
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onClick={() => unfollow(data.pubkey)}
|
|
||||||
className="inline-flex h-8 w-8 items-center justify-center rounded-md bg-neutral-200 text-neutral-900 backdrop-blur-xl hover:bg-blue-600 hover:text-white dark:bg-neutral-800 dark:text-neutral-100 dark:hover:text-white"
|
|
||||||
>
|
|
||||||
<UnfollowIcon className="h-4 w-4" />
|
|
||||||
</button>
|
|
||||||
) : (
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => follow(data.pubkey)}
|
onClick={() => follow(data.pubkey)}
|
||||||
@@ -116,7 +85,7 @@ export function NostrBandUserProfile({ data }: { data: Profile }) {
|
|||||||
>
|
>
|
||||||
<FollowIcon className="h-4 w-4" />
|
<FollowIcon className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
)}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-2 line-clamp-5 whitespace-pre-line break-all text-neutral-900 dark:text-neutral-100">
|
<div className="mt-2 line-clamp-5 whitespace-pre-line break-all text-neutral-900 dark:text-neutral-100">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
export const FULL_RELAYS = [
|
export const FULL_RELAYS = [
|
||||||
'wss://relay.damus.io',
|
'wss://relay.damus.io',
|
||||||
'wss://relayable.org',
|
|
||||||
'wss://relay.nostr.band/all',
|
'wss://relay.nostr.band/all',
|
||||||
'wss://nostr.mutinywallet.com',
|
'wss://nostr.mutinywallet.com',
|
||||||
];
|
];
|
||||||
|
|||||||
79
src/utils/hooks/useSuggestion.ts
Normal file
79
src/utils/hooks/useSuggestion.ts
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
import { MentionOptions } from '@tiptap/extension-mention';
|
||||||
|
import { ReactRenderer } from '@tiptap/react';
|
||||||
|
import tippy from 'tippy.js';
|
||||||
|
|
||||||
|
import { MentionList } from '@app/new/components';
|
||||||
|
|
||||||
|
import { useStorage } from '@libs/storage/provider';
|
||||||
|
|
||||||
|
export function useSuggestion() {
|
||||||
|
const { db } = useStorage();
|
||||||
|
|
||||||
|
const suggestion: MentionOptions['suggestion'] = {
|
||||||
|
items: async ({ query }) => {
|
||||||
|
const users = await db.getAllCacheUsers();
|
||||||
|
return users
|
||||||
|
.filter((item) => {
|
||||||
|
if (item.name) return item.name.toLowerCase().startsWith(query.toLowerCase());
|
||||||
|
return item.displayName.toLowerCase().startsWith(query.toLowerCase());
|
||||||
|
})
|
||||||
|
.slice(0, 5);
|
||||||
|
},
|
||||||
|
render: () => {
|
||||||
|
let component;
|
||||||
|
let popup;
|
||||||
|
|
||||||
|
return {
|
||||||
|
onStart: (props) => {
|
||||||
|
component = new ReactRenderer(MentionList, {
|
||||||
|
props,
|
||||||
|
editor: props.editor,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!props.clientRect) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup = tippy('body', {
|
||||||
|
getReferenceClientRect: props.clientRect,
|
||||||
|
appendTo: () => document.body,
|
||||||
|
content: component.element,
|
||||||
|
showOnCreate: true,
|
||||||
|
interactive: true,
|
||||||
|
trigger: 'manual',
|
||||||
|
placement: 'bottom-start',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onUpdate(props) {
|
||||||
|
component.updateProps(props);
|
||||||
|
|
||||||
|
if (!props.clientRect) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
popup[0].setProps({
|
||||||
|
getReferenceClientRect: props.clientRect,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onKeyDown(props) {
|
||||||
|
if (props.event.key === 'Escape') {
|
||||||
|
popup[0].hide();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return component.ref?.onKeyDown(props);
|
||||||
|
},
|
||||||
|
|
||||||
|
onExit() {
|
||||||
|
popup[0].destroy();
|
||||||
|
component.destroy();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return { suggestion };
|
||||||
|
}
|
||||||
4
src/utils/types.d.ts
vendored
4
src/utils/types.d.ts
vendored
@@ -122,6 +122,10 @@ export interface NDKCacheUser {
|
|||||||
createdAt: number;
|
createdAt: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface NDKCacheUserProfile extends NDKUserProfile {
|
||||||
|
pubkey: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface NDKCacheEvent {
|
export interface NDKCacheEvent {
|
||||||
id: string;
|
id: string;
|
||||||
pubkey: string;
|
pubkey: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user