feat(editor): настройки экрана презентации при запуске сессии
Выбор монитора и полноэкранного режима в настройках; при «Запустить» окно презентации открывается на выбранном дисплее автоматически. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,6 +24,8 @@ import type {
|
||||
PlayerTeamId,
|
||||
PlayerImageOffset,
|
||||
PlayersUpsertProgressEvent,
|
||||
PresentationSettings,
|
||||
DisplayInfo,
|
||||
Scene,
|
||||
SceneDarknessEvent,
|
||||
SceneDarknessState,
|
||||
@@ -160,6 +162,11 @@ export const ipcChannels = {
|
||||
syncChromeTitles: 'windows.syncChromeTitles',
|
||||
getPresentationContentSize: 'windows.getPresentationContentSize',
|
||||
presentationContentSizeChanged: 'windows.presentationContentSizeChanged',
|
||||
listDisplays: 'windows.listDisplays',
|
||||
},
|
||||
preferences: {
|
||||
getPresentation: 'preferences.getPresentation',
|
||||
setPresentation: 'preferences.setPresentation',
|
||||
},
|
||||
session: {
|
||||
stateChanged: 'session.stateChanged',
|
||||
@@ -687,6 +694,18 @@ export type IpcInvokeMap = {
|
||||
req: Record<string, never>;
|
||||
res: { width: number; height: number } | { width: null; height: null };
|
||||
};
|
||||
[ipcChannels.windows.listDisplays]: {
|
||||
req: Record<string, never>;
|
||||
res: { displays: DisplayInfo[] };
|
||||
};
|
||||
[ipcChannels.preferences.getPresentation]: {
|
||||
req: Record<string, never>;
|
||||
res: { settings: PresentationSettings };
|
||||
};
|
||||
[ipcChannels.preferences.setPresentation]: {
|
||||
req: { settings: PresentationSettings };
|
||||
res: { settings: PresentationSettings };
|
||||
};
|
||||
[ipcChannels.windows.openSceneDescription]: {
|
||||
req: { html: string };
|
||||
res: { ok: true };
|
||||
|
||||
@@ -16,6 +16,7 @@ export * from './tokenPath';
|
||||
export * from './tokenPathSession';
|
||||
export * from './tokenPathPlayback';
|
||||
export * from './scenePreviewRotation';
|
||||
export * from './presentationSettings';
|
||||
export * from './sceneTraps';
|
||||
export * from './sceneView';
|
||||
export * from './videoPlayback';
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/** Настройки окна презентации (хранятся в userData/preferences.json). */
|
||||
export type PresentationSettings = {
|
||||
/** `null` — основной монитор системы. */
|
||||
displayId: number | null;
|
||||
fullScreen: boolean;
|
||||
};
|
||||
|
||||
export type DisplayInfo = {
|
||||
id: number;
|
||||
label: string;
|
||||
width: number;
|
||||
height: number;
|
||||
isPrimary: boolean;
|
||||
};
|
||||
|
||||
export const DEFAULT_PRESENTATION_SETTINGS: PresentationSettings = {
|
||||
displayId: null,
|
||||
fullScreen: true,
|
||||
};
|
||||
Reference in New Issue
Block a user