Skip to content

Commit

Permalink
begin implementation of ScrcpyPlusBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 5, 2024
1 parent 61e0b30 commit 04010b9
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
5 changes: 4 additions & 1 deletion app/src/components/home/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<div class="card section bg-base-300 shadow-xl">
<div class="card-body">

<h2 class="card-title">Devices</h2>
<div class="flex">
<h2 class="card-title">Devices</h2>
<button class="btn btn-primary min-h-8 h-8 ml-auto">Add wireless device</button>
</div>

<div role="tablist" class="tabs tabs-boxed">
<a v-for="device, i in devices" role="tab" class="tab" :class="device.selected ? 'tab-active' : ''" @click="select(device, i)">{{ device.name }}</a>
Expand Down
5 changes: 4 additions & 1 deletion app/src/components/home/information.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>

<div class="card-actions justify-end">
<button class="btn">Join the Discord</button>
<button class="btn btn-ghost">Join the Discord</button>
<router-link to="/settings">
<button class="btn btn-primary">Settings</button>
</router-link>
Expand All @@ -27,6 +27,9 @@ export default {
return {
scrcpyPlusVersion: this.$version
}
},
mounted() {
this.spb.execute('test');
}
}
</script>
5 changes: 4 additions & 1 deletion app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { version } from '../package.json';
import App from './App.vue'
import router from './router'
import './app.css';
import ScrcpyPlusBridge from "./plugins/scrcpy-plus-bridge.js";

const app = createApp(App);
app.use(router).mount('#app');
app.use(router);
app.use(ScrcpyPlusBridge);
app.mount('#app');
app.config.globalProperties.$version = version;
12 changes: 0 additions & 12 deletions app/src/plugins/execute.js

This file was deleted.

12 changes: 12 additions & 0 deletions app/src/plugins/scrcpy-plus-bridge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function execute(data) {
console.log(data)
}

// This file is the 'SCRCPY Plus Bridge' that bridges the electron app to the host system, be it Windows, Linux or MacOS.
export default {
install: (app, options) => {
app.spb = {
execute
}
},
};
2 changes: 1 addition & 1 deletion app/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
daisyui: {
themes: [
{
dark: {
scrcpyplus: {
...require("daisyui/src/theming/themes")["dark"],
primary: "#8867c0",
},
Expand Down

0 comments on commit 04010b9

Please sign in to comment.