some backend fixes and add android app
This commit is contained in:
69 files changed
+7111
-7
No files matched your search
@@ -70,4 +70,15 @@ QtObject {
|
||||
if (kind === "long_break") return "Long break"
|
||||
return "Focus"
|
||||
}
|
||||
|
||||
// Mirrors the web app's humanMinutes() in lib/format.ts, so "125m" reads
|
||||
// as "2h 5m" here too.
|
||||
function humanMinutes(minutes) {
|
||||
var rounded = Math.round(minutes)
|
||||
var hours = Math.floor(rounded / 60)
|
||||
var rest = rounded % 60
|
||||
if (hours && rest) return hours + "h " + rest + "m"
|
||||
if (hours) return hours + "h"
|
||||
return rest + "m"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user