From b807cf19072d1c962fc7f8e89bb0cf90fb555306 Mon Sep 17 00:00:00 2001 From: Shiny Nematoda Date: Fri, 22 Sep 2023 12:39:40 +0000 Subject: [PATCH] fmt fixes --- src/App.vue | 18 +++++++----------- src/assets/version.json | 2 +- src/components/Player.vue | 3 ++- src/components/SearchBar.vue | 6 +++--- src/components/StatusBar.vue | 20 +++++++++++--------- src/stores/misc.js | 2 +- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/App.vue b/src/App.vue index a4b8879..eff2d53 100644 --- a/src/App.vue +++ b/src/App.vue @@ -95,27 +95,23 @@ function parseUrl() { function setupKeys() { window.addEventListener('keydown', e => { - if ( - !e.shiftKey || - e.repeat || - 'string' == typeof e.target.value - ) return - + if (!e.shiftKey || e.repeat || 'string' == typeof e.target.value) return; + switch (e.code) { case 'Space': - player.toggle('play') + player.toggle('play'); break; case 'Slash': - nav.show() + nav.show(); break; case 'KeyN': - data.nextTrack() + data.nextTrack(); break; case 'KeyP': - data.prevTrack() + data.prevTrack(); break; } - }) + }); } function playThis(t) { diff --git a/src/assets/version.json b/src/assets/version.json index a9ef4ee..fc94ece 100644 --- a/src/assets/version.json +++ b/src/assets/version.json @@ -1,3 +1,3 @@ { - "date": "2023-09-02" + "date": "2023-09-22" } diff --git a/src/components/Player.vue b/src/components/Player.vue index 77b0c14..8f15d61 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -62,7 +62,8 @@ async function Stream() { window.offline = new shaka.offline.Storage(audioPlayer); window.offline.configure({ offline: { - progressCallback: ({ appMetadata: { title, artist } }, prog) => a.add(`${title} by ${artist}: ${Math.floor(prog*100)}%`), + progressCallback: ({ appMetadata: { title, artist } }, prog) => + a.add(`${title} by ${artist}: ${Math.floor(prog * 100)}%`), trackSelectionCallback: tracks => [ tracks .sort((a, b) => a.bandwidth - b.bandwidth) diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue index d05875c..d85d1bf 100644 --- a/src/components/SearchBar.vue +++ b/src/components/SearchBar.vue @@ -16,9 +16,9 @@ function search(e) { watch( () => nav.state.show, e => { - if (e === true) setTimeout(() => searchEl.value.focus(), 0) - } -) + if (e === true) setTimeout(() => searchEl.value.focus(), 0); + }, +);