circles timezone and sorting fixes
This commit is contained in:
parent
fd6096a93c
commit
63c0c51f38
1
TODO.txt
1
TODO.txt
@ -2,6 +2,7 @@
|
||||
* add multi-device forward secrecy
|
||||
* document anonymity & security theory
|
||||
* document usage
|
||||
* add offline mode
|
||||
* encrypt local data and keys
|
||||
* ensure accessibility for Onionr web UI
|
||||
* make forward secrecy compatible with multiple devices
|
||||
|
@ -58,7 +58,7 @@ function appendMessages(msg, blockHash, beforeHash, channel) {
|
||||
msgDate = 'unknown'
|
||||
} else {
|
||||
humanDate.setUTCSeconds(msgDate)
|
||||
msgDate = humanDate.toLocaleTimeString() + ' ' + humanDate.toLocaleDateString()
|
||||
msgDate = humanDate.toLocaleString("en-US", {timeZone: "Etc/GMT"})
|
||||
}
|
||||
|
||||
var el = document.createElement('div')
|
||||
|
@ -20,18 +20,11 @@
|
||||
function sortEntries() {
|
||||
var entries = document.getElementsByClassName('entry')
|
||||
|
||||
var timestamp = 0;
|
||||
if (entries.length > 0){
|
||||
timestamp = entries[0].getAttribute('timestamp')
|
||||
}
|
||||
if (entries.length > 1) {
|
||||
const sortBy = 'timestamp'
|
||||
const parent = entries[0].parentNode
|
||||
|
||||
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)
|
||||
const sorted = Array.from(entries).sort((a, b) => b.getAttribute(sortBy) - a.getAttribute(sortBy))
|
||||
sorted.forEach(element => parent.appendChild(element))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item idLink" href="/">
|
||||
<img src="/shared/images/favicon.ico" class="navabarLogo">
|
||||
<img src="/shared/images/favicon.ico" class="navbarLogo">
|
||||
</a>
|
||||
|
||||
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
|
||||
|
Loading…
Reference in New Issue
Block a user