add webremote url in modal

This commit is contained in:
vapormusic 2022-01-22 11:00:37 +07:00
parent 82f049dcd2
commit 2db8c535a0
4 changed files with 11 additions and 4 deletions

View file

@ -426,10 +426,15 @@ export class Win {
//QR Code
electron.ipcMain.handle('setRemoteQR', async (event , _) => {
let url = await qrcode2.toDataURL(`http://${getIp()}:${this.remotePort}`)
console.log(url)
return url;
})
//Remote URL
electron.ipcMain.handle('setRemoteURL', async (event , _) => {
let url = `http://${getIp()}:${this.remotePort}`
return await url;
})
/* *********************************************************************************************
* Window Events
* **********************************************************************************************/

View file

@ -231,6 +231,7 @@ const app = new Vue({
loadingState: 0, // 0 loading, 1 loaded, 2 error
id: ""
},
webremoteurl : "",
webremoteqr: "",
mxmtoken: "",
mkIsReady: false,
@ -3298,6 +3299,7 @@ const app = new Vue({
},
async showWebRemoteQR(){
this.webremoteqr = await ipcRenderer.invoke('setRemoteQR','')
this.webremoteurl = await ipcRenderer.invoke('setRemoteURL','')
this.modals.qrcode = true;
}

View file

@ -2,7 +2,7 @@
<div class="modal-fullscreen spatialproperties-panel">
<div class="modal-window" >
<div class="modal-header">
<div class="modal-title">Web Remote QR</div>
<div class="modal-title">{{`Web Remote QR : ` + url }}</div>
<button class="close-btn" @click="close()"></button>
</div>
<div class="modal-content">
@ -21,7 +21,7 @@
}
},
props: ["src"],
props: ["src","url"],
mounted() {
},

View file

@ -610,7 +610,7 @@
<spatial-properties v-if="modals.spatialProperties"></spatial-properties>
</transition>
<transition name="modal">
<qrcode-modal v-if="modals.qrcode" :src="webremoteqr"></qrcode-modal>
<qrcode-modal v-if="modals.qrcode" :src="webremoteqr" :url="webremoteurl"></qrcode-modal>
</transition>
<div id="apple-music-video-container">
<div id="apple-music-video-player-controls">