Skip to content

Commit

Permalink
fix: 🔧 修复自定义路径功能没有生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 26, 2023
1 parent 517eecd commit 894b581
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 510 deletions.
6 changes: 3 additions & 3 deletions electron/exposes/adbkit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ window.addEventListener('beforeunload', () => {
}
})

appStore.onDidChange('scrcpy.common.adbPath', async (value, oldValue) => {
console.log('onDidChange.scrcpy.common.adbPath', value)
appStore.onDidChange('common.adbPath', async (value, oldValue) => {
console.log('onDidChange.common.adbPath', value)

if (value === oldValue) {
return false
Expand Down Expand Up @@ -146,7 +146,7 @@ const watch = async (callback) => {
}

export default () => {
const binPath = appStore.get('scrcpy.common.adbPath') || adbPath
const binPath = appStore.get('common.adbPath') || adbPath

client = Adb.createClient({
bin: binPath,
Expand Down
4 changes: 2 additions & 2 deletions electron/exposes/scrcpy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import appStore from '@electron/helpers/store.js'
import { adbPath, scrcpyPath } from '@electron/configs/index.js'

const shell = async (command, { stdout, stderr } = {}) => {
const spawnPath = appStore.get('scrcpy.common.scrcpyPath') || scrcpyPath
const ADB = appStore.get('scrcpy.common.adbPath') || adbPath
const spawnPath = appStore.get('common.scrcpyPath') || scrcpyPath
const ADB = appStore.get('common.adbPath') || adbPath
const args = command.split(' ')

const scrcpyProcess = spawn(`"${spawnPath}"`, args, {
Expand Down
4 changes: 1 addition & 3 deletions src/store/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { createPinia } from 'pinia'
import { useScrcpyStore } from './scrcpy/index.js'
import { useDeviceStore } from './device/index.js'
import { usePreferenceStore } from './preference/index.js'

export { useScrcpyStore, useDeviceStore, usePreferenceStore }
export { useDeviceStore, usePreferenceStore }

export default {
install(app) {
Expand All @@ -12,7 +11,6 @@ export default {
app.use(store)

app.config.globalProperties.$store = {
scrcpy: useScrcpyStore(),
device: useDeviceStore(),
preference: usePreferenceStore(),
}
Expand Down
185 changes: 0 additions & 185 deletions src/store/scrcpy/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/store/scrcpy/model/audio/index.js

This file was deleted.

39 changes: 0 additions & 39 deletions src/store/scrcpy/model/custom/index.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/store/scrcpy/model/device/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions src/store/scrcpy/model/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/store/scrcpy/model/record/index.js

This file was deleted.

Loading

0 comments on commit 894b581

Please sign in to comment.