forked from coracle/flotilla
Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1510f39a8a | |||
| bbbe011482 | |||
| 82ab7a043f | |||
| 798253a50e | |||
| 52432ca068 | |||
| b3f1d8464b | |||
| 87bb62b359 | |||
| 3f914d02cc | |||
| d1db77d0f5 | |||
| 6aa297c1a4 | |||
| f3647e9bc1 | |||
| 5b43c62f2d | |||
| 23ffb15a8d | |||
| adb2ce4846 | |||
| cdee6ca743 | |||
| fe30aa4af2 | |||
| 9943728eab | |||
| 8ae7cf05cc | |||
| a7c944e8ef | |||
| 102339d7e8 | |||
| 9a0ad0c663 | |||
| f86afc08fa | |||
| cd1b328b1b | |||
| 48f2bb1c75 | |||
| d416fe913e | |||
| 7f8744725c | |||
| e5d1b82a9d | |||
| 619cf2e134 | |||
| 28b522f015 | |||
| 39233f261e | |||
| 00f0127caf | |||
| f69b575381 | |||
| 986973a605 | |||
| 0d6b4591f1 | |||
| 2c62749d9b | |||
| 4be4288ef0 | |||
| c7eec167cf | |||
| 7bae956ffa | |||
| a2f59a5b1b | |||
| df56af9b0e | |||
| 83f7f9584f | |||
| a2d440e54f | |||
| 4132e8449b | |||
| ee444416e4 | |||
| 10c12c3c48 | |||
| db3775ae99 | |||
| 393acce884 | |||
| 68fe663730 | |||
| f65a4b0db0 | |||
| cdfb502e6e |
+6
-4
@@ -1,6 +1,6 @@
|
||||
VITE_DEFAULT_PUBKEYS=06639a386c9c1014217622ccbcf40908c4f1a0c33e23f8d6d68f4abf655f8f71,266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5,391819e2f2f13b90cac7209419eb574ef7c0d1f4e81867fc24c47a3ce5e8a248,3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d,3f770d65d3a764a9c5cb503ae123e62ec7598ad035d836e2a810f3877a745b24,55f04590674f3648f4cdc9dc8ce32da2a282074cd0b020596ee033d12d385185,58c741aa630c2da35a56a77c1d05381908bd10504fdd2d8b43f725efa6d23196,61066504617ee79387021e18c89fb79d1ddbc3e7bff19cf2298f40466f8715e9,6389be6491e7b693e9f368ece88fcd145f07c068d2c1bbae4247b9b5ef439d32,63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed,6e75f7972397ca3295e0f4ca0fbc6eb9cc79be85bafdd56bd378220ca8eee74e,76c71aae3a491f1d9eec47cba17e229cda4113a0bbb6e6ae1776d7643e29cafa,7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194,82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2,84dee6e676e5bb67b4ad4e042cf70cbd8681155db535942fcc6a0533858a7240,97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322,b676ded7c768d66a757aa3967b1243d90bf57afb09d1044d3219d8d424e4aea0,dace63b00c42e6e017d00dd190a9328386002ff597b841eb5ef91de4f1ce8491,eeb11961b25442b16389fe6c7ebea9adf0ac36dd596816ea7119e521b8821b9e,fe7f6bc6f7338b76bbf80db402ade65953e20b2f23e66e898204b63cc42539a3
|
||||
VITE_DEFAULT_BLOSSOM_SERVERS=https://blossom.primal.net/
|
||||
VITE_BURROW_URL=
|
||||
VITE_POMADE_SIGNERS=
|
||||
VITE_PLATFORM_URL=https://app.flotilla.social
|
||||
VITE_PLATFORM_TERMS=https://flotilla.social/terms
|
||||
VITE_PLATFORM_PRIVACY=https://flotilla.social/privacy
|
||||
@@ -10,10 +10,12 @@ VITE_PLATFORM_RELAYS=
|
||||
VITE_PLATFORM_ACCENT="#7161FF"
|
||||
VITE_PLATFORM_SECONDARY="#EB5E28"
|
||||
VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities."
|
||||
VITE_INDEXER_RELAYS=wss://purplepag.es/,wss://relay.damus.io/,wss://relay.nostr.band/,wss://indexer.coracle.social/
|
||||
VITE_SIGNER_RELAYS=wss://relay.nsec.app/,wss://offchain.pub/
|
||||
VITE_INDEXER_RELAYS=purplepag.es,relay.damus.io,indexer.coracle.social
|
||||
VITE_DEFAULT_RELAYS=relay.damus.io,relay.primal.net,nostr.mom
|
||||
VITE_DEFAULT_MESSAGING_RELAYS=auth.nostr1.com
|
||||
VITE_SIGNER_RELAYS=relay.nsec.app,ephemeral.snowflare.cc,bucket.coracle.social
|
||||
VITE_NOTIFIER_PUBKEY=27b7c2ed89ef78322114225ea3ebf5f72c7767c2528d4d0c1854d039c00085df
|
||||
VITE_NOTIFIER_RELAY=wss://anchor.coracle.social/
|
||||
VITE_NOTIFIER_RELAY=anchor.coracle.social
|
||||
VITE_VAPID_PUBLIC_KEY=BIt2D4BdgdbCowD_0d3Np6GbrIGHxd7aIEUeZNe3hQuRlHz02OhzvDaai0XSFoJYVzSzdMjdyW-QhvW9_yq8j4Y
|
||||
VITE_GLITCHTIP_API_KEY=
|
||||
GLITCHTIP_AUTH_TOKEN=
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# Changelog
|
||||
|
||||
# 1.6.3
|
||||
|
||||
* Fix scroll down button z index
|
||||
* Hide tooltips on mobile
|
||||
* Sort comments ascending
|
||||
* Make video embeds rounded
|
||||
* Fix ProfileMultiSelect styling
|
||||
* Accept hex pubkeys/npubs/nprofiles in ProfileMultiSelect
|
||||
* Tweak room edit form design
|
||||
* Report pending signer to user
|
||||
* Update default relays
|
||||
* Fix chat list responsiveness
|
||||
* Fix memory leak, notification badge not showing
|
||||
* Improve space join flow
|
||||
* Fix opening images in fullscreen dialog
|
||||
* Add support for blocked relays
|
||||
* Add authentication policy setting
|
||||
* Add login with key if no signer is detected
|
||||
* Publish default relay selections on signup
|
||||
|
||||
# 1.6.2
|
||||
|
||||
* Fix modal scrolling and style
|
||||
|
||||
# 1.6.1
|
||||
|
||||
* Fix skinny profile images
|
||||
* Custom handler for relay urls
|
||||
* Improve time based chat partitioning
|
||||
* Improve authenticated image access interop
|
||||
* Fix image detail dialog
|
||||
* Fix zapper loading
|
||||
* Fix recent events missing in feeds
|
||||
|
||||
# 1.6.0
|
||||
|
||||
* Switch back to indexeddb to fix memory and performance
|
||||
|
||||
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "social.flotilla"
|
||||
minSdk rootProject.ext.minSdkVersion
|
||||
targetSdk rootProject.ext.targetSdkVersion
|
||||
versionCode 35
|
||||
versionName "1.6.0"
|
||||
versionCode 39
|
||||
versionName "1.6.3"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.8.0'
|
||||
classpath 'com.android.tools.build:gradle:8.13.2'
|
||||
classpath 'com.google.gms:google-services:4.4.2'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -358,14 +358,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Flotilla Chat.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 26;
|
||||
CURRENT_PROJECT_VERSION = 29;
|
||||
DEVELOPMENT_TEAM = S26U9DYW3A;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "Flotilla Chat";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.6.0;
|
||||
MARKETING_VERSION = 1.6.3;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = social.flotilla;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -384,14 +384,14 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Flotilla Chat.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 26;
|
||||
CURRENT_PROJECT_VERSION = 29;
|
||||
DEVELOPMENT_TEAM = S26U9DYW3A;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "Flotilla Chat";
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 1.6.0;
|
||||
MARKETING_VERSION = 1.6.3;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = social.flotilla;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
if (execSync('git status --porcelain', { encoding: 'utf8' }).trim()) {
|
||||
console.error('Error: Git working tree is dirty. Please commit or stash your changes first.')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'))
|
||||
|
||||
pkg.pnpm.overrides = pkg.pnpm.overrides || {}
|
||||
pkg.pnpm.overrides["@welshman/app"] = "link:../welshman/packages/app"
|
||||
pkg.pnpm.overrides["@welshman/content"] = "link:../welshman/packages/content"
|
||||
pkg.pnpm.overrides["@welshman/editor"] = "link:../welshman/packages/editor"
|
||||
pkg.pnpm.overrides["@welshman/feeds"] = "link:../welshman/packages/feeds"
|
||||
pkg.pnpm.overrides["@welshman/lib"] = "link:../welshman/packages/lib"
|
||||
pkg.pnpm.overrides["@welshman/net"] = "link:../welshman/packages/net"
|
||||
pkg.pnpm.overrides["@welshman/router"] = "link:../welshman/packages/router"
|
||||
pkg.pnpm.overrides["@welshman/signer"] = "link:../welshman/packages/signer"
|
||||
pkg.pnpm.overrides["@welshman/store"] = "link:../welshman/packages/store"
|
||||
pkg.pnpm.overrides["@welshman/util"] = "link:../welshman/packages/util"
|
||||
pkg.pnpm.overrides["@pomade/core"] = "link:../pomade/packages/core"
|
||||
|
||||
fs.writeFileSync('./package.json', JSON.stringify(pkg, null, 2) + '\n')
|
||||
|
||||
execSync('pnpm i', { stdio: 'inherit' })
|
||||
|
||||
execSync('git checkout -f pnpm-lock.yaml', { stdio: 'inherit' })
|
||||
execSync('git checkout -f package.json', { stdio: 'inherit' })
|
||||
+14
-16
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "flotilla",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
@@ -10,14 +10,13 @@
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --check src && eslint src",
|
||||
"format": "git diff head --name-only --diff-filter d | grep -E '(js|ts|svelte)$' | xargs -r prettier --write",
|
||||
"format": "git diff head --name-only --diff-filter d | grep -E '(js|ts|svelte|css)$' | xargs -r prettier --write",
|
||||
"format:all": "prettier --write src",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "^3.0.5",
|
||||
"@eslint/js": "^9.37.0",
|
||||
"@sentry/cli": "^2.56.1",
|
||||
"@sveltejs/kit": "^2.46.5",
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.4",
|
||||
"@types/eslint": "^9.6.1",
|
||||
@@ -53,24 +52,24 @@
|
||||
"@capawesome/capacitor-badge": "^7.0.1",
|
||||
"@getalby/lightning-tools": "^6.0.0",
|
||||
"@getalby/sdk": "^5.1.2",
|
||||
"@pomade/core": "^0.0.12",
|
||||
"@poppanator/sveltekit-svg": "^4.2.1",
|
||||
"@sentry/browser": "^8.55.0",
|
||||
"@sveltejs/adapter-static": "^3.0.10",
|
||||
"@tiptap/core": "^2.26.3",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@types/throttle-debounce": "^5.0.2",
|
||||
"@vite-pwa/assets-generator": "^0.2.6",
|
||||
"@vite-pwa/sveltekit": "^0.6.8",
|
||||
"@welshman/app": "^0.7.0",
|
||||
"@welshman/content": "^0.7.0",
|
||||
"@welshman/editor": "^0.7.0",
|
||||
"@welshman/feeds": "^0.7.0",
|
||||
"@welshman/lib": "^0.7.0",
|
||||
"@welshman/net": "^0.7.0",
|
||||
"@welshman/router": "^0.7.0",
|
||||
"@welshman/signer": "^0.7.0",
|
||||
"@welshman/store": "^0.7.0",
|
||||
"@welshman/util": "^0.7.0",
|
||||
"@welshman/app": "^0.8.1",
|
||||
"@welshman/content": "^0.8.1",
|
||||
"@welshman/editor": "^0.8.1",
|
||||
"@welshman/feeds": "^0.8.1",
|
||||
"@welshman/lib": "^0.8.1",
|
||||
"@welshman/net": "^0.8.1",
|
||||
"@welshman/router": "^0.8.1",
|
||||
"@welshman/signer": "^0.8.1",
|
||||
"@welshman/store": "^0.8.1",
|
||||
"@welshman/util": "^0.8.1",
|
||||
"compressorjs": "^1.2.1",
|
||||
"daisyui": "^4.12.24",
|
||||
"date-picker-svelte": "^2.16.0",
|
||||
@@ -80,7 +79,7 @@
|
||||
"husky": "^9.1.7",
|
||||
"idb": "^8.0.3",
|
||||
"nostr-signer-capacitor-plugin": "^0.0.4",
|
||||
"nostr-tools": "^2.14.2",
|
||||
"nostr-tools": "^2.19.4",
|
||||
"prettier-plugin-tailwindcss": "^0.6.14",
|
||||
"qr-scanner": "^1.4.2",
|
||||
"qrcode": "^1.5.4",
|
||||
@@ -89,7 +88,6 @@
|
||||
},
|
||||
"pnpm": {
|
||||
"ignoredBuiltDependencies": [
|
||||
"@sentry/cli",
|
||||
"esbuild"
|
||||
],
|
||||
"onlyBuiltDependencies": [
|
||||
|
||||
Generated
+236
-360
@@ -50,12 +50,12 @@ importers:
|
||||
'@getalby/sdk':
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.2(typescript@5.9.3)
|
||||
'@pomade/core':
|
||||
specifier: ^0.0.12
|
||||
version: 0.0.12(@frostr/bifrost@1.0.7(typescript@5.9.3))(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/signer@0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3)))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@poppanator/sveltekit-svg':
|
||||
specifier: ^4.2.1
|
||||
version: 4.2.1(rollup@2.79.2)(svelte@5.39.12)(svgo@3.3.2)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0))
|
||||
'@sentry/browser':
|
||||
specifier: ^8.55.0
|
||||
version: 8.55.0
|
||||
'@sveltejs/adapter-static':
|
||||
specifier: ^3.0.10
|
||||
version: 3.0.10(@sveltejs/kit@2.46.5(@sveltejs/vite-plugin-svelte@4.0.4(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0)))(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0)))
|
||||
@@ -75,35 +75,35 @@ importers:
|
||||
specifier: ^0.6.8
|
||||
version: 0.6.8(@sveltejs/kit@2.46.5(@sveltejs/vite-plugin-svelte@4.0.4(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0)))(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0)))(@vite-pwa/assets-generator@0.2.6)(vite-plugin-pwa@0.21.2(@vite-pwa/assets-generator@0.2.6)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0))(workbox-build@7.3.0)(workbox-window@7.3.0))
|
||||
'@welshman/app':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(7cc2d202a89b51b45c1ecb6d486f020b)
|
||||
'@welshman/content':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.9.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/editor':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(linkifyjs@4.3.2)(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(typescript@5.9.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(linkifyjs@4.3.2)(nostr-tools@2.19.4(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))
|
||||
'@welshman/feeds':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(c3072638adf29bdf3b0a110142b651da)
|
||||
'@welshman/lib':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1
|
||||
'@welshman/net':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/router':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))
|
||||
'@welshman/signer':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/store':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(svelte@5.39.12)
|
||||
'@welshman/util':
|
||||
specifier: ^0.7.0
|
||||
version: 0.7.0(typescript@5.9.3)
|
||||
specifier: ^0.8.1
|
||||
version: 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
compressorjs:
|
||||
specifier: ^1.2.1
|
||||
version: 1.2.1
|
||||
@@ -132,8 +132,8 @@ importers:
|
||||
specifier: ^0.0.4
|
||||
version: 0.0.4(@capacitor/core@7.4.3)
|
||||
nostr-tools:
|
||||
specifier: ^2.14.2
|
||||
version: 2.17.0(typescript@5.9.3)
|
||||
specifier: ^2.19.4
|
||||
version: 2.19.4(typescript@5.9.3)
|
||||
prettier-plugin-tailwindcss:
|
||||
specifier: ^0.6.14
|
||||
version: 0.6.14(prettier-plugin-svelte@3.4.0(prettier@3.6.2)(svelte@5.39.12))(prettier@3.6.2)
|
||||
@@ -156,9 +156,6 @@ importers:
|
||||
'@eslint/js':
|
||||
specifier: ^9.37.0
|
||||
version: 9.37.0
|
||||
'@sentry/cli':
|
||||
specifier: ^2.56.1
|
||||
version: 2.56.1
|
||||
'@sveltejs/kit':
|
||||
specifier: ^2.46.5
|
||||
version: 2.46.5(@sveltejs/vite-plugin-svelte@4.0.4(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0)))(svelte@5.39.12)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0))
|
||||
@@ -220,10 +217,6 @@ packages:
|
||||
resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
'@ampproject/remapping@2.3.0':
|
||||
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
|
||||
'@antfu/utils@0.7.10':
|
||||
resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==}
|
||||
|
||||
@@ -805,6 +798,15 @@ packages:
|
||||
peerDependencies:
|
||||
'@capacitor/core': '>=7.0.0'
|
||||
|
||||
'@cmdcode/buff@2.2.5':
|
||||
resolution: {integrity: sha512-+nc3QDoJ+MU/fp+YkX6WuEjJrXLF6ME+eVX1sj5a+MfBKO9LWb4R9Y2zH6APBrySd7nFr48ozscAui7SKvLmXg==}
|
||||
|
||||
'@cmdcode/frost@1.1.3':
|
||||
resolution: {integrity: sha512-Aap5+IqJCisHJzdFJS4h+i5IRaw/yrZ5m5tpoGpKPBljMWjH3K17iD53VvLEQPI85l2asDrjj8vnrFKlwnK7zw==}
|
||||
|
||||
'@cmdcode/nostr-p2p@2.0.11':
|
||||
resolution: {integrity: sha512-hZpWYqRPdvXoaG5LaP2/dR1ObloQxPUYHAA1japQveGdhPbXWiS5aKPxOyUXqgjHDShWeXQ3giOTg6SsCJwnYA==}
|
||||
|
||||
'@cspotcode/source-map-support@0.8.1':
|
||||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -985,6 +987,9 @@ packages:
|
||||
resolution: {integrity: sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@frostr/bifrost@1.0.7':
|
||||
resolution: {integrity: sha512-9PO8s8ra7Cf94HqsF0sArRkLLFYqDyGfRKUOflTWMGgaDvSWIksNA8PckcXvy5/G6u4RtAkTAqki47+ga+7yow==}
|
||||
|
||||
'@getalby/lightning-tools@5.2.1':
|
||||
resolution: {integrity: sha512-dxOmJLJAh6qJ8rsbA5/Bwj7MSI9X3RkxxqmCedl5rfP+yKwNSdfu8i4EiCZN/tk2hNBJb8GHSCcPRNZfwfmEHg==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -1102,6 +1107,10 @@ packages:
|
||||
'@noble/ciphers@0.5.3':
|
||||
resolution: {integrity: sha512-B0+6IIHiqEs3BPMT0hcRmHvEj2QHOLu+uwt+tqDDeVd0oyVzh7BPrDcPjRnV1PV/5LaknXJJQvOuRGR0zQJz+w==}
|
||||
|
||||
'@noble/ciphers@1.3.0':
|
||||
resolution: {integrity: sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==}
|
||||
engines: {node: ^14.21.3 || >=16}
|
||||
|
||||
'@noble/curves@1.1.0':
|
||||
resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==}
|
||||
|
||||
@@ -1124,6 +1133,10 @@ packages:
|
||||
resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==}
|
||||
engines: {node: ^14.21.3 || >=16}
|
||||
|
||||
'@noble/hashes@2.0.1':
|
||||
resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==}
|
||||
engines: {node: '>= 20.19.0'}
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||
engines: {node: '>= 8'}
|
||||
@@ -1146,6 +1159,18 @@ packages:
|
||||
'@polka/url@1.0.0-next.29':
|
||||
resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}
|
||||
|
||||
'@pomade/core@0.0.12':
|
||||
resolution: {integrity: sha512-xI8DSPwpm8m124RjHmcpko3lCvfobNwwl11Fkvpt5L6vgORFMGFA6UM2PGBfgKcVAXR/ao957Hza6yYpMNHEGQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
peerDependencies:
|
||||
'@frostr/bifrost': ^1.0.7
|
||||
'@noble/hashes': ^2.0.1
|
||||
'@welshman/lib': ^0.8.0-pre.1
|
||||
'@welshman/net': ^0.8.0-pre.1
|
||||
'@welshman/signer': ^0.8.0-pre.1
|
||||
'@welshman/util': ^0.8.0-pre.1
|
||||
nostr-tools: ^2.19.3
|
||||
|
||||
'@poppanator/sveltekit-svg@4.2.1':
|
||||
resolution: {integrity: sha512-w7jl4EVOOF+X+uv2BEUiMDJwds+GfbczwGpcS0+rsjIsKYmqmwMi4ts3bVZR9ZvdFHWy5rS84U+pSBClz6cbBg==}
|
||||
peerDependencies:
|
||||
@@ -1333,82 +1358,6 @@ packages:
|
||||
'@scure/bip39@1.2.1':
|
||||
resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==}
|
||||
|
||||
'@sentry-internal/browser-utils@8.55.0':
|
||||
resolution: {integrity: sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@sentry-internal/feedback@8.55.0':
|
||||
resolution: {integrity: sha512-cP3BD/Q6pquVQ+YL+rwCnorKuTXiS9KXW8HNKu4nmmBAyf7urjs+F6Hr1k9MXP5yQ8W3yK7jRWd09Yu6DHWOiw==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@sentry-internal/replay-canvas@8.55.0':
|
||||
resolution: {integrity: sha512-nIkfgRWk1091zHdu4NbocQsxZF1rv1f7bbp3tTIlZYbrH62XVZosx5iHAuZG0Zc48AETLE7K4AX9VGjvQj8i9w==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@sentry-internal/replay@8.55.0':
|
||||
resolution: {integrity: sha512-roCDEGkORwolxBn8xAKedybY+Jlefq3xYmgN2fr3BTnsXjSYOPC7D1/mYqINBat99nDtvgFvNfRcZPiwwZ1hSw==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@sentry/browser@8.55.0':
|
||||
resolution: {integrity: sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@sentry/cli-darwin@2.56.1':
|
||||
resolution: {integrity: sha512-zfhT8MrvB5x/xRdIVGwg+sG0Cx3i0G6RH2zCrdQ/moWn8TfkwsM0O1k/AxpwbpcRfAHCkVb04CU/yKciKwg2KA==}
|
||||
engines: {node: '>=10'}
|
||||
os: [darwin]
|
||||
|
||||
'@sentry/cli-linux-arm64@2.56.1':
|
||||
resolution: {integrity: sha512-AypXIwZvOMJb9RgjI/98hTAd06FcOjqjIm6G9IR0OI4pJCOcaAXz9NKXdJqxpZd7phSMJnD+Bx/8iYOUPeY73A==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [linux, freebsd, android]
|
||||
|
||||
'@sentry/cli-linux-arm@2.56.1':
|
||||
resolution: {integrity: sha512-fNB/Ng11HrkGOSEIDg+fc3zfTCV7q6kJddp6ndK3QlYFsCffRSnclaX1SMp+mqxdWkHqe1kkp85OY8G/x5uAWw==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm]
|
||||
os: [linux, freebsd, android]
|
||||
|
||||
'@sentry/cli-linux-i686@2.56.1':
|
||||
resolution: {integrity: sha512-vnH+WJEsUq7Lf7xc9udzE/M4hoDXXsniFFYr/7BvdnXtCQlNNaWFMXHbEDYAql3baIlHkWoG8cEHWuB/YKyniw==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x86, ia32]
|
||||
os: [linux, freebsd, android]
|
||||
|
||||
'@sentry/cli-linux-x64@2.56.1':
|
||||
resolution: {integrity: sha512-3/BlKe5Vdnia36MeovghHJD8lbcum5TFIxLp+PSfH2sVb09+5Jo0L95oRTI2JkD8Fs+QNssvTqTxJj5eIo/n+A==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [linux, freebsd, android]
|
||||
|
||||
'@sentry/cli-win32-arm64@2.56.1':
|
||||
resolution: {integrity: sha512-Gg8RV7CV7Tz4fiR1EN1Af5AVhJsnEXiZvfvfQXI4lp51MKAhcxZIMtEfg9HaWsn3Dm/wgwYBinyeywfWbTXYDg==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@sentry/cli-win32-i686@2.56.1':
|
||||
resolution: {integrity: sha512-6u6a060yC3i76Ze1apqgWr5luQSyhuD5ND84eWfh/UbddsEa42UHjoVHOiBwmpZqf/hvNZAtzLnE4NCvU4zOMg==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x86, ia32]
|
||||
os: [win32]
|
||||
|
||||
'@sentry/cli-win32-x64@2.56.1':
|
||||
resolution: {integrity: sha512-11cdflajBrDWlRZqI9MOu7ok2vnPzFjKmbU3YvBYWQapNE+HHAsWdsRL/u/P1RmU62vj7Y42iSUcj6x1SNrdPw==}
|
||||
engines: {node: '>=10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@sentry/cli@2.56.1':
|
||||
resolution: {integrity: sha512-VDAIg+gmjNtJS5VUZQMDSK9RaKC9hYQi3PoXpNa+owNfQNk60bCi8z8jkbWRcKbNGn3V51WqvrQAqLoNAdPc9w==}
|
||||
engines: {node: '>= 10'}
|
||||
hasBin: true
|
||||
|
||||
'@sentry/core@8.55.0':
|
||||
resolution: {integrity: sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA==}
|
||||
engines: {node: '>=14.18'}
|
||||
|
||||
'@standard-schema/spec@1.0.0':
|
||||
resolution: {integrity: sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==}
|
||||
|
||||
@@ -1699,38 +1648,82 @@ packages:
|
||||
'@vite-pwa/assets-generator':
|
||||
optional: true
|
||||
|
||||
'@welshman/app@0.7.0':
|
||||
resolution: {integrity: sha512-g+LSfB+KOmz683DEBjXohLATi1FO+U24LMUCMgcElFPyxCdVShL8uBz+DZWMmMsfy0A+WlzwBNd9/L+8amdcTA==}
|
||||
'@welshman/app@0.8.1':
|
||||
resolution: {integrity: sha512-1xMVFUpFq3ZI0sqfz/5h8rlSGHzBm1o8yvSIBTFhoM+Yzz+So4qrO0fpQiYBidlA0f9AEVGcKYlKm8Vcyhqlag==}
|
||||
peerDependencies:
|
||||
'@pomade/core': ^0.0.12
|
||||
'@welshman/feeds': 0.8.1
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1
|
||||
'@welshman/router': 0.8.1
|
||||
'@welshman/signer': 0.8.1
|
||||
'@welshman/store': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
svelte: ^4.0.0 || ^5.0.0
|
||||
|
||||
'@welshman/content@0.7.0':
|
||||
resolution: {integrity: sha512-eJSdsTOQ0VpjvTEG1/mK06Tl2Bdd8iOkPup92/IhHwodXdNHjmauPSt/L7PbV8SQsIASQWTyS48UNQ+eG2KJKA==}
|
||||
'@welshman/content@0.8.1':
|
||||
resolution: {integrity: sha512-DQ08ijfQQojNKWj/LRzcry6IqA45s+xpg25sc2zxP6iXE4Q0cidSoVwvJjPa2PjYWsInC6Zmj/ZQOErWtsyBjQ==}
|
||||
peerDependencies:
|
||||
nostr-tools: ^2.19.4
|
||||
|
||||
'@welshman/editor@0.7.0':
|
||||
resolution: {integrity: sha512-iQbrFP/Q+d2E8eBcLKPgzK8sxHQzY8wa41UHjWLrZdjwj4yUFttoiKXeRcNJHJj9Wv2vBktHTF2LUCdP80dRgg==}
|
||||
'@welshman/editor@0.8.1':
|
||||
resolution: {integrity: sha512-nJdGkWVA4J/ETNKcu2LGUXCjNScd2jgP30khNdIGzXUDhKfuKZYS6MOb8B+c5U1lDbl7o2BQr7CYchtwezXFaQ==}
|
||||
peerDependencies:
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
nostr-tools: ^2.19.4
|
||||
|
||||
'@welshman/feeds@0.7.0':
|
||||
resolution: {integrity: sha512-A0FjnpfONXz15QXtsDCKwUUgGK3lKlGH6Jj2uJ/X0tf5KygDr3PFS3ZYtPn0LXFAYGPjV6YI6e7hYilmoTt8QQ==}
|
||||
'@welshman/feeds@0.8.1':
|
||||
resolution: {integrity: sha512-yUFN+lMz4R1+90VWRBDOKZFZzc3KHJVkcpKacOR+3st6CJSdPYMWgGc8eI6lXXHMIWQu9qDjMTTubx7VrsbJfA==}
|
||||
peerDependencies:
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1
|
||||
'@welshman/router': 0.8.1
|
||||
'@welshman/signer': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
|
||||
'@welshman/lib@0.7.0':
|
||||
resolution: {integrity: sha512-bjkt69D5rQPk/q6Ny7R34wksoMY8jhyAQMsm2mLgv7v68unWDjhYaUy4Q5MQcLKit0pgySSx4tUh3xFlh5TCug==}
|
||||
'@welshman/lib@0.8.1':
|
||||
resolution: {integrity: sha512-s4gRg4NXwDPiXgZVuAaZKS+rpnfYcFfqTqvw44hBTIWa1o12J4k7bqP7Oyi3r6Q901lW/6tvP7TInBWkdhm5Bw==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
|
||||
'@welshman/net@0.7.0':
|
||||
resolution: {integrity: sha512-9PNiMzNPtKIh5LTlyfYQOn6N3OkNSES0OdBedbGDYGX883C35gSwpPga8MXU2gg/EJDnbF77ozAhI1V0s6pGRw==}
|
||||
|
||||
'@welshman/router@0.7.0':
|
||||
resolution: {integrity: sha512-UOsSw4aIMAD6Mkd4jecSD7/18zwFzAES/piegwYv/pWQvX0OAFXoaoPOAbBk19II1mzTX6FzGsoIMf35LO7ZXA==}
|
||||
|
||||
'@welshman/signer@0.7.0':
|
||||
resolution: {integrity: sha512-Jom7yQhG60X/L29XjaJgAAzhvQlIDy05OEluEl6flgpNJdmbvbPfEc0mMvH8g8pK0qDvJtTIQ7957c8zbYdXCg==}
|
||||
'@welshman/net@0.8.1':
|
||||
resolution: {integrity: sha512-ugPs8YT6B2WNVA9A443x3t0DAQyLnzj1nueDTAsHLbB9/4nAJDsXy7EKKcw4rMVXyZyaWZlBdOIR59hKhw1uew==}
|
||||
peerDependencies:
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
|
||||
'@welshman/router@0.8.1':
|
||||
resolution: {integrity: sha512-WOSVGa5utQ7lx99g6pUMibIz4PtlNiYgnEHsimVGGwngKo/bXb7XcSNXggdkTfD5+iHoaHFfil/27Jotfjxmeg==}
|
||||
peerDependencies:
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
|
||||
'@welshman/signer@0.8.1':
|
||||
resolution: {integrity: sha512-lJJWuMZYcgjmVaFNSxnxR1Zs6PcWOaF+MNjEzakLNs8t1P1zBnKGhrmQrzPMFbdy+NcQvfVlmJOd97jN+VZUQw==}
|
||||
peerDependencies:
|
||||
'@noble/curves': ^1.9.7
|
||||
'@noble/hashes': ^2.0.1
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
nostr-signer-capacitor-plugin: ~0.0.4
|
||||
nostr-tools: ^2.19.4
|
||||
|
||||
'@welshman/store@0.7.0':
|
||||
resolution: {integrity: sha512-oKWD5azFtJZECtwqv/DKiZfRTiZ5/hrmuRoxFtKjKDNQYCgMOThHd+ZqsgphA3Q3+bhLpzq74A/uUAontzxUCw==}
|
||||
'@welshman/store@0.8.1':
|
||||
resolution: {integrity: sha512-l+4qU4dvQDY10ESlOhV/Orq3tMIUa2LV0UA8zbqOfF0ZCaar6SxSdS3QodCsVIpViIvO9XQkhuAyUT5R6p6hKw==}
|
||||
peerDependencies:
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1
|
||||
'@welshman/util': 0.8.1
|
||||
svelte: ^4.0.0 || ^5.0.0
|
||||
|
||||
'@welshman/util@0.7.0':
|
||||
resolution: {integrity: sha512-ZLtEP107/BncZePUINHHOqzfcjkXS1ljF3UyaJeE8+kdb2X08ncTA2PAzgrs/r+NSSRWObOM4Wxf6qJSSLzkPw==}
|
||||
'@welshman/util@0.8.1':
|
||||
resolution: {integrity: sha512-eMXeZ6hGuZnCeliPKQqpADNBKBEiXCEZgHIVN3+9qRVx/RVO2YRfDGFde9MKt+PO1qspot91wlbjpgcJ2P9M8A==}
|
||||
peerDependencies:
|
||||
'@noble/curves': ^1.9.7
|
||||
'@welshman/lib': 0.8.1
|
||||
nostr-tools: ^2.19.4
|
||||
|
||||
'@xml-tools/parser@1.0.11':
|
||||
resolution: {integrity: sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA==}
|
||||
@@ -1765,10 +1758,6 @@ packages:
|
||||
add-stream@1.0.0:
|
||||
resolution: {integrity: sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==}
|
||||
|
||||
agent-base@6.0.2:
|
||||
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
|
||||
engines: {node: '>= 6.0.0'}
|
||||
|
||||
aggregate-error@3.1.0:
|
||||
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -2076,9 +2065,6 @@ packages:
|
||||
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
code-red@1.0.4:
|
||||
resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==}
|
||||
|
||||
color-convert@1.9.3:
|
||||
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
|
||||
|
||||
@@ -2593,9 +2579,6 @@ packages:
|
||||
estree-walker@2.0.2:
|
||||
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
|
||||
|
||||
estree-walker@3.0.3:
|
||||
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
|
||||
|
||||
esutils@2.0.3:
|
||||
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -2877,6 +2860,9 @@ packages:
|
||||
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
hash-wasm@4.12.0:
|
||||
resolution: {integrity: sha512-+/2B2rYLb48I/evdOIhP+K/DD2ca2fgBjp6O+GBEnCDk2e4rpeXIK8GvIyRPjTezgmWn9gmKwkQjjx6BtqDHVQ==}
|
||||
|
||||
hasown@2.0.2:
|
||||
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -2892,10 +2878,6 @@ packages:
|
||||
resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
https-proxy-agent@5.0.1:
|
||||
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
|
||||
engines: {node: '>= 6'}
|
||||
|
||||
husky@9.1.7:
|
||||
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -3525,8 +3507,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
nostr-tools@2.17.0:
|
||||
resolution: {integrity: sha512-lrvHM7cSaGhz7F0YuBvgHMoU2s8/KuThihDoOYk8w5gpVHTy0DeUCAgCN8uLGeuSl5MAWekJr9Dkfo5HClqO9w==}
|
||||
nostr-tools@2.19.4:
|
||||
resolution: {integrity: sha512-qVLfoTpZegNYRJo5j+Oi6RPu0AwLP6jcvzcB3ySMnIT5DrAGNXfs5HNBspB/2HiGfH3GY+v6yXkTtcKSBQZwSg==}
|
||||
peerDependencies:
|
||||
typescript: '>=5.0.0'
|
||||
peerDependenciesMeta:
|
||||
@@ -3666,9 +3648,6 @@ packages:
|
||||
pend@1.2.0:
|
||||
resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==}
|
||||
|
||||
periscopic@3.1.0:
|
||||
resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==}
|
||||
|
||||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
|
||||
@@ -3872,10 +3851,6 @@ packages:
|
||||
process-nextick-args@2.0.1:
|
||||
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
|
||||
|
||||
progress@2.0.3:
|
||||
resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
|
||||
prompts@2.4.2:
|
||||
resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==}
|
||||
engines: {node: '>= 6'}
|
||||
@@ -3938,9 +3913,6 @@ packages:
|
||||
prosemirror-view@1.41.3:
|
||||
resolution: {integrity: sha512-SqMiYMUQNNBP9kfPhLO8WXEk/fon47vc52FQsUiJzTBuyjKgEcoAwMyF04eQ4WZ2ArMn7+ReypYL60aKngbACQ==}
|
||||
|
||||
proxy-from-env@1.1.0:
|
||||
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
|
||||
|
||||
pump@3.0.3:
|
||||
resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==}
|
||||
|
||||
@@ -4388,10 +4360,6 @@ packages:
|
||||
svelte:
|
||||
optional: true
|
||||
|
||||
svelte@4.2.20:
|
||||
resolution: {integrity: sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q==}
|
||||
engines: {node: '>=16'}
|
||||
|
||||
svelte@5.39.12:
|
||||
resolution: {integrity: sha512-CEzwxFuEycokU8K8CE/OuwVbmei+ivu2HvBGYIdASfMa1hCRSNr4RRkzNSvbAvu6h+BOig2CsZTAEY+WKvwZpA==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -4933,15 +4901,16 @@ packages:
|
||||
zimmerframe@1.1.4:
|
||||
resolution: {integrity: sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==}
|
||||
|
||||
zod@3.25.76:
|
||||
resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==}
|
||||
|
||||
zod@4.3.5:
|
||||
resolution: {integrity: sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==}
|
||||
|
||||
snapshots:
|
||||
|
||||
'@alloc/quick-lru@5.2.0': {}
|
||||
|
||||
'@ampproject/remapping@2.3.0':
|
||||
dependencies:
|
||||
'@jridgewell/gen-mapping': 0.3.13
|
||||
'@jridgewell/trace-mapping': 0.3.31
|
||||
|
||||
'@antfu/utils@0.7.10': {}
|
||||
|
||||
'@apideck/better-ajv-errors@0.3.6(ajv@8.17.1)':
|
||||
@@ -5725,6 +5694,27 @@ snapshots:
|
||||
dependencies:
|
||||
'@capacitor/core': 7.4.3
|
||||
|
||||
'@cmdcode/buff@2.2.5':
|
||||
dependencies:
|
||||
'@noble/hashes': 1.8.0
|
||||
'@scure/base': 1.2.6
|
||||
|
||||
'@cmdcode/frost@1.1.3':
|
||||
dependencies:
|
||||
'@cmdcode/buff': 2.2.5
|
||||
'@noble/curves': 1.9.7
|
||||
'@noble/hashes': 1.8.0
|
||||
|
||||
'@cmdcode/nostr-p2p@2.0.11(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@cmdcode/buff': 2.2.5
|
||||
'@noble/ciphers': 1.3.0
|
||||
'@noble/curves': 1.9.7
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
zod: 3.25.76
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@cspotcode/source-map-support@0.8.1':
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.9
|
||||
@@ -5844,6 +5834,17 @@ snapshots:
|
||||
'@eslint/core': 0.16.0
|
||||
levn: 0.4.1
|
||||
|
||||
'@frostr/bifrost@1.0.7(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@cmdcode/buff': 2.2.5
|
||||
'@cmdcode/frost': 1.1.3
|
||||
'@cmdcode/nostr-p2p': 2.0.11(typescript@5.9.3)
|
||||
'@noble/ciphers': 1.3.0
|
||||
'@noble/curves': 1.9.7
|
||||
zod: 3.25.76
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@getalby/lightning-tools@5.2.1': {}
|
||||
|
||||
'@getalby/lightning-tools@6.0.0': {}
|
||||
@@ -6035,6 +6036,8 @@ snapshots:
|
||||
|
||||
'@noble/ciphers@0.5.3': {}
|
||||
|
||||
'@noble/ciphers@1.3.0': {}
|
||||
|
||||
'@noble/curves@1.1.0':
|
||||
dependencies:
|
||||
'@noble/hashes': 1.3.1
|
||||
@@ -6053,6 +6056,8 @@ snapshots:
|
||||
|
||||
'@noble/hashes@1.8.0': {}
|
||||
|
||||
'@noble/hashes@2.0.1': {}
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
dependencies:
|
||||
'@nodelib/fs.stat': 2.0.5
|
||||
@@ -6074,6 +6079,18 @@ snapshots:
|
||||
|
||||
'@polka/url@1.0.0-next.29': {}
|
||||
|
||||
'@pomade/core@0.0.12(@frostr/bifrost@1.0.7(typescript@5.9.3))(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/signer@0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3)))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-tools@2.19.4(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@frostr/bifrost': 1.0.7(typescript@5.9.3)
|
||||
'@noble/hashes': 2.0.1
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/signer': 0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
hash-wasm: 4.12.0
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
zod: 4.3.5
|
||||
|
||||
'@poppanator/sveltekit-svg@4.2.1(rollup@2.79.2)(svelte@5.39.12)(svgo@3.3.2)(vite@5.4.20(@types/node@24.7.2)(terser@5.44.0))':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.3.0(rollup@2.79.2)
|
||||
@@ -6221,78 +6238,6 @@ snapshots:
|
||||
'@noble/hashes': 1.3.2
|
||||
'@scure/base': 1.1.1
|
||||
|
||||
'@sentry-internal/browser-utils@8.55.0':
|
||||
dependencies:
|
||||
'@sentry/core': 8.55.0
|
||||
|
||||
'@sentry-internal/feedback@8.55.0':
|
||||
dependencies:
|
||||
'@sentry/core': 8.55.0
|
||||
|
||||
'@sentry-internal/replay-canvas@8.55.0':
|
||||
dependencies:
|
||||
'@sentry-internal/replay': 8.55.0
|
||||
'@sentry/core': 8.55.0
|
||||
|
||||
'@sentry-internal/replay@8.55.0':
|
||||
dependencies:
|
||||
'@sentry-internal/browser-utils': 8.55.0
|
||||
'@sentry/core': 8.55.0
|
||||
|
||||
'@sentry/browser@8.55.0':
|
||||
dependencies:
|
||||
'@sentry-internal/browser-utils': 8.55.0
|
||||
'@sentry-internal/feedback': 8.55.0
|
||||
'@sentry-internal/replay': 8.55.0
|
||||
'@sentry-internal/replay-canvas': 8.55.0
|
||||
'@sentry/core': 8.55.0
|
||||
|
||||
'@sentry/cli-darwin@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-linux-arm64@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-linux-arm@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-linux-i686@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-linux-x64@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-win32-arm64@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-win32-i686@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli-win32-x64@2.56.1':
|
||||
optional: true
|
||||
|
||||
'@sentry/cli@2.56.1':
|
||||
dependencies:
|
||||
https-proxy-agent: 5.0.1
|
||||
node-fetch: 2.7.0
|
||||
progress: 2.0.3
|
||||
proxy-from-env: 1.1.0
|
||||
which: 2.0.2
|
||||
optionalDependencies:
|
||||
'@sentry/cli-darwin': 2.56.1
|
||||
'@sentry/cli-linux-arm': 2.56.1
|
||||
'@sentry/cli-linux-arm64': 2.56.1
|
||||
'@sentry/cli-linux-i686': 2.56.1
|
||||
'@sentry/cli-linux-x64': 2.56.1
|
||||
'@sentry/cli-win32-arm64': 2.56.1
|
||||
'@sentry/cli-win32-i686': 2.56.1
|
||||
'@sentry/cli-win32-x64': 2.56.1
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- supports-color
|
||||
|
||||
'@sentry/core@8.55.0': {}
|
||||
|
||||
'@standard-schema/spec@1.0.0': {}
|
||||
|
||||
'@surma/rollup-plugin-off-main-thread@2.2.3':
|
||||
@@ -6660,32 +6605,26 @@ snapshots:
|
||||
optionalDependencies:
|
||||
'@vite-pwa/assets-generator': 0.2.6
|
||||
|
||||
'@welshman/app@0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/app@0.8.1(7cc2d202a89b51b45c1ecb6d486f020b)':
|
||||
dependencies:
|
||||
'@types/throttle-debounce': 5.0.2
|
||||
'@welshman/feeds': 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/net': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/router': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/signer': 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/store': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
'@pomade/core': 0.0.12(@frostr/bifrost@1.0.7(typescript@5.9.3))(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/signer@0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3)))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/feeds': 0.8.1(c3072638adf29bdf3b0a110142b651da)
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/router': 0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))
|
||||
'@welshman/signer': 0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/store': 0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(svelte@5.39.12)
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
fuse.js: 7.1.0
|
||||
svelte: 4.2.20
|
||||
svelte: 5.39.12
|
||||
throttle-debounce: 5.0.2
|
||||
transitivePeerDependencies:
|
||||
- nostr-signer-capacitor-plugin
|
||||
- typescript
|
||||
- ws
|
||||
|
||||
'@welshman/content@0.7.0(typescript@5.9.3)':
|
||||
'@welshman/content@0.8.1(nostr-tools@2.19.4(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@braintree/sanitize-url': 7.1.1
|
||||
nostr-tools: 2.17.0(typescript@5.9.3)
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
|
||||
'@welshman/editor@0.7.0(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(linkifyjs@4.3.2)(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(typescript@5.9.3)':
|
||||
'@welshman/editor@0.8.1(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(linkifyjs@4.3.2)(nostr-tools@2.19.4(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))':
|
||||
dependencies:
|
||||
'@tiptap/core': 2.26.3(@tiptap/pm@2.26.3)
|
||||
'@tiptap/extension-code': 2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))
|
||||
@@ -6700,10 +6639,10 @@ snapshots:
|
||||
'@tiptap/extension-text': 2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))
|
||||
'@tiptap/pm': 2.26.3
|
||||
'@tiptap/suggestion': 2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3)
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
nostr-editor: 1.0.2(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3)(linkifyjs@4.3.2)(nostr-tools@2.17.0(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))
|
||||
nostr-tools: 2.17.0(typescript@5.9.3)
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
nostr-editor: 1.0.2(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3)(linkifyjs@4.3.2)(nostr-tools@2.19.4(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
tippy.js: 6.3.7
|
||||
transitivePeerDependencies:
|
||||
- '@tiptap/extension-image'
|
||||
@@ -6714,79 +6653,62 @@ snapshots:
|
||||
- prosemirror-state
|
||||
- prosemirror-view
|
||||
- tiptap-markdown
|
||||
- typescript
|
||||
|
||||
'@welshman/feeds@0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/feeds@0.8.1(c3072638adf29bdf3b0a110142b651da)':
|
||||
dependencies:
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/net': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/router': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/signer': 0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/router': 0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))
|
||||
'@welshman/signer': 0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
trava: 1.2.1
|
||||
transitivePeerDependencies:
|
||||
- nostr-signer-capacitor-plugin
|
||||
- typescript
|
||||
- ws
|
||||
|
||||
'@welshman/lib@0.7.0':
|
||||
'@welshman/lib@0.8.1':
|
||||
dependencies:
|
||||
'@scure/base': 1.2.6
|
||||
'@types/events': 3.0.3
|
||||
events: 3.3.0
|
||||
|
||||
'@welshman/net@0.7.0(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)':
|
||||
dependencies:
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
events: 3.3.0
|
||||
isomorphic-ws: 5.0.0(ws@8.18.3)
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
- ws
|
||||
|
||||
'@welshman/router@0.7.0(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/router@0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))':
|
||||
dependencies:
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/net': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
- ws
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
|
||||
'@welshman/signer@0.7.0(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/signer@0.8.1(@noble/curves@1.9.7)(@noble/hashes@2.0.1)(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(nostr-signer-capacitor-plugin@0.0.4(@capacitor/core@7.4.3))(nostr-tools@2.19.4(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@noble/curves': 1.9.7
|
||||
'@noble/hashes': 1.8.0
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/net': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
'@noble/hashes': 2.0.1
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
nostr-signer-capacitor-plugin: 0.0.4(@capacitor/core@7.4.3)
|
||||
nostr-tools: 2.17.0(typescript@5.9.3)
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
- ws
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
|
||||
'@welshman/store@0.7.0(typescript@5.9.3)(ws@8.18.3)':
|
||||
'@welshman/store@0.8.1(@welshman/lib@0.8.1)(@welshman/net@0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3))(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(svelte@5.39.12)':
|
||||
dependencies:
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/net': 0.7.0(typescript@5.9.3)(ws@8.18.3)
|
||||
'@welshman/util': 0.7.0(typescript@5.9.3)
|
||||
svelte: 4.2.20
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
- ws
|
||||
'@welshman/lib': 0.8.1
|
||||
'@welshman/net': 0.8.1(@welshman/lib@0.8.1)(@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3)))(ws@8.18.3)
|
||||
'@welshman/util': 0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))
|
||||
svelte: 5.39.12
|
||||
|
||||
'@welshman/util@0.7.0(typescript@5.9.3)':
|
||||
'@welshman/util@0.8.1(@noble/curves@1.9.7)(@welshman/lib@0.8.1)(nostr-tools@2.19.4(typescript@5.9.3))':
|
||||
dependencies:
|
||||
'@noble/curves': 1.9.7
|
||||
'@types/ws': 8.18.1
|
||||
'@welshman/lib': 0.7.0
|
||||
'@welshman/lib': 0.8.1
|
||||
js-base64: 3.7.8
|
||||
nostr-tools: 2.17.0(typescript@5.9.3)
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
nostr-wasm: 0.1.0
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@xml-tools/parser@1.0.11':
|
||||
dependencies:
|
||||
@@ -6813,12 +6735,6 @@ snapshots:
|
||||
|
||||
add-stream@1.0.0: {}
|
||||
|
||||
agent-base@6.0.2:
|
||||
dependencies:
|
||||
debug: 4.4.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
aggregate-error@3.1.0:
|
||||
dependencies:
|
||||
clean-stack: 2.2.0
|
||||
@@ -7131,14 +7047,6 @@ snapshots:
|
||||
|
||||
clsx@2.1.1: {}
|
||||
|
||||
code-red@1.0.4:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
'@types/estree': 1.0.8
|
||||
acorn: 8.15.0
|
||||
estree-walker: 3.0.3
|
||||
periscopic: 3.1.0
|
||||
|
||||
color-convert@1.9.3:
|
||||
dependencies:
|
||||
color-name: 1.1.3
|
||||
@@ -7780,10 +7688,6 @@ snapshots:
|
||||
|
||||
estree-walker@2.0.2: {}
|
||||
|
||||
estree-walker@3.0.3:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.8
|
||||
|
||||
esutils@2.0.3: {}
|
||||
|
||||
events-universal@1.0.1:
|
||||
@@ -8087,6 +7991,8 @@ snapshots:
|
||||
dependencies:
|
||||
has-symbols: 1.1.0
|
||||
|
||||
hash-wasm@4.12.0: {}
|
||||
|
||||
hasown@2.0.2:
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
@@ -8099,13 +8005,6 @@ snapshots:
|
||||
dependencies:
|
||||
lru-cache: 6.0.0
|
||||
|
||||
https-proxy-agent@5.0.1:
|
||||
dependencies:
|
||||
agent-base: 6.0.2
|
||||
debug: 4.4.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
husky@9.1.7: {}
|
||||
|
||||
ico-endec@0.1.6: {}
|
||||
@@ -8635,7 +8534,7 @@ snapshots:
|
||||
|
||||
normalize-range@0.1.2: {}
|
||||
|
||||
nostr-editor@1.0.2(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3)(linkifyjs@4.3.2)(nostr-tools@2.17.0(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))):
|
||||
nostr-editor@1.0.2(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/extension-image@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3)))(@tiptap/extension-link@2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3))(@tiptap/pm@2.26.3)(linkifyjs@4.3.2)(nostr-tools@2.19.4(typescript@5.9.3))(prosemirror-markdown@1.13.2)(prosemirror-model@1.25.3)(prosemirror-state@1.4.3)(prosemirror-view@1.41.3)(tiptap-markdown@0.8.10(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))):
|
||||
dependencies:
|
||||
'@tiptap/core': 2.26.3(@tiptap/pm@2.26.3)
|
||||
'@tiptap/extension-image': 2.27.1(@tiptap/core@2.26.3(@tiptap/pm@2.26.3))
|
||||
@@ -8644,7 +8543,7 @@ snapshots:
|
||||
js-base64: 3.7.8
|
||||
light-bolt11-decoder: 3.2.0
|
||||
linkifyjs: 4.3.2
|
||||
nostr-tools: 2.17.0(typescript@5.9.3)
|
||||
nostr-tools: 2.19.4(typescript@5.9.3)
|
||||
prosemirror-markdown: 1.13.2
|
||||
prosemirror-model: 1.25.3
|
||||
prosemirror-state: 1.4.3
|
||||
@@ -8667,7 +8566,7 @@ snapshots:
|
||||
optionalDependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
nostr-tools@2.17.0(typescript@5.9.3):
|
||||
nostr-tools@2.19.4(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@noble/ciphers': 0.5.3
|
||||
'@noble/curves': 1.2.0
|
||||
@@ -8807,12 +8706,6 @@ snapshots:
|
||||
|
||||
pend@1.2.0: {}
|
||||
|
||||
periscopic@3.1.0:
|
||||
dependencies:
|
||||
'@types/estree': 1.0.8
|
||||
estree-walker: 3.0.3
|
||||
is-reference: 3.0.3
|
||||
|
||||
picocolors@1.1.1: {}
|
||||
|
||||
picomatch@2.3.1: {}
|
||||
@@ -8927,8 +8820,6 @@ snapshots:
|
||||
|
||||
process-nextick-args@2.0.1: {}
|
||||
|
||||
progress@2.0.3: {}
|
||||
|
||||
prompts@2.4.2:
|
||||
dependencies:
|
||||
kleur: 3.0.3
|
||||
@@ -9037,8 +8928,6 @@ snapshots:
|
||||
prosemirror-state: 1.4.3
|
||||
prosemirror-transform: 1.10.4
|
||||
|
||||
proxy-from-env@1.1.0: {}
|
||||
|
||||
pump@3.0.3:
|
||||
dependencies:
|
||||
end-of-stream: 1.4.5
|
||||
@@ -9594,23 +9483,6 @@ snapshots:
|
||||
optionalDependencies:
|
||||
svelte: 5.39.12
|
||||
|
||||
svelte@4.2.20:
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
'@jridgewell/trace-mapping': 0.3.31
|
||||
'@types/estree': 1.0.8
|
||||
acorn: 8.15.0
|
||||
aria-query: 5.3.2
|
||||
axobject-query: 4.1.0
|
||||
code-red: 1.0.4
|
||||
css-tree: 2.3.1
|
||||
estree-walker: 3.0.3
|
||||
is-reference: 3.0.3
|
||||
locate-character: 3.0.0
|
||||
magic-string: 0.30.19
|
||||
periscopic: 3.1.0
|
||||
|
||||
svelte@5.39.12:
|
||||
dependencies:
|
||||
'@jridgewell/remapping': 2.3.5
|
||||
@@ -10280,3 +10152,7 @@ snapshots:
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
zimmerframe@1.1.4: {}
|
||||
|
||||
zod@3.25.76: {}
|
||||
|
||||
zod@4.3.5: {}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
hash=$(find build -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum | awk '{print $1}')
|
||||
|
||||
sentry-cli \
|
||||
--url https://glitchtip.coracle.social \
|
||||
--auth-token $GLITCHTIP_AUTH_TOKEN \
|
||||
--api-key $VITE_GLITCHTIP_API_KEY \
|
||||
sourcemaps \
|
||||
--org coracle \
|
||||
--project flotilla \
|
||||
--release $hash \
|
||||
upload \
|
||||
--url-prefix /_app/immutable/ \
|
||||
build/_app/immutable
|
||||
+6
-2
@@ -66,6 +66,10 @@
|
||||
--neutral-content: oklch(var(--nc));
|
||||
}
|
||||
|
||||
.mobile [data-tip]::before {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* safe area insets */
|
||||
|
||||
@layer components {
|
||||
@@ -398,7 +402,7 @@ body.keyboard-open .cb {
|
||||
@apply bottom-sai;
|
||||
}
|
||||
|
||||
body.keyboard-open .bottom-nav {
|
||||
body.keyboard-open .hide-on-keyboard {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -409,5 +413,5 @@ body.keyboard-open .bottom-nav {
|
||||
}
|
||||
|
||||
.chat__scroll-down {
|
||||
@apply fixed bottom-28 right-4 md:bottom-16;
|
||||
@apply fixed bottom-28 right-4 z-feature md:bottom-16;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import {randomInt, map, displayList, TIMEZONE, identity} from "@welshman/lib"
|
||||
import {randomInt, map, displayList, identity, TIMEZONE} from "@welshman/lib"
|
||||
import {displayRelayUrl, getTagValue, THREAD, MESSAGE, EVENT_TIME, COMMENT} from "@welshman/util"
|
||||
import type {Filter} from "@welshman/util"
|
||||
import {makeIntersectionFeed, makeRelayFeed, feedFromFilters} from "@welshman/feeds"
|
||||
@@ -37,7 +37,7 @@
|
||||
hideSpaceField = false,
|
||||
}: Props = $props()
|
||||
|
||||
const timezoneOffset = parseInt(TIMEZONE.slice(3)) / 100
|
||||
const timezoneOffset = parseInt(TIMEZONE.split(":")?.[0] || "00")
|
||||
const minute = randomInt(0, 59)
|
||||
const hour = (17 - timezoneOffset) % 24
|
||||
const WEEKLY = `0 ${minute} ${hour} * * 1`
|
||||
|
||||
@@ -5,32 +5,13 @@
|
||||
import Landing from "@app/components/Landing.svelte"
|
||||
import Toast from "@app/components/Toast.svelte"
|
||||
import PrimaryNav from "@app/components/PrimaryNav.svelte"
|
||||
import EmailConfirm from "@app/components/EmailConfirm.svelte"
|
||||
import PasswordReset from "@app/components/PasswordReset.svelte"
|
||||
import {BURROW_URL} from "@app/core/state"
|
||||
import {modals, pushModal} from "@app/util/modal"
|
||||
import {modals} from "@app/util/modal"
|
||||
|
||||
interface Props {
|
||||
children: Snippet
|
||||
}
|
||||
|
||||
const {children}: Props = $props()
|
||||
|
||||
if (BURROW_URL && !$pubkey) {
|
||||
if ($page.url.pathname === "/confirm-email") {
|
||||
pushModal(EmailConfirm, {
|
||||
email: $page.url.searchParams.get("email"),
|
||||
confirm_token: $page.url.searchParams.get("confirm_token"),
|
||||
})
|
||||
}
|
||||
|
||||
if ($page.url.pathname === "/reset-password") {
|
||||
pushModal(PasswordReset, {
|
||||
email: $page.url.searchParams.get("email"),
|
||||
reset_token: $page.url.searchParams.get("reset_token"),
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex h-screen overflow-hidden">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import {remove, formatTimestamp} from "@welshman/lib"
|
||||
import {remove, uniq, formatTimestamp} from "@welshman/lib"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {pubkey, loadMessagingRelayList} from "@welshman/app"
|
||||
import {fade} from "@lib/transition"
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
const {...props}: Props = $props()
|
||||
|
||||
const others = remove($pubkey!, props.pubkeys)
|
||||
const others = uniq(remove($pubkey!, props.pubkeys))
|
||||
const active = $derived($page.params.chat === props.id)
|
||||
const path = makeChatPath(props.pubkeys)
|
||||
|
||||
|
||||
@@ -46,20 +46,20 @@
|
||||
</script>
|
||||
|
||||
<div class="col-2">
|
||||
<Button class="btn btn-primary w-full" onclick={showEmojiPicker}>
|
||||
<Icon size={4} icon={SmileCircle} />
|
||||
Send Reaction
|
||||
</Button>
|
||||
<Button class="btn btn-neutral w-full" onclick={sendReply}>
|
||||
<Icon size={4} icon={Reply} />
|
||||
Send Reply
|
||||
<Button class="btn btn-neutral" onclick={showInfo}>
|
||||
<Icon size={4} icon={Code2} />
|
||||
Message Info
|
||||
</Button>
|
||||
<Button class="btn btn-neutral w-full" onclick={copyText}>
|
||||
<Icon size={4} icon={Copy} />
|
||||
Copy Text
|
||||
</Button>
|
||||
<Button class="btn btn-neutral" onclick={showInfo}>
|
||||
<Icon size={4} icon={Code2} />
|
||||
Message Details
|
||||
<Button class="btn btn-neutral w-full" onclick={sendReply}>
|
||||
<Icon size={4} icon={Reply} />
|
||||
Send Reply
|
||||
</Button>
|
||||
<Button class="btn btn-primary w-full" onclick={showEmojiPicker}>
|
||||
<Icon size={4} icon={SmileCircle} />
|
||||
Send Reaction
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import {goto} from "$app/navigation"
|
||||
import {tryCatch, uniq} from "@welshman/lib"
|
||||
import {fromNostrURI} from "@welshman/util"
|
||||
import {pubkey} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
@@ -19,7 +18,7 @@
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = () => goto(makeChatPath([...pubkeys, $pubkey!]))
|
||||
const onSubmit = () => goto(makeChatPath(pubkeys))
|
||||
|
||||
const addPubkey = (pubkey: string) => {
|
||||
pubkeys = uniq([...pubkeys, pubkey])
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
{#if isBlock(i)}
|
||||
<ContentLinkBlock value={parsed.value} {event} />
|
||||
{:else}
|
||||
<ContentLinkInline value={parsed.value} />
|
||||
<ContentLinkInline value={parsed.value} {event} />
|
||||
{/if}
|
||||
{:else if isProfile(parsed)}
|
||||
<ContentMention value={parsed.value} {url} />
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
<script lang="ts">
|
||||
import {ellipsize, displayUrl, postJson} from "@welshman/lib"
|
||||
import {dufflepud} from "@app/core/state"
|
||||
import {call, ellipsize, displayUrl, postJson} from "@welshman/lib"
|
||||
import {isRelayUrl} from "@welshman/util"
|
||||
import {preventDefault, stopPropagation} from "@lib/html"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||
import ContentLinkBlockImage from "@app/components/ContentLinkBlockImage.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {PLATFORM_URL} from "@app/core/state"
|
||||
import {dufflepud, PLATFORM_URL} from "@app/core/state"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
|
||||
const {value, event} = $props()
|
||||
|
||||
let hideImage = $state(false)
|
||||
|
||||
const url = value.url.toString()
|
||||
const external = !url.startsWith(PLATFORM_URL)
|
||||
const href = external ? url : url.replace(PLATFORM_URL, "")
|
||||
const [href, external] = call(() => {
|
||||
if (isRelayUrl(url)) return [makeSpacePath(url), false]
|
||||
if (url.startsWith(PLATFORM_URL)) return [url.replace(PLATFORM_URL, ""), false]
|
||||
|
||||
return [url, true]
|
||||
})
|
||||
|
||||
const loadPreview = async () => {
|
||||
const json = await postJson(dufflepud("link/preview"), {url})
|
||||
@@ -36,7 +41,7 @@
|
||||
<Link {external} {href} class="my-2 block">
|
||||
<div class="overflow-hidden rounded-box">
|
||||
{#if url.match(/\.(mov|webm|mp4)$/)}
|
||||
<video controls src={url} class="max-h-96 object-contain object-center">
|
||||
<video controls src={url} class="max-h-96 rounded-box object-contain object-center">
|
||||
<track kind="captions" />
|
||||
</video>
|
||||
{:else if url.match(/\.(jpe?g|png|gif|webp)$/)}
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
.map(tagsFromIMeta)
|
||||
.find(meta => getTagValue("url", meta) === url) || event.tags
|
||||
|
||||
const hash = getTagValue("x", meta)
|
||||
// Fallback to filename if hash was omitted from the message for interoperability
|
||||
const hash = getTagValue("x", meta) || url.split(/[\/\.]/).slice(-2)[0]
|
||||
const key = getTagValue("decryption-key", meta)
|
||||
const nonce = getTagValue("decryption-nonce", meta)
|
||||
const algorithm = getTagValue("encryption-algorithm", meta)
|
||||
|
||||
@@ -1,25 +1,34 @@
|
||||
<script lang="ts">
|
||||
import {displayUrl} from "@welshman/lib"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import {call, displayUrl} from "@welshman/lib"
|
||||
import {isRelayUrl} from "@welshman/util"
|
||||
import {preventDefault, stopPropagation} from "@lib/html"
|
||||
import LinkRound from "@assets/icons/link-round.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import ContentLinkDetail from "@app/components/ContentLinkDetail.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {PLATFORM_URL} from "@app/core/state"
|
||||
import {makeSpacePath} from "@app/util/routes"
|
||||
|
||||
const {value} = $props()
|
||||
const {value, event} = $props()
|
||||
|
||||
const url = value.url.toString()
|
||||
const external = !url.startsWith(PLATFORM_URL)
|
||||
const href = external ? url : url.replace(PLATFORM_URL, "")
|
||||
const [href, external] = call(() => {
|
||||
if (isRelayUrl(url)) return [makeSpacePath(url), false]
|
||||
if (url.startsWith(PLATFORM_URL)) return [url.replace(PLATFORM_URL, ""), false]
|
||||
|
||||
const expand = () => pushModal(ContentLinkDetail, {url}, {fullscreen: true})
|
||||
return [url, true]
|
||||
})
|
||||
|
||||
const expand = () => pushModal(ContentLinkDetail, {value, event}, {fullscreen: true})
|
||||
</script>
|
||||
|
||||
{#if url.match(/\.(jpe?g|png|gif|webp)$/)}
|
||||
<!-- Use a real link so people can copy the href -->
|
||||
<a href={url} class="link-content whitespace-nowrap" onclick={preventDefault(expand)}>
|
||||
<a
|
||||
href={url}
|
||||
class="link-content whitespace-nowrap"
|
||||
onclick={stopPropagation(preventDefault(expand))}>
|
||||
<Icon icon={LinkRound} size={3} class="inline-block" />
|
||||
{displayUrl(url)}
|
||||
</a>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
{:else if isCashu(parsed) || isInvoice(parsed)}
|
||||
<ContentToken value={parsed.value} />
|
||||
{:else if isLink(parsed)}
|
||||
<ContentLinkInline value={parsed.value} />
|
||||
<ContentLinkInline value={parsed.value} {event} />
|
||||
{:else if isProfile(parsed)}
|
||||
<ContentMention value={parsed.value} {url} />
|
||||
{:else if isQuote(parsed)}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {postJson, sleep} from "@welshman/lib"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import LogInPassword from "@app/components/LogInPassword.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {BURROW_URL} from "@app/core/state"
|
||||
|
||||
const {email, confirm_token} = $props()
|
||||
|
||||
const login = () => {
|
||||
pushModal(LogInPassword, {email}, {path: "/"})
|
||||
}
|
||||
|
||||
let error = $state("")
|
||||
let loading = $state(true)
|
||||
|
||||
onMount(async () => {
|
||||
const [res] = await Promise.all([
|
||||
postJson(BURROW_URL + "/user/confirm-email", {email, confirm_token}),
|
||||
sleep(2000),
|
||||
])
|
||||
|
||||
error = res.error
|
||||
loading = false
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="column gap-4">
|
||||
<h1 class="heading">
|
||||
{#if loading}
|
||||
Just a second...
|
||||
{:else if error}
|
||||
Oops!
|
||||
{:else}
|
||||
Success!
|
||||
{/if}
|
||||
</h1>
|
||||
<p class="m-auto max-w-sm text-center">
|
||||
<Spinner {loading}>
|
||||
{#if loading}
|
||||
Hang tight, we're checking your confirmation link.
|
||||
{:else if error}
|
||||
Looks like something went wrong. {error}
|
||||
{:else}
|
||||
You're all set - click below to log in.
|
||||
{/if}
|
||||
</Spinner>
|
||||
</p>
|
||||
<Button class="btn btn-primary" onclick={login} disabled={loading}>Continue to Login</Button>
|
||||
</div>
|
||||
@@ -7,13 +7,13 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProfileEject from "@app/components/ProfileEject.svelte"
|
||||
import KeyRecoveryRequest from "@app/components/KeyRecoveryRequest.svelte"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const startEject = () => pushModal(ProfileEject)
|
||||
const startRecoveryRequest = () => pushModal(KeyRecoveryRequest)
|
||||
</script>
|
||||
|
||||
<div class="column gap-4">
|
||||
@@ -44,7 +44,7 @@
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button class="btn btn-primary" onclick={startEject}>
|
||||
<Button class="btn btn-primary" onclick={startRecoveryRequest}>
|
||||
<Icon icon={CheckCircle} />
|
||||
I want to hold my own keys
|
||||
</Button>
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
<script lang="ts">
|
||||
import {nsecEncode} from "nostr-tools/nip19"
|
||||
import {encrypt} from "nostr-tools/nip49"
|
||||
import {hexToBytes} from "@welshman/lib"
|
||||
import {preventDefault, downloadText} from "@lib/html"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import ArrowDown from "@assets/icons/arrow-down.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
|
||||
type Props = {
|
||||
secret: string
|
||||
next: () => unknown
|
||||
submitText?: string
|
||||
}
|
||||
|
||||
const {secret, next, submitText = "Continue"}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const cleanupCopy = (copy: string) =>
|
||||
copy
|
||||
.replace(/\n\s*\n\s*/g, "NEWLINE")
|
||||
.replace(/\s+/g, " ")
|
||||
.replace(/NEWLINE/g, "\n\n")
|
||||
.trim()
|
||||
|
||||
const downloadKey = () => {
|
||||
const sharedCopy = `
|
||||
Most online services keep track of users by giving them a username and password. This gives the
|
||||
service total control over their users, allowing them to ban them at any time, or sell their activity.
|
||||
|
||||
On Nostr, you control your own identity and social data, through the magic of cryptography. The basic
|
||||
idea is that you have a public key, which acts as your user ID, and a private key which allows you to
|
||||
prove your identity.
|
||||
|
||||
It's very important to keep your private key secret because it grants permanent and complete access to your
|
||||
account.
|
||||
`
|
||||
|
||||
if (usePassword) {
|
||||
if (password.length < 12) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Your password must be at least 12 characters long.",
|
||||
})
|
||||
}
|
||||
|
||||
const ncryptsec = encrypt(hexToBytes(secret), password)
|
||||
const instructions = `
|
||||
This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME} and encrypted using
|
||||
a password you chose when you signed up.
|
||||
|
||||
${sharedCopy}
|
||||
|
||||
Your encrypted private key is:
|
||||
|
||||
${ncryptsec}
|
||||
|
||||
To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good
|
||||
place to look), and import your key.
|
||||
`
|
||||
|
||||
downloadText("Nostr Secret Key.txt", cleanupCopy(instructions))
|
||||
} else {
|
||||
const nsec = nsecEncode(hexToBytes(secret))
|
||||
const instructions = `
|
||||
This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME}.
|
||||
|
||||
${sharedCopy}
|
||||
|
||||
Your private key is:
|
||||
|
||||
${nsec}
|
||||
|
||||
To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good
|
||||
place to look), and import your key.
|
||||
`
|
||||
|
||||
downloadText("Nostr Secret Key.txt", cleanupCopy(instructions))
|
||||
}
|
||||
|
||||
didDownload = true
|
||||
}
|
||||
|
||||
const onPasswordChange = () => {
|
||||
didDownload = false
|
||||
}
|
||||
|
||||
const toggleUsePassword = () => {
|
||||
usePassword = !usePassword
|
||||
didDownload = false
|
||||
}
|
||||
|
||||
let password = $state("")
|
||||
let usePassword = $state(false)
|
||||
let didDownload = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(next)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Your Keys are Ready!</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>
|
||||
A cryptographic key pair has two parts: your <strong>public key</strong> identifies your
|
||||
account, while your <strong>private key</strong> acts sort of like a master password.
|
||||
</p>
|
||||
<p>
|
||||
Securing your private key is very important, so make sure to take the time to save your key in a
|
||||
secure place (like a password manager).
|
||||
</p>
|
||||
{#if usePassword}
|
||||
<Field>
|
||||
{#snippet label()}
|
||||
Password*
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={password} onchange={onPasswordChange} class="grow" type="password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Passwords should be at least 12 characters long. Write this down!</p>
|
||||
{/snippet}
|
||||
</Field>
|
||||
{/if}
|
||||
<div class="flex flex-col">
|
||||
<Button class="btn {didDownload ? 'btn-neutral' : 'btn-primary'}" onclick={downloadKey}>
|
||||
Download my key
|
||||
<Icon icon={ArrowDown} />
|
||||
</Button>
|
||||
<Button class="btn btn-link no-underline" onclick={toggleUsePassword}>
|
||||
{#if usePassword}
|
||||
Nevermind, I want to download the plain version
|
||||
{:else}
|
||||
I want to download an encrypted version
|
||||
{/if}
|
||||
</Button>
|
||||
</div>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button disabled={!didDownload} class="btn btn-primary" type="submit">
|
||||
{submitText}
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -0,0 +1,112 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import {getPubkey} from "@welshman/util"
|
||||
import type {SessionPomade} from "@welshman/app"
|
||||
import {session} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import KeyDownload from "@app/components/KeyDownload.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {POMADE_SIGNERS} from "@app/core/state"
|
||||
|
||||
type Props = {
|
||||
peersByPrefix: Map<string, string>
|
||||
}
|
||||
|
||||
const {peersByPrefix}: Props = $props()
|
||||
|
||||
const {
|
||||
email,
|
||||
clientOptions: {secret, peers},
|
||||
} = $session as SessionPomade
|
||||
|
||||
const confirmRecovery = async () => {
|
||||
const otps = input
|
||||
.split(/\n/)
|
||||
.map(x => x.trim())
|
||||
.filter(x => x.match(/^[0-9]{8}$/))
|
||||
|
||||
if (otps.length < 2) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to recover, not enough valid recovery codes were provided.",
|
||||
})
|
||||
}
|
||||
|
||||
const request = await Client.recoverWithChallenge(email, peersByPrefix, otps)
|
||||
|
||||
if (!request.ok) {
|
||||
console.log(request.messages)
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: `Failed to recover: ${request.messages[0]?.payload.message.toLowerCase()}`,
|
||||
})
|
||||
}
|
||||
|
||||
const result = await Client.selectRecovery(request.clientSecret, getPubkey(secret), peers)
|
||||
|
||||
if (!result.ok) {
|
||||
console.log(result.messages)
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: `Failed to recover: ${result.messages[0]?.payload.message.toLowerCase()}`,
|
||||
})
|
||||
}
|
||||
|
||||
pushModal(KeyDownload, {secret: result.userSecret, next: clearModals, submitText: "Done"})
|
||||
}
|
||||
|
||||
const submit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
await confirmRecovery()
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
let loading = $state(false)
|
||||
let input = $state("")
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(submit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
Recover your Key
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
Take control over your cryptographic identity
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>Your recovery codes have been sent!</p>
|
||||
<p>
|
||||
For security reasons, you may receive three or more emails with recovery codes in them. Please
|
||||
paste <strong>all</strong> recovery codes into the text box below, on separate lines.
|
||||
</p>
|
||||
<textarea
|
||||
rows={POMADE_SIGNERS.length + 1}
|
||||
class="textarea textarea-bordered leading-4"
|
||||
bind:value={input}></textarea>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
<Spinner {loading}>Confirm recovery</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -0,0 +1,69 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import type {SessionPomade} from "@welshman/app"
|
||||
import {session} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import KeyRecoveryConfirm from "@app/components/KeyRecoveryConfirm.svelte"
|
||||
|
||||
const {
|
||||
email,
|
||||
clientOptions: {peers},
|
||||
} = $session as SessionPomade
|
||||
|
||||
const requestRecovery = async () => {
|
||||
const {peersByPrefix} = await Client.requestChallenge(email, peers)
|
||||
|
||||
pushModal(KeyRecoveryConfirm, {peersByPrefix})
|
||||
}
|
||||
|
||||
const submit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
await requestRecovery()
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(submit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
Recover your Key
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
Take control over your cryptographic identity
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>
|
||||
When you signed up, your Nostr secret key was split into multiple pieces and stored on separate
|
||||
third-party servers to keep it safe.
|
||||
</p>
|
||||
<p>
|
||||
If you're ready to take control of your cryptographic identity, click below. We'll confirm your
|
||||
email by sending you some recovery codes.
|
||||
</p>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
<Spinner {loading}>Request recovery</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -4,24 +4,28 @@
|
||||
import {getNip07, getNip55, Nip55Signer} from "@welshman/signer"
|
||||
import {addSession, type Session, makeNip07Session, makeNip55Session} from "@welshman/app"
|
||||
import Widget from "@assets/icons/widget-2.svg?dataurl"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import Letter from "@assets/icons/letter.svg?dataurl"
|
||||
import Cpu from "@assets/icons/cpu-bolt.svg?dataurl"
|
||||
import Compass from "@assets/icons/compass-big.svg?dataurl"
|
||||
import Key from "@assets/icons/key.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import SignUp from "@app/components/SignUp.svelte"
|
||||
import InfoNostr from "@app/components/InfoNostr.svelte"
|
||||
import LogInBunker from "@app/components/LogInBunker.svelte"
|
||||
import LogInPassword from "@app/components/LogInPassword.svelte"
|
||||
import LogInEmail from "@app/components/LogInEmail.svelte"
|
||||
import LogInKey from "@app/components/LogInKey.svelte"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {PLATFORM_NAME, BURROW_URL} from "@app/core/state"
|
||||
import {PLATFORM_NAME, POMADE_SIGNERS} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
|
||||
let signers: any[] = $state([])
|
||||
let loading: string | undefined = $state()
|
||||
|
||||
const hasPomade = POMADE_SIGNERS.length >= 3
|
||||
|
||||
const disabled = $derived(loading ? true : undefined)
|
||||
|
||||
const signUp = () => pushModal(SignUp)
|
||||
@@ -72,10 +76,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
const loginWithPassword = () => pushModal(LogInPassword)
|
||||
const loginWithEmail = () => pushModal(LogInEmail)
|
||||
|
||||
const loginWithBunker = () => pushModal(LogInBunker)
|
||||
|
||||
const loginWithKey = () => pushModal(LogInKey)
|
||||
|
||||
const hasSigner = $derived(getNip07() || signers.length > 0)
|
||||
|
||||
onMount(async () => {
|
||||
@@ -112,39 +118,37 @@
|
||||
Log in with {app.name}
|
||||
</Button>
|
||||
{/each}
|
||||
{#if BURROW_URL && !hasSigner}
|
||||
<Button {disabled} onclick={loginWithPassword} class="btn btn-primary">
|
||||
{#if loading === "password"}
|
||||
<span class="loading loading-spinner mr-3"></span>
|
||||
{:else}
|
||||
<Icon icon={Key} />
|
||||
{/if}
|
||||
Log in with Password
|
||||
{#if hasPomade && !hasSigner}
|
||||
<Button {disabled} onclick={loginWithEmail} class="btn btn-primary">
|
||||
<Icon icon={Letter} />
|
||||
Log in with Email
|
||||
</Button>
|
||||
{/if}
|
||||
<Button
|
||||
onclick={loginWithBunker}
|
||||
{disabled}
|
||||
class="btn {hasSigner || BURROW_URL ? 'btn-neutral' : 'btn-primary'}">
|
||||
class="btn {hasSigner || hasPomade ? 'btn-neutral' : 'btn-primary'}">
|
||||
<Icon icon={Cpu} />
|
||||
Log in with Remote Signer
|
||||
</Button>
|
||||
{#if BURROW_URL && hasSigner}
|
||||
<Button {disabled} onclick={loginWithPassword} class="btn">
|
||||
{#if loading === "password"}
|
||||
<span class="loading loading-spinner mr-3"></span>
|
||||
{:else}
|
||||
<Icon icon={Key} />
|
||||
{/if}
|
||||
Log in with Password
|
||||
{#if hasPomade && hasSigner}
|
||||
<Button {disabled} onclick={loginWithEmail} class="btn">
|
||||
<Icon icon={Letter} />
|
||||
Log in with Email
|
||||
</Button>
|
||||
{/if}
|
||||
{#if !hasSigner || !BURROW_URL}
|
||||
{#if !hasSigner}
|
||||
<Button {disabled} onclick={loginWithKey} class="btn btn-neutral">
|
||||
<Icon icon={Key} />
|
||||
Log in with Key
|
||||
</Button>
|
||||
{/if}
|
||||
{#if !hasSigner || !hasPomade}
|
||||
<Link
|
||||
external
|
||||
{disabled}
|
||||
href="https://nostrapps.com#signers"
|
||||
class="btn {hasSigner || BURROW_URL ? '' : 'btn-neutral'}">
|
||||
class="btn {hasSigner || hasPomade ? '' : 'btn-neutral'}">
|
||||
<Icon icon={Compass} />
|
||||
Browse Signer Apps
|
||||
</Link>
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import {loginWithPomade} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Letter from "@assets/icons/letter.svg?dataurl"
|
||||
import Key from "@assets/icons/key.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import LogInOTP from "@app/components/LogInOTP.svelte"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
|
||||
interface Props {
|
||||
email?: string
|
||||
}
|
||||
|
||||
let {email = $bindable("")}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const loginWithOTP = () => pushModal(LogInOTP, {email})
|
||||
|
||||
const onSubmit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const {ok, options, messages, clientSecret} = await Client.loginWithPassword(email, password)
|
||||
|
||||
if (!ok) {
|
||||
console.error(messages)
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
})
|
||||
}
|
||||
|
||||
const [client, peers] = options[0]!
|
||||
const {clientOptions, ...res} = await Client.selectLogin(clientSecret, client, peers)
|
||||
|
||||
if (res.ok && clientOptions) {
|
||||
loginWithPomade(clientOptions.group.group_pk.slice(2), email, clientOptions)
|
||||
pushToast({message: "Successfully logged in!"})
|
||||
setChecked("*")
|
||||
clearModals()
|
||||
} else {
|
||||
console.error(res.messages)
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
let loading = $state(false)
|
||||
let password = $state("")
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Log In</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Log in using your email and password</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Email*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Password*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={password} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<p class="text-sm">
|
||||
Forgot your password? <Button class="link" onclick={loginWithOTP}
|
||||
>Log in with a one-time access code</Button
|
||||
>.
|
||||
</p>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading || !email || !password}>
|
||||
<Spinner {loading}>Log in</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -0,0 +1,128 @@
|
||||
<script lang="ts">
|
||||
import {bytesToHex} from "@welshman/lib"
|
||||
import {loginWithNip01} from "@welshman/app"
|
||||
import {decrypt} from "nostr-tools/nip49"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import {nsecDecode} from "@lib/util"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Key from "@assets/icons/key.svg?dataurl"
|
||||
import Danger from "@assets/icons/danger-triangle.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
|
||||
let loading = $state(false)
|
||||
let keyInput = $state("")
|
||||
let password = $state("")
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const isHex = $derived(keyInput.match(/^[0-9a-f]{64}$/i))
|
||||
|
||||
const isNsec = $derived(keyInput.startsWith("nsec1"))
|
||||
|
||||
const isNcryptsec = $derived(keyInput.startsWith("ncryptsec1"))
|
||||
|
||||
const canSubmit = $derived(!loading && (isHex || isNsec || isNcryptsec))
|
||||
|
||||
const onSubmit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
let secret: string
|
||||
|
||||
if (isNcryptsec) {
|
||||
secret = bytesToHex(decrypt(keyInput, password))
|
||||
} else if (isNsec) {
|
||||
secret = nsecDecode(keyInput)
|
||||
} else if (isHex) {
|
||||
secret = keyInput.toLowerCase()
|
||||
} else {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Invalid key format. Please enter a hex key, nsec, or ncryptsec.",
|
||||
})
|
||||
}
|
||||
|
||||
loginWithNip01(secret)
|
||||
pushToast({message: "Successfully logged in!"})
|
||||
setChecked("*")
|
||||
clearModals()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: isNcryptsec
|
||||
? "Failed to decrypt key. Please check your password."
|
||||
: "Invalid key format. Please check your input.",
|
||||
})
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Log In with Key</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Enter your nostr private key to log in.</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Your Key*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={keyInput} placeholder="nsec1..." />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
{#if isNcryptsec}
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Password*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={password} placeholder="Your password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
{/if}
|
||||
<div class="card2 card2-sm bg-alt flex flex-col gap-2 text-sm">
|
||||
<strong class="flex items-center gap-2">
|
||||
<Icon icon={Danger} />
|
||||
Please note!
|
||||
</strong>
|
||||
<p>
|
||||
Logging in this way is not a best practice. For better security, please consider using a
|
||||
<Link external href="https://nostrapps.com#signers" class="link">signer app</Link>
|
||||
to keep your keys safe.
|
||||
</p>
|
||||
</div>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={!canSubmit}>
|
||||
<Spinner {loading}>Log in</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
+28
-28
@@ -1,24 +1,24 @@
|
||||
<script lang="ts">
|
||||
import {postJson, sleep} from "@welshman/lib"
|
||||
import {Client} from "@pomade/core"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import UserRounded from "@assets/icons/user-rounded.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Letter from "@assets/icons/letter.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import LogInPassword from "@app/components/LogInPassword.svelte"
|
||||
import LogInOTPConfirm from "@app/components/LogInOTPConfirm.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {BURROW_URL} from "@app/core/state"
|
||||
|
||||
interface Props {
|
||||
email: string
|
||||
email?: string
|
||||
}
|
||||
|
||||
let {email = $bindable()}: Props = $props()
|
||||
let {email = $bindable("")}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
@@ -26,16 +26,15 @@
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const [res] = await Promise.all([
|
||||
postJson(BURROW_URL + "/user/request-reset", {email}),
|
||||
sleep(1000),
|
||||
])
|
||||
const {ok, peersByPrefix} = await Client.requestChallenge(email)
|
||||
|
||||
if (res.error) {
|
||||
pushToast({message: res.error, theme: "error"})
|
||||
if (ok) {
|
||||
pushModal(LogInOTPConfirm, {email, peersByPrefix})
|
||||
} else {
|
||||
pushToast({message: `Password reset email has been sent!`})
|
||||
pushModal(LogInPassword, {email}, {path: "/"})
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to request a login code.",
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
@@ -48,30 +47,31 @@
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Reset your password</div>
|
||||
<div>Log In</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Log in using a one-time login code</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline disabled={loading}>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Email Address</p>
|
||||
<p>Email*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={UserRounded} />
|
||||
<input bind:value={email} class="grow" />
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>You'll be sent an email with a password reset link.</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
<Spinner {loading}>Request password reset link</Spinner>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading || !email}>
|
||||
<Spinner {loading}>Log in</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -0,0 +1,110 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import {loginWithPomade} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {POMADE_SIGNERS} from "@app/core/state"
|
||||
|
||||
type Props = {
|
||||
email: string
|
||||
peersByPrefix: Map<string, string>
|
||||
}
|
||||
|
||||
const {email, peersByPrefix}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = async () => {
|
||||
const otps = input
|
||||
.split(/\n/)
|
||||
.map(x => x.trim())
|
||||
.filter(x => x.match(/^[0-9]{8}$/))
|
||||
|
||||
if (otps.length < 2) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to recover, not enough valid recovery codes were provided.",
|
||||
})
|
||||
}
|
||||
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const {ok, options, messages, clientSecret} = await Client.loginWithChallenge(
|
||||
email,
|
||||
peersByPrefix,
|
||||
otps,
|
||||
)
|
||||
|
||||
if (!ok) {
|
||||
console.error(messages)
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
})
|
||||
}
|
||||
|
||||
const [client, peers] = options[0]!
|
||||
const {clientOptions, ...res} = await Client.selectLogin(clientSecret, client, peers)
|
||||
|
||||
if (res.ok && clientOptions) {
|
||||
loginWithPomade(clientOptions.group.group_pk.slice(2), email, clientOptions)
|
||||
pushToast({message: "Successfully logged in!"})
|
||||
setChecked("*")
|
||||
clearModals()
|
||||
} else {
|
||||
console.error(res.messages)
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Sorry, we were unable to log you in.",
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
let input = $state("")
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Log In</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Enter the login codes sent to your email</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>Your login codes have been sent!</p>
|
||||
<p>
|
||||
For security reasons, you may receive three or more emails with login codes in them. Please
|
||||
paste <strong>all</strong> login codes into the text box below, on separate lines.
|
||||
</p>
|
||||
<textarea
|
||||
rows={POMADE_SIGNERS.length + 1}
|
||||
class="textarea textarea-bordered leading-4"
|
||||
bind:value={input}></textarea>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
<Spinner {loading}>Log In</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -1,156 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {onMount, onDestroy} from "svelte"
|
||||
import {postJson, stripProtocol} from "@welshman/lib"
|
||||
import {Nip46Broker} from "@welshman/signer"
|
||||
import {normalizeRelayUrl, makeSecret} from "@welshman/util"
|
||||
import {addSession, makeNip46Session} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import UserRounded from "@assets/icons/user-rounded.svg?dataurl"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import PasswordResetRequest from "@app/components/PasswordResetRequest.svelte"
|
||||
import {clearModals, pushModal} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {
|
||||
NIP46_PERMS,
|
||||
BURROW_URL,
|
||||
PLATFORM_URL,
|
||||
PLATFORM_NAME,
|
||||
PLATFORM_LOGO,
|
||||
} from "@app/core/state"
|
||||
|
||||
interface Props {
|
||||
email?: string
|
||||
}
|
||||
|
||||
let {email = $bindable("")}: Props = $props()
|
||||
|
||||
const clientSecret = makeSecret()
|
||||
|
||||
const startReset = () => pushModal(PasswordResetRequest, {email})
|
||||
|
||||
const abortController = new AbortController()
|
||||
|
||||
const relays = BURROW_URL.startsWith("http://")
|
||||
? [normalizeRelayUrl("ws://" + stripProtocol(BURROW_URL))]
|
||||
: [normalizeRelayUrl(BURROW_URL)]
|
||||
|
||||
const broker = new Nip46Broker({clientSecret, relays})
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const res = await postJson(BURROW_URL + "/session", {email, password, nostrconnect: url})
|
||||
|
||||
if (res.error) {
|
||||
pushToast({message: res.error, theme: "error"})
|
||||
loading = false
|
||||
}
|
||||
} catch (e) {
|
||||
pushToast({message: "Something went wrong, please try again!", theme: "error"})
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
let url = ""
|
||||
let password = $state("")
|
||||
let loading = $state(false)
|
||||
|
||||
onMount(async () => {
|
||||
url = await broker.makeNostrconnectUrl({
|
||||
perms: NIP46_PERMS,
|
||||
url: PLATFORM_URL,
|
||||
name: PLATFORM_NAME,
|
||||
image: PLATFORM_LOGO,
|
||||
})
|
||||
|
||||
let response
|
||||
try {
|
||||
response = await broker.waitForNostrconnect(url, abortController.signal)
|
||||
} catch (errorResponse: any) {
|
||||
if (errorResponse?.error) {
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: `Received error from signer: ${errorResponse.error}`,
|
||||
})
|
||||
} else if (errorResponse) {
|
||||
console.error(errorResponse)
|
||||
}
|
||||
}
|
||||
|
||||
if (response) {
|
||||
loading = true
|
||||
|
||||
const pubkey = await broker.getPublicKey()
|
||||
const session = makeNip46Session(pubkey, clientSecret, response.event.pubkey, relays)
|
||||
|
||||
addSession({...session, email})
|
||||
broker.cleanup()
|
||||
setChecked("*")
|
||||
clearModals()
|
||||
}
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
abortController.abort()
|
||||
})
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Log In</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Log in using your email and password</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Email</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={UserRounded} />
|
||||
<input bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Password</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={password} type="password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<p class="text-sm">
|
||||
Your email and password only work to log in to {PLATFORM_NAME}. To use your key on other nostr
|
||||
applications, visit your settings page. <Button class="link" onclick={startReset}
|
||||
>Forgot your password?</Button>
|
||||
</p>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading || !email || !password}>
|
||||
<Spinner {loading}>Next</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -17,6 +17,7 @@
|
||||
await logout()
|
||||
window.location.href = "/"
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
if ($notifications.size > notificationCount) {
|
||||
playSound()
|
||||
}
|
||||
|
||||
notificationCount = $notifications.size
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
audioElement.load()
|
||||
|
||||
notifications.subscribe(notifications => {
|
||||
if (notifications.size > notificationCount) {
|
||||
playSound()
|
||||
}
|
||||
|
||||
notificationCount = notifications.size
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {postJson, sleep} from "@welshman/lib"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import UserRounded from "@assets/icons/user-rounded.svg?dataurl"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import LogInPassword from "@app/components/LogInPassword.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {BURROW_URL} from "@app/core/state"
|
||||
|
||||
const {email, reset_token} = $props()
|
||||
|
||||
const onSubmit = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const [res] = await Promise.all([
|
||||
postJson(BURROW_URL + "/user/confirm-reset", {email, password, reset_token}),
|
||||
sleep(1000),
|
||||
])
|
||||
|
||||
if (res.error) {
|
||||
pushToast({message: res.error, theme: "error"})
|
||||
} else {
|
||||
pushToast({message: "Password reset successfully!"})
|
||||
pushModal(LogInPassword, {email}, {path: "/"})
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
let loading = $state(false)
|
||||
let password = $state("")
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Reset your password</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline disabled={loading}>
|
||||
{#snippet label()}
|
||||
<p>Email Address</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={UserRounded} />
|
||||
<input readonly value={email} class="grow" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline disabled={loading}>
|
||||
{#snippet label()}
|
||||
<p>New Password</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={password} class="grow" type="password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
<Spinner {loading}>Reset password</Spinner>
|
||||
</Button>
|
||||
</form>
|
||||
@@ -0,0 +1,130 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import type {SessionItem} from "@pomade/core"
|
||||
import {session, isPomadeSession} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import TrashBin2 from "@assets/icons/trash-bin-2.svg?dataurl"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {onMount} from "svelte"
|
||||
|
||||
type SessionWithPeers = SessionItem & {peers: string[]}
|
||||
|
||||
let sessions = $state<SessionWithPeers[]>([])
|
||||
let deletingSession = $state<string | null>(null)
|
||||
|
||||
const loadSessions = async () => {
|
||||
if (!isPomadeSession($session)) return
|
||||
|
||||
const client = new Client($session.clientOptions)
|
||||
|
||||
try {
|
||||
const result = await client.listSessions()
|
||||
const pubkey = await client.getPubkey()
|
||||
|
||||
if (result.ok) {
|
||||
// Group sessions by client pubkey and collect peers
|
||||
const sessionMap = new Map<string, SessionWithPeers>()
|
||||
|
||||
for (const message of result.messages) {
|
||||
if (!message?.payload.items) continue
|
||||
|
||||
const peer = message.event.pubkey
|
||||
|
||||
for (const item of message.payload.items) {
|
||||
const existing = sessionMap.get(item.client)
|
||||
|
||||
if (existing) {
|
||||
existing.peers.push(peer)
|
||||
} else if (item.client !== pubkey) {
|
||||
sessionMap.set(item.client, {...item, peers: [peer]})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sessions = Array.from(sessionMap.values())
|
||||
}
|
||||
} finally {
|
||||
client.stop()
|
||||
}
|
||||
}
|
||||
|
||||
const deleteSession = async (sessionItem: SessionWithPeers) => {
|
||||
if (!isPomadeSession($session)) return
|
||||
|
||||
deletingSession = sessionItem.client
|
||||
|
||||
try {
|
||||
const client = new Client($session.clientOptions)
|
||||
const result = await client.deleteSession(sessionItem.client, sessionItem.peers)
|
||||
|
||||
if (result.ok) {
|
||||
pushToast({
|
||||
message: "Session deleted successfully",
|
||||
})
|
||||
|
||||
// Remove from local list
|
||||
sessions = sessions.filter(s => s.client !== sessionItem.client)
|
||||
} else {
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to delete session",
|
||||
})
|
||||
}
|
||||
|
||||
client.stop()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to delete session",
|
||||
})
|
||||
} finally {
|
||||
deletingSession = null
|
||||
}
|
||||
}
|
||||
|
||||
const formatDate = (timestamp: number) => {
|
||||
const date = new Date(timestamp * 1000)
|
||||
return date.toLocaleDateString(undefined, {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
})
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
loadSessions()
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if sessions.length > 0}
|
||||
<div class="flex flex-col gap-4 border-t border-solid border-base-100 pt-4">
|
||||
<strong>Other Sessions</strong>
|
||||
{#each sessions as sessionItem (sessionItem.client)}
|
||||
<div class="flex justify-between text-sm">
|
||||
<div class="flex flex-col gap-1">
|
||||
<span>{sessionItem.client.slice(0, 8)}</span>
|
||||
<div class="flex gap-1">
|
||||
<div class="badge badge-neutral">
|
||||
Created {formatDate(sessionItem.created_at)}
|
||||
</div>
|
||||
<div class="badge badge-neutral">
|
||||
Last active: {formatDate(sessionItem.last_activity)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
class="btn btn-error btn-sm"
|
||||
disabled={deletingSession !== null}
|
||||
onclick={() => deleteSession(sessionItem)}>
|
||||
{#if deletingSession === sessionItem.client}
|
||||
<span class="loading loading-spinner"></span>
|
||||
{:else}
|
||||
<Icon icon={TrashBin2} />
|
||||
{/if}
|
||||
</Button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -62,7 +62,7 @@
|
||||
<PrimaryNavItemSpace {url} />
|
||||
{:else}
|
||||
<PrimaryNavItem title="Home" href="/home" class="tooltip-right">
|
||||
<ImageIcon alt="Home" src={PLATFORM_LOGO} class="rounded-full" />
|
||||
<ImageIcon alt="Home" src={PLATFORM_LOGO} class="rounded-full" size={10} />
|
||||
</PrimaryNavItem>
|
||||
<Divider />
|
||||
{#each primarySpaceUrls as url (url)}
|
||||
@@ -74,11 +74,11 @@
|
||||
class="tooltip-right"
|
||||
onclick={showOtherSpacesMenu}
|
||||
notification={otherSpaceNotifications}>
|
||||
<ImageIcon alt="Other Spaces" src={Widget} />
|
||||
<ImageIcon alt="Other Spaces" src={Widget} size={8} />
|
||||
</PrimaryNavItem>
|
||||
{/if}
|
||||
<PrimaryNavItem title="Add a Space" href="/discover" class="tooltip-right">
|
||||
<ImageIcon alt="Add a Space" src={Compass} size={7} />
|
||||
<ImageIcon alt="Add a Space" src={Compass} size={8} />
|
||||
</PrimaryNavItem>
|
||||
{/each}
|
||||
</div>
|
||||
@@ -91,17 +91,21 @@
|
||||
href="/settings/profile"
|
||||
prefix="/settings"
|
||||
class="tooltip-right">
|
||||
<ImageIcon alt="Settings" src={$userProfile?.picture || UserRounded} class="rounded-full" />
|
||||
{#if $userProfile?.picture}
|
||||
<ImageIcon alt="Settings" src={$userProfile?.picture} class="rounded-full" size={10} />
|
||||
{:else}
|
||||
<ImageIcon alt="Settings" src={UserRounded} class="rounded-full" size={8} />
|
||||
{/if}
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem
|
||||
title="Messages"
|
||||
onclick={openChat}
|
||||
class="tooltip-right"
|
||||
notification={$notifications.has("/chat")}>
|
||||
<ImageIcon alt="Messages" src={Letter} size={7} />
|
||||
<ImageIcon alt="Messages" src={Letter} size={8} />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem title="Search" href="/people" class="tooltip-right">
|
||||
<ImageIcon alt="Search" src={Magnifier} size={7} />
|
||||
<ImageIcon alt="Search" src={Magnifier} size={8} />
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
</div>
|
||||
@@ -110,33 +114,34 @@
|
||||
{@render children?.()}
|
||||
|
||||
<!-- a little extra something for ios -->
|
||||
<div class="bottom-nav fixed bottom-0 left-0 right-0 z-nav h-[var(--saib)] bg-base-100 md:hidden">
|
||||
<div
|
||||
class="bottom-nav hide-on-keyboard fixed bottom-0 left-0 right-0 z-nav h-[var(--saib)] bg-base-100 md:hidden">
|
||||
</div>
|
||||
<div
|
||||
class="bottom-nav border-top bottom-sai fixed left-0 right-0 z-nav h-14 border border-base-200 bg-base-100 md:hidden">
|
||||
class="bottom-nav hide-on-keyboard border-top bottom-sai fixed left-0 right-0 z-nav h-14 border border-base-200 bg-base-100 md:hidden">
|
||||
<div class="content-padding-x content-sizing flex justify-between px-2">
|
||||
<div class="flex gap-2 sm:gap-6">
|
||||
<PrimaryNavItem title="Home" href="/home">
|
||||
<ImageIcon alt="Home" src={HomeSmile} size={7} />
|
||||
<ImageIcon alt="Home" src={HomeSmile} size={8} />
|
||||
</PrimaryNavItem>
|
||||
<PrimaryNavItem
|
||||
title="Messages"
|
||||
onclick={openChat}
|
||||
notification={$notifications.has("/chat")}>
|
||||
<ImageIcon alt="Messages" src={Letter} size={7} />
|
||||
<ImageIcon alt="Messages" src={Letter} size={8} />
|
||||
</PrimaryNavItem>
|
||||
{#if PLATFORM_RELAYS.length !== 1}
|
||||
<PrimaryNavItem title="Spaces" href="/spaces" notification={anySpaceNotifications}>
|
||||
<ImageIcon alt="Spaces" src={SettingsMinimalistic} size={7} />
|
||||
<ImageIcon alt="Spaces" src={SettingsMinimalistic} size={8} />
|
||||
</PrimaryNavItem>
|
||||
{/if}
|
||||
</div>
|
||||
<PrimaryNavItem title="Settings" onclick={showSettingsMenu}>
|
||||
<ImageIcon
|
||||
alt="Settings"
|
||||
src={$userProfile?.picture || Settings}
|
||||
size={7}
|
||||
class="rounded-full" />
|
||||
{#if $userProfile?.picture}
|
||||
<ImageIcon alt="Settings" src={$userProfile?.picture} size={10} class="rounded-full" />
|
||||
{:else}
|
||||
<ImageIcon alt="Settings" src={Settings} size={8} class="rounded-full" />
|
||||
{/if}
|
||||
</PrimaryNavItem>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
title={displayRelayUrl(url)}
|
||||
class="tooltip-right"
|
||||
notification={$notifications.has(makeSpacePath(url))}>
|
||||
<RelayIcon {url} size={7} class="rounded-full" />
|
||||
<RelayIcon {url} size={10} class="rounded-full" />
|
||||
</PrimaryNavItem>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import {getProfile} from "@welshman/app"
|
||||
import {getProfile, loadProfile} from "@welshman/app"
|
||||
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
||||
|
||||
type Props = {
|
||||
@@ -8,14 +8,22 @@
|
||||
}
|
||||
|
||||
const {pubkeys, size = 7}: Props = $props()
|
||||
|
||||
for (const pubkey of pubkeys) {
|
||||
loadProfile(pubkey)
|
||||
}
|
||||
|
||||
const visiblePubkeys = $derived.by(() => {
|
||||
const filtered = pubkeys.filter(pubkey => getProfile(pubkey)?.picture)
|
||||
|
||||
return filtered.length > 0 ? filtered : pubkeys.slice(0, 1)
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="flex pr-3">
|
||||
{#each pubkeys
|
||||
.filter(p => getProfile(p)?.picture)
|
||||
.toSorted()
|
||||
.slice(0, 15) as pubkey (pubkey)}
|
||||
<div class="z-feature -mr-3 inline-block">
|
||||
{#each visiblePubkeys.toSorted().slice(0, 15) as pubkey (pubkey)}
|
||||
<div
|
||||
class="z-feature -mr-3 inline-block flex h-8 w-8 items-center justify-center rounded-full bg-base-100">
|
||||
<ProfileCircle class="h-8 w-8 bg-base-300" {pubkey} {size} />
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
import {updateProfile} from "../core/commands"
|
||||
import {updateProfile} from "@app/core/commands"
|
||||
|
||||
const profile = $profilesByPubkey.get($pubkey!) || makeProfile()
|
||||
const shouldBroadcast = !getTag(PROTECTED, profile.event?.tags || [])
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {postJson} from "@welshman/lib"
|
||||
import {session} from "@welshman/app"
|
||||
import {slideAndFade} from "@lib/transition"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import CheckCircle from "@assets/icons/check-circle.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {PLATFORM_NAME, BURROW_URL} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {logout} from "@app/core/commands"
|
||||
|
||||
const email = $session?.email
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const confirm = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
const payload = {email, password, eject: true}
|
||||
const res = await postJson(BURROW_URL + "/user", payload, {method: "delete"})
|
||||
|
||||
if (res.error) {
|
||||
return pushToast({message: res.error, theme: "error"})
|
||||
}
|
||||
|
||||
success = true
|
||||
pushToast({message: "Success! Please check your messages and continue when you're ready."})
|
||||
|
||||
await logout()
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
const reload = () => {
|
||||
loading = true
|
||||
window.location.href = "/"
|
||||
}
|
||||
|
||||
let password = $state("")
|
||||
let success = $state(false)
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<div class="column gap-4">
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Export your keys</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>Here's what the process looks like:</p>
|
||||
<ul class="flex list-inside list-decimal flex-col gap-4">
|
||||
<li>When you're ready, enter your account password below to continue.</li>
|
||||
<li>
|
||||
{PLATFORM_NAME} will send an email to "{email}" with your encrypted private key in it.
|
||||
</li>
|
||||
<li>
|
||||
Store your "ncryptsec" in a password manager like
|
||||
<Link class="link" external href="https://bitwarden.com/">Bitwarden</Link>. This is the key to
|
||||
your social identity; keep it safe and secret.
|
||||
</li>
|
||||
<li>
|
||||
Choose a <Link class="link" href="https://nostrapps.com/#signers">signer app</Link> and import
|
||||
your private key into it. Don't forget your account password; you'll need it to decrypt your key.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Once you export your key, you'll be <strong>logged out</strong> and won't be able to log in using
|
||||
your email and password any more. Going forward, you'll need to use your signer app instead.
|
||||
</p>
|
||||
{#if !success}
|
||||
<div out:slideAndFade>
|
||||
<Field>
|
||||
{#snippet label()}
|
||||
<p>To confirm, please enter your password below:</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" disabled={loading} bind:value={password} class="grow" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</Field>
|
||||
</div>
|
||||
{/if}
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" disabled={loading || success} onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
{#if success}
|
||||
<Button class="btn btn-primary" disabled={loading} onclick={reload}>
|
||||
<Icon icon={CheckCircle} />
|
||||
<Spinner {loading}>Refresh the page</Spinner>
|
||||
</Button>
|
||||
{:else}
|
||||
<Button class="btn btn-error" disabled={loading} onclick={confirm}>
|
||||
<Icon icon={CheckCircle} />
|
||||
<Spinner {loading}>I understand, send me my private key</Spinner>
|
||||
</Button>
|
||||
{/if}
|
||||
</ModalFooter>
|
||||
</div>
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import * as nip19 from "nostr-tools/nip19"
|
||||
import {writable} from "svelte/store"
|
||||
import type {Writable} from "svelte/store"
|
||||
import {type Instance} from "tippy.js"
|
||||
@@ -35,6 +36,26 @@
|
||||
value = remove(pubkey, value)
|
||||
}
|
||||
|
||||
const onInput = (e: any) => {
|
||||
if (e.target.value.match(/^[a-f0-9]{64}$/)) {
|
||||
selectPubkey(e.target.value)
|
||||
}
|
||||
|
||||
try {
|
||||
const {type, data} = nip19.decode(e.target.value) as any
|
||||
|
||||
if (type === "npub") {
|
||||
selectPubkey(data)
|
||||
}
|
||||
|
||||
if (type === "nprofile") {
|
||||
selectPubkey(data.pubkey)
|
||||
}
|
||||
} catch (e) {
|
||||
// pass
|
||||
}
|
||||
}
|
||||
|
||||
const onKeyDown = (e: Event) => {
|
||||
if (instance.onKeyDown(e)) {
|
||||
e.preventDefault()
|
||||
@@ -80,6 +101,7 @@
|
||||
type="text"
|
||||
placeholder="Search for profiles..."
|
||||
bind:value={$term}
|
||||
oninput={onInput}
|
||||
onkeydown={onKeyDown} />
|
||||
</label>
|
||||
<Tippy
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
const canvasRect = canvas.getBoundingClientRect()
|
||||
|
||||
scale = wrapperRect.width / (canvasRect.width * 10)
|
||||
height = canvasRect.width * 10 * scale
|
||||
height = canvasRect.height * 10 * scale
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -14,4 +14,8 @@
|
||||
const relay = deriveRelay(url)
|
||||
</script>
|
||||
|
||||
<ImageIcon {size} alt="" src={$relay?.icon || RemoteControllerMinimalistic} class={props.class} />
|
||||
{#if $relay?.icon}
|
||||
<ImageIcon {size} alt="" src={$relay?.icon} class={props.class} />
|
||||
{:else}
|
||||
<ImageIcon size={size - 2} alt="" src={RemoteControllerMinimalistic} class={props.class} />
|
||||
{/if}
|
||||
|
||||
@@ -112,27 +112,25 @@
|
||||
<p>Icon</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-4">
|
||||
{#if imagePreview}
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-sm opacity-75">Selected:</span>
|
||||
<ImageIcon src={imagePreview} alt="" class="rounded-lg" />
|
||||
</div>
|
||||
{:else}
|
||||
<span class="text-sm opacity-75">No icon selected</span>
|
||||
{/if}
|
||||
<div class="flex gap-2">
|
||||
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-sm">
|
||||
<Icon icon={StickerSmileSquare} size={4} />
|
||||
Select
|
||||
</IconPickerButton>
|
||||
<label class="btn btn-neutral btn-sm cursor-pointer">
|
||||
<Icon icon={UploadMinimalistic} size={4} />
|
||||
Upload
|
||||
<input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} />
|
||||
</label>
|
||||
<div class="flex flex-grow items-center justify-between gap-4">
|
||||
{#if imagePreview}
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-sm opacity-75">Selected:</span>
|
||||
<ImageIcon src={imagePreview} alt="" class="rounded-lg" />
|
||||
</div>
|
||||
{:else}
|
||||
<span class="text-sm opacity-75">No icon selected</span>
|
||||
{/if}
|
||||
<div class="flex gap-2">
|
||||
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-xs">
|
||||
<Icon icon={StickerSmileSquare} size={4} />
|
||||
<span class="hidden sm:inline">Select</span>
|
||||
</IconPickerButton>
|
||||
<label class="btn btn-neutral btn-xs cursor-pointer">
|
||||
<Icon icon={UploadMinimalistic} size={4} />
|
||||
<span class="hidden sm:inline">Upload</span>
|
||||
<input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/snippet}
|
||||
@@ -162,41 +160,22 @@
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<strong>Restricted</strong>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isRestricted} />
|
||||
<span class="text-sm opacity-75">Only allow members to send messages</span>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<strong>Private</strong>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isPrivate} />
|
||||
<span class="text-sm opacity-75">Only allow members to read messages</span>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<strong>Hidden</strong>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isHidden} />
|
||||
<span class="text-sm opacity-75">Hide this group from non-members</span>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<strong>Closed</strong>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isClosed} />
|
||||
<span class="text-sm opacity-75">Ignore requests to join</span>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<strong class="md:hidden">Permissions</strong>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isRestricted} />
|
||||
<span class="text-sm opacity-75">Only allow members to send messages</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isPrivate} />
|
||||
<span class="text-sm opacity-75">Only allow members to read messages</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isHidden} />
|
||||
<span class="text-sm opacity-75">Hide this group from non-members</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<input type="checkbox" class="checkbox" bind:checked={values.isClosed} />
|
||||
<span class="text-sm opacity-75">Ignore requests to join</span>
|
||||
</div>
|
||||
{@render footer({loading})}
|
||||
</form>
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
{#if event.pubkey === $pubkey}
|
||||
<Button class="btn btn-neutral text-error" onclick={showDelete}>
|
||||
<Icon size={4} icon={TrashBin2} />
|
||||
Delete
|
||||
Delete Message
|
||||
</Button>
|
||||
{/if}
|
||||
<Button class="btn btn-neutral" onclick={showInfo}>
|
||||
<Icon size={4} icon={Code2} />
|
||||
Show JSON
|
||||
Message Info
|
||||
</Button>
|
||||
{#if path}
|
||||
<Link class="btn btn-neutral" href={path}>
|
||||
@@ -71,18 +71,18 @@
|
||||
View Details
|
||||
</Link>
|
||||
{/if}
|
||||
<Button class="btn btn-neutral w-full" onclick={sendReply}>
|
||||
<Icon size={4} icon={Reply} />
|
||||
Reply
|
||||
</Button>
|
||||
<Button class="btn btn-neutral w-full" onclick={showEmojiPicker}>
|
||||
<Icon size={4} icon={SmileCircle} />
|
||||
React
|
||||
</Button>
|
||||
{#if ENABLE_ZAPS}
|
||||
<ZapButton replaceState {url} {event} class="btn btn-neutral w-full">
|
||||
<Icon size={4} icon={Bolt} />
|
||||
Zap
|
||||
Send Zap
|
||||
</ZapButton>
|
||||
{/if}
|
||||
<Button class="btn btn-neutral w-full" onclick={sendReply}>
|
||||
<Icon size={4} icon={Reply} />
|
||||
Send Reply
|
||||
</Button>
|
||||
<Button class="btn btn-neutral w-full" onclick={showEmojiPicker}>
|
||||
<Icon size={4} icon={SmileCircle} />
|
||||
Send Reaction
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -1,95 +1,111 @@
|
||||
<script lang="ts">
|
||||
import {postJson} from "@welshman/lib"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import UserRounded from "@assets/icons/user-rounded.svg?dataurl"
|
||||
import type {ClientOptions} from "@pomade/core"
|
||||
import type {Profile} from "@welshman/util"
|
||||
import {
|
||||
makeProfile,
|
||||
makeSecret,
|
||||
getPubkey,
|
||||
RELAYS,
|
||||
MESSAGING_RELAYS,
|
||||
makeEvent,
|
||||
} from "@welshman/util"
|
||||
import {loginWithNip01, loginWithPomade, publishThunk} from "@welshman/app"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Letter from "@assets/icons/letter.svg?dataurl"
|
||||
import {getKey, setKey} from "@lib/implicit"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Divider from "@lib/components/Divider.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import LogIn from "@app/components/LogIn.svelte"
|
||||
import InfoNostr from "@app/components/InfoNostr.svelte"
|
||||
import SignUpKey from "@app/components/SignUpKey.svelte"
|
||||
import SignUpEmail from "@app/components/SignUpEmail.svelte"
|
||||
import SignUpProfile from "@app/components/SignUpProfile.svelte"
|
||||
import SignUpSuccess from "@app/components/SignUpSuccess.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {BURROW_URL, PLATFORM_NAME} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import SignUpComplete from "@app/components/SignUpComplete.svelte"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {pushModal, clearModals} from "@app/util/modal"
|
||||
import {initProfile} from "@app/core/commands"
|
||||
import {
|
||||
POMADE_SIGNERS,
|
||||
PLATFORM_NAME,
|
||||
INDEXER_RELAYS,
|
||||
DEFAULT_RELAYS,
|
||||
DEFAULT_MESSAGING_RELAYS,
|
||||
} from "@app/core/state"
|
||||
|
||||
setKey("signup.email", "")
|
||||
setKey("signup.secret", makeSecret())
|
||||
setKey("signup.profile", makeProfile())
|
||||
setKey("signup.clientOptions", undefined)
|
||||
|
||||
const hasPomade = POMADE_SIGNERS.length >= 3
|
||||
|
||||
const login = () => pushModal(LogIn)
|
||||
|
||||
const signupPassword = async () => {
|
||||
loading = true
|
||||
const completeSignup = () => {
|
||||
// Add default outbox/inbox relays
|
||||
publishThunk({
|
||||
event: makeEvent(RELAYS, {tags: DEFAULT_RELAYS.map(url => ["r", url])}),
|
||||
relays: [...INDEXER_RELAYS, ...DEFAULT_RELAYS],
|
||||
})
|
||||
|
||||
try {
|
||||
const res = await postJson(BURROW_URL + "/user", {email, password})
|
||||
// Add default messaging relays
|
||||
publishThunk({
|
||||
event: makeEvent(MESSAGING_RELAYS, {tags: DEFAULT_MESSAGING_RELAYS.map(url => ["r", url])}),
|
||||
relays: DEFAULT_RELAYS,
|
||||
})
|
||||
|
||||
if (res.error) {
|
||||
pushToast({message: res.error, theme: "error"})
|
||||
} else {
|
||||
pushModal(SignUpSuccess, {email}, {replaceState: true})
|
||||
}
|
||||
} finally {
|
||||
loading = false
|
||||
}
|
||||
// Save the user's profile
|
||||
initProfile(getKey<Profile>("signup.profile")!)
|
||||
|
||||
// Don't show any notifications for old content
|
||||
setChecked("*")
|
||||
|
||||
// Go to the dashboard
|
||||
clearModals()
|
||||
}
|
||||
|
||||
const usePassword = () => {
|
||||
if (BURROW_URL) {
|
||||
signupPassword()
|
||||
}
|
||||
const flows = {
|
||||
email: {
|
||||
start: () => pushModal(SignUpEmail, {next: flows.email.profile}),
|
||||
profile: () => pushModal(SignUpProfile, {next: flows.email.complete}),
|
||||
complete: () => pushModal(SignUpComplete, {next: flows.email.finalize}),
|
||||
finalize: () => {
|
||||
const email = getKey<string>("signup.email")!
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
const clientOptions = getKey<ClientOptions>("signup.clientOptions")!
|
||||
|
||||
loginWithPomade(getPubkey(secret), email, clientOptions)
|
||||
completeSignup()
|
||||
},
|
||||
},
|
||||
nostr: {
|
||||
start: () => pushModal(SignUpProfile, {next: flows.nostr.key}),
|
||||
key: () => pushModal(SignUpKey, {next: flows.nostr.complete}),
|
||||
complete: () => pushModal(SignUpComplete, {next: flows.nostr.finalize}),
|
||||
finalize: () => {
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
|
||||
loginWithNip01(secret)
|
||||
completeSignup()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const next = () => pushModal(SignUpProfile)
|
||||
|
||||
let email = $state("")
|
||||
let password = $state("")
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(usePassword)}>
|
||||
<div class="column gap-4">
|
||||
<h1 class="heading">Sign up with Nostr</h1>
|
||||
<p class="m-auto max-w-sm text-center">
|
||||
{PLATFORM_NAME} is built using the
|
||||
<Button class="link" onclick={() => pushModal(InfoNostr)}>nostr protocol</Button>, which gives
|
||||
users control over their digital identity using <strong>cryptographic key pairs</strong>.
|
||||
</p>
|
||||
{#if BURROW_URL}
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Email</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={UserRounded} />
|
||||
<input bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Password</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={password} type="password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading || !email || !password}>
|
||||
<Spinner {loading}>Sign Up</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
{#if hasPomade}
|
||||
<Button onclick={flows.email.start} class="btn btn-primary">
|
||||
<Icon icon={Letter} />
|
||||
Sign up with email
|
||||
</Button>
|
||||
<p class="text-sm opacity-75">
|
||||
Note that your email and password will only work to log in to {PLATFORM_NAME}. To use your key
|
||||
on other nostr applications, you can create a nostr key yourself, or export your key from {PLATFORM_NAME}
|
||||
later.
|
||||
</p>
|
||||
<Divider>Or</Divider>
|
||||
{/if}
|
||||
<Button onclick={next} class="btn {email || password ? 'btn-neutral' : 'btn-primary'}">
|
||||
<Button onclick={flows.nostr.start} class="btn {hasPomade ? 'btn-neutral' : 'btn-primary'}">
|
||||
<Icon icon={Key} />
|
||||
Generate a key
|
||||
</Button>
|
||||
@@ -97,4 +113,4 @@
|
||||
Already have an account?
|
||||
<Button class="link" onclick={login}>Log in instead</Button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
<script lang="ts">
|
||||
import type {Profile} from "@welshman/util"
|
||||
import {createProfile, PROFILE, makeEvent} from "@welshman/util"
|
||||
import {publishThunk, loginWithNip01} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import HomeSmile from "@assets/icons/home-smile.svg?dataurl"
|
||||
@@ -9,34 +6,14 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {clearModals} from "@app/util/modal"
|
||||
import {PROTECTED} from "@app/core/state"
|
||||
|
||||
type Props = {
|
||||
secret: string
|
||||
profile: Profile
|
||||
next: () => void
|
||||
}
|
||||
|
||||
const {secret, profile}: Props = $props()
|
||||
const {next}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const next = () => {
|
||||
const template = createProfile(profile)
|
||||
|
||||
// Start out protected by default
|
||||
template.tags.push(PROTECTED)
|
||||
|
||||
const event = makeEvent(PROFILE, template)
|
||||
|
||||
// Log in first, then publish
|
||||
loginWithNip01(secret)
|
||||
|
||||
// Don't publish anywhere yet, wait until they join a space
|
||||
publishThunk({event, relays: []})
|
||||
|
||||
clearModals()
|
||||
}
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(next)}>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
<script lang="ts">
|
||||
import {Client} from "@pomade/core"
|
||||
import {choice} from "@welshman/lib"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Letter from "@assets/icons/letter.svg?dataurl"
|
||||
import Key from "@assets/icons/key.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import {getKey, setKey} from "@lib/implicit"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import SignUpEmailConfirm from "@app/components/SignUpEmailConfirm.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (password.trim().length < 12) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Password must be at least 12 characters long.",
|
||||
})
|
||||
}
|
||||
|
||||
loading = true
|
||||
|
||||
let client: Client | undefined = undefined
|
||||
|
||||
try {
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
const {clientOptions, ...registerRes} = await Client.register(2, 3, secret)
|
||||
|
||||
if (!registerRes.ok) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to register! Please try again.",
|
||||
})
|
||||
}
|
||||
|
||||
client = new Client(clientOptions)
|
||||
|
||||
const setupRes = await client.setupRecovery(email, password)
|
||||
|
||||
if (!setupRes.ok) {
|
||||
const message = setupRes.messages[0]?.payload.message || "Please try again."
|
||||
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: `Failed to register! ${message}.`,
|
||||
})
|
||||
}
|
||||
|
||||
const challengeRes = await Client.requestChallenge(email, [choice(clientOptions.peers)])
|
||||
|
||||
if (!challengeRes.ok) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: `Failed to request confirmation code! Please try again.`,
|
||||
})
|
||||
}
|
||||
|
||||
setKey("signup.email", email)
|
||||
setKey("signup.clientOptions", clientOptions)
|
||||
|
||||
pushModal(SignUpEmailConfirm, {next})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
||||
pushToast({
|
||||
theme: "error",
|
||||
message: "Failed to register! Please try again.",
|
||||
})
|
||||
} finally {
|
||||
client?.stop()
|
||||
loading = false
|
||||
}
|
||||
}
|
||||
|
||||
let email = $state("")
|
||||
let password = $state("")
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Sign up with Email</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Keep your keys safe using multi-signer key sharing</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>
|
||||
Under the hood, nostr uses "cryptographic keypairs" to help you prove that your identity is
|
||||
actually you.
|
||||
</p>
|
||||
<p>
|
||||
If you you're not ready to take control of your keys though, that's ok! We'll keep them safe
|
||||
until you are.
|
||||
</p>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Email*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Letter} />
|
||||
<input bind:value={email} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Password*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={password} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button class="btn btn-primary" type="submit" disabled={loading || !email || !password}>
|
||||
<Spinner {loading}>Continue</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -0,0 +1,72 @@
|
||||
<script lang="ts">
|
||||
import {sleep} from "@welshman/lib"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import {getKey} from "@lib/implicit"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
|
||||
type Props = {
|
||||
next: () => void
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
|
||||
const email = getKey<string>("signup.email")
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onSubmit = async () => {
|
||||
loading = true
|
||||
|
||||
// Just pretend we're validating, they clearly got a code from somewhere
|
||||
await sleep(800)
|
||||
|
||||
next()
|
||||
}
|
||||
|
||||
let challenge = $state("")
|
||||
let loading = $state(false)
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(onSubmit)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Verify your Email Address</div>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<div>Enter the one-time confirmation code sent to your email</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Confirmation Code*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={challenge} />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<p class="text-sm">
|
||||
We just sent a one-time confirmation code to {email}. Once you receive it, you can enter it
|
||||
above.
|
||||
</p>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading || !challenge}>
|
||||
<Spinner {loading}>Log In</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
@@ -1,168 +1,14 @@
|
||||
<script lang="ts">
|
||||
import {nsecEncode} from "nostr-tools/nip19"
|
||||
import {encrypt} from "nostr-tools/nip49"
|
||||
import {hexToBytes} from "@welshman/lib"
|
||||
import {makeSecret} from "@welshman/util"
|
||||
import type {Profile} from "@welshman/util"
|
||||
import {preventDefault, downloadText} from "@lib/html"
|
||||
import Key from "@assets/icons/key-minimalistic.svg?dataurl"
|
||||
import ArrowDown from "@assets/icons/arrow-down.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import SignUpComplete from "@app/components/SignUpComplete.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {PLATFORM_NAME} from "@app/core/state"
|
||||
import {getKey} from "@lib/implicit"
|
||||
import KeyDownload from "@app/components/KeyDownload.svelte"
|
||||
|
||||
type Props = {
|
||||
profile: Profile
|
||||
next: () => void
|
||||
}
|
||||
|
||||
const {profile}: Props = $props()
|
||||
const {next}: Props = $props()
|
||||
|
||||
const secret = makeSecret()
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const cleanupCopy = (copy: string) =>
|
||||
copy
|
||||
.replace(/\n\s*\n\s*/g, "NEWLINE")
|
||||
.replace(/\s+/g, " ")
|
||||
.replace(/NEWLINE/g, "\n\n")
|
||||
.trim()
|
||||
|
||||
const downloadKey = () => {
|
||||
const sharedCopy = `
|
||||
Most online services keep track of users by giving them a username and password. This gives the
|
||||
service total control over their users, allowing them to ban them at any time, or sell their activity.
|
||||
|
||||
On Nostr, you control your own identity and social data, through the magic of cryptography. The basic
|
||||
idea is that you have a public key, which acts as your user ID, and a private key which allows you to
|
||||
prove your identity.
|
||||
|
||||
It's very important to keep your private key secret because it grants permanent and complete access to your
|
||||
account.
|
||||
`
|
||||
|
||||
if (usePassword) {
|
||||
if (password.length < 12) {
|
||||
return pushToast({
|
||||
theme: "error",
|
||||
message: "Your password must be at least 12 characters long.",
|
||||
})
|
||||
}
|
||||
|
||||
const ncryptsec = encrypt(hexToBytes(secret), password)
|
||||
const instructions = `
|
||||
This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME} and encrypted using
|
||||
a password you chose when you signed up.
|
||||
|
||||
${sharedCopy}
|
||||
|
||||
Your encrypted private key is:
|
||||
|
||||
${ncryptsec}
|
||||
|
||||
To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good
|
||||
place to look), and import your key.
|
||||
`
|
||||
|
||||
downloadText("Nostr Secret Key.txt", cleanupCopy(instructions))
|
||||
} else {
|
||||
const nsec = nsecEncode(hexToBytes(secret))
|
||||
const instructions = `
|
||||
This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME}.
|
||||
|
||||
${sharedCopy}
|
||||
|
||||
Your private key is:
|
||||
|
||||
${nsec}
|
||||
|
||||
To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good
|
||||
place to look), and import your key.
|
||||
`
|
||||
|
||||
downloadText("Nostr Secret Key.txt", cleanupCopy(instructions))
|
||||
}
|
||||
|
||||
didDownload = true
|
||||
}
|
||||
|
||||
const next = () => {
|
||||
pushModal(SignUpComplete, {profile, secret})
|
||||
}
|
||||
|
||||
const onPasswordChange = () => {
|
||||
didDownload = false
|
||||
}
|
||||
|
||||
const toggleUsePassword = () => {
|
||||
usePassword = !usePassword
|
||||
didDownload = false
|
||||
}
|
||||
|
||||
let password = $state("")
|
||||
let usePassword = $state(false)
|
||||
let didDownload = $state(false)
|
||||
const secret = getKey<string>("signup.secret")!
|
||||
</script>
|
||||
|
||||
<form class="column gap-4" onsubmit={preventDefault(next)}>
|
||||
<ModalHeader>
|
||||
{#snippet title()}
|
||||
<div>Your Keys are Ready!</div>
|
||||
{/snippet}
|
||||
</ModalHeader>
|
||||
<p>
|
||||
A cryptographic key pair has two parts: your <strong>public key</strong> identifies your
|
||||
account, while your <strong>private key</strong> acts sort of like a master password.
|
||||
</p>
|
||||
<p>
|
||||
Securing your private key is very important, so make sure to take the time to save your key in a
|
||||
secure place (like a password manager).
|
||||
</p>
|
||||
{#if usePassword}
|
||||
<Field>
|
||||
{#snippet label()}
|
||||
Password*
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon={Key} />
|
||||
<input bind:value={password} onchange={onPasswordChange} class="grow" type="password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>Passwords should be at least 12 characters long. Write this down!</p>
|
||||
{/snippet}
|
||||
</Field>
|
||||
{/if}
|
||||
<div class="flex flex-col">
|
||||
<Button class="btn {didDownload ? 'btn-neutral' : 'btn-primary'}" onclick={downloadKey}>
|
||||
Download my key
|
||||
<Icon icon={ArrowDown} />
|
||||
</Button>
|
||||
<Button class="btn btn-link no-underline" onclick={toggleUsePassword}>
|
||||
{#if usePassword}
|
||||
Nevermind, I want to download the plain version
|
||||
{:else}
|
||||
I want to download an encrypted version
|
||||
{/if}
|
||||
</Button>
|
||||
</div>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button disabled={!didDownload} class="btn btn-primary" type="submit">
|
||||
Continue
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
</form>
|
||||
<KeyDownload {secret} {next} />
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
<script lang="ts">
|
||||
import type {Profile} from "@welshman/util"
|
||||
import {makeProfile} from "@welshman/util"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import {getKey, setKey} from "@lib/implicit"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
|
||||
import SignUpKey from "@app/components/SignUpKey.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
|
||||
const initialValues = {
|
||||
profile: makeProfile(),
|
||||
shouldBroadcast: false,
|
||||
type Props = {
|
||||
next: () => void
|
||||
}
|
||||
|
||||
const {next}: Props = $props()
|
||||
|
||||
const profile = getKey<Profile>("signup.profile")!
|
||||
|
||||
const initialValues = {profile, shouldBroadcast: false}
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const onsubmit = (values: {profile: Profile}) => pushModal(SignUpKey, values)
|
||||
const onsubmit = ({profile}: {profile: Profile}) => {
|
||||
setKey("signup.profile", profile)
|
||||
next()
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<script lang="ts">
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import LogInPassword from "@app/components/LogInPassword.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
|
||||
const {email} = $props()
|
||||
|
||||
const login = () => pushModal(LogInPassword)
|
||||
</script>
|
||||
|
||||
<div class="column gap-4">
|
||||
<h1 class="heading">Success!</h1>
|
||||
<p class="m-auto max-w-sm text-center">
|
||||
A confirmation email has been sent to {email}.
|
||||
</p>
|
||||
<p>Once you've confirmed your account you'll be redirected to the login page.</p>
|
||||
<Button class="btn btn-primary" onclick={login}>Back to Login</Button>
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {spec, prop, avg} from "@welshman/lib"
|
||||
import {session, SessionMethod, signerLog, SignerLogEntryStatus} from "@welshman/app"
|
||||
import {spec, avg} from "@welshman/lib"
|
||||
import {session, SessionMethod, signerLog} from "@welshman/app"
|
||||
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
||||
import Danger from "@assets/icons/danger-triangle.svg?dataurl"
|
||||
import ClockCircle from "@assets/icons/clock-circle.svg?dataurl"
|
||||
@@ -9,18 +9,20 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import LogOut from "@app/components/LogOut.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import PomadeSessions from "@app/components/PomadeSessions.svelte"
|
||||
|
||||
const {Pending, Success, Failure} = SignerLogEntryStatus
|
||||
const pending = $derived($signerLog.filter(spec({status: Pending})).length)
|
||||
const success = $derived($signerLog.filter(spec({status: Success})).length)
|
||||
const failure = $derived($signerLog.filter(spec({status: Failure})).length)
|
||||
const recent = $derived($signerLog.slice(-10))
|
||||
const recentAvg = $derived(avg(recent.map(prop("duration"))))
|
||||
const recentPending = $derived(recent.filter(spec({status: Pending})).length)
|
||||
const recentSuccess = $derived(recent.filter(spec({status: Success})).length)
|
||||
const recentFailure = $derived(recent.filter(spec({status: Failure})).length)
|
||||
const finished = $derived($signerLog.filter(x => x.finished_at))
|
||||
const pending = $derived($signerLog.filter(x => !x.finished_at))
|
||||
const failure = $derived(finished.filter(spec({ok: false})))
|
||||
const success = $derived(finished.filter(spec({ok: true})))
|
||||
const recent = $derived($signerLog.filter(x => x.started_at < Date.now() - 5000).slice(-10))
|
||||
const recentFinished = $derived(recent.filter(x => x.finished_at))
|
||||
const recentPending = $derived(recent.filter(x => !x.finished_at))
|
||||
const recentAvg = $derived(avg(recentFinished.map(x => x.finished_at! - x.started_at)))
|
||||
const recentFailure = $derived(recentFinished.filter(x => !x.ok))
|
||||
const recentSuccess = $derived(recentFinished.filter(x => x.ok))
|
||||
const isDisconnected = $derived(
|
||||
recent.length > 0 && recentFailure + recentPending === recent.length,
|
||||
recent.length > 0 && recentFailure.length + recentPending.length === recent.length,
|
||||
)
|
||||
|
||||
const logout = () => pushModal(LogOut)
|
||||
@@ -34,11 +36,13 @@
|
||||
<span class="flex items-center gap-2">
|
||||
{#if isDisconnected}
|
||||
<Icon icon={CloseCircle} class="text-error" size={4} /> Disconnected
|
||||
{:else if recentFailure > 3}
|
||||
{:else if recentFailure.length > 3}
|
||||
<Icon icon={Danger} class="text-warning" size={4} /> Partial Failure
|
||||
{:else if recentAvg > 1000 || recentPending > 3}
|
||||
{:else if recentAvg > 1000 || recentPending.length > 3}
|
||||
<Icon icon={ClockCircle} class="text-warning" size={4} /> Slow connection
|
||||
{:else if recentSuccess === 0 && recentFailure > 0}{:else}
|
||||
{:else if recentSuccess.length === 0 && recentFailure.length > 0}
|
||||
<Icon icon={Danger} class="text-warning" size={4} /> Partial Failure
|
||||
{:else}
|
||||
<Icon icon={CheckCircle} class="text-success" size={4} /> Ok
|
||||
{/if}
|
||||
</span>
|
||||
@@ -56,15 +60,19 @@
|
||||
{$session.signer}
|
||||
{:else if $session.method === SessionMethod.Pubkey}
|
||||
public key (readonly)
|
||||
{:else if $session.method === SessionMethod.Pomade}
|
||||
email and password
|
||||
{/if}
|
||||
</p>
|
||||
<p>
|
||||
{success} requests succeeded, {failure} failed, {pending} pending
|
||||
{success.length} requests succeeded, {failure.length} failed, {pending.length} pending
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{#if isDisconnected}
|
||||
<Button class="btn btn-outline btn-error" onclick={logout}>Logout to Reconnect</Button>
|
||||
{:else}
|
||||
<PomadeSessions />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import SpaceAccessRequest from "@app/components/SpaceAccessRequest.svelte"
|
||||
import SpaceJoinConfirm, {confirmSpaceJoin} from "@app/components/SpaceJoinConfirm.svelte"
|
||||
import {attemptRelayAccess} from "@app/core/commands"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
|
||||
const {url} = $props()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
const next = async () => {
|
||||
if (error) {
|
||||
return pushToast({theme: "error", message: error, timeout: 30_000})
|
||||
return pushModal(SpaceAccessRequest, {url})
|
||||
}
|
||||
|
||||
if (Pool.get().get(url).auth.status === AuthStatus.None) {
|
||||
@@ -35,7 +35,7 @@
|
||||
let loading = $state(true)
|
||||
|
||||
onMount(async () => {
|
||||
;[error] = await Promise.all([attemptRelayAccess(url), sleep(3000)])
|
||||
;[error] = await Promise.all([attemptRelayAccess(url), sleep(1000)])
|
||||
loading = false
|
||||
})
|
||||
</script>
|
||||
@@ -77,7 +77,11 @@
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={loading}>
|
||||
Join Space
|
||||
{#if error}
|
||||
Request Access
|
||||
{:else}
|
||||
Join Space
|
||||
{/if}
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
</ModalFooter>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const startEdit = () => pushModal(SpaceEdit, {url, initialValues: $relay})
|
||||
const startEdit = () => pushModal(SpaceEdit, {url, initialValues: $relay || {url}})
|
||||
</script>
|
||||
|
||||
<div class="column gap-4">
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {ifLet} from "@welshman/lib"
|
||||
import type {RelayProfile} from "@welshman/util"
|
||||
import {displayRelayUrl, ManagementMethod} from "@welshman/util"
|
||||
import {manageRelay, relaysByUrl, notifyRelay, fetchRelayDirectly} from "@welshman/app"
|
||||
import {manageRelay, forceLoadRelay} from "@welshman/app"
|
||||
import StickerSmileSquare from "@assets/icons/sticker-smile-square.svg?dataurl"
|
||||
import SettingsMinimalistic from "@assets/icons/settings-minimalistic.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
@@ -22,10 +21,10 @@
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
initialValues: RelayProfile
|
||||
initialValues: Partial<RelayProfile>
|
||||
}
|
||||
|
||||
const {url, initialValues}: Props = $props()
|
||||
const {url, initialValues = {}}: Props = $props()
|
||||
|
||||
const values = $state(initialValues)
|
||||
|
||||
@@ -71,18 +70,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Force-reload the relay
|
||||
ifLet(await fetchRelayDirectly(url), relay => {
|
||||
relaysByUrl.update($relaysByUrl => {
|
||||
$relaysByUrl.set(url, relay)
|
||||
|
||||
return new Map($relaysByUrl)
|
||||
})
|
||||
|
||||
notifyRelay(relay)
|
||||
})
|
||||
|
||||
pushToast({message: "Your changes have been saved!"})
|
||||
forceLoadRelay(url)
|
||||
clearModals()
|
||||
}
|
||||
|
||||
@@ -155,11 +144,11 @@
|
||||
<span class="text-sm opacity-75">No icon selected</span>
|
||||
{/if}
|
||||
<div class="flex gap-2">
|
||||
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-sm">
|
||||
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-xs">
|
||||
<Icon icon={StickerSmileSquare} size={4} />
|
||||
Select
|
||||
</IconPickerButton>
|
||||
<label class="btn btn-neutral btn-sm cursor-pointer">
|
||||
<label class="btn btn-neutral btn-xs cursor-pointer">
|
||||
<Icon icon={UploadMinimalistic} size={4} />
|
||||
Upload
|
||||
<input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} />
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import QRCode from "@app/components/QRCode.svelte"
|
||||
import {clip} from "@app/util/toast"
|
||||
import {PLATFORM_URL, deriveRelayAuthError} from "@app/core/state"
|
||||
import {PLATFORM_URL} from "@app/core/state"
|
||||
import {deriveRelayAuthError} from "@app/core/commands"
|
||||
|
||||
const {url} = $props()
|
||||
|
||||
|
||||
@@ -15,18 +15,14 @@
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
const tryJoin = async () => {
|
||||
await addSpaceMembership(url)
|
||||
|
||||
broadcastUserData([url])
|
||||
clearModals()
|
||||
}
|
||||
|
||||
const join = async () => {
|
||||
loading = true
|
||||
|
||||
try {
|
||||
await tryJoin()
|
||||
await addSpaceMembership(url)
|
||||
|
||||
broadcastUserData([url])
|
||||
clearModals()
|
||||
} catch (e) {
|
||||
loading = false
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#each $members as pubkey (pubkey)}
|
||||
<div class="card2 bg-alt relative">
|
||||
<div class="card2 card2-sm bg-alt relative">
|
||||
<div class="flex items-center justify-between gap-2">
|
||||
<div class="min-w-0 flex-1">
|
||||
<Profile {pubkey} {url} />
|
||||
|
||||
+51
-47
@@ -1,6 +1,6 @@
|
||||
import {nwc} from "@getalby/sdk"
|
||||
import * as nip19 from "nostr-tools/nip19"
|
||||
import {get} from "svelte/store"
|
||||
import {get, derived} from "svelte/store"
|
||||
import type {Override, MakeOptional} from "@welshman/lib"
|
||||
import {
|
||||
first,
|
||||
@@ -52,10 +52,8 @@ import {
|
||||
removeFromListByPredicate,
|
||||
getTag,
|
||||
getListTags,
|
||||
getRelayTags,
|
||||
getRelayTagValues,
|
||||
toNostrURI,
|
||||
getRelaysFromList,
|
||||
RelayMode,
|
||||
getAddress,
|
||||
getTagValue,
|
||||
@@ -80,8 +78,6 @@ import {
|
||||
publishThunk,
|
||||
tagEvent,
|
||||
tagEventForReaction,
|
||||
userRelayList,
|
||||
userMessagingRelayList,
|
||||
nip44EncryptToSelf,
|
||||
dropSession,
|
||||
tagEventForComment,
|
||||
@@ -90,6 +86,7 @@ import {
|
||||
getPubkeyRelays,
|
||||
userBlossomServerList,
|
||||
shouldUnwrap,
|
||||
getThunkError,
|
||||
} from "@welshman/app"
|
||||
import {compressFile} from "@lib/html"
|
||||
import {kv, db} from "@app/core/storage"
|
||||
@@ -106,6 +103,9 @@ import {
|
||||
getSetting,
|
||||
userGroupList,
|
||||
shouldIgnoreError,
|
||||
stripPrefix,
|
||||
relaysMostlyRestricted,
|
||||
deriveSocket,
|
||||
} from "@app/core/state"
|
||||
import {loadAlertStatuses} from "@app/core/requests"
|
||||
import {platform, platformName, getPushInfo} from "@app/util/push"
|
||||
@@ -176,7 +176,7 @@ export const addSpaceMembership = async (url: string) => {
|
||||
|
||||
export const removeSpaceMembership = async (url: string) => {
|
||||
const list = get(userGroupList) || makeList({kind: ROOMS})
|
||||
const pred = (t: string[]) => t[t[0] === "r" ? 1 : 2] === url
|
||||
const pred = (t: string[]) => normalizeRelayUrl(t[t[0] === "r" ? 1 : 2]) === url
|
||||
const event = await removeFromListByPredicate(list, pred).reconcile(nip44EncryptToSelf)
|
||||
const relays = uniq([url, ...Router.get().FromUser().getUrls(), ...getRelayTagValues(event.tags)])
|
||||
|
||||
@@ -204,42 +204,6 @@ export const removeRoomMembership = async (url: string, h: string) => {
|
||||
return publishThunk({event, relays})
|
||||
}
|
||||
|
||||
export const setRelayPolicy = (url: string, read: boolean, write: boolean) => {
|
||||
const list = get(userRelayList) || makeList({kind: RELAYS})
|
||||
const tags = getRelayTags(getListTags(list)).filter(t => normalizeRelayUrl(t[1]) !== url)
|
||||
|
||||
if (read && write) {
|
||||
tags.push(["r", url])
|
||||
} else if (read) {
|
||||
tags.push(["r", url, "read"])
|
||||
} else if (write) {
|
||||
tags.push(["r", url, "write"])
|
||||
}
|
||||
|
||||
return publishThunk({
|
||||
event: makeEvent(list.kind, {tags}),
|
||||
relays: [url, ...INDEXER_RELAYS, ...Router.get().FromUser().getUrls(), ...get(userSpaceUrls)],
|
||||
})
|
||||
}
|
||||
|
||||
export const setMessagingRelayPolicy = (url: string, enabled: boolean) => {
|
||||
const list = get(userMessagingRelayList) || makeList({kind: MESSAGING_RELAYS})
|
||||
|
||||
// Only update messaging policies if they already exist or we're adding them
|
||||
if (enabled || getRelaysFromList(list).includes(url)) {
|
||||
const tags = getRelayTags(getListTags(list)).filter(t => normalizeRelayUrl(t[1]) !== url)
|
||||
|
||||
if (enabled) {
|
||||
tags.push(["relay", url])
|
||||
}
|
||||
|
||||
return publishThunk({
|
||||
event: makeEvent(list.kind, {tags}),
|
||||
relays: [...INDEXER_RELAYS, ...Router.get().FromUser().getUrls(), ...get(userSpaceUrls)],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Relay access
|
||||
|
||||
export const canEnforceNip70 = async (url: string) => {
|
||||
@@ -281,12 +245,40 @@ export const attemptRelayAccess = async (url: string, claim = "") => {
|
||||
|
||||
if (shouldIgnoreError(error)) return
|
||||
|
||||
if (claim) {
|
||||
const ignoreClaimError =
|
||||
error.includes("invalid invite code size") || error.includes("failed to validate invite code")
|
||||
if (error.includes("invite code")) return "join request rejected"
|
||||
|
||||
if (!ignoreClaimError) return error?.replace(/^\w+: /, "")
|
||||
}
|
||||
return stripPrefix(error)
|
||||
}
|
||||
|
||||
export const deriveRelayAuthError = (url: string, claim = "") => {
|
||||
// Kick off the auth process
|
||||
Pool.get().get(url).auth.attemptAuth(sign)
|
||||
|
||||
// Attempt to join the relay
|
||||
const thunk = publishJoinRequest({url, claim})
|
||||
|
||||
return derived(
|
||||
[thunk, relaysMostlyRestricted, deriveSocket(url)],
|
||||
([$thunk, $relaysMostlyRestricted, $socket]) => {
|
||||
if ($socket.auth.status === AuthStatus.Forbidden && $socket.auth.details) {
|
||||
return stripPrefix($socket.auth.details)
|
||||
}
|
||||
|
||||
if ($relaysMostlyRestricted[url]) {
|
||||
return stripPrefix($relaysMostlyRestricted[url])
|
||||
}
|
||||
|
||||
const error = getThunkError($thunk)
|
||||
|
||||
if (error) {
|
||||
const isEmptyInvite = !claim && error.includes("invite code")
|
||||
|
||||
if (!shouldIgnoreError(error) && !isEmptyInvite) {
|
||||
return stripPrefix(error) || "join request rejected"
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
// Deletions
|
||||
@@ -722,6 +714,18 @@ export const uploadFile = async (file: File, options: UploadFileOptions = {}) =>
|
||||
|
||||
// Update Profile
|
||||
|
||||
export const initProfile = (profile: Profile) => {
|
||||
const template = createProfile(profile)
|
||||
|
||||
// Start out protected by default
|
||||
template.tags.push(PROTECTED)
|
||||
|
||||
const event = makeEvent(PROFILE, template)
|
||||
|
||||
// Don't publish anywhere yet, wait until they join a space
|
||||
return publishThunk({event, relays: []})
|
||||
}
|
||||
|
||||
export const updateProfile = async ({
|
||||
profile,
|
||||
shouldBroadcast = !getTag(PROTECTED, profile.event?.tags || []),
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
int,
|
||||
YEAR,
|
||||
DAY,
|
||||
assoc,
|
||||
insertAt,
|
||||
sortBy,
|
||||
now,
|
||||
@@ -33,7 +32,7 @@ import {load, request} from "@welshman/net"
|
||||
import {repository, makeFeedController, loadRelay, tracker} from "@welshman/app"
|
||||
import {createScroller} from "@lib/html"
|
||||
import {daysBetween} from "@lib/util"
|
||||
import {NOTIFIER_RELAY} from "@app/core/state"
|
||||
import {NOTIFIER_RELAY, getEventsForUrl} from "@app/core/state"
|
||||
|
||||
// Utils
|
||||
|
||||
@@ -48,12 +47,9 @@ export const makeFeed = ({
|
||||
element: HTMLElement
|
||||
onExhausted?: () => void
|
||||
}) => {
|
||||
const initialIds = Array.from(tracker.getIds(url))
|
||||
const initialFilters = filters.map(assoc("ids", initialIds))
|
||||
const initialEvents = repository.query(initialFilters)
|
||||
const seen = new Set(initialEvents.map(e => e.id))
|
||||
const seen = new Set<string>()
|
||||
const controller = new AbortController()
|
||||
const buffer = writable(initialEvents)
|
||||
const buffer = writable<TrustedEvent[]>([])
|
||||
const events = writable<TrustedEvent[]>([])
|
||||
|
||||
const insertEvent = (event: TrustedEvent) => {
|
||||
@@ -124,6 +120,10 @@ export const makeFeed = ({
|
||||
},
|
||||
})
|
||||
|
||||
for (const event of getEventsForUrl(url, filters)) {
|
||||
insertEvent(event)
|
||||
}
|
||||
|
||||
return {
|
||||
events,
|
||||
cleanup: () => {
|
||||
@@ -147,9 +147,6 @@ export const makeCalendarFeed = ({
|
||||
}) => {
|
||||
const interval = int(5, DAY)
|
||||
const controller = new AbortController()
|
||||
const initialIds = Array.from(tracker.getIds(url))
|
||||
const initialFilters = filters.map(assoc("ids", initialIds))
|
||||
const initialEvents = repository.query(initialFilters)
|
||||
|
||||
let exhaustedScrollers = 0
|
||||
let backwardWindow = [now() - interval, now()]
|
||||
@@ -159,7 +156,7 @@ export const makeCalendarFeed = ({
|
||||
|
||||
const getEnd = (event: TrustedEvent) => parseInt(getTagValue("end", event.tags) || "")
|
||||
|
||||
const events = writable(sortBy(getStart, initialEvents))
|
||||
const events = writable(sortBy(getStart, getEventsForUrl(url, filters)))
|
||||
|
||||
const insertEvent = (event: TrustedEvent) => {
|
||||
const start = getStart(event)
|
||||
|
||||
+70
-61
@@ -1,4 +1,5 @@
|
||||
import twColors from "tailwindcss/colors"
|
||||
import {context as pomadeContext} from "@pomade/core"
|
||||
import {Capacitor} from "@capacitor/core"
|
||||
import {get, derived, readable, writable} from "svelte/store"
|
||||
import * as nip19 from "nostr-tools/nip19"
|
||||
@@ -17,7 +18,6 @@ import {
|
||||
uniq,
|
||||
indexBy,
|
||||
partition,
|
||||
pushToMapKey,
|
||||
shuffle,
|
||||
parseJson,
|
||||
memoize,
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
always,
|
||||
tryCatch,
|
||||
fromPairs,
|
||||
remove,
|
||||
} from "@welshman/lib"
|
||||
import type {Override} from "@welshman/lib"
|
||||
import type {RepositoryUpdate} from "@welshman/net"
|
||||
@@ -48,6 +49,7 @@ import {
|
||||
deriveItemsByKey,
|
||||
deriveEventsByIdByUrl,
|
||||
deriveEventsByIdForUrl,
|
||||
getEventsByIdForUrl,
|
||||
} from "@welshman/store"
|
||||
import {isKindFeed, findFeed} from "@welshman/feeds"
|
||||
import {
|
||||
@@ -95,7 +97,6 @@ import {
|
||||
getTagValue,
|
||||
getTagValues,
|
||||
isRelayUrl,
|
||||
makeEvent,
|
||||
normalizeRelayUrl,
|
||||
readList,
|
||||
verifyEvent,
|
||||
@@ -113,12 +114,9 @@ import {
|
||||
createSearch,
|
||||
userFollowList,
|
||||
ensurePlaintext,
|
||||
sign,
|
||||
signer,
|
||||
makeOutboxLoader,
|
||||
appContext,
|
||||
getThunkError,
|
||||
publishThunk,
|
||||
deriveRelay,
|
||||
makeUserData,
|
||||
makeUserLoader,
|
||||
@@ -136,13 +134,21 @@ export const ENABLE_ZAPS = Capacitor.getPlatform() != "ios"
|
||||
|
||||
export const NOTIFIER_PUBKEY = import.meta.env.VITE_NOTIFIER_PUBKEY
|
||||
|
||||
export const NOTIFIER_RELAY = import.meta.env.VITE_NOTIFIER_RELAY
|
||||
|
||||
export const VAPID_PUBLIC_KEY = import.meta.env.VITE_VAPID_PUBLIC_KEY
|
||||
|
||||
export const INDEXER_RELAYS = fromCsv(import.meta.env.VITE_INDEXER_RELAYS)
|
||||
export const NOTIFIER_RELAY = normalizeRelayUrl(import.meta.env.VITE_NOTIFIER_RELAY)
|
||||
|
||||
export const SIGNER_RELAYS = fromCsv(import.meta.env.VITE_SIGNER_RELAYS)
|
||||
export const SIGNER_RELAYS = fromCsv(import.meta.env.VITE_SIGNER_RELAYS).map(normalizeRelayUrl)
|
||||
|
||||
export const INDEXER_RELAYS = fromCsv(import.meta.env.VITE_INDEXER_RELAYS).map(normalizeRelayUrl)
|
||||
|
||||
export const DEFAULT_RELAYS = fromCsv(import.meta.env.VITE_DEFAULT_RELAYS).map(normalizeRelayUrl)
|
||||
|
||||
export const DEFAULT_MESSAGING_RELAYS = fromCsv(import.meta.env.VITE_DEFAULT_MESSAGING_RELAYS).map(
|
||||
normalizeRelayUrl,
|
||||
)
|
||||
|
||||
export const PLATFORM_RELAYS = fromCsv(import.meta.env.VITE_PLATFORM_RELAYS).map(normalizeRelayUrl)
|
||||
|
||||
export const PLATFORM_URL = import.meta.env.VITE_PLATFORM_URL
|
||||
|
||||
@@ -154,15 +160,13 @@ export const PLATFORM_LOGO = PLATFORM_URL + "/logo.png"
|
||||
|
||||
export const PLATFORM_NAME = import.meta.env.VITE_PLATFORM_NAME
|
||||
|
||||
export const PLATFORM_RELAYS = fromCsv(import.meta.env.VITE_PLATFORM_RELAYS)
|
||||
|
||||
export const PLATFORM_ACCENT = import.meta.env.VITE_PLATFORM_ACCENT
|
||||
|
||||
export const PLATFORM_DESCRIPTION = import.meta.env.VITE_PLATFORM_DESCRIPTION
|
||||
|
||||
export const DEFAULT_BLOSSOM_SERVERS = fromCsv(import.meta.env.VITE_DEFAULT_BLOSSOM_SERVERS)
|
||||
export const POMADE_SIGNERS = fromCsv(import.meta.env.VITE_POMADE_SIGNERS)
|
||||
|
||||
export const BURROW_URL = import.meta.env.VITE_BURROW_URL
|
||||
export const DEFAULT_BLOSSOM_SERVERS = fromCsv(import.meta.env.VITE_DEFAULT_BLOSSOM_SERVERS)
|
||||
|
||||
export const DEFAULT_PUBKEYS = import.meta.env.VITE_DEFAULT_PUBKEYS
|
||||
|
||||
@@ -216,6 +220,9 @@ export const deriveEvent = makeDeriveEvent({
|
||||
onDerive: (filters: Filter[], relays: string[]) => load({filters, relays}),
|
||||
})
|
||||
|
||||
export const getEventsForUrl = (url: string, filters: Filter[]) =>
|
||||
getEventsByIdForUrl({url, tracker, repository, filters}).values()
|
||||
|
||||
export const deriveEventsForUrl = (url: string, filters: Filter[]) =>
|
||||
deriveArray(deriveEventsByIdForUrl({url, tracker, repository, filters}))
|
||||
|
||||
@@ -229,6 +236,10 @@ export const deriveRelaySignedEvents = (url: string, filters: Filter[]) =>
|
||||
|
||||
// Context
|
||||
|
||||
pomadeContext.setSignerPubkeys(POMADE_SIGNERS)
|
||||
|
||||
pomadeContext.setArgonWorker(import("@pomade/core/argon-worker.js?worker"))
|
||||
|
||||
appContext.dufflepudUrl = DUFFLEPUD_URL
|
||||
|
||||
routerContext.getIndexerRelays = always(INDEXER_RELAYS)
|
||||
@@ -258,12 +269,18 @@ export const MESSAGE_KINDS = [...CONTENT_KINDS, MESSAGE]
|
||||
|
||||
export const SETTINGS = "flotilla/settings"
|
||||
|
||||
export enum RelayAuthMode {
|
||||
Aggressive = "aggressive",
|
||||
Conservative = "conservative",
|
||||
}
|
||||
|
||||
export type SettingsValues = {
|
||||
show_media: boolean
|
||||
hide_sensitive: boolean
|
||||
trusted_relays: string[]
|
||||
report_usage: boolean
|
||||
report_errors: boolean
|
||||
relay_auth: RelayAuthMode
|
||||
send_delay: number
|
||||
font_size: number
|
||||
play_notification_sound: boolean
|
||||
@@ -275,14 +292,15 @@ export type Settings = {
|
||||
values: SettingsValues
|
||||
}
|
||||
|
||||
export const defaultSettings = {
|
||||
export const defaultSettings: SettingsValues = {
|
||||
show_media: true,
|
||||
hide_sensitive: true,
|
||||
trusted_relays: [],
|
||||
report_usage: true,
|
||||
report_errors: true,
|
||||
relay_auth: RelayAuthMode.Conservative,
|
||||
send_delay: 0,
|
||||
font_size: 1,
|
||||
font_size: 1.1,
|
||||
play_notification_sound: true,
|
||||
show_notifications_badge: true,
|
||||
}
|
||||
@@ -390,9 +408,20 @@ export type Chat = {
|
||||
search_text: string
|
||||
}
|
||||
|
||||
export const makeChatId = (pubkeys: string[]) => sort(uniq(pubkeys)).join(",")
|
||||
export const getChatPubkeys = (pubkeys: string[]) => sort(uniq(append(pubkey.get()!, pubkeys)))
|
||||
|
||||
export const splitChatId = (id: string) => id.split(",")
|
||||
export const getChatPubkeysFromEvent = (event: TrustedEvent) =>
|
||||
getChatPubkeys(getPubkeyTagValues(event.tags).concat(event.pubkey))
|
||||
|
||||
export const makeChatId = (pubkeys: string[]) => {
|
||||
const userPubkey = pubkey.get()!
|
||||
const otherPubkeys = remove(userPubkey, uniq(pubkeys))
|
||||
const visiblePubkeys = otherPubkeys.length === 0 ? [userPubkey] : otherPubkeys
|
||||
|
||||
return sort(visiblePubkeys).join(",")
|
||||
}
|
||||
|
||||
export const splitChatId = (id: string) => getChatPubkeys(id.split(","))
|
||||
|
||||
export const chatsById = call(() => {
|
||||
const chatsById = new Map<string, Chat>()
|
||||
@@ -402,7 +431,7 @@ export const chatsById = call(() => {
|
||||
chat.search_text =
|
||||
chat.pubkeys.length === 1
|
||||
? displayProfileByPubkey(chat.pubkeys[0]) + " note to self"
|
||||
: chat.pubkeys.map(displayProfileByPubkey).join(" ")
|
||||
: remove(pubkey.get()!, chat.pubkeys).map(displayProfileByPubkey).join(" ")
|
||||
|
||||
return chat as Chat
|
||||
}
|
||||
@@ -412,10 +441,10 @@ export const chatsById = call(() => {
|
||||
let dirty = false
|
||||
for (const event of events) {
|
||||
if ([DIRECT_MESSAGE, DIRECT_MESSAGE_FILE].includes(event.kind)) {
|
||||
const pubkeys = getPubkeyTagValues(event.tags).concat(event.pubkey)
|
||||
const pubkeys = getChatPubkeysFromEvent(event)
|
||||
const id = makeChatId(pubkeys)
|
||||
const chat = chatsById.get(id)
|
||||
const messages = append(event, chat?.messages || [])
|
||||
const messages = sortBy(e => -e.created_at, append(event, chat?.messages || []))
|
||||
const last_activity = Math.max(chat?.last_activity || 0, event.created_at)
|
||||
const updatedChat = addSearchText({id, pubkeys, messages, last_activity})
|
||||
|
||||
@@ -488,7 +517,7 @@ export const roomMetaEventsByIdByUrl = deriveEventsByIdByUrl({
|
||||
})
|
||||
|
||||
export const roomsByUrl = derived(roomMetaEventsByIdByUrl, roomMetaEventsByIdByUrl => {
|
||||
const result = new Map<string, Room[]>()
|
||||
const metaByIdByUrl = new Map<string, Map<string, Room>>()
|
||||
|
||||
for (const [url, events] of roomMetaEventsByIdByUrl.entries()) {
|
||||
const [metaEvents, deleteEvents] = partition(spec({kind: ROOM_META}), events.values())
|
||||
@@ -501,16 +530,30 @@ export const roomsByUrl = derived(roomMetaEventsByIdByUrl, roomMetaEventsByIdByU
|
||||
}
|
||||
|
||||
for (const event of metaEvents) {
|
||||
const meta = readRoomMeta(event)
|
||||
const meta = tryCatch(() => readRoomMeta(event))
|
||||
|
||||
if (gt(deletedByH.get(meta.h), meta.event.created_at)) {
|
||||
if (!meta || gt(deletedByH.get(meta.h), meta.event.created_at)) {
|
||||
continue
|
||||
}
|
||||
|
||||
pushToMapKey(result, url, {...meta, url, id: makeRoomId(url, meta.h)})
|
||||
let metaById = metaByIdByUrl.get(url)
|
||||
if (!metaById) {
|
||||
metaById = new Map()
|
||||
metaByIdByUrl.set(url, metaById)
|
||||
}
|
||||
|
||||
const id = makeRoomId(url, meta.h)
|
||||
|
||||
metaById.set(id, {...meta, url, id})
|
||||
}
|
||||
}
|
||||
|
||||
const result = new Map<string, Room[]>()
|
||||
|
||||
for (const [url, metaById] of metaByIdByUrl.entries()) {
|
||||
result.set(url, Array.from(metaById.values()))
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
|
||||
@@ -614,7 +657,7 @@ export const getSpaceRoomsFromGroupList = (url: string, groupList: List | undefi
|
||||
}
|
||||
}
|
||||
|
||||
return sortBy(roomComparator(url), rooms)
|
||||
return sortBy(roomComparator(url), uniq(rooms))
|
||||
}
|
||||
|
||||
export const userGroupList = makeUserData(groupListsByPubkey, loadGroupList)
|
||||
@@ -646,7 +689,7 @@ export const deriveOtherRooms = (url: string) =>
|
||||
}
|
||||
}
|
||||
|
||||
return sortBy(roomComparator(url), rooms)
|
||||
return sortBy(roomComparator(url), uniq(rooms))
|
||||
})
|
||||
|
||||
// Space/room memberships
|
||||
@@ -952,41 +995,7 @@ export const shouldIgnoreError = (error: string) => {
|
||||
return isIgnored || isAborted || isStrictNip29Relay
|
||||
}
|
||||
|
||||
export const deriveRelayAuthError = (url: string, claim = "") => {
|
||||
const stripPrefix = (m: string) => m.replace(/^\w+: /, "")
|
||||
|
||||
// Kick off the auth process
|
||||
Pool.get().get(url).auth.attemptAuth(sign)
|
||||
|
||||
// Attempt to join the relay
|
||||
const thunk = publishThunk({
|
||||
event: makeEvent(RELAY_JOIN, {tags: [["claim", claim]]}),
|
||||
relays: [url],
|
||||
})
|
||||
|
||||
return derived(
|
||||
[thunk, relaysMostlyRestricted, deriveSocket(url)],
|
||||
([$thunk, $relaysMostlyRestricted, $socket]) => {
|
||||
if ($socket.auth.status === AuthStatus.Forbidden && $socket.auth.details) {
|
||||
return stripPrefix($socket.auth.details)
|
||||
}
|
||||
|
||||
if ($relaysMostlyRestricted[url]) {
|
||||
return stripPrefix($relaysMostlyRestricted[url])
|
||||
}
|
||||
|
||||
const error = getThunkError($thunk)
|
||||
|
||||
if (error) {
|
||||
const isEmptyInvite = !claim && error.includes("invite code")
|
||||
|
||||
if (!shouldIgnoreError(error) && !isEmptyInvite) {
|
||||
return stripPrefix(error) || "join request rejected"
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
export const stripPrefix = (m: string) => m.replace(/^\w+: /, "")
|
||||
|
||||
export type InviteData = {url: string; claim: string}
|
||||
|
||||
|
||||
+22
-9
@@ -1,7 +1,18 @@
|
||||
import {page} from "$app/stores"
|
||||
import type {Unsubscriber} from "svelte/store"
|
||||
import {derived, get} from "svelte/store"
|
||||
import {partition, call, sortBy, assoc, chunk, sleep, identity, WEEK, ago} from "@welshman/lib"
|
||||
import {
|
||||
partition,
|
||||
call,
|
||||
sortBy,
|
||||
assoc,
|
||||
dissoc,
|
||||
chunk,
|
||||
sleep,
|
||||
identity,
|
||||
WEEK,
|
||||
ago,
|
||||
} from "@welshman/lib"
|
||||
import {
|
||||
getListTags,
|
||||
getRelayTagValues,
|
||||
@@ -30,6 +41,7 @@ import {
|
||||
loadRelayList,
|
||||
loadMessagingRelayList,
|
||||
loadBlossomServerList,
|
||||
loadBlockedRelayList,
|
||||
loadFollowList,
|
||||
loadMuteList,
|
||||
loadProfile,
|
||||
@@ -94,7 +106,7 @@ const pullAndListen = ({relays, filters, signal}: PullOpts) => {
|
||||
request({
|
||||
relays,
|
||||
signal,
|
||||
filters: unionFilters(filters).map(assoc("limit", 0)),
|
||||
filters: unionFilters(filters.map(dissoc("limit"))).map(assoc("limit", 0)),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -204,6 +216,7 @@ const syncUserData = () => {
|
||||
loadAlerts($userRelayList.event.pubkey)
|
||||
loadAlertStatuses($userRelayList.event.pubkey)
|
||||
loadBlossomServerList($userRelayList.event.pubkey)
|
||||
loadBlockedRelayList($userRelayList.event.pubkey)
|
||||
loadFollowList($userRelayList.event.pubkey)
|
||||
loadGroupList($userRelayList.event.pubkey)
|
||||
loadMuteList($userRelayList.event.pubkey)
|
||||
@@ -218,13 +231,13 @@ const syncUserData = () => {
|
||||
await sleep(1000)
|
||||
|
||||
await Promise.all(
|
||||
pubkeys.map(async pk => {
|
||||
await loadRelayList(pk)
|
||||
await loadGroupList(pk)
|
||||
await loadProfile(pk)
|
||||
await loadFollowList(pk)
|
||||
await loadMuteList(pk)
|
||||
}),
|
||||
pubkeys.flatMap(pk => [
|
||||
loadRelayList(pk),
|
||||
loadGroupList(pk),
|
||||
loadProfile(pk),
|
||||
loadFollowList(pk),
|
||||
loadMuteList(pk),
|
||||
]),
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,7 +2,13 @@ import {writable} from "svelte/store"
|
||||
import type {Nip46ResponseWithResult} from "@welshman/signer"
|
||||
import {Nip46Broker} from "@welshman/signer"
|
||||
import {makeSecret} from "@welshman/util"
|
||||
import {PLATFORM_URL, PLATFORM_NAME, PLATFORM_LOGO, SIGNER_RELAYS} from "@app/core/state"
|
||||
import {
|
||||
PLATFORM_URL,
|
||||
PLATFORM_NAME,
|
||||
PLATFORM_LOGO,
|
||||
SIGNER_RELAYS,
|
||||
NIP46_PERMS,
|
||||
} from "@app/core/state"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
|
||||
export class Nip46Controller {
|
||||
@@ -23,6 +29,7 @@ export class Nip46Controller {
|
||||
url: PLATFORM_URL,
|
||||
name: PLATFORM_NAME,
|
||||
image: PLATFORM_LOGO,
|
||||
perms: NIP46_PERMS,
|
||||
})
|
||||
|
||||
this.url.set(url)
|
||||
|
||||
@@ -5,7 +5,15 @@ import {pubkey, tracker, repository, relaysByUrl} from "@welshman/app"
|
||||
import {prop, find, call, spec, first, identity, now, groupBy} from "@welshman/lib"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {deriveEventsByIdByUrl} from "@welshman/store"
|
||||
import {ZAP_GOAL, EVENT_TIME, MESSAGE, THREAD, COMMENT, getTagValue} from "@welshman/util"
|
||||
import {
|
||||
ZAP_GOAL,
|
||||
EVENT_TIME,
|
||||
MESSAGE,
|
||||
THREAD,
|
||||
COMMENT,
|
||||
getTagValue,
|
||||
sortEventsDesc,
|
||||
} from "@welshman/util"
|
||||
import {
|
||||
makeSpacePath,
|
||||
makeChatPath,
|
||||
@@ -111,10 +119,10 @@ export const notifications = call(() => {
|
||||
const threadPath = makeThreadPath(url)
|
||||
const calendarPath = makeCalendarPath(url)
|
||||
const messagesPath = makeSpaceChatPath(url)
|
||||
const goalComments = goalCommentsByUrl.get(url)?.values() || []
|
||||
const threadComments = threadCommentsByUrl.get(url)?.values() || []
|
||||
const calendarComments = calendarCommentsByUrl.get(url)?.values() || []
|
||||
const messages = messagesByUrl.get(url)?.values() || []
|
||||
const goalComments = sortEventsDesc(goalCommentsByUrl.get(url)?.values() || [])
|
||||
const threadComments = sortEventsDesc(threadCommentsByUrl.get(url)?.values() || [])
|
||||
const calendarComments = sortEventsDesc(calendarCommentsByUrl.get(url)?.values() || [])
|
||||
const messages = sortEventsDesc(messagesByUrl.get(url)?.values() || [])
|
||||
|
||||
const commentsByGoalId = groupBy(
|
||||
e => getTagValue("E", e.tags),
|
||||
@@ -124,11 +132,8 @@ export const notifications = call(() => {
|
||||
for (const [goalId, [comment]] of commentsByGoalId.entries()) {
|
||||
const goalItemPath = makeGoalPath(url, goalId)
|
||||
|
||||
if (hasNotification(spacePathMobile, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
}
|
||||
|
||||
if (hasNotification(goalPath, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
paths.add(goalPath)
|
||||
}
|
||||
|
||||
@@ -145,11 +150,8 @@ export const notifications = call(() => {
|
||||
for (const [threadId, [comment]] of commentsByThreadId.entries()) {
|
||||
const threadItemPath = makeThreadPath(url, threadId)
|
||||
|
||||
if (hasNotification(spacePathMobile, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
}
|
||||
|
||||
if (hasNotification(threadPath, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
paths.add(threadPath)
|
||||
}
|
||||
|
||||
@@ -166,11 +168,8 @@ export const notifications = call(() => {
|
||||
for (const [eventId, [comment]] of commentsByEventId.entries()) {
|
||||
const calendarItemPath = makeCalendarPath(url, eventId)
|
||||
|
||||
if (hasNotification(spacePathMobile, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
}
|
||||
|
||||
if (hasNotification(calendarPath, comment)) {
|
||||
paths.add(spacePathMobile)
|
||||
paths.add(calendarPath)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import {on, always, call, dissoc, assoc, uniq} from "@welshman/lib"
|
||||
import {get} from "svelte/store"
|
||||
import {on, call, dissoc, assoc, uniq} from "@welshman/lib"
|
||||
import {RelayMode} from "@welshman/util"
|
||||
import type {Socket, RelayMessage, ClientMessage} from "@welshman/net"
|
||||
import {
|
||||
makeSocketPolicyAuth,
|
||||
@@ -13,15 +15,49 @@ import {
|
||||
isClientNegOpen,
|
||||
isClientNegClose,
|
||||
} from "@welshman/net"
|
||||
import {sign} from "@welshman/app"
|
||||
import {sign, pubkey, getPubkeyRelays} from "@welshman/app"
|
||||
import {
|
||||
userSettingsValues,
|
||||
getSetting,
|
||||
relaysPendingTrust,
|
||||
relaysMostlyRestricted,
|
||||
RelayAuthMode,
|
||||
NOTIFIER_RELAY,
|
||||
userSpaceUrls,
|
||||
} from "@app/core/state"
|
||||
|
||||
export const authPolicy = makeSocketPolicyAuth({sign, shouldAuth: always(true)})
|
||||
export const authPolicy = makeSocketPolicyAuth({
|
||||
sign,
|
||||
shouldAuth: (socket: Socket) => {
|
||||
const $pubkey = pubkey.get()
|
||||
const mode = getSetting<RelayAuthMode>("relay_auth")
|
||||
|
||||
if (!$pubkey) return false
|
||||
if (socket.url === NOTIFIER_RELAY) return true
|
||||
if (mode === RelayAuthMode.Aggressive) return true
|
||||
if (get(userSpaceUrls).includes(socket.url)) return true
|
||||
if (getPubkeyRelays($pubkey).includes(socket.url)) return true
|
||||
if (getPubkeyRelays($pubkey, RelayMode.Messaging).includes(socket.url)) return true
|
||||
|
||||
return false
|
||||
},
|
||||
})
|
||||
|
||||
export const blockPolicy = (socket: Socket) => {
|
||||
const previousOpen = socket.open
|
||||
|
||||
socket.open = () => {
|
||||
const $pubkey = pubkey.get()
|
||||
|
||||
if (!$pubkey || !getPubkeyRelays($pubkey, RelayMode.Blocked).includes(socket.url)) {
|
||||
return previousOpen()
|
||||
}
|
||||
}
|
||||
|
||||
return () => {
|
||||
socket.open = previousOpen
|
||||
}
|
||||
}
|
||||
|
||||
export const trustPolicy = (socket: Socket) => {
|
||||
const buffer: RelayMessage[] = []
|
||||
|
||||
@@ -2,9 +2,9 @@ import type {Page} from "@sveltejs/kit"
|
||||
import {get} from "svelte/store"
|
||||
import * as nip19 from "nostr-tools/nip19"
|
||||
import {goto} from "$app/navigation"
|
||||
import {nthEq, remove, sleep} from "@welshman/lib"
|
||||
import {nthEq, sleep} from "@welshman/lib"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {pubkey, tracker, loadRelay} from "@welshman/app"
|
||||
import {tracker, loadRelay} from "@welshman/app"
|
||||
import {scrollToEvent} from "@lib/html"
|
||||
import {identity} from "@welshman/lib"
|
||||
import {
|
||||
@@ -55,11 +55,7 @@ export const goToSpace = async (url: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const makeChatPath = (pubkeys: string[]) => {
|
||||
const id = makeChatId(remove(pubkey.get()!, pubkeys))
|
||||
|
||||
return `/chat/${id}`
|
||||
}
|
||||
export const makeChatPath = (pubkeys: string[]) => `/chat/${makeChatId(pubkeys)}`
|
||||
|
||||
export const makeRoomPath = (url: string, h: string) => `/spaces/${encodeRelay(url)}/${h}`
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import {noop} from "@welshman/lib"
|
||||
import * as Sentry from "@sentry/browser"
|
||||
import {getSetting} from "@app/core/state"
|
||||
|
||||
export const setupTracking = () => {
|
||||
if (import.meta.env.VITE_GLITCHTIP_API_KEY) {
|
||||
Sentry.init({
|
||||
dsn: import.meta.env.VITE_GLITCHTIP_API_KEY,
|
||||
beforeSend(event: any) {
|
||||
if (!getSetting("report_errors")) {
|
||||
return null
|
||||
}
|
||||
|
||||
return event
|
||||
},
|
||||
integrations(integrations) {
|
||||
return integrations.filter(integration => integration.name !== "Breadcrumbs")
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
return noop
|
||||
}
|
||||
@@ -11,13 +11,21 @@
|
||||
|
||||
const {onClose = noop, fullscreen = false, children}: Props = $props()
|
||||
|
||||
const extraClass = $derived(
|
||||
!fullscreen &&
|
||||
cx(
|
||||
"bg-alt text-base-content overflow-auto text-base-content shadow-md",
|
||||
"px-4 py-6 bottom-0 left-0 right-0 top-20 rounded-t-box absolute",
|
||||
"sm:p-6 sm:max-h-[90vh] sm:w-[520px] sm:rounded-box sm:relative sm:top-0 sm:relative",
|
||||
),
|
||||
const wrapperClass = $derived(
|
||||
cx("absolute inset-0 flex sm:relative pointer-events-none", {
|
||||
"items-center justify-center": fullscreen,
|
||||
"items-end sm:w-[520px] sm:items-center": !fullscreen,
|
||||
}),
|
||||
)
|
||||
|
||||
const innerClass = $derived(
|
||||
cx(
|
||||
"relative text-base-content text-base-content flex-grow pointer-events-auto",
|
||||
"px-4 py-6 rounded-t-box sm:p-6 sm:rounded-box sm:mt-0",
|
||||
{
|
||||
"bg-alt shadow-m max-h-[90vh] scroll-container overflow-auto": !fullscreen,
|
||||
},
|
||||
),
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -28,7 +36,9 @@
|
||||
transition:fade={{duration: 300}}
|
||||
onclick={onClose}>
|
||||
</button>
|
||||
<div class="scroll-container {extraClass}" transition:fly={{duration: 300}}>
|
||||
{@render children?.()}
|
||||
<div class={wrapperClass}>
|
||||
<div class={innerClass} transition:fly={{duration: 300}}>
|
||||
{@render children?.()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
const {...props}: Props = $props()
|
||||
</script>
|
||||
|
||||
<div class="grid grid-cols-1 gap-2 md:grid-cols-3 {props.class}">
|
||||
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3 {props.class}">
|
||||
<label class="flex items-center gap-2 font-bold">
|
||||
{@render props.label?.()}
|
||||
</label>
|
||||
<div class="col-span-2 flex items-center gap-2">
|
||||
{@render props.input?.()}
|
||||
</div>
|
||||
<p class="flex-end text-sm opacity-70 md:col-span-3">
|
||||
<p class="flex-end text-sm opacity-50 lg:col-span-3">
|
||||
{#if props.info}
|
||||
{@render props.info?.()}
|
||||
{/if}
|
||||
|
||||
@@ -14,5 +14,8 @@
|
||||
{#if src.includes("image/svg") || src.endsWith(".svg")}
|
||||
<Icon icon={src} {size} class={props.class} />
|
||||
{:else}
|
||||
<img {src} {alt} class="h-{size} w-{size} aspect-square object-cover {props.class}" />
|
||||
<img
|
||||
{src}
|
||||
{alt}
|
||||
class="h-{size} w-{size} min-w-{size} min-h-{size} aspect-square object-cover {props.class}" />
|
||||
{/if}
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
{...props}
|
||||
bind:this={element}
|
||||
data-component="PageContent"
|
||||
class="scroll-container cw md:bottom-sai fixed bottom-[calc(var(--saib)+3.5rem)] top-[calc(var(--sait)+3rem)] z-feature overflow-y-auto overflow-x-hidden {props.class}">
|
||||
class="scroll-container cw cb fixed top-[calc(var(--sait)+3rem)] z-feature overflow-y-auto overflow-x-hidden {props.class}">
|
||||
{@render children?.()}
|
||||
</div>
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
</script>
|
||||
|
||||
{#if href}
|
||||
<a {href} class="relative z-nav-item flex h-14 w-14 items-center justify-center">
|
||||
<a {href} class="relative z-nav-item flex h-14 w-14 items-center justify-center p-1">
|
||||
<div
|
||||
class="avatar cursor-pointer rounded-full p-2 {restProps.class} transition-colors hover:bg-base-300"
|
||||
class="aspect-square flex-grow cursor-pointer rounded-full {restProps.class} flex items-center justify-center transition-colors hover:bg-base-300"
|
||||
class:bg-base-300={active}
|
||||
class:tooltip={title}
|
||||
data-tip={title}>
|
||||
@@ -29,9 +29,9 @@
|
||||
</div>
|
||||
</a>
|
||||
{:else}
|
||||
<Button {onclick} class="relative z-nav-item flex h-14 w-14 items-center justify-center">
|
||||
<Button {onclick} class="relative z-nav-item flex h-14 w-14 items-center justify-center p-1">
|
||||
<div
|
||||
class="avatar cursor-pointer rounded-full p-2 {restProps.class} transition-colors hover:bg-base-300"
|
||||
class="aspect-square flex-grow cursor-pointer rounded-full {restProps.class} flex items-center justify-center transition-colors hover:bg-base-300"
|
||||
class:bg-base-300={active}
|
||||
class:tooltip={title}
|
||||
data-tip={title}>
|
||||
|
||||
@@ -76,9 +76,8 @@
|
||||
onclick={stopPropagation(preventDefault(() => select(value)))}>
|
||||
<Component {value}></Component>
|
||||
</button>
|
||||
{:else}
|
||||
<div class="tiptap-suggestions__item">No results</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if items.length === 0}
|
||||
<div class="tiptap-suggestions__empty">No results</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
+27
-28
@@ -1,17 +1,16 @@
|
||||
<script lang="ts">
|
||||
import "@src/app.css"
|
||||
import "@capacitor-community/safe-area"
|
||||
import {throttle} from "throttle-debounce"
|
||||
import * as nip19 from "nostr-tools/nip19"
|
||||
import type {Unsubscriber} from "svelte/store"
|
||||
import {get} from "svelte/store"
|
||||
import {App, type URLOpenListenerEvent} from "@capacitor/app"
|
||||
import {dev} from "$app/environment"
|
||||
import {goto} from "$app/navigation"
|
||||
import {sync} from "@welshman/store"
|
||||
import {call, spec} from "@welshman/lib"
|
||||
import {sync, throttled} from "@welshman/store"
|
||||
import {call} from "@welshman/lib"
|
||||
import {defaultSocketPolicies} from "@welshman/net"
|
||||
import {pubkey, sessions, signerLog, shouldUnwrap, SignerLogEntryStatus} from "@welshman/app"
|
||||
import {pubkey, sessions, signerLog, shouldUnwrap} from "@welshman/app"
|
||||
import * as lib from "@welshman/lib"
|
||||
import * as util from "@welshman/util"
|
||||
import * as feeds from "@welshman/feeds"
|
||||
@@ -20,12 +19,13 @@
|
||||
import * as welshmanSigner from "@welshman/signer"
|
||||
import * as net from "@welshman/net"
|
||||
import * as app from "@welshman/app"
|
||||
import {isMobile} from "@lib/html"
|
||||
import * as implicit from "@lib/implicit"
|
||||
import AppContainer from "@app/components/AppContainer.svelte"
|
||||
import ModalContainer from "@app/components/ModalContainer.svelte"
|
||||
import {setupHistory} from "@app/util/history"
|
||||
import {setupTracking} from "@app/util/tracking"
|
||||
import {setupAnalytics} from "@app/util/analytics"
|
||||
import {authPolicy, trustPolicy, mostlyRestrictedPolicy} from "@app/util/policies"
|
||||
import {authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy} from "@app/util/policies"
|
||||
import {kv, db} from "@app/core/storage"
|
||||
import {userSettingsValues} from "@app/core/state"
|
||||
import {syncApplicationData} from "@app/core/sync"
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
const {children} = $props()
|
||||
|
||||
const policies = [authPolicy, trustPolicy, mostlyRestrictedPolicy]
|
||||
const policies = [authPolicy, blockPolicy, trustPolicy, mostlyRestrictedPolicy]
|
||||
|
||||
// Add stuff to window for convenience
|
||||
Object.assign(window, {
|
||||
@@ -50,6 +50,7 @@
|
||||
nip19,
|
||||
theme,
|
||||
...lib,
|
||||
...implicit,
|
||||
...welshmanSigner,
|
||||
...router,
|
||||
...store,
|
||||
@@ -129,8 +130,8 @@
|
||||
// Remove policies when we're done
|
||||
unsubscribers.push(() => defaultSocketPolicies.splice(-policies.length))
|
||||
|
||||
// History, navigation, bug tracking, application data
|
||||
unsubscribers.push(setupHistory(), setupAnalytics(), setupTracking(), syncApplicationData())
|
||||
// History, navigation, application data
|
||||
unsubscribers.push(setupHistory(), setupAnalytics(), syncApplicationData())
|
||||
|
||||
// Subscribe to badge count for changes
|
||||
unsubscribers.push(notifications.badgeCount.subscribe(notifications.handleBadgeCountChanges))
|
||||
@@ -140,25 +141,23 @@
|
||||
|
||||
// Listen for signer errors, report to user via toast
|
||||
unsubscribers.push(
|
||||
signerLog.subscribe(
|
||||
throttle(10_000, $log => {
|
||||
const recent = $log.slice(-10)
|
||||
const success = recent.filter(spec({status: SignerLogEntryStatus.Success}))
|
||||
const failure = recent.filter(spec({status: SignerLogEntryStatus.Failure}))
|
||||
throttled(10_000, signerLog).subscribe($log => {
|
||||
const cutoff = Date.now() - 3_000
|
||||
const recent = $log.filter(x => x.started_at < cutoff).slice(-10)
|
||||
const ok = recent.filter(x => x.ok)
|
||||
|
||||
if (!$toast && failure.length > 5 && success.length === 0) {
|
||||
pushToast({
|
||||
theme: "error",
|
||||
timeout: 60_000,
|
||||
message: "Your signer appears to be unresponsive.",
|
||||
action: {
|
||||
message: "Details",
|
||||
onclick: () => goto("/settings/profile"),
|
||||
},
|
||||
})
|
||||
}
|
||||
}),
|
||||
),
|
||||
if (!$toast && recent.length > 5 && ok.length === 0) {
|
||||
pushToast({
|
||||
theme: "error",
|
||||
timeout: 60_000,
|
||||
message: "Your signer appears to be unresponsive.",
|
||||
action: {
|
||||
message: "Details",
|
||||
onclick: () => goto("/settings/profile"),
|
||||
},
|
||||
})
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
// Sync theme and font size
|
||||
@@ -191,7 +190,7 @@
|
||||
{#await unsubscribe}
|
||||
<!-- pass -->
|
||||
{:then}
|
||||
<div>
|
||||
<div class={isMobile ? "mobile" : ""}>
|
||||
<AppContainer>
|
||||
{@render children()}
|
||||
</AppContainer>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
import InfoSquare from "@assets/icons/info-square.svg?dataurl"
|
||||
import Exit from "@assets/icons/logout-3.svg?dataurl"
|
||||
import GalleryMinimalistic from "@assets/icons/gallery-minimalistic.svg?dataurl"
|
||||
import Shield from "@assets/icons/shield-minimalistic.svg?dataurl"
|
||||
import Bell from "@assets/icons/bell.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
@@ -60,16 +61,21 @@
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly|local={{delay: 250}}>
|
||||
<SecondaryNavItem href="/settings/privacy">
|
||||
<Icon icon={Shield} /> Privacy
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly|local={{delay: 300}}>
|
||||
<SecondaryNavItem onclick={toggleTheme}>
|
||||
<Icon icon={Moon} /> Theme
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly|local={{delay: 300}}>
|
||||
<div in:fly|local={{delay: 350}}>
|
||||
<SecondaryNavItem href="/settings/about">
|
||||
<Icon icon={InfoSquare} /> About
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly|local={{delay: 350}}>
|
||||
<div in:fly|local={{delay: 400}}>
|
||||
<SecondaryNavItem class="text-error hover:text-error" onclick={logout}>
|
||||
<Icon icon={Exit} /> Log Out
|
||||
</SecondaryNavItem>
|
||||
|
||||
@@ -87,36 +87,6 @@
|
||||
</div>
|
||||
{/snippet}
|
||||
</Field>
|
||||
<strong class="text-lg">Privacy Settings</strong>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report errors?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
bind:checked={settings.report_errors} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Allow {PLATFORM_NAME} to send error reports to help improve the app.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report usage?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.report_usage} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Allow {PLATFORM_NAME} to collect anonymous usage data.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<strong class="text-lg">Editor Settings</strong>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<script lang="ts">
|
||||
import {preventDefault} from "@lib/html"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {pushToast} from "@app/util/toast"
|
||||
import {PLATFORM_NAME, RelayAuthMode, userSettingsValues} from "@app/core/state"
|
||||
import {publishSettings} from "@app/core/commands"
|
||||
|
||||
const reset = () => {
|
||||
settings = {...$userSettingsValues}
|
||||
}
|
||||
|
||||
const onAuthModeChange = (e: any) => {
|
||||
settings.auth_mode = e.target.checked ? RelayAuthMode.Aggressive : RelayAuthMode.Conservative
|
||||
}
|
||||
|
||||
const onsubmit = preventDefault(async () => {
|
||||
await publishSettings($state.snapshot(settings))
|
||||
|
||||
pushToast({message: "Your settings have been saved!"})
|
||||
})
|
||||
|
||||
let settings = $state({...$userSettingsValues})
|
||||
</script>
|
||||
|
||||
<form class="content column gap-4" {onsubmit}>
|
||||
<div class="card2 bg-alt col-4 shadow-md">
|
||||
<strong class="text-lg">Privacy Settings</strong>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Authenticate with unknown relays?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
onchange={onAuthModeChange}
|
||||
checked={settings.auth_mode === RelayAuthMode.Aggressive} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Controls whether {PLATFORM_NAME} will identify you to relays not in your lists.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report errors?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input
|
||||
type="checkbox"
|
||||
class="toggle toggle-primary"
|
||||
bind:checked={settings.report_errors} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Allow {PLATFORM_NAME} to send error reports to help improve the app.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<FieldInline>
|
||||
{#snippet label()}
|
||||
<p>Report usage?</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<input type="checkbox" class="toggle toggle-primary" bind:checked={settings.report_usage} />
|
||||
{/snippet}
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Allow {PLATFORM_NAME} to collect anonymous usage data.
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
<div class="mt-4 flex flex-row items-center justify-between gap-4">
|
||||
<Button class="btn btn-neutral" onclick={reset}>Discard Changes</Button>
|
||||
<Button type="submit" class="btn btn-primary">Save Changes</Button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
const startEdit = () => pushModal(ProfileEdit)
|
||||
|
||||
const startEject = () => pushModal(InfoKeys)
|
||||
|
||||
const startDelete = () => pushModal(ProfileDelete)
|
||||
|
||||
const startRecovery = () => pushModal(InfoKeys)
|
||||
|
||||
let showAdvanced = false
|
||||
</script>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
{#snippet info()}
|
||||
<p>
|
||||
Your email and password can only be used to log into {PLATFORM_NAME}.
|
||||
<Button class="link" onclick={startEject}>Start holding your own keys</Button>
|
||||
<Button class="link" onclick={startRecovery}>Start holding your own keys</Button>
|
||||
</p>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
@@ -156,7 +156,7 @@
|
||||
</div>
|
||||
{#if showAdvanced}
|
||||
<div transition:slideAndFade class="flex flex-col gap-2 pt-4">
|
||||
<Button class="btn btn-outline btn-error" onclick={startDelete}>
|
||||
<Button class="btn btn-error" onclick={startDelete}>
|
||||
<Icon icon={TrashBin2} />
|
||||
Delete your profile
|
||||
</Button>
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
<script lang="ts">
|
||||
import {onMount} from "svelte"
|
||||
import {pubkey, getRelayLists, getMessagingRelayLists, derivePubkeyRelays} from "@welshman/app"
|
||||
import {
|
||||
pubkey,
|
||||
getRelayLists,
|
||||
derivePubkeyRelays,
|
||||
addRelay,
|
||||
removeRelay,
|
||||
addBlockedRelay,
|
||||
removeBlockedRelay,
|
||||
addMessagingRelay,
|
||||
removeMessagingRelay,
|
||||
} from "@welshman/app"
|
||||
import {RelayMode} from "@welshman/util"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
@@ -9,43 +19,42 @@
|
||||
import RelayAdd from "@app/components/RelayAdd.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {discoverRelays} from "@app/core/requests"
|
||||
import {setRelayPolicy, setMessagingRelayPolicy} from "@app/core/commands"
|
||||
import Globus from "@assets/icons/globus.svg?dataurl"
|
||||
import Inbox from "@assets/icons/inbox.svg?dataurl"
|
||||
import Mailbox from "@assets/icons/mailbox.svg?dataurl"
|
||||
import ForbiddenCircle from "@assets/icons/forbidden-circle.svg?dataurl"
|
||||
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
||||
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
|
||||
|
||||
const readRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Read)
|
||||
const writeRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Write)
|
||||
const blockedRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Blocked)
|
||||
const messagingRelayUrls = derivePubkeyRelays($pubkey!, RelayMode.Messaging)
|
||||
|
||||
const addReadRelay = () =>
|
||||
const addReadRelays = () =>
|
||||
pushModal(RelayAdd, {
|
||||
relays: readRelayUrls,
|
||||
addRelay: (url: string) => setRelayPolicy(url, true, $writeRelayUrls.includes(url)),
|
||||
addRelay: (url: string) => addRelay(url, RelayMode.Read),
|
||||
})
|
||||
|
||||
const addWriteRelay = () =>
|
||||
const addWriteRelays = () =>
|
||||
pushModal(RelayAdd, {
|
||||
relays: writeRelayUrls,
|
||||
addRelay: (url: string) => setRelayPolicy(url, $readRelayUrls.includes(url), true),
|
||||
addRelay: (url: string) => addRelay(url, RelayMode.Write),
|
||||
})
|
||||
|
||||
const addMessagingRelay = () =>
|
||||
pushModal(RelayAdd, {
|
||||
relays: messagingRelayUrls,
|
||||
addRelay: (url: string) => setMessagingRelayPolicy(url, true),
|
||||
})
|
||||
const addBlockedRelays = () =>
|
||||
pushModal(RelayAdd, {relays: blockedRelayUrls, addRelay: addBlockedRelay})
|
||||
|
||||
const removeReadRelay = (url: string) => setRelayPolicy(url, false, $writeRelayUrls.includes(url))
|
||||
const addMessagingRelays = () =>
|
||||
pushModal(RelayAdd, {relays: messagingRelayUrls, addRelay: addMessagingRelay})
|
||||
|
||||
const removeWriteRelay = (url: string) => setRelayPolicy(url, $readRelayUrls.includes(url), false)
|
||||
const removeReadRelay = (url: string) => removeRelay(url, RelayMode.Read)
|
||||
|
||||
const removeMessagingRelay = (url: string) => setMessagingRelayPolicy(url, false)
|
||||
const removeWriteRelay = (url: string) => removeRelay(url, RelayMode.Write)
|
||||
|
||||
onMount(() => {
|
||||
discoverRelays([...getRelayLists(), ...getMessagingRelayLists()])
|
||||
discoverRelays(getRelayLists())
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -77,7 +86,7 @@
|
||||
{:else}
|
||||
<p class="text-center text-sm">No relays found</p>
|
||||
{/each}
|
||||
<Button class="btn btn-primary mt-2" onclick={addWriteRelay}>
|
||||
<Button class="btn btn-primary mt-2" onclick={addWriteRelays}>
|
||||
<Icon icon={AddCircle} />
|
||||
Add Relay
|
||||
</Button>
|
||||
@@ -109,7 +118,7 @@
|
||||
{:else}
|
||||
<p class="text-center text-sm">No relays found</p>
|
||||
{/each}
|
||||
<Button class="btn btn-primary mt-2" onclick={addReadRelay}>
|
||||
<Button class="btn btn-primary mt-2" onclick={addReadRelays}>
|
||||
<Icon icon={AddCircle} />
|
||||
Add Relay
|
||||
</Button>
|
||||
@@ -142,7 +151,38 @@
|
||||
{:else}
|
||||
<p class="text-center text-sm">No relays found</p>
|
||||
{/each}
|
||||
<Button class="btn btn-primary mt-2" onclick={addMessagingRelay}>
|
||||
<Button class="btn btn-primary mt-2" onclick={addMessagingRelays}>
|
||||
<Icon icon={AddCircle} />
|
||||
Add Relay
|
||||
</Button>
|
||||
</div>
|
||||
</Collapse>
|
||||
<Collapse class="card2 bg-alt column gap-4 shadow-md">
|
||||
{#snippet title()}
|
||||
<h2 class="flex items-center gap-3 text-xl">
|
||||
<Icon icon={ForbiddenCircle} />
|
||||
Blocked Relays
|
||||
</h2>
|
||||
{/snippet}
|
||||
{#snippet description()}
|
||||
<p class="text-sm">
|
||||
These relays will never be connected to by clients supporting this policy.
|
||||
</p>
|
||||
{/snippet}
|
||||
<div class="column gap-2">
|
||||
{#each $blockedRelayUrls.sort() as url (url)}
|
||||
<RelayItem {url}>
|
||||
<Button
|
||||
class="tooltip flex items-center"
|
||||
data-tip="Stop using this relay"
|
||||
onclick={() => removeBlockedRelay(url)}>
|
||||
<Icon icon={CloseCircle} />
|
||||
</Button>
|
||||
</RelayItem>
|
||||
{:else}
|
||||
<p class="text-center text-sm">No relays found</p>
|
||||
{/each}
|
||||
<Button class="btn btn-primary mt-2" onclick={addBlockedRelays}>
|
||||
<Icon icon={AddCircle} />
|
||||
Add Relay
|
||||
</Button>
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte"
|
||||
import {pushModal} from "@app/util/modal"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {decodeRelay, deriveRelayAuthError, relaysPendingTrust} from "@app/core/state"
|
||||
import {decodeRelay, relaysPendingTrust} from "@app/core/state"
|
||||
import {deriveRelayAuthError} from "@app/core/commands"
|
||||
import {notifications} from "@app/util/notifications"
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import {page} from "$app/stores"
|
||||
import type {Readable} from "svelte/store"
|
||||
import type {MakeNonOptional} from "@welshman/lib"
|
||||
import {now, formatTimestampAsDate, ago, MINUTE} from "@welshman/lib"
|
||||
import {now, int, formatTimestampAsDate, ago, MINUTE} from "@welshman/lib"
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
import {
|
||||
makeEvent,
|
||||
@@ -171,6 +171,8 @@
|
||||
const onScroll = () => {
|
||||
showScrollButton = Math.abs(element?.scrollTop || 0) > 1500
|
||||
|
||||
const newMessages = document.getElementById("new-messages")
|
||||
|
||||
if (!newMessages || newMessagesSeen) {
|
||||
showFixedNewMessages = false
|
||||
} else {
|
||||
@@ -185,7 +187,7 @@
|
||||
}
|
||||
|
||||
const scrollToNewMessages = () =>
|
||||
newMessages?.scrollIntoView({behavior: "smooth", block: "center"})
|
||||
document.getElementById("new-messages")?.scrollIntoView({behavior: "smooth", block: "center"})
|
||||
|
||||
const scrollToBottom = () => element?.scrollTo({top: 0, behavior: "smooth"})
|
||||
|
||||
@@ -195,7 +197,6 @@
|
||||
let share = $state(popKey<TrustedEvent | undefined>("share"))
|
||||
let parent: TrustedEvent | undefined = $state()
|
||||
let element: HTMLElement | undefined = $state()
|
||||
let newMessages: HTMLElement | undefined = $state()
|
||||
let chatCompose: HTMLElement | undefined = $state()
|
||||
let dynamicPadding: HTMLElement | undefined = $state()
|
||||
let newMessagesSeen = false
|
||||
@@ -213,6 +214,7 @@
|
||||
let previousDate
|
||||
let previousKind
|
||||
let previousPubkey
|
||||
let previousCreatedAt = 0
|
||||
let newMessagesSeen = false
|
||||
|
||||
if (events) {
|
||||
@@ -249,14 +251,15 @@
|
||||
type: "note",
|
||||
value: event,
|
||||
showPubkey:
|
||||
date !== previousDate ||
|
||||
previousPubkey !== event.pubkey ||
|
||||
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
||||
[ROOM_ADD_MEMBER, ROOM_REMOVE_MEMBER].includes(previousKind!),
|
||||
})
|
||||
|
||||
previousDate = date
|
||||
previousKind = event.kind
|
||||
previousPubkey = event.pubkey
|
||||
previousCreatedAt = event.created_at
|
||||
seen.add(event.id)
|
||||
}
|
||||
}
|
||||
@@ -389,7 +392,7 @@
|
||||
{#each elements as { type, id, value, showPubkey } (id)}
|
||||
{#if type === "new-messages"}
|
||||
<div
|
||||
bind:this={newMessages}
|
||||
{id}
|
||||
class="flex items-center py-2 text-xs transition-colors"
|
||||
class:opacity-0={showFixedNewMessages}>
|
||||
<div class="h-px flex-grow bg-primary"></div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {COMMENT, getTagValue} from "@welshman/util"
|
||||
import {request} from "@welshman/net"
|
||||
import {repository} from "@welshman/app"
|
||||
import {deriveEventsById, deriveEventsDesc} from "@welshman/store"
|
||||
import {deriveEventsById, deriveEventsAsc} from "@welshman/store"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import SortVertical from "@assets/icons/sort-vertical.svg?dataurl"
|
||||
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
||||
@@ -30,7 +30,7 @@
|
||||
const url = decodeRelay(relay)
|
||||
const event = deriveEvent(id, [url])
|
||||
const filters = [{kinds: [COMMENT], "#E": [id]}]
|
||||
const replies = deriveEventsDesc(deriveEventsById({filters, repository}))
|
||||
const replies = deriveEventsAsc(deriveEventsById({filters, repository}))
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import {page} from "$app/stores"
|
||||
import type {Readable} from "svelte/store"
|
||||
import {readable} from "svelte/store"
|
||||
import {now, formatTimestampAsDate, MINUTE, ago} from "@welshman/lib"
|
||||
import {now, int, formatTimestampAsDate, MINUTE, ago} from "@welshman/lib"
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
import {makeEvent, MESSAGE, RELAY_ADD_MEMBER, RELAY_REMOVE_MEMBER} from "@welshman/util"
|
||||
import {pubkey, publishThunk} from "@welshman/app"
|
||||
@@ -98,6 +98,8 @@
|
||||
const onScroll = () => {
|
||||
showScrollButton = Math.abs(element?.scrollTop || 0) > 1500
|
||||
|
||||
const newMessages = document.getElementById("new-messages")
|
||||
|
||||
if (!newMessages || newMessagesSeen) {
|
||||
showFixedNewMessages = false
|
||||
} else {
|
||||
@@ -112,7 +114,7 @@
|
||||
}
|
||||
|
||||
const scrollToNewMessages = () =>
|
||||
newMessages?.scrollIntoView({behavior: "smooth", block: "center"})
|
||||
document.getElementById("new-messages")?.scrollIntoView({behavior: "smooth", block: "center"})
|
||||
|
||||
const scrollToBottom = () => element?.scrollTo({top: 0, behavior: "smooth"})
|
||||
|
||||
@@ -120,7 +122,6 @@
|
||||
let share = $state(popKey<TrustedEvent | undefined>("share"))
|
||||
let parent: TrustedEvent | undefined = $state()
|
||||
let element: HTMLElement | undefined = $state()
|
||||
let newMessages: HTMLElement | undefined = $state()
|
||||
let chatCompose: HTMLElement | undefined = $state()
|
||||
let dynamicPadding: HTMLElement | undefined = $state()
|
||||
let newMessagesSeen = false
|
||||
@@ -138,6 +139,7 @@
|
||||
let previousDate
|
||||
let previousKind
|
||||
let previousPubkey
|
||||
let previousCreatedAt = 0
|
||||
let newMessagesSeen = false
|
||||
|
||||
if (events) {
|
||||
@@ -174,14 +176,15 @@
|
||||
type: "note",
|
||||
value: event,
|
||||
showPubkey:
|
||||
date !== previousDate ||
|
||||
previousPubkey !== event.pubkey ||
|
||||
event.created_at - previousCreatedAt > int(3, MINUTE) ||
|
||||
[RELAY_ADD_MEMBER, RELAY_REMOVE_MEMBER].includes(previousKind!),
|
||||
})
|
||||
|
||||
previousDate = date
|
||||
previousKind = event.kind
|
||||
previousPubkey = event.pubkey
|
||||
previousCreatedAt = event.created_at
|
||||
seen.add(event.id)
|
||||
}
|
||||
}
|
||||
@@ -273,7 +276,7 @@
|
||||
{#each elements as { type, id, value, showPubkey } (id)}
|
||||
{#if type === "new-messages"}
|
||||
<div
|
||||
bind:this={newMessages}
|
||||
{id}
|
||||
class="flex items-center py-2 text-xs transition-colors"
|
||||
class:opacity-0={showFixedNewMessages}>
|
||||
<div class="h-px flex-grow bg-primary"></div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {COMMENT, getTagValue} from "@welshman/util"
|
||||
import {repository} from "@welshman/app"
|
||||
import {request} from "@welshman/net"
|
||||
import {deriveEventsById, deriveEventsDesc} from "@welshman/store"
|
||||
import {deriveEventsById, deriveEventsAsc} from "@welshman/store"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import SortVertical from "@assets/icons/sort-vertical.svg?dataurl"
|
||||
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
||||
@@ -29,7 +29,7 @@
|
||||
const url = decodeRelay(relay)
|
||||
const event = deriveEvent(id, [url])
|
||||
const filters = [{kinds: [COMMENT], "#E": [id]}]
|
||||
const replies = deriveEventsDesc(deriveEventsById({repository, filters}))
|
||||
const replies = deriveEventsAsc(deriveEventsById({repository, filters}))
|
||||
const summary = getTagValue("summary", $event?.tags || [])
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import {COMMENT, getTagValue} from "@welshman/util"
|
||||
import {repository} from "@welshman/app"
|
||||
import {request} from "@welshman/net"
|
||||
import {deriveEventsById, deriveEventsDesc} from "@welshman/store"
|
||||
import {deriveEventsById, deriveEventsAsc} from "@welshman/store"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import SortVertical from "@assets/icons/sort-vertical.svg?dataurl"
|
||||
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
||||
@@ -28,7 +28,7 @@
|
||||
const url = decodeRelay(relay)
|
||||
const event = deriveEvent(id, [url])
|
||||
const filters = [{kinds: [COMMENT], "#E": [id]}]
|
||||
const replies = deriveEventsDesc(deriveEventsById({filters, repository}))
|
||||
const replies = deriveEventsAsc(deriveEventsById({filters, repository}))
|
||||
|
||||
const back = () => history.back()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user