Files
DndGamePlayer/app/shared/appBranding.ts
T
Ivan Fontosh cfa3959fb3 feat(scenes): rich scene descriptions and control viewer window
Add TipTap editing in the editor and an Electron window on the control panel to read the current scene description.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 09:49:40 +08:00

33 lines
1.5 KiB
TypeScript

/** Отображаемое имя продукта (с пробелом), не путать с `productName` сборки (`TTRPGPlayer`). */
export const APP_DISPLAY_NAME_EN = 'TTRPG Player';
export const APP_DISPLAY_NAME_RU = 'НРИ Плеер';
/** Системный идентификатор приложения (exe, AppImage, appId). */
export const APP_PRODUCT_NAME = 'TTRPGPlayer';
export const APP_BUNDLE_ID = 'com.ttrpgplayer.app';
export function appDisplayNameForLocale(localeTag: string): string {
const tag = localeTag.trim().toLowerCase();
if (tag.startsWith('ru')) return APP_DISPLAY_NAME_RU;
return APP_DISPLAY_NAME_EN;
}
/** Префикс заголовка окон: `TTRPG - Редактор`. */
export const APP_WINDOW_BRAND = 'TTRPG';
export type AppWindowKind = 'editor' | 'presentation' | 'control' | 'boot' | 'sceneDescription';
const WINDOW_SUFFIX: Record<AppWindowKind, { ru: string; en: string }> = {
editor: { ru: 'Редактор', en: 'Editor' },
presentation: { ru: 'Презентация', en: 'Presentation' },
control: { ru: 'Пульт', en: 'Control' },
boot: { ru: 'Загрузка', en: 'Loading' },
sceneDescription: { ru: 'Описание сцены', en: 'Scene description' },
};
export function windowChromeTitle(kind: AppWindowKind, localeTag: string): string {
const tag = localeTag.trim().toLowerCase();
const suffix = tag.startsWith('ru') ? WINDOW_SUFFIX[kind].ru : WINDOW_SUFFIX[kind].en;
return `${APP_WINDOW_BRAND} - ${suffix}`;
}