-
+
-
+
{{ row.$loading ? '镜像中' : '开始镜像' }}
@@ -137,16 +144,37 @@ export default {
}
row.$stopLoading = false
},
- async handleStart(row) {
+ async handleMirror(row) {
row.$loading = true
try {
- await this.$scrcpy.shell(`--serial=${row.id}`)
+ await this.$scrcpy.shell(`--serial=${row.id} ${this.addScrcpyConfigs()}`)
}
catch (error) {
this.$message.warning(error.message)
}
row.$loading = false
},
+ addScrcpyConfigs() {
+ const configs = storage.get('scrcpyCache') || {}
+ const value = Object.entries(configs)
+ .reduce((arr, [key, value]) => {
+ if (!value) {
+ return arr
+ }
+ if (typeof value === 'boolean') {
+ arr.push(key)
+ }
+ else {
+ arr.push(`${key}=${value}`)
+ }
+ return arr
+ }, [])
+ .join(' ')
+
+ console.log('addScrcpyConfigs.value', value)
+
+ return value
+ },
async getDeviceData() {
this.loading = true
await sleep()
diff --git a/src/renderer/src/plugins/element-plus/restyle.css b/src/renderer/src/plugins/element-plus/restyle.css
index adb8fdce..4a25d481 100644
--- a/src/renderer/src/plugins/element-plus/restyle.css
+++ b/src/renderer/src/plugins/element-plus/restyle.css
@@ -13,9 +13,9 @@
--el-color-primary-light-9: rgba(var(--color-primary-50), 1);
/* 字体大小 */
- --el-font-size-base: 12px;
- --el-font-size-small: 14px;
- --el-font-size-large: 16px;
+ /* --el-font-size-base: 14px;
+ --el-font-size-small: 16px;
+ --el-font-size-large: 18px; */
}
.el-tabs-flex {
@@ -30,6 +30,6 @@
}
.el-tab-pane {
- @apply h-full;
+ @apply h-full overflow-auto;
}
}
diff --git a/src/renderer/src/styles/css/desktop.css b/src/renderer/src/styles/css/desktop.css
new file mode 100644
index 00000000..d1e40a58
--- /dev/null
+++ b/src/renderer/src/styles/css/desktop.css
@@ -0,0 +1,21 @@
+html {
+ font-size: 14px !important;
+}
+
+/* 自定义滚动条的外观 */
+::-webkit-scrollbar {
+ width: 8px;
+}
+
+::-webkit-scrollbar-track {
+ background-color: theme('colors.gray.100');
+}
+
+::-webkit-scrollbar-thumb {
+ background-color: theme('colors.gray.300');
+ border-radius: 9999px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background-color: theme('colors.gray.500');
+}
diff --git a/src/renderer/src/styles/css/index.js b/src/renderer/src/styles/css/index.js
index 1a9ad128..f09f3fbd 100644
--- a/src/renderer/src/styles/css/index.js
+++ b/src/renderer/src/styles/css/index.js
@@ -1 +1,2 @@
import '@viarotel-org/design/styles/resets'
+import './desktop.css'