Skip to content

Commit

Permalink
feat: 🔖 Version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Frontesque committed Jun 24, 2022
1 parent 486d51c commit 2f5accf
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 27 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<img src="https://github.com/Frontesque/scrcpy-plus/raw/main/icons/SCRCPY%2B.png" alt="scrcpy-plus icon" width="200"/>

### Features
- Supports most SCRCPY flags
- Some ADB commands
- Display connected device info
- 🚩 Supports Most SCRCPY Flags
- 🤖 Some ADB commands
- 📱 Connected Device Information
- 📶 Wireless Screenshare

### Download
- Windows [v1.1.2 Installer (82 MB)](https://github.com/Frontesque/scrcpy-plus/releases/download/1.1.2/scrcpy-plus-1.1.2-installer-win-x64.exe) - [v1.1.2 Portable (110 MB)](https://github.com/Frontesque/scrcpy-plus/releases/download/1.1.2/scrcpy-plus-1.1.2-portable-win-x64.zip)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrcpy-plus",
"version": "1.1.2",
"version": "1.2.0",
"description": "A GUI for scrcpy",
"main": "./dist/main/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/device.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<center v-show="!device">
<v-icon size="50px">mdi-devices</v-icon>
<h1>No Device Found</h1>
<p style="color: #999;">You may need to plug your device in or enable 'USB Debugging'</p>
<p style="color: #999;">You may need to plug in your device or enable 'USB Debugging'</p>
<p>or</p>
<v-btn rounded color="primary" @click="$router.push('/wirelessSetup')">Connect Wirelessly</v-btn>
</center>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/scrcpy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- Error Dialog -->
<v-dialog v-model="dialog" width="500">
<v-card>
<v-card-title class="text-h5 grey darken-1">An error has occured</v-card-title>
<v-card-title class="text-h5 grey darken-3">An error has occured</v-card-title>

<v-card-text v-text="dialogText" style="margin-top: 2em;" />

Expand Down
65 changes: 65 additions & 0 deletions src/renderer/components/scrcpyPlusInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div>

<section>
<h1>SCRCPY+ ({{ version }})</h1>
<h4>SCRCPY ({{ scrcpyVersion }})</h4>
<h4>ADB ({{ adbVersion }})</h4>
<v-btn style="margin-top: 1em;" rounded color="primary" to="/changelog">SCRCPY+ Changelog</v-btn>
</section>

<!-- Error Dialog -->
<v-dialog v-model="dialog" width="500" persistent>
<v-card>
<v-card-title class="text-h5 grey darken-3">Error Starting SCRCPY+</v-card-title>
<v-card-text v-text="error" style="margin-top: 2em;" />
<v-alert text type="error" style="margin: 0 2em 0 2em;">This error could be caused by {{ reason }} not being properly installed on your OS.</v-alert>
<br />
</v-card>
</v-dialog>
<!-- End Error Dialog -->

</div>
</template>

<script>
const env = process.env;
export default {
data() {
return {
version: env.version,
scrcpyVersion: new String(),
adbVersion: new String(),
dialog: false,
error: new String(),
reason: "SCRCPY or ADB"
}
},
async mounted() {
await this.$scrcpy.execute("adb --version")
.then(data => {
this.adbVersion = data.split('\n')[1].split(" ")[1].trim();
})
.catch(err => this.errHandler(err));
await this.$scrcpy.execute("scrcpy --version")
.then(data => {
this.scrcpyVersion = data.split('\n')[0].split(" ")[1].trim();
})
.catch(err => this.errHandler(err));
},
methods: {
errHandler(err) {
this.dialog = true;
this.error = err;
if (err.toString().includes("scrcpy")) return this.reason = "SCRCPY";
if (err.toString() .includes("adb")) return this.reason = "ADB";
}
}
}
</script>
9 changes: 4 additions & 5 deletions src/renderer/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@

module.exports = {
env: {
version: "1.1.2",
scrcpyVersion: "1.23",
adbVersion: "31.0.3-7562133",
//scrcpyPath: "src/extraResources/scrcpy/", //Development
scrcpyPath: "resources/scrcpy/", //Production
version: "1.2.0",
scrcpyPath: "src/extraResources/scrcpy/", //Development
//scrcpyPath: "resources/scrcpy/", //Production
os: "windows",

devicePollRate: 1250,
},
Expand Down
13 changes: 13 additions & 0 deletions src/renderer/pages/changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
<v-btn style="margin-top: 1em;" rounded color="primary" @click="$router.go(-1)">Back</v-btn>
</section>

<section>
<h3>1.2.0</h3>
<ul>
<li>Refactored some of the app to be more modular</li>
<li>Dynamically get the installed version of SCRCPY</li>
<li>Dynamically get the installed version of ADB</li>
<li>Minor UI Tweaks</li>
<li>Multiplatform / Linux Support</li>
<li>Some Bug Fixes</li>
<li>Take 'Wireless Connection' Development Warning Away</li>
</ul>
</section>

<section>
<h3>1.1.2</h3>
<ul>
Expand Down
17 changes: 4 additions & 13 deletions src/renderer/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<template>
<div>

<section>
<h1>SCRCPY+ ({{ version }})</h1>
<h4>SCRCPY ({{ scrcpyVersion }})</h4>
<h4>ADB ({{ adbVersion }})</h4>
<v-btn style="margin-top: 1em;" rounded color="primary" to="/changelog">SCRCPY+ Changelog</v-btn>
</section>


<!-- Import Modules -->
<scrcpyPlusInfo />
<device :device.sync="deviceConnected" />
<adb v-if="deviceConnected" />
<scrcpy v-if="deviceConnected" />
Expand All @@ -18,16 +14,11 @@
</template>

<script>
const env = process.env;
import scrcpyPlusInfo from '../components/scrcpyPlusInfo.vue'
export default {
components: { scrcpyPlusInfo },
data() {
return {
version: env.version,
scrcpyVersion: env.scrcpyVersion,
scrcpyPath: env.scrcpyPath,
adbVersion: env.adbVersion,
deviceConnected: false,
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/pages/wirelessSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1>Wireless Connection Setup</h1>
<div style="color: #999">Android 11+ is required for a wireless connection to be established.</div>
<a @click="$utils.openInternal('https://developer.android.com/studio/command-line/adb')">View More Information on Pairing Here</a>
<v-alert text type="warning">Wireless Connection is still under development and may not work properly on your device.</v-alert>
<v-spacer />
<v-btn style="margin-top: 1em;" rounded color="primary" @click="$router.go(-1)">Cancel</v-btn>
</section>

Expand Down Expand Up @@ -73,7 +73,7 @@ export default {
ip: "",
pairingLoading: false,
pairingNotice: null,
step: 2,
step: 0,
ip2: "",
connectingLoading: false,
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/plugins/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const module = {
execute(cmd) {
return new Promise((resolve, reject) => {

exec(`cd ${process.env.scrcpyPath}&`+cmd, (error, stdout, stderr) => {
exec(
(process.env.os === "windows" ? ('cd '+process.env.scrcpyPath+ '&') : ('')) // CD to PreInstalled SCRCPY On Windows
+cmd,
(error, stdout, stderr) => {
if (error || stderr) reject(error || stderr);
resolve(stdout);
});
Expand Down

0 comments on commit 2f5accf

Please sign in to comment.