mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-04-21 04:25:13 +08:00
feat(Sidebar): set screen mode
This commit is contained in:
parent
95b302c39f
commit
63fa9eb73c
@ -2,9 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"windows": [
|
||||
"main"
|
||||
],
|
||||
"windows": ["main"],
|
||||
"permissions": [
|
||||
"event:default",
|
||||
"window:default",
|
||||
@ -27,6 +25,8 @@
|
||||
"clipboard-manager:default",
|
||||
"clipboard-manager:allow-write-text",
|
||||
"process:default",
|
||||
"process:allow-restart"
|
||||
"process:allow-restart",
|
||||
"webview:default",
|
||||
"webview:allow-internal-toggle-devtools"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -9,22 +9,30 @@ import {
|
||||
VolumeLowOutline,
|
||||
StopOutline,
|
||||
ListOutline,
|
||||
BulbOutline,
|
||||
Bulb,
|
||||
} from "@vicons/ionicons5";
|
||||
import { Keyboard24Regular } from "@vicons/fluent";
|
||||
import { NIcon, useMessage } from "naive-ui";
|
||||
import { useGlobalStore } from "../store/global";
|
||||
import { sendInjectKeycode } from "../frontcommand/controlMsg";
|
||||
import {
|
||||
sendInjectKeycode,
|
||||
sendSetScreenPowerMode,
|
||||
} from "../frontcommand/controlMsg";
|
||||
import {
|
||||
AndroidKeyEventAction,
|
||||
AndroidKeycode,
|
||||
AndroidMetastate,
|
||||
} from "../frontcommand/android";
|
||||
import { ref } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useGlobalStore();
|
||||
const message = useMessage();
|
||||
|
||||
const nextScreenPowerMode = ref(0);
|
||||
|
||||
function nav(name: string) {
|
||||
router.replace({ name });
|
||||
}
|
||||
@ -88,6 +96,17 @@ async function sendKeyCodeToDevice(code: AndroidKeycode) {
|
||||
</div>
|
||||
|
||||
<div class="nav">
|
||||
<div
|
||||
@click="
|
||||
sendSetScreenPowerMode({ mode: nextScreenPowerMode });
|
||||
nextScreenPowerMode = nextScreenPowerMode ? 0 : 2;
|
||||
"
|
||||
>
|
||||
<NIcon>
|
||||
<Bulb v-if="nextScreenPowerMode" />
|
||||
<BulbOutline v-else />
|
||||
</NIcon>
|
||||
</div>
|
||||
<div @click="sendKeyCodeToDevice(AndroidKeycode.AKEYCODE_VOLUME_UP)">
|
||||
<NIcon>
|
||||
<VolumeHighOutline />
|
||||
|
@ -18,8 +18,6 @@ import { DropdownOption, NDropdown, useDialog, useMessage } from "naive-ui";
|
||||
import { onBeforeRouteLeave } from "vue-router";
|
||||
import { useKeyboardStore } from "../../store/keyboard";
|
||||
|
||||
// TODO 添加开发者工具打开按钮
|
||||
// TODO 添加息屏按键
|
||||
// TODO 添加无线调试(rust加一条指令connet即可)
|
||||
|
||||
const store = useGlobalStore();
|
||||
|
Loading…
Reference in New Issue
Block a user