Add "Display" settings page and move some settings to it (close #42)

Skylar Ittner 4 years ago
parent 69f691caab
commit 5c86142a94

@ -395,6 +395,13 @@ var routes = [
text: "Change map settings and units.",
onclick: "router.navigate('/settings/maps')",
link: true
},
{
setting: "display",
title: "Display and Appearance",
text: "Change the app theme, show/hide help bubbles, etc.",
onclick: "router.navigate('/settings/display')",
link: true
}
);
if (platform_type == "cordova" && cordova.platformId != "browser") {
@ -409,30 +416,6 @@ var routes = [
}
settings.push(
{
setting: "darktheme",
title: "Use dark theme",
text: "Saves power on phones with OLED screens.",
toggle: true,
checked: getStorage("darktheme") == "true",
onclick: ""
},
{
setting: "showhelp",
title: "Show help",
text: "Show the <span class=material-icons-intext><i class=material-icons>help</i></span> icons",
toggle: true,
checked: getStorage("show_help") != "false",
onclick: ""
},
{
setting: "oldhomeui",
title: "Show home screen as list",
text: "Use a vertical list instead of tiles.",
toggle: true,
checked: getStorage("oldhomeui") == "true",
onclick: ""
},
{
setting: "versions",
title: "PackageHelper app v" + app_version,
@ -619,6 +602,46 @@ var routes = [
}
});
}
},
{
path: '/display',
name: 'settings',
async: function (routeTo, routeFrom, resolve, reject) {
var settings = [
{
setting: "darktheme",
title: "Use dark theme",
text: "Saves power on phones with OLED screens.",
toggle: true,
checked: getStorage("darktheme") == "true",
onclick: ""
},
{
setting: "showhelp",
title: "Show help",
text: "Show the <span class=material-icons-intext><i class=material-icons>help</i></span> icons",
toggle: true,
checked: getStorage("show_help") != "false",
onclick: ""
},
{
setting: "oldhomeui",
title: "Show home screen as list",
text: "Use a vertical list instead of tiles.",
toggle: true,
checked: getStorage("oldhomeui") == "true",
onclick: ""
}
];
resolve({
templateUrl: './pages/settings.html'
}, {
context: {
page_title: "Display Settings",
settings: settings
}
});
}
}
]
}

Loading…
Cancel
Save