From 9422f04e87164d05e2e94520775e62c5abf1e2bc Mon Sep 17 00:00:00 2001 From: David Titarenco Date: Wed, 8 Jul 2020 12:16:13 -0700 Subject: [PATCH] code cleanup and more sensible defaults --- src/constants.ts | 2 +- src/renderer/components/Lofi/About/index.tsx | 2 +- src/renderer/components/Lofi/Cover/index.tsx | 4 ++-- src/renderer/components/util/WindowPortal/index.tsx | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 14c0428..63b3da5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -35,7 +35,7 @@ export const DEFAULT_SETTINGS = { debug: false, hardware_acceleration: true, lofi: { - visualization: 2, + visualization: 0, window: { always_on_top: true, x: 0, diff --git a/src/renderer/components/Lofi/About/index.tsx b/src/renderer/components/Lofi/About/index.tsx index 34e23a4..39ba1d9 100644 --- a/src/renderer/components/Lofi/About/index.tsx +++ b/src/renderer/components/Lofi/About/index.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React from 'react'; import TitleBar from 'frameless-titlebar' import * as j from '../../../../../package.json' import './style.scss'; diff --git a/src/renderer/components/Lofi/Cover/index.tsx b/src/renderer/components/Lofi/Cover/index.tsx index 31aa45f..dec627f 100644 --- a/src/renderer/components/Lofi/Cover/index.tsx +++ b/src/renderer/components/Lofi/Cover/index.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { remote, ipcRenderer } from 'electron' +import { remote } from 'electron' import settings from 'electron-settings'; import { MACOS } from '../../../../constants' import * as path from 'path'; @@ -243,7 +243,7 @@ class Cover extends React.Component { // 5) Put them in the shuffled order in the playlist ID // 6) Play that playlist ID const playlist_id = this.state.currently_playing.context.uri.split(":").reverse()[0]; - const tracks = (await this.getAllTracksFromPlaylist(playlist_id)); + // const tracks = (await this.getAllTracksFromPlaylist(playlist_id)); let res = await fetch('https://api.spotify.com/v1/playlists/' + playlist_id + '/tracks', { method: 'GET', diff --git a/src/renderer/components/util/WindowPortal/index.tsx b/src/renderer/components/util/WindowPortal/index.tsx index 97b8757..37ad0ff 100644 --- a/src/renderer/components/util/WindowPortal/index.tsx +++ b/src/renderer/components/util/WindowPortal/index.tsx @@ -5,7 +5,6 @@ import React from 'react' import ReactDOM from 'react-dom' -import PropTypes from 'prop-types' /** * The NewWindow class object. @@ -66,7 +65,7 @@ class NewWindow extends React.PureComponent { * Create the new window when NewWindow component mount. */ openChild() { - const { url, title, name, features, onBlock, onOpen, center, fullscreen, size } = this.props + const { url, title, name, features, onBlock, onOpen, center } = this.props // Prepare position of the new window to be centered against the 'parent' window or 'screen'. if (