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 { import {
app,
BrowserWindow, BrowserWindow,
app,
components, components,
globalShortcut, globalShortcut,
ipcMain, ipcMain,
protocol, protocol,
session, session,
} from "electron"; } 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 { import {
settings,
store,
createSettingsWindow,
showSettingsWindow,
closeSettingsWindow, closeSettingsWindow,
createSettingsWindow,
hideSettingsWindow, hideSettingsWindow,
settings,
showSettingsWindow,
store,
} from "./scripts/settings"; } from "./scripts/settings";
import { addTray, refreshTray } from "./scripts/tray"; 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"; const tidalUrl = "https://listen.tidal.com";
initialize(); initialize();

View File

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

View File

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