Skip to content

Commit

Permalink
fix: 🐛 Repair floating action bar start application error
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 6, 2024
1 parent b2bb0ae commit 487e7e2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion control/electron/events/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function (controlWindow) {
return {
label: item.label,
click() {
controlWindow.webContents.send(channel, item.value)
controlWindow.webContents.send(channel, item.value, item)
},
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
</template>

<script>
import { openFloatControl } from '$/utils/device/index.js'
import { toRaw } from 'vue'
export default {
props: {
device: {
Expand Down Expand Up @@ -80,8 +83,8 @@ export default {
window.electron.ipcRenderer.once(
channel,
(event, data) => {
this.handleCommand(data)
(event, value, item) => {
this.handleCommand(item)
},
)
Expand All @@ -103,6 +106,8 @@ export default {
await window.scrcpy.startApp(this.device.id, { title, commands, packageName: value })
openFloatControl(toRaw(this.device))
this.loading = false
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default {
window.electron.ipcRenderer.once(
channel,
(event, data) => {
console.log('data')
this.handleCommand(data)
},
)
Expand Down

0 comments on commit 487e7e2

Please sign in to comment.