mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-04-21 04:25:13 +08:00
feat(Device): remove useless device status
This commit is contained in:
parent
83f153eb34
commit
db4f51e9e2
@ -98,7 +98,7 @@ onUnmounted(() => {
|
|||||||
const devices: Ref<Device[]> = ref([]);
|
const devices: Ref<Device[]> = ref([]);
|
||||||
const availableDevice = computed(() => {
|
const availableDevice = computed(() => {
|
||||||
return devices.value.filter((d) => {
|
return devices.value.filter((d) => {
|
||||||
return store.controledDevice?.device.id !== d.id;
|
return store.controledDevice?.deviceID !== d.id;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const tableCols: DataTableColumns = [
|
const tableCols: DataTableColumns = [
|
||||||
@ -227,7 +227,7 @@ async function deviceControl() {
|
|||||||
store.controledDevice = {
|
store.controledDevice = {
|
||||||
scid,
|
scid,
|
||||||
deviceName,
|
deviceName,
|
||||||
device,
|
deviceID: device.id,
|
||||||
};
|
};
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
deviceWaitForMetadataTask = null;
|
deviceWaitForMetadataTask = null;
|
||||||
@ -332,7 +332,7 @@ async function connectDevice() {
|
|||||||
<div class="controled-device" v-if="store.controledDevice">
|
<div class="controled-device" v-if="store.controledDevice">
|
||||||
<div>
|
<div>
|
||||||
{{ store.controledDevice.deviceName }} ({{
|
{{ store.controledDevice.deviceName }} ({{
|
||||||
store.controledDevice.device.id
|
store.controledDevice.deviceID
|
||||||
}})
|
}})
|
||||||
</div>
|
</div>
|
||||||
<div class="device-op">
|
<div class="device-op">
|
||||||
@ -344,8 +344,7 @@ async function connectDevice() {
|
|||||||
</template>
|
</template>
|
||||||
</NButton>
|
</NButton>
|
||||||
</template>
|
</template>
|
||||||
scid: {{ store.controledDevice.scid }} <br />status:
|
scid: {{ store.controledDevice.scid }}
|
||||||
{{ store.controledDevice.device.status }}
|
|
||||||
</NTooltip>
|
</NTooltip>
|
||||||
<NButton quaternary circle type="error" @click="shutdownSC()">
|
<NButton quaternary circle type="error" @click="shutdownSC()">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { Device } from "../invoke";
|
|
||||||
import {
|
import {
|
||||||
KeyMapping,
|
KeyMapping,
|
||||||
KeyMappingConfig,
|
KeyMappingConfig,
|
||||||
@ -22,7 +21,7 @@ export const useGlobalStore = defineStore("global", () => {
|
|||||||
interface ControledDevice {
|
interface ControledDevice {
|
||||||
scid: string;
|
scid: string;
|
||||||
deviceName: string;
|
deviceName: string;
|
||||||
device: Device;
|
deviceID: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const controledDevice: Ref<ControledDevice | null> = ref(null);
|
const controledDevice: Ref<ControledDevice | null> = ref(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user