diff --git a/README.md b/README.md index 411807a..4db307d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ To develop: 1. `npm install` -2. `npm start` in one terminal, `npm run electron-dev` in another +2. `npm start` in one terminal, `npm run electron` in another 3. Edit JS code 4. Sometimes you may need to re-run step 2 diff --git a/main.js b/main.js index 0a88304..7e04c27 100644 --- a/main.js +++ b/main.js @@ -237,10 +237,9 @@ async function handlePPPPPUri(uri) { return } if (!uri.startsWith('ppppp://')) return - console.log('handlePPPPPUri', uri) const commands = peer.invite.parse(uri) for (const command of commands) { - console.log(command) + console.log('Executing command', JSON.stringify(command)) switch (command.type) { case 'join': { try { @@ -258,9 +257,7 @@ async function handlePPPPPUri(uri) { case 'promise.follow': { const [issuerType, issuerPubkey] = command.issuer if (issuerType !== 'pubkey') { - throw new Error( - 'dont know how to claim promise issued by ' + issuerType - ) + throw new Error(`Dont know how to claim a ${issuerType} promise`) } // eslint-disable-next-line no-loop-func peer.addListener('rpc:connect', function onConnect(rpc) { diff --git a/package.json b/package.json index 14a0bb8..94e7d3b 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,11 @@ "main": "main.js", "homepage": "./", "scripts": { - "start": "react-scripts start", + "start": "BROWSER=none react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "electron": "electron .", - "electron-dev": "ELECTRON_START_URL=http://localhost:3000 electron ." + "electron": "ELECTRON_START_URL=http://localhost:3000 DEBUG=*,-shse,-pull-secretstream electron ." }, "dependencies": { "@excalidraw/excalidraw": "0.17.2", diff --git a/src/App.js b/src/App.js index 5456fd6..50666e1 100644 --- a/src/App.js +++ b/src/App.js @@ -11,7 +11,7 @@ let sceneInitialized = false function App() { const [excalidrawAPI, setExcalidrawAPI] = useState(null) - const [inviteModalOpen, setInviteModalOpen] = useState(true) + const [inviteModalOpen, setInviteModalOpen] = useState(false) const [inviteCode, setInviteCode] = useState(null) const openInviteModal = () => setInviteModalOpen(true) const closeInviteModal = () => setInviteModalOpen(false)