Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Nov 5, 2024
1 parent 077a466 commit 205bfda
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions renderer/player/elements/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const styles = css`
`

class Header extends Component {
constructor(opts) {
constructor (opts) {
super(opts)

this.emit = null
Expand All @@ -53,12 +53,12 @@ class Header extends Component {
this.searchComp = new Search()
}

handleSearch(val) {
handleSearch (val) {
this.search = val
this.emit('library:search', val)
}

handleAddButton() {
handleAddButton () {
if (!this.dialogOpen) {
this.dialogOpen = true
const paths = config.get('paths')
Expand All @@ -75,27 +75,27 @@ class Header extends Component {
}
}

handlePaths({ filePaths }) {
handlePaths ({ filePaths }) {
this.dialogOpen = false
if (Array.isArray(filePaths) && filePaths.length > 0) {
this.emit('config:set', { filePaths })
this.emit('library:update-library', filePaths)
}
}

handleNav() {
handleNav () {
this.emit('pushState', '#preferences')
}

handleDrop(event) {
handleDrop (event) {
event.preventDefault()
const { files } = event.dataTransfer

const paths = Array(files.length).fill(0).map((_, i) => webUtils.getPathForFile(files.item(i)))
this.handlePaths({ filePaths: paths })
}

createElement(state, emit) {
createElement (state, emit) {
this.emit = emit
this.search = state.library.search
this.loading = state.library.loading
Expand Down Expand Up @@ -123,7 +123,7 @@ class Header extends Component {
`
}

update(state, emit) {
update (state, emit) {
if (this.search !== state.library.search) return true
if (this.loading !== state.library.loading) return true
return false
Expand Down

0 comments on commit 205bfda

Please sign in to comment.