mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 12:21:47 +00:00
@ -1,7 +1,7 @@
|
|||||||
export interface LanguageResources {
|
export interface LanguageResources {
|
||||||
[lang: string]: {
|
[lang: string]: {
|
||||||
translation: Record<string, unknown> & {
|
translation: Record<string, unknown> & {
|
||||||
language: {
|
language?: {
|
||||||
name: string;
|
name: string;
|
||||||
'local-name': string;
|
'local-name': string;
|
||||||
code: string;
|
code: string;
|
||||||
|
|||||||
@ -404,7 +404,7 @@ async function createMainWindow() {
|
|||||||
removeContentSecurityPolicy();
|
removeContentSecurityPolicy();
|
||||||
|
|
||||||
win.webContents.on('dom-ready', async () => {
|
win.webContents.on('dom-ready', async () => {
|
||||||
if (useInlineMenu) {
|
if (useInlineMenu && !is.linux()) {
|
||||||
win.setTitleBarOverlay({
|
win.setTitleBarOverlay({
|
||||||
...defaultTitleBarOverlayOptions,
|
...defaultTitleBarOverlayOptions,
|
||||||
height: Math.floor(
|
height: Math.floor(
|
||||||
|
|||||||
@ -377,7 +377,7 @@ export const mainMenuTemplate = async (
|
|||||||
availableLanguages
|
availableLanguages
|
||||||
.map(
|
.map(
|
||||||
(lang): Electron.MenuItemConstructorOptions => ({
|
(lang): Electron.MenuItemConstructorOptions => ({
|
||||||
label: `${languageResources[lang].translation.language.name} (${languageResources[lang].translation.language['local-name']})`,
|
label: `${languageResources[lang].translation.language?.name ?? 'Unknown'} (${languageResources[lang].translation.language?.['local-name'] ?? 'Unknown'})`,
|
||||||
type: 'checkbox',
|
type: 'checkbox',
|
||||||
checked: (config.get('options.language') ?? 'en') === lang,
|
checked: (config.get('options.language') ?? 'en') === lang,
|
||||||
click() {
|
click() {
|
||||||
|
|||||||
Reference in New Issue
Block a user