sleeplog - Fix translation messing with back menu items

pull/3367/head
Martin Boonk 2024-04-20 08:31:41 +02:00
parent 14b6257bd7
commit ed42b0eb41
3 changed files with 13 additions and 12 deletions

View File

@ -13,3 +13,4 @@
0.15: Issue newline before GB commands (solves issue with console.log and ignored commands)
0.16: Only write logs if we have a non-empty log to write
0.17: Minor code improvements
0.18: Add back as a function to prevent translation making it a menu entry

View File

@ -2,7 +2,7 @@
"id":"sleeplog",
"name":"Sleep Log",
"shortName": "SleepLog",
"version": "0.17",
"version": "0.18",
"description": "Log and view your sleeping habits. This app is using the built in movement calculation.",
"icon": "app.png",
"type": "app",

View File

@ -246,14 +246,14 @@
// setup debugging menu
var debugMenu = {
"": {
title: /*LANG*/"Debugging"
},
/*LANG*/"< Back": () => {
title: /*LANG*/"Debugging",
back: () => {
// check if some value has changed
if (enabled !== !!global.sleeplog.debug || file !== (typeof global.sleeplog.debug === "object") || duration)
require("sleeplog").setDebug(enabled, file ? duration || 12 : undefined);
// redraw main menu
showMain(7);
}
},
/*LANG*/"View log": () => selectDebug(),
/*LANG*/"Enable": {
@ -293,9 +293,9 @@
//var menu;
var thresholdsMenu = {
"": {
title: /*LANG*/"Thresholds"
title: /*LANG*/"Thresholds",
back: () => showMain(2)
},
/*LANG*/"< Back": () => showMain(2),
/*LANG*/"Max Awake": {
value: settings.maxAwake / 6E4,
step: 10,
@ -398,9 +398,9 @@
var mainMenu = {
"": {
title: "Sleep Log",
back: back,
selected: selected
},
/*LANG*/"< Back": () => back(),
/*LANG*/"Thresholds": () => showThresholds(),
/*LANG*/"Break ToD": {
value: settings.breakToD,