added: saved mark

This commit is contained in:
quenousimporte 2023-11-28 15:24:33 +01:00
parent 946776f221
commit 0aab00f9c4
3 changed files with 13 additions and 1 deletions

View File

@ -31,6 +31,8 @@
<div id="notepage"> <div id="notepage">
<div id="unsavedmark" hidden></div>
<div id="topbar" onclick="ontopbarclick()"> <div id="topbar" onclick="ontopbarclick()">
<input id="title" onchange="ontitlechange()" hidden/> <input id="title" onchange="ontitlechange()" hidden/>
</div> </div>

View File

@ -13,7 +13,8 @@ var defaultsettings =
password: "", password: "",
sync: false, sync: false,
tagsinlists: true, tagsinlists: true,
uselinkpopup: true uselinkpopup: true,
useunsavedmark: false
}; };
//builtin //builtin
@ -1917,6 +1918,7 @@ function postpone()
function setsaved() function setsaved()
{ {
unsavedmark.hidden = true;
saved = true; saved = true;
lastsaved = timestamp(); lastsaved = timestamp();
} }
@ -2277,6 +2279,7 @@ function datachanged()
resize(); resize();
saved = false; saved = false;
unsavedmark.hidden = !settings.useunsavedmark;
postpone() postpone()
.then(save); .then(save);

View File

@ -50,6 +50,13 @@ body::-webkit-scrollbar-thumb {
/* note page and editor */ /* note page and editor */
#unsavedmark {
position: fixed;
top: 0;
left: 5px;
color: lightgrey;
}
#notepage { #notepage {
width: 100%; width: 100%;
display: table; display: table;