From c23b141ed0616b624e3e1efb156c4c64413b73d4 Mon Sep 17 00:00:00 2001 From: Kristoffer Date: Thu, 5 Dec 2024 13:18:51 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=EF=B8=8F=20Fixed=20timer=20not=20clea?= =?UTF-8?q?ring=20from=20action=20-=20Wider=20font=20dropdown=20-=20Versio?= =?UTF-8?q?n=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/frontend/components/helpers/timerTick.ts | 9 +++++++-- src/frontend/components/inputs/FontDropdown.svelte | 12 +++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index dfeeda52..fae747fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "freeshow", - "version": "1.3.2", + "version": "1.3.3-beta.1", "private": true, "main": "build/electron/index.js", "description": "Show song lyrics and more for free!", diff --git a/src/frontend/components/helpers/timerTick.ts b/src/frontend/components/helpers/timerTick.ts index 9c88d3cc..36ef0b91 100644 --- a/src/frontend/components/helpers/timerTick.ts +++ b/src/frontend/components/helpers/timerTick.ts @@ -23,6 +23,7 @@ export function startTimer() { if (get(currentWindow)) return if (!get(activeTimers).filter((a) => a.paused !== true).length || timeout) return + if (timeout) clearTimeout(timeout) timeout = setTimeout(() => { let newActiveTimers = clone(get(activeTimers)).map(increment) @@ -51,8 +52,12 @@ export function startTimerById(id: string) { } export function stopTimers() { - activeTimers.set([]) - customInterval = INTERVAL + // timeout so timer_end action don't clear at the same time as next timer tick starts + setTimeout(() => { + // if (timeout) clearTimeout(timeout) // clear timeout (timer does not start again then...) + activeTimers.set([]) + customInterval = INTERVAL + }, 50) } function increment(timer: any, i: number) { diff --git a/src/frontend/components/inputs/FontDropdown.svelte b/src/frontend/components/inputs/FontDropdown.svelte index 9316f075..5c7a5786 100644 --- a/src/frontend/components/inputs/FontDropdown.svelte +++ b/src/frontend/components/inputs/FontDropdown.svelte @@ -185,11 +185,6 @@ display: flex; } - .dropdownElem :global(.arrow) { - width: 130px !important; - text-transform: capitalize; - } - div { background-color: var(--primary-darker); color: var(--text); @@ -207,6 +202,13 @@ border: 2px solid var(--primary-lighter); transform: translateY(-1px); z-index: 10; + + width: 180%; + right: 0; + } + .dropdownElem :global(.dropdownElem .dropdown.arrow) { + /* this is currently relative to 40px anyway */ + width: 520% !important; } button {