feat(quick-4): add remote-hd display mode for port 9999
- Add 'remote-hd' to DisplayMode type alongside 'kiosk' and 'remote' - Update useDisplayMode() to return 'remote-hd' for port 9999 - Update getDisplayMode() to return 'remote-hd' for port 9999 - Port 9090 continues to return 'remote' - All other ports return 'kiosk' (default)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
export type DisplayMode = 'kiosk' | 'remote';
|
export type DisplayMode = 'kiosk' | 'remote' | 'remote-hd';
|
||||||
|
|
||||||
export function useDisplayMode(): DisplayMode {
|
export function useDisplayMode(): DisplayMode {
|
||||||
return useMemo(() => {
|
return useMemo(() => {
|
||||||
@@ -10,6 +10,10 @@ export function useDisplayMode(): DisplayMode {
|
|||||||
|
|
||||||
const port = window.location.port;
|
const port = window.location.port;
|
||||||
|
|
||||||
|
if (port === '9999') {
|
||||||
|
return 'remote-hd';
|
||||||
|
}
|
||||||
|
|
||||||
if (port === '9090') {
|
if (port === '9090') {
|
||||||
return 'remote';
|
return 'remote';
|
||||||
}
|
}
|
||||||
@@ -25,6 +29,10 @@ export function getDisplayMode(): DisplayMode {
|
|||||||
|
|
||||||
const port = window.location.port;
|
const port = window.location.port;
|
||||||
|
|
||||||
|
if (port === '9999') {
|
||||||
|
return 'remote-hd';
|
||||||
|
}
|
||||||
|
|
||||||
if (port === '9090') {
|
if (port === '9090') {
|
||||||
return 'remote';
|
return 'remote';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user