change messages

This commit is contained in:
quenousimporte 2024-02-16 09:39:19 +01:00
parent 682a18132d
commit e8c5d38b3a
1 changed files with 10 additions and 3 deletions

13
main.js
View File

@ -1305,7 +1305,7 @@ function migratelegacystorage()
var legacy = localStorage.getItem("data"); var legacy = localStorage.getItem("data");
if (legacy) if (legacy)
{ {
alert("Old data model detected. Click ok to migrate, or close app.") alert("Hey! I am about to migrate your notes to the brand new data model. No worries, I will keep a backup somewhere in case things go wrong. Take a deep breath, and click ok when you're ready.")
legacy = JSON.parse(legacy); legacy = JSON.parse(legacy);
var index = {}; var index = {};
legacy.reverse().forEach( (note, i) => legacy.reverse().forEach( (note, i) =>
@ -1366,7 +1366,14 @@ function fetch()
{ {
if (!filecontent) if (!filecontent)
{ {
pushall().then(resolve); if (confirm("No remote index found. Init remote now?"))
{
pushall().then(resolve);
}
else
{
resolve();
}
} }
else else
{ {
@ -2813,7 +2820,7 @@ function bind(title, content, pos)
{ {
if (workerid) if (workerid)
{ {
showtemporaryinfo("current note not yet serialized"); showtemporaryinfo("Cannot open '" + title + "' because current note not yet serialized");
return; return;
} }