up
This commit is contained in:
@@ -30,7 +30,12 @@ const message = useMessage()
|
||||
const bridge = window.screenBridge
|
||||
const state = ref<State | null>(null)
|
||||
const packages = ref<PackageSummary[]>([])
|
||||
const host = ref<HostInfo>({ displays: [] })
|
||||
const host = ref<HostInfo>({
|
||||
displays: [],
|
||||
notice: '',
|
||||
sleepBlocked: false,
|
||||
preferredDisplayId: null,
|
||||
})
|
||||
const display = ref<number | null>(null)
|
||||
const positions = ref<Record<Channel, number | null>>({ main: 10, music: 10 })
|
||||
const isBusy = ref(false)
|
||||
@@ -179,7 +184,10 @@ async function removePackage(key: string) {
|
||||
})
|
||||
}
|
||||
async function refreshHost() {
|
||||
if (bridge) host.value = await bridge.host()
|
||||
if (!bridge) return
|
||||
host.value = await bridge.host()
|
||||
if (display.value === null) display.value = host.value.preferredDisplayId
|
||||
if (!host.value.displays.some((d) => d.id === display.value)) display.value = null
|
||||
}
|
||||
function metrics(channel: Channel) {
|
||||
const values = (state.value?.samples ?? [])
|
||||
@@ -254,6 +262,19 @@ onUnmounted(() => {
|
||||
</n-card>
|
||||
<n-card v-if="bridge" title="Дисплей показа">
|
||||
<n-space vertical>
|
||||
<n-alert v-if="host.notice" type="warning">{{ host.notice }}</n-alert>
|
||||
<p role="status">
|
||||
{{
|
||||
host.sleepBlocked
|
||||
? 'Автоматический сон заблокирован на время показа'
|
||||
: 'Блокировка сна выключена'
|
||||
}}
|
||||
</p>
|
||||
<p>
|
||||
Перед игрой выберите аудиовыход в настройках звука ОС, проверьте громкость и выполните
|
||||
пробный пуск. После подключения HDMI проверьте выход повторно: система может переключить
|
||||
звук на проектор.
|
||||
</p>
|
||||
<n-select
|
||||
v-model:value="display"
|
||||
:options="host.displays.map((d) => ({ label: d.label, value: d.id }))"
|
||||
|
||||
@@ -125,6 +125,9 @@ export interface DisplayInfo {
|
||||
label: string
|
||||
}
|
||||
export interface HostInfo {
|
||||
notice: string
|
||||
sleepBlocked: boolean
|
||||
preferredDisplayId: number | null
|
||||
displays: DisplayInfo[]
|
||||
}
|
||||
export interface PackageSummary {
|
||||
|
||||
Reference in New Issue
Block a user