diff --git a/src/main/base/browserwindow.ts b/src/main/base/browserwindow.ts index ce8675b7..a87d6178 100644 --- a/src/main/base/browserwindow.ts +++ b/src/main/base/browserwindow.ts @@ -1048,7 +1048,7 @@ export class BrowserWindow { }); ipcMain.on("get-i18n-listing", (event) => { - const translations = utils.i18n + const translations = utils.i18n; const i18nListing: any = []; for (const lang in translations) { diff --git a/src/main/base/utils.ts b/src/main/base/utils.ts index 0a50ce3e..22131505 100644 --- a/src/main/base/utils.ts +++ b/src/main/base/utils.ts @@ -8,7 +8,7 @@ import fetch from "electron-fetch"; import ElectronStore from "electron-store"; export class utils { - static crowdinClient: OtaClient = new OtaClient('fda9a6528649ea90dee35390wog') + static crowdinClient: OtaClient = new OtaClient("fda9a6528649ea90dee35390wog"); static i18n: any = {}; /** @@ -106,7 +106,7 @@ export class utils { } static async initializeTranslations() { - this.i18n = await this.crowdinClient.getTranslations() + this.i18n = await this.crowdinClient.getTranslations(); } /** @@ -116,7 +116,7 @@ export class utils { * @returns {string | Object} The locale value. */ static getLocale(language: string, key?: string): string | object { - let i18n: any = {} + let i18n: any = {}; if (!this.i18n[language]) { i18n = this.i18n["en"][0].content; } else { diff --git a/src/main/index.ts b/src/main/index.ts index e345eb16..73a7d634 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -32,7 +32,7 @@ const CiderPlug = new Plugins(); * App Event Handlers * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ app.on("ready", async () => { - await utils.initializeTranslations() + await utils.initializeTranslations(); Cider.ready(CiderPlug); console.log("[Cider] Application is Ready. Creating Window."); @@ -40,10 +40,10 @@ app.on("ready", async () => { console.info("[Cider] Running in development mode."); require("vue-devtools").install(); } - console.log("aa") + console.log("aa"); components.whenReady().then(async () => { const bw = new BrowserWindow(); - console.log("[Cider] Creating Window.") + console.log("[Cider] Creating Window."); const win = await bw.createWindow(); app.getGPUInfo("complete").then((gpuInfo) => { @@ -112,4 +112,3 @@ app.on("widevine-error", (error) => { console.log("[Cider][Widevine] Widevine installation encountered an error: " + error); app.exit(); }); - diff --git a/src/main/plugins/menubar.ts b/src/main/plugins/menubar.ts index 3bd4588b..c0e427b6 100644 --- a/src/main/plugins/menubar.ts +++ b/src/main/plugins/menubar.ts @@ -18,7 +18,7 @@ export default class Thumbar { private isNotMac: boolean = process.platform !== "darwin"; private isMac: boolean = process.platform === "darwin"; - private _menuTemplate: any = [] + private _menuTemplate: any = []; /******************************************************************************************* * Public Methods @@ -57,13 +57,13 @@ export default class Thumbar { ...(this.isMac ? [{ type: "separator" }, { role: "services" }, { type: "separator" }, { role: "hide" }, { role: "hideOthers" }, { role: "unhide" }, { type: "separator" }, { role: "quit" }] : []), ...(this.isNotMac ? [ - { type: "separator" }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "term.quit"), - accelerator: "Control+Q", - click: () => app.quit(), - }, - ] + { type: "separator" }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "term.quit"), + accelerator: "Control+Q", + click: () => app.quit(), + }, + ] : []), ], }, @@ -120,67 +120,67 @@ export default class Thumbar { { type: "separator" }, ...(this.isMac ? [ - { - label: "Show", - click: () => utils.getWindow().show(), - }, - { role: "zoom" }, - { type: "separator" }, - { role: "front" }, - { role: "close" }, - { - label: "Edit", - submenu: [{ role: "undo" }, { role: "redo" }, { type: "separator" }, { role: "cut" }, { role: "copy" }, { role: "paste" }], - }, - { type: "separator" }, - ] + { + label: "Show", + click: () => utils.getWindow().show(), + }, + { role: "zoom" }, + { type: "separator" }, + { role: "front" }, + { role: "close" }, + { + label: "Edit", + submenu: [{ role: "undo" }, { role: "redo" }, { type: "separator" }, { role: "cut" }, { role: "copy" }, { role: "paste" }], + }, + { type: "separator" }, + ] : []), ...(this.isNotMac ? [ - { - label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.zoom"), - submenu: [ - { - label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomin"), - role: "zoomIn", - accelerator: utils.getStoreValue("general.keybindings.zoomn").join("+"), - }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomout"), - role: "zoomOut", - accelerator: utils.getStoreValue("general.keybindings.zoomt").join("+"), - }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomreset"), - role: "resetZoom", - accelerator: utils.getStoreValue("general.keybindings.zoomrst").join("+"), - }, - ], - }, - { type: "separator" }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "term.fullscreen"), - accelerator: "Control+Enter", - role: "togglefullscreen", - }, - { type: "separator" }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "action.close"), - accelerator: "Control+W", - role: "close", - }, - { type: "separator" }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.reload"), - accelerator: "Control+R", - role: "reload", - }, - { - label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.forcereload"), - accelerator: "Control+Shift+R", - role: "forceReload", - }, - ] + { + label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.zoom"), + submenu: [ + { + label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomin"), + role: "zoomIn", + accelerator: utils.getStoreValue("general.keybindings.zoomn").join("+"), + }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomout"), + role: "zoomOut", + accelerator: utils.getStoreValue("general.keybindings.zoomt").join("+"), + }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "term.zoomreset"), + role: "resetZoom", + accelerator: utils.getStoreValue("general.keybindings.zoomrst").join("+"), + }, + ], + }, + { type: "separator" }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "term.fullscreen"), + accelerator: "Control+Enter", + role: "togglefullscreen", + }, + { type: "separator" }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "action.close"), + accelerator: "Control+W", + role: "close", + }, + { type: "separator" }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.reload"), + accelerator: "Control+R", + role: "reload", + }, + { + label: utils.getLocale(utils.getStoreValue("general.language"), "menubar.options.forcereload"), + accelerator: "Control+Shift+R", + role: "forceReload", + }, + ] : []), ], }, @@ -317,11 +317,11 @@ export default class Thumbar { * Runs on playback State Change * @param attributes Music Attributes (attributes.status = current state) */ - onPlaybackStateDidChange(attributes: object): void { } + onPlaybackStateDidChange(attributes: object): void {} /** * Runs on song change * @param attributes Music Attributes */ - onNowPlayingItemDidChange(attributes: object): void { } + onNowPlayingItemDidChange(attributes: object): void {} }