-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
486d51c
commit 2f5accf
Showing
10 changed files
with
99 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters