Skip to content

Commit

Permalink
feat: 🔖 Version 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Frontesque committed Jul 5, 2022
1 parent 7e664da commit 92793da
Show file tree
Hide file tree
Showing 15 changed files with 146 additions and 46 deletions.
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.4.1",
"version": "1.4.2",
"description": "A GUI for scrcpy",
"main": "./dist/main/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/mainWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import BrowserWinHandler from './BrowserWinHandler'

const winHandler = new BrowserWinHandler({
height: 700,
width: 600,
minWidth: 300,
width: 720,
minWidth: 720,
autoHideMenuBar: true,
titleBarStyle: 'hidden',
titleBarOverlay: {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/back.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-btn rounded color="primary" @click="$router.go(-1)" style="margin-right: 1em;">
<v-icon>mdi-arrow-left</v-icon>
<v-icon style="margin-right: 0;">mdi-arrow-left</v-icon>
</v-btn>
</template>
32 changes: 19 additions & 13 deletions src/renderer/components/scrcpy.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
<template>
<div>

<section>
<section style="margin-top: 0;">
<h2>SCRCPY Settings</h2>


<!-- Standard Actions -->
<v-list-item v-for="(item, i) in args" :key="i">
<div style="display: flex;">
<v-checkbox v-model="selectedArgs" :value="item" />

<v-checkbox
v-model="selectedArgs"
:value="item"
:label="item.arg.replace(/-/g,' ')"
persistent-hint
:hint="item.description"
/>

<div style="display: block; transform: translateY(25%);">
<v-list-item-title v-text="item.arg.replace(/-/g,' ')" />
<p v-text="item.description" class="accent--text" />
</div>
</div>
</v-list-item>
<!-- End Standard Actions -->

<!-- Advanced Actions Wrapper -->
<v-expansion-panels>
<v-expansion-panels style="margin-top: 1em;">
<v-expansion-panel class="rounded-xl" style="background-color: rgba(0,0,0, 0.25);">
<v-expansion-panel-header>Advanced</v-expansion-panel-header>
<v-expansion-panel-content>
Expand All @@ -37,12 +40,15 @@
<!-- Advanced Actions -->
<v-list-item v-for="(item, i) in advArgs" :key="i">
<div style="display: flex;">
<v-checkbox v-model="selectedArgs" :value="item" />

<div style="display: block; transform: translateY(25%);">
<v-list-item-title v-text="item.arg.replace(/-/g,' ')" />
<p v-text="item.description" class="accent--text" />
</div>
<v-checkbox
v-model="selectedArgs"
:value="item"
:label="item.arg.replace(/-/g,' ')"
persistent-hint
:hint="item.description"
/>

</div>
</v-list-item>
<!-- End Advanced Actions -->
Expand Down Expand Up @@ -95,7 +101,7 @@ export default {
this.$execute(`scrcpy --bit-rate ${this.bitrate}M`+flags)
.catch((err) => {
if (err.startsWith("INFO:")) return; // Catch information outputs
if (typeof err != "object" && err.startsWith("INFO:")) return; // Catch information outputs
this.dialog = true;
this.dialogText = err;
})
Expand Down
12 changes: 11 additions & 1 deletion src/renderer/components/scrcpyPlusInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@
<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>
<v-card-actions>
<v-btn rounded color="primary" to="/changelog">
<v-icon>mdi-script-text</v-icon>
SCRCPY+ Changelog
</v-btn>
<v-btn rounded to="/settings">
<v-icon>mdi-cog</v-icon>
Settings
</v-btn>

</v-card-actions>
</section>

<!-- Error Dialog -->
Expand Down
9 changes: 5 additions & 4 deletions src/renderer/components/tools.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<section>
<section style="margin-right: 0.5em;">
<h2>Tools <v-chip color="primary" style="margin-left: 0.5em; height: 2em;">Beta</v-chip></h2>
<div class="accent--text">All tools are written by me for SCRCPY+. All bug reports should go through the GitHub!</div>

<v-list-item v-for="(item, i) in cmds" :key="i">
<v-btn rounded :to="item.to" :disabled="item.disabled">
<v-icon v-text="item.icon" style="margin-right: 0.5em;"/>
<v-icon v-text="item.icon"/>
{{ item.title }}
</v-btn>
</v-list-item>
Expand All @@ -32,10 +32,11 @@ export default {
{
title: "Resource Monitor",
icon: "mdi-chart-bell-curve",
to: "/tools/resources"
to: "/tools/resources",
disabled: true,
},
{
title: "Partition Dumper (Coming Soon)",
title: "Partition Dumper",
icon: "mdi-zip-box",
to: "/tools/dump",
disabled: true
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ section {
background: #999;
border-radius: 3px;
}
.v-icon {
margin-right: 0.5em;
}
</style>
2 changes: 1 addition & 1 deletion src/renderer/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

module.exports = {
env: {
version: "1.4.1",
version: "1.5.0",
scrcpyPath: "resources/scrcpy/",

releasesUrl: "https://api.github.com/repos/Frontesque/scrcpy-plus/releases",
Expand Down
17 changes: 17 additions & 0 deletions src/renderer/pages/changelog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@
</v-card-title>
</section>

<section>
<h3>1.5.0</h3>
<ul>
<li>Slight UI Tweaks</li>
<li>Disable Resource Monitor tool since it only worked on older samsung devices</li>
<li>Move Tools and ADB Quick Commands next to eachother as per the request of reddit/u/aroonz</li>
<li>Fix errors not showing on some devices when starting SCRCPY</li>
<li>Change how SCRCPY flags are rendered for better performance and style</li>
<li>Change how the file manager renders list items</li>
<li>Change how icons are rendered</li>
<li>Add settings page</li>
<li>Add the ability do disable sections of the app in settings</li>
<li>Change default window bounds</li>
<li>Adjust bounding on wireless connecting success screen</li>
</ul>
</section>

<section>
<h3>1.4.1</h3>
<ul>
Expand Down
22 changes: 19 additions & 3 deletions src/renderer/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
<div style="scrollbar-width: thin;">
<!-- Import Modules -->
<scrcpyPlusInfo />
<device :device.sync="deviceConnected" />
<tools v-if="deviceConnected" />
<adb v-if="deviceConnected" />
<device :device.sync="deviceConnected" style="margin-bottom: 0;" v-show="settings.device == 'true' || !deviceConnected" />

<div style="display: flex; width: 100%;">
<tools v-if="deviceConnected && settings.tools == 'true'" />
<adb v-if="deviceConnected && settings.adb == 'true'" />
</div>

<scrcpy v-if="deviceConnected" />

<updateNotice />
Expand All @@ -19,7 +23,19 @@ export default {
data() {
return {
deviceConnected: false,
settings: {}
}
},
mounted() {
this.settings = {
device: localStorage.getItem("deviceInformation") || true,
tools: localStorage.getItem("tools") || true,
adb: localStorage.getItem("adbQuickActions") || true,
}
console.log(this.settings)
}
}
</script>
43 changes: 43 additions & 0 deletions src/renderer/pages/settings.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<template>
<div>

<section>
<v-card-title>
<back />
Settings
</v-card-title>
</section>

<section>
<v-switch inset label="Disable Device Information" v-model="deviceInformation" />
<v-switch inset label="Disable Tools" v-model="tools" />
<v-switch inset label="Disable ADB Quick Actions" v-model="adbQuickActions" />
</section>

</div>
</template>

<script>
export default {
data() {
return {
deviceInformation: false,
tools: false,
adbQuickActions: false,
}
},
watch: {
deviceInformation(newVal) { localStorage.setItem("deviceInformation", !newVal); },
tools(newVal) { localStorage.setItem("tools", !newVal); },
adbQuickActions(newVal) { localStorage.setItem("adbQuickActions", !newVal); }
},
mounted() {
this.deviceInformation = localStorage.getItem("deviceInformation") == 'true' ? false : true;
this.tools = localStorage.getItem("tools") == 'true' ? false : true;
this.adbQuickActions = localStorage.getItem("adbQuickActions") == 'true' ? false : true;
}
}
</script>
2 changes: 1 addition & 1 deletion src/renderer/pages/tools/apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


<v-list-item-icon>
<v-icon v-text="item.icon || 'mdi-package'" />
<v-icon v-text="item.icon || 'mdi-package'" style="margin-right: 0;"/>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>
Expand Down
38 changes: 20 additions & 18 deletions src/renderer/pages/tools/files.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,26 @@
<!-- End Empty Notice -->

<!-- File Selector -->
<v-list-item-group v-model="selected" color="primary" style="margin-top: 12em;">
<v-list-item v-for="(item, i) in files" :key="i">


<v-list-item-icon>
<v-icon v-text="item.icon || 'mdi-package'" />
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>
{{ item.name }}
<v-chip v-if="item.disabled" style="height: 1.75em;">Disabled</v-chip>
</v-list-item-title>
</v-list-item-content>



</v-list-item>
</v-list-item-group>
<v-list nav>
<v-list-item-group v-model="selected" color="primary" style="margin-top: 12em;">
<v-list-item v-for="(item, i) in files" :key="i" nav>


<v-list-item-icon>
<v-icon v-text="item.icon || 'mdi-package'" />
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>
{{ item.name }}
<v-chip v-if="item.disabled" style="height: 1.75em;">Disabled</v-chip>
</v-list-item-title>
</v-list-item-content>



</v-list-item>
</v-list-item-group>
</v-list>
<!-- End File Selector -->


Expand Down
1 change: 1 addition & 0 deletions src/renderer/pages/tools/resources.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default {
methods: {
async getProcesses() {
const data = await this.$execute("adb shell top -n 1 -m 1");
console.log(data)
this.userUsage = data.split("User ")[1].split("%")[0];
this.userThreads = data.split("User ")[2].split(" ")[0];
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/pages/wirelessSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<center>
<v-icon size="5em">mdi-cellphone-check</v-icon>
<h1>Success!</h1>
<v-progress-linear color="primary" indeterminate />
<v-progress-linear color="primary" indeterminate style="margin-top: 1em;" />
</center>
</section>

Expand Down

0 comments on commit 92793da

Please sign in to comment.