circles timezone and sorting fixes

This commit is contained in:
Kevin Froman 2019-12-06 14:25:02 -06:00
parent fd6096a93c
commit 63c0c51f38
4 changed files with 11 additions and 17 deletions

View File

@ -2,6 +2,7 @@
* add multi-device forward secrecy * add multi-device forward secrecy
* document anonymity & security theory * document anonymity & security theory
* document usage * document usage
* add offline mode
* encrypt local data and keys * encrypt local data and keys
* ensure accessibility for Onionr web UI * ensure accessibility for Onionr web UI
* make forward secrecy compatible with multiple devices * make forward secrecy compatible with multiple devices

View File

@ -58,7 +58,7 @@ function appendMessages(msg, blockHash, beforeHash, channel) {
msgDate = 'unknown' msgDate = 'unknown'
} else { } else {
humanDate.setUTCSeconds(msgDate) humanDate.setUTCSeconds(msgDate)
msgDate = humanDate.toLocaleTimeString() + ' ' + humanDate.toLocaleDateString() msgDate = humanDate.toLocaleString("en-US", {timeZone: "Etc/GMT"})
} }
var el = document.createElement('div') var el = document.createElement('div')

View File

@ -17,21 +17,14 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
function sortEntries(){ function sortEntries() {
var entries = document.getElementsByClassName('entry') var entries = document.getElementsByClassName('entry')
var timestamp = 0; if (entries.length > 1) {
if (entries.length > 0){ const sortBy = 'timestamp'
timestamp = entries[0].getAttribute('timestamp') const parent = entries[0].parentNode
const sorted = Array.from(entries).sort((a, b) => b.getAttribute(sortBy) - a.getAttribute(sortBy))
sorted.forEach(element => parent.appendChild(element))
} }
for (i = 0; i < entries.length; i++){
if (entries[i].getAttribute('timestamp') > timestamp){
if(entries[i].previousElementSibling){
entries[i].parentNode.insertBefore(entries[i], entries[i].previousElementSibling)
}
}
}
} }

View File

@ -25,7 +25,7 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item idLink" href="/"> <a class="navbar-item idLink" href="/">
<img src="/shared/images/favicon.ico" class="navabarLogo"> <img src="/shared/images/favicon.ico" class="navbarLogo">
</a> </a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"