Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add infobar ios

ammarahm-edfe6204e77a4c
diff --git a/apps/mobile/android/app/src/main/assets/texteditor.html b/apps/mobile/android/app/src/main/assets/texteditor.html
index 45dacd550..4fb2e8546 100644
--- a/apps/mobile/android/app/src/main/assets/texteditor.html
+++ b/apps/mobile/android/app/src/main/assets/texteditor.html
@@ -1104,7 +1104,6 @@
<div class="info-bar">
<p id="infowords"></p>
<p>•</p>
-
<p id="infodate"></p>
<p>•</p>
<p id="infosaved"></p>
diff --git a/apps/mobile/html/Web.bundle/site/index.html b/apps/mobile/html/Web.bundle/site/index.html
index c19a595f0..3da437129 100644
--- a/apps/mobile/html/Web.bundle/site/index.html
+++ b/apps/mobile/html/Web.bundle/site/index.html
@@ -1067,9 +1067,33 @@
background-color: transparent;
}
+ .info-bar {
+ display: flex;
+ color: gray;
+ font-size: 11px;
+ position: absolute;
+ margin-top: -18px;
+ font-family: 'DM Sans';
+ }
+
#titlebar input:focus {
outline: none;
}
+
+ #infowords {
+ margin-right: 5px;
+ margin-left: 5px;
+ }
+
+ #infodate {
+ margin-right: 5px;
+ margin-left: 5px;
+ }
+
+ #infosaved {
+ margin-right: 5px;
+ margin-left: 5px;
+ }
</style>
</head>
@@ -1077,7 +1101,13 @@
<body class="app-body">
<div id="titlebar">
<input id="titleInput" placeholder="Title here" />
- </div>
+ <div class="info-bar">
+ <p id="infowords"></p>
+ <p>•</p>
+ <p id="infodate"></p>
+ <p>•</p>
+ <p id="infosaved"></p>
+ </div>
<div id="editor"></div>
<div id="toolbar"></div>
@@ -1512,6 +1542,10 @@
color:${pageTheme.colors.pri};
}
+ .info-bar {
+ color:${pageTheme.colors.icon};
+ }
+
svg {
fill: ${pageTheme.colors.pri} !important;
}
@@ -1526,6 +1560,8 @@
editor.once('text-change', function () {
window.ReactNativeWebView.postMessage("loaded");
+ let text = editor.getText();
+ document.getElementById("infowords").innerText = text.split(' ').length + ' words';
});
@@ -1553,6 +1589,12 @@
document.getElementById('titleInput').blur();
editor.blur();
break;
+ case "dateEdited":
+ document.getElementById('infodate').innerText = value;
+ break;
+ case "saving":
+ document.getElementById('infosaved').innerText = value;
+ break;
case "text":
editor.setText(value, 'api')
setTimeout(() => {
@@ -1578,7 +1620,7 @@
case "nomenu":
let isenabled = value;
let width = window.innerWidth;
- let titleIn = document.getElementById('titleInput');
+ let titleIn = document.getElementById('titlebar');
if (isenabled) {
titleIn.style.width = width - 72;
titleIn.style['margin-left'] = 12;
@@ -1663,7 +1705,7 @@
m.delta = { ops: editor.getContents().ops }
m.text = editor.getText();
-
+ document.getElementById("infowords").innerText = m.text.split(' ').length + ' words';
m.html = editor.root.innerHTML;
m.type = 'content';