|
|
|
@ -20,16 +20,29 @@ function logout() {
|
|
|
|
|
|
|
|
|
|
function resyncAndRestart() {
|
|
|
|
|
app.toast.show({
|
|
|
|
|
text: "Syncing settings and restarting...",
|
|
|
|
|
position: "bottom",
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
closeTimeout: 1000 * 10
|
|
|
|
|
});
|
|
|
|
|
text: "Syncing settings and restarting...",
|
|
|
|
|
position: "bottom",
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
closeTimeout: 1000 * 10
|
|
|
|
|
});
|
|
|
|
|
syncNow(function () {
|
|
|
|
|
restartApplication();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function clearCaches() {
|
|
|
|
|
app.toast.show({
|
|
|
|
|
text: "Clearing caches. You may need to restart the app to see a difference.",
|
|
|
|
|
position: "bottom",
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
closeTimeout: 1000 * 10
|
|
|
|
|
});
|
|
|
|
|
setStorage("geocode_cache", "{}");
|
|
|
|
|
if ('caches' in window) {
|
|
|
|
|
clearAllCaches();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('.item-content[data-setting=darktheme] .toggle input').on("change", function () {
|
|
|
|
|
var checked = $(this).prop('checked');
|
|
|
|
|
setStorage("darktheme", checked);
|
|
|
|
|