circles timezone and sorting fixes

master
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
* 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

View File

@ -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')

View File

@ -17,21 +17,14 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
function sortEntries(){
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))
}
}
}
}

View File

@ -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"