chore: Prettified Code
[ci skip]
This commit is contained in:
parent
27a3a73124
commit
246450fde3
4 changed files with 75 additions and 76 deletions
|
@ -1048,7 +1048,7 @@ export class BrowserWindow {
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on("get-i18n-listing", (event) => {
|
ipcMain.on("get-i18n-listing", (event) => {
|
||||||
const translations = utils.i18n
|
const translations = utils.i18n;
|
||||||
const i18nListing: any = [];
|
const i18nListing: any = [];
|
||||||
|
|
||||||
for (const lang in translations) {
|
for (const lang in translations) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import fetch from "electron-fetch";
|
||||||
import ElectronStore from "electron-store";
|
import ElectronStore from "electron-store";
|
||||||
|
|
||||||
export class utils {
|
export class utils {
|
||||||
static crowdinClient: OtaClient = new OtaClient('fda9a6528649ea90dee35390wog')
|
static crowdinClient: OtaClient = new OtaClient("fda9a6528649ea90dee35390wog");
|
||||||
static i18n: any = {};
|
static i18n: any = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,7 +106,7 @@ export class utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async initializeTranslations() {
|
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.
|
* @returns {string | Object} The locale value.
|
||||||
*/
|
*/
|
||||||
static getLocale(language: string, key?: string): string | object {
|
static getLocale(language: string, key?: string): string | object {
|
||||||
let i18n: any = {}
|
let i18n: any = {};
|
||||||
if (!this.i18n[language]) {
|
if (!this.i18n[language]) {
|
||||||
i18n = this.i18n["en"][0].content;
|
i18n = this.i18n["en"][0].content;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,7 @@ const CiderPlug = new Plugins();
|
||||||
* App Event Handlers
|
* App Event Handlers
|
||||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||||
app.on("ready", async () => {
|
app.on("ready", async () => {
|
||||||
await utils.initializeTranslations()
|
await utils.initializeTranslations();
|
||||||
Cider.ready(CiderPlug);
|
Cider.ready(CiderPlug);
|
||||||
|
|
||||||
console.log("[Cider] Application is Ready. Creating Window.");
|
console.log("[Cider] Application is Ready. Creating Window.");
|
||||||
|
@ -40,10 +40,10 @@ app.on("ready", async () => {
|
||||||
console.info("[Cider] Running in development mode.");
|
console.info("[Cider] Running in development mode.");
|
||||||
require("vue-devtools").install();
|
require("vue-devtools").install();
|
||||||
}
|
}
|
||||||
console.log("aa")
|
console.log("aa");
|
||||||
components.whenReady().then(async () => {
|
components.whenReady().then(async () => {
|
||||||
const bw = new BrowserWindow();
|
const bw = new BrowserWindow();
|
||||||
console.log("[Cider] Creating Window.")
|
console.log("[Cider] Creating Window.");
|
||||||
const win = await bw.createWindow();
|
const win = await bw.createWindow();
|
||||||
|
|
||||||
app.getGPUInfo("complete").then((gpuInfo) => {
|
app.getGPUInfo("complete").then((gpuInfo) => {
|
||||||
|
@ -112,4 +112,3 @@ app.on("widevine-error", (error) => {
|
||||||
console.log("[Cider][Widevine] Widevine installation encountered an error: " + error);
|
console.log("[Cider][Widevine] Widevine installation encountered an error: " + error);
|
||||||
app.exit();
|
app.exit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default class Thumbar {
|
||||||
|
|
||||||
private isNotMac: boolean = process.platform !== "darwin";
|
private isNotMac: boolean = process.platform !== "darwin";
|
||||||
private isMac: boolean = process.platform === "darwin";
|
private isMac: boolean = process.platform === "darwin";
|
||||||
private _menuTemplate: any = []
|
private _menuTemplate: any = [];
|
||||||
|
|
||||||
/*******************************************************************************************
|
/*******************************************************************************************
|
||||||
* Public Methods
|
* Public Methods
|
||||||
|
@ -317,11 +317,11 @@ export default class Thumbar {
|
||||||
* Runs on playback State Change
|
* Runs on playback State Change
|
||||||
* @param attributes Music Attributes (attributes.status = current state)
|
* @param attributes Music Attributes (attributes.status = current state)
|
||||||
*/
|
*/
|
||||||
onPlaybackStateDidChange(attributes: object): void { }
|
onPlaybackStateDidChange(attributes: object): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs on song change
|
* Runs on song change
|
||||||
* @param attributes Music Attributes
|
* @param attributes Music Attributes
|
||||||
*/
|
*/
|
||||||
onNowPlayingItemDidChange(attributes: object): void { }
|
onNowPlayingItemDidChange(attributes: object): void {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue