mirror of https://codeberg.org/pzp/zooboard.git
fix small quirks
This commit is contained in:
parent
4401cc3b8e
commit
53bde957df
|
@ -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
|
||||
|
|
7
main.js
7
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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue