This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow disconnect controller
- Loading branch information
Showing
7 changed files
with
169 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
node_modules | ||
dist | ||
assets | ||
|
||
pnpm-lock.yaml | ||
|
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,111 @@ | ||
<script setup lang="ts"> | ||
import { AdbControllerType } from '@maa/loader' | ||
import { NSelect } from 'naive-ui' | ||
import { useTr } from '@/i18n' | ||
import GridFormlayout from '@/layouts/GridFormLayout.vue' | ||
defineProps<{ | ||
type: number | ||
}>() | ||
const emits = defineEmits<{ | ||
'update:type': [number] | ||
}>() | ||
const { t } = useTr() | ||
const touchOptions = [ | ||
{ | ||
label: 'adb', | ||
value: AdbControllerType.Touch_Adb | ||
}, | ||
{ | ||
label: 'minitouch', | ||
value: AdbControllerType.Touch_MiniTouch | ||
}, | ||
{ | ||
label: 'maatouch', | ||
value: AdbControllerType.Touch_MaaTouch | ||
} | ||
] | ||
const keyOptions = [ | ||
{ | ||
label: 'adb', | ||
value: AdbControllerType.Key_Adb | ||
}, | ||
{ | ||
label: 'maatouch', | ||
value: AdbControllerType.Key_MaaTouch | ||
} | ||
] | ||
const screencapOptions = [ | ||
{ | ||
label: t('device.type.fastest_way'), | ||
value: AdbControllerType.Screencap_FastestWay | ||
}, | ||
{ | ||
label: t('device.type.raw_by_netcat'), | ||
value: AdbControllerType.Screencap_RawByNetcat | ||
}, | ||
{ | ||
label: t('device.type.raw_with_gzip'), | ||
value: AdbControllerType.Screencap_RawWithGzip | ||
}, | ||
{ | ||
label: t('device.type.encode'), | ||
value: AdbControllerType.Screencap_Encode | ||
}, | ||
{ | ||
label: t('device.type.encode_to_file'), | ||
value: AdbControllerType.Screencap_EncodeToFile | ||
}, | ||
{ | ||
label: t('device.type.minicap_direct'), | ||
value: AdbControllerType.Screencap_MinicapDirect | ||
}, | ||
{ | ||
label: t('device.type.minicap_stream'), | ||
value: AdbControllerType.Screencap_MinicapStream | ||
} | ||
] | ||
</script> | ||
|
||
<template> | ||
<GridFormlayout> | ||
<span> {{ t('device.info.touch') }} </span> | ||
<NSelect | ||
:value="type & AdbControllerType.Touch_Mask" | ||
@update:value=" | ||
v => { | ||
emits('update:type', (type & ~AdbControllerType.Touch_Mask) | v) | ||
} | ||
" | ||
:options="touchOptions" | ||
></NSelect> | ||
|
||
<span> {{ t('device.info.key') }} </span> | ||
<NSelect | ||
:value="type & AdbControllerType.Key_Mask" | ||
@update:value=" | ||
v => { | ||
emits('update:type', (type & ~AdbControllerType.Key_Mask) | v) | ||
} | ||
" | ||
:options="keyOptions" | ||
></NSelect> | ||
|
||
<span> {{ t('device.info.screencap') }} </span> | ||
<NSelect | ||
:value="type & AdbControllerType.Screencap_Mask" | ||
@update:value=" | ||
v => { | ||
emits('update:type', (type & ~AdbControllerType.Screencap_Mask) | v) | ||
} | ||
" | ||
:options="screencapOptions" | ||
></NSelect> | ||
</GridFormlayout> | ||
</template> |
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
Submodule loader
updated
6 files
+71 −7 | src/base/instance.ts | |
+56 −2 | src/flat/client.ts | |
+121 −2 | src/flat/server.ts | |
+11 −79 | src/wrappper/instance.ts | |
+12 −16 | src/wrappper/syncctx.ts | |
+23 −0 | src/wrappper/types.ts |