-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: π§βπ» Improve device-based terminal experience
- Loading branch information
Showing
14 changed files
with
97 additions
and
188 deletions.
There are no files selected for viewing
File renamed without changes.
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
20 changes: 0 additions & 20 deletions
20
src/components/Device/components/ControlBar/Shell/index.vue
This file was deleted.
Oops, something went wrong.
112 changes: 0 additions & 112 deletions
112
src/components/Device/components/ControlBar/Synergy/index.vue
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
src/components/Device/components/ControlBar/Terminal/index.vue
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,40 @@ | ||
<template> | ||
<el-dropdown> | ||
<slot :loading /> | ||
|
||
<template #dropdown> | ||
<el-dropdown-menu> | ||
<el-dropdown-item @click="handleCommand(device)"> | ||
{{ $t('device.control.terminal.command.name') }} | ||
</el-dropdown-item> | ||
<el-dropdown-item @click="handleScript(device)"> | ||
{{ $t('device.control.terminal.script.name') }} | ||
</el-dropdown-item> | ||
</el-dropdown-menu> | ||
</template> | ||
</el-dropdown> | ||
</template> | ||
|
||
<script setup> | ||
import { useShellAction } from '$/composables/useShellAction/index.js' | ||
import { useTaskStore } from '$/store' | ||
const props = defineProps({ | ||
device: { | ||
type: Object, | ||
default: () => null, | ||
}, | ||
}) | ||
const { loading, invoke: handleScript } = useShellAction() | ||
function handleCommand(device) { | ||
const taskStore = useTaskStore() | ||
const command = `adb -s ${device.id} ` | ||
taskStore.emit('terminal', { command }) | ||
} | ||
</script> | ||
|
||
<style></style> |
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
Oops, something went wrong.