settings: show the version, and let the rest timer be turned off
Two things people asked for on release day, both small, both awkward to live without. The version was not visible anywhere. mflova asked how to tell which build the phone app is running and andi242 said he had wondered the same that morning; issue #7 asks for it too. The support template in #install-help has been telling people to read it off "the bottom of Settings" — where it was not. It is there now, read from package.json at build time so it cannot drift from the release it shipped in. On the phone there is no address bar and no about box, so this was the only missing way to answer "did the update actually install". The rest timer had no off switch. andi242, in the per-exercise-timers thread: "I don't use rest timers, so I find it's a bit tedious to skip the timer every time." v1.2.10 made that worse rather than better — it now rests after every set except the last of the session, so an exercise that used to end quietly no longer does, and there was still no way out. "Off" now sits at the top of the same list as 60/90/120/150/180. The guard is inside startRest rather than at the four places that call it, for the same reason the rest-after-a-set rule became one shared condition: a rule that has to be repeated is a rule that gets forgotten. 'Off' already exists in all twelve locale packs, so this adds no translation work.
This commit is contained in:
1 parent
fa879a8b40
commit
9bec4bb785
4 files changed
+44
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
@@ -28,7 +29,13 @@ const umami = {
|
||||
}
|
||||
}
|
||||
|
||||
// The version people are asked for in #install-help and on every bug report. Read from
|
||||
// package.json so it cannot drift from the release it was built in, and inlined at build
|
||||
// time so no runtime fetch is involved.
|
||||
const pkgVersion = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version
|
||||
|
||||
export default defineConfig({
|
||||
define: { __APP_VERSION__: JSON.stringify(pkgVersion) },
|
||||
plugins: [react(), umami],
|
||||
base: './',
|
||||
server: {
|
||||
|
||||
Reference in new issue
Block a user