diff --git a/.gitignore b/.gitignore index 07e529b0..ae2f9459 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ out pnpm-lock.yaml *.db *.db-journal +bun.lockb # Editor directories and files .vscode/* diff --git a/.husky/pre-commit b/.husky/pre-commit index 58b1861c..375d2a1d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm exec lint-staged +bun run lint-staged diff --git a/README.md b/README.md index 1ef037a5..03daf97c 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ Download Lume for your platform here: [https://github.com/luminous-devs/lume/rel Supported platform: macOS, Windows and Linux +### Prerequisites + +- Bun: https://bun.sh/docs/installation + +- Tauri: https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-macos + ### Develop Clone project @@ -19,23 +25,17 @@ git clone https://github.com/luminous-devs/lume.git && cd lume Install packages ``` -pnpm install +bun install ``` -Run dev +Run dev build ``` -pnpm tauri dev +bun tauri dev ``` -Build +Generate production build ``` -pnpm tauri build -``` - -(Advance) - Generate SQLite migration - -``` -pnpm add-migrate -``` +bun tauri build +``` \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index eff90d90..3d96f4db 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 4eb4bd2e..30586057 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "prepare": "husky install", "lint": "eslint ./src --fix", "format": "prettier ./src --write", - "dep-update": "pnpm update && cd src-tauri/ && cargo update" + "dep-update": "bun update && cd src-tauri/ && cargo update" }, "lint-staged": { "**/*.{ts, tsx}": "eslint --fix", diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index bcb2bb11..920a9237 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "../node_modules/@tauri-apps/cli/schema.json", "build": { - "beforeBuildCommand": "pnpm build", - "beforeDevCommand": "pnpm dev", + "beforeBuildCommand": "bun run build", + "beforeDevCommand": "bun run dev", "devPath": "http://localhost:3000", "distDir": "../dist", "withGlobalTauri": true diff --git a/src/app/auth/unlock.tsx b/src/app/auth/unlock.tsx index 2a235dfd..95609c5a 100644 --- a/src/app/auth/unlock.tsx +++ b/src/app/auth/unlock.tsx @@ -56,7 +56,7 @@ export function UnlockScreen() { if (!db.secureDB) db.secureDB = stronghold; const privkey = await db.secureLoad(db.account.pubkey); - const uri = await db.secureLoad('walletConnectURL', 'alby'); + const uri = await db.secureLoad('walletConnectURL', 'nwc'); if (privkey) setPrivkey(privkey); if (uri) setWalletConnectURL(uri); diff --git a/src/app/nwc/components/alby.tsx b/src/app/nwc/components/alby.tsx index 5dc9299b..a141cbf5 100644 --- a/src/app/nwc/components/alby.tsx +++ b/src/app/nwc/components/alby.tsx @@ -45,7 +45,7 @@ export function NWCAlby() { }); webview.listen('tauri://close-requested', async () => { - await db.secureSave('walletConnectURL', walletConnectURL, 'alby'); + await db.secureSave('walletConnectURL', walletConnectURL, 'nwc'); setWalletConnectURL(walletConnectURL); setIsConnected(true); setIsloading(false); @@ -59,7 +59,7 @@ export function NWCAlby() { return (
-
+
@@ -71,7 +71,7 @@ export function NWCAlby() { diff --git a/src/app/nwc/components/other.tsx b/src/app/nwc/components/other.tsx index a775940b..49266b06 100644 --- a/src/app/nwc/components/other.tsx +++ b/src/app/nwc/components/other.tsx @@ -57,9 +57,10 @@ export function NWCOther() { const params = new URLSearchParams(uriObj.search); if (params.has('relay') && params.has('secret')) { - await db.secureSave('walletConnectURL', data.uri, 'alby'); + await db.secureSave('walletConnectURL', data.uri, 'nwc'); setWalletConnectURL(data.uri); setIsloading(false); + setIsOpen(false); } } catch (e) { setIsloading(false); @@ -73,22 +74,22 @@ export function NWCOther() { return ( -
-
+
+
URI String

- Using format nostr+walletconnect:// + Using format nostr+walletconnect:

@@ -123,6 +124,7 @@ export function NWCOther() { [ + state.walletConnectURL, + state.setWalletConnectURL, + ]); + + const remove = async () => { + setWalletConnectURL(''); + await db.secureSave('walletConnectURL', '', 'nwc'); + }; + return (
-

Nostr Wallet Connect

+

+ Nostr Wallet Connect (Beta) +

Sending tips easily via Bitcoin Lightning.

-
- - +
+ {!walletConnectURL ? ( +
+ + +
+ ) : ( +
+
+ +

You're using nostr wallet connect

+
+
+