clean code

This commit is contained in:
JellyBrick
2023-11-27 19:26:45 +09:00
parent 3ffbfbe0e3
commit 2fe28cf126
16 changed files with 43 additions and 41 deletions

View File

@ -1,12 +1,10 @@
import path from 'node:path';
import { app, BrowserWindow, ipcMain, ipcRenderer } from 'electron';
import { app, BrowserWindow, ipcMain } from 'electron';
import config from '../config';
import config from '@/config';
export const restart = () => {
process.type === 'browser' ? restartInternal() : ipcRenderer.send('restart');
};
export const restart = () => restartInternal();
export const setupAppControls = () => {
ipcMain.on('restart', restart);

View File

@ -1,8 +1,8 @@
import { singleton } from './decorators';
import type { YoutubePlayer } from '../types/youtube-player';
import type { GetState } from '../types/datahost-get-state';
import type { VideoDataChangeValue } from '../types/player-api-events';
import type { YoutubePlayer } from '@/types/youtube-player';
import type { GetState } from '@/types/datahost-get-state';
import type { VideoDataChangeValue } from '@/types/player-api-events';
import type { SongInfo } from './song-info';

View File

@ -2,9 +2,9 @@ import { BrowserWindow, ipcMain, nativeImage, net } from 'electron';
import { cache } from './decorators';
import config from '../config';
import config from '@/config';
import type { GetPlayerResponse } from '../types/get-player-response';
import type { GetPlayerResponse } from '@/types/get-player-response';
export interface SongInfo {
title: string;