organize imports

This commit is contained in:
Rick van Lieshout 2023-05-01 23:31:37 +02:00
parent 46d030cf8e
commit e8509d42e7
3 changed files with 20 additions and 21 deletions

View File

@ -1,30 +1,30 @@
import { initialize, enable } from "@electron/remote/main";
import { enable, initialize } from "@electron/remote/main";
import {
app,
BrowserWindow,
app,
components,
globalShortcut,
ipcMain,
protocol,
session,
} from "electron";
import path from "path";
import flagValues from "./constants/flags";
import globalEvents from "./constants/globalEvents";
import mediaKeys from "./constants/mediaKeys";
import discordModule from "./scripts/discord";
import { startExpress } from "./scripts/express";
import mediaInfoModule from "./scripts/mediaInfo";
import { addMenu } from "./scripts/menu";
import {
settings,
store,
createSettingsWindow,
showSettingsWindow,
closeSettingsWindow,
createSettingsWindow,
hideSettingsWindow,
settings,
showSettingsWindow,
store,
} from "./scripts/settings";
import { addTray, refreshTray } from "./scripts/tray";
import { addMenu } from "./scripts/menu";
import path from "path";
import { startExpress } from "./scripts/express";
import mediaKeys from "./constants/mediaKeys";
import mediaInfoModule from "./scripts/mediaInfo";
import discordModule from "./scripts/discord";
import globalEvents from "./constants/globalEvents";
import flagValues from "./constants/flags";
const tidalUrl = "https://listen.tidal.com";
initialize();

View File

@ -1,14 +1,14 @@
import { Notification, app, dialog } from "@electron/remote";
import { ipcRenderer } from "electron";
import globalEvents from "./constants/globalEvents";
import { customCSS, skipArtists, updateFrequency } from "./constants/settings";
import statuses from "./constants/statuses";
import { Options } from "./models/options";
import { downloadFile } from "./scripts/download";
import { addHotkey } from "./scripts/hotkeys";
import { settings, store } from "./scripts/settings";
import { setTitle } from "./scripts/window-functions";
const { store, settings } = require("./scripts/settings");
const notificationPath = `${app.getPath("userData")}/notification.jpg`;
const statuses = require("./constants/statuses");
const globalEvents = require("./constants/globalEvents");
const { skipArtists, updateFrequency, customCSS } = require("./constants/settings");
const appName = "Tidal Hifi";
let currentSong = "";
let player: any;
@ -156,7 +156,7 @@ function addCustomCss() {
* make sure it returns a number, if not use the default
*/
function getUpdateFrequency() {
const storeValue = store.get(updateFrequency);
const storeValue = store.get(updateFrequency) as number;
const defaultValue = 500;
if (!isNaN(storeValue)) {

View File

@ -1,6 +1,5 @@
import { BrowserWindow, Tray } from "electron";
const { getMenu } = require("./menu");
import { getMenu } from "./menu";
let tray: Tray;