Skip to content
Snippets Groups Projects
Verified Commit ef9c8bc7 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Remove debug info, improve HTML

parent 6d25c616
No related branches found
No related tags found
No related merge requests found
......@@ -5,5 +5,5 @@ TAGS=$(git describe --always --tags HEAD)
docker build -t $IMAGE:$TAGS .
docker tag $IMAGE:$TAGS $IMAGE:latest
echo Successfully tagged $IMAGE:latest
docker push $IMAGE:$TAGS
docker push $IMAGE:latest
\ No newline at end of file
#docker push $IMAGE:$TAGS
#docker push $IMAGE:latest
\ No newline at end of file
#!/bin/sh
IMAGE=k8r.eu/justjanne/quassel-rest-search
TAGS=$(git describe --always --tags HEAD)
docker push $IMAGE:$TAGS
docker push $IMAGE:latest
echo Successfully pushed $IMAGE:latest
......@@ -250,6 +250,10 @@
background: #fff
position: relative
.invisible
font-size: 0
opacity: 0
&:before
bottom: 0
box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .24)
......@@ -329,10 +333,6 @@
overflow: hidden
text-overflow: ellipsis
.invisible
font-size: 0
opacity: 0
@media(max-width: 800px)
width: initial
padding: 0
......
......@@ -1152,6 +1152,9 @@ body {
color: #212121;
background: #fff;
position: relative; }
.results .buffer .container .context .message .invisible {
font-size: 0;
opacity: 0; }
.results .buffer .container .context .message:before {
bottom: 0;
box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
......@@ -1228,9 +1231,6 @@ body {
flex-shrink: 0;
overflow: hidden;
text-overflow: ellipsis; }
.results .buffer .container .context .message .container .sender .invisible {
font-size: 0;
opacity: 0; }
@media (max-width: 800px) {
.results .buffer .container .context .message .container .sender {
width: initial;
......
......@@ -3,7 +3,7 @@ class Message extends Component {
super();
this.id = id;
this.type = type;
this.time = time;
this.time = time.replace(' ', 'T') + 'Z';
this.sender = sender;
this.content = content;
this.isAnchor = isAnchor;
......@@ -19,47 +19,60 @@ class Message extends Component {
return this.elem = function () {
var $$a = document.createElement('span');
$$a.setAttribute('class', classes.join(' '));
var $$b = document.createElement('div');
$$b.setAttribute('class', 'hidden');
var $$b = document.createElement('span');
$$a.appendChild($$b);
$$b.appendChildren(JSON.stringify(MircColorHandler.render(this.content)));
var $$d = document.createElement('span');
$$a.appendChild($$d);
var $$c = document.createElement('span');
$$c.setAttribute('class', 'invisible');
$$c.setAttribute('aria-hidden', 'true');
$$b.appendChild($$c);
var $$d = document.createTextNode('[');
$$c.appendChild($$d);
var $$e = document.createElement('time');
$$d.appendChild($$e);
$$e.setAttribute('dateTime', this.time);
$$b.appendChild($$e);
$$e.appendChildren(this.formatTime());
var $$g = document.createElement('span');
$$g.setAttribute('class', 'container');
$$a.appendChild($$g);
var $$h = document.createElement('span');
$$h.setAttribute('class', 'sender');
$$h.setAttribute('data-sendercolor', SenderColorHandler.nickToColor(this.getNick()));
$$g.setAttribute('class', 'invisible');
$$g.setAttribute('aria-hidden', 'true');
$$b.appendChild($$g);
var $$h = document.createTextNode(']');
$$g.appendChild($$h);
var $$i = document.createElement('span');
$$i.setAttribute('class', 'invisible');
$$h.appendChild($$i);
var $$j = document.createTextNode(' <');
$$i.setAttribute('class', 'container');
$$a.appendChild($$i);
var $$j = document.createElement('span');
$$j.setAttribute('class', 'sender');
$$j.setAttribute('data-sendercolor', SenderColorHandler.nickToColor(this.getNick()));
$$i.appendChild($$j);
$$h.appendChildren(this.getNick());
var $$l = document.createElement('span');
$$l.setAttribute('class', 'invisible');
$$h.appendChild($$l);
var $$m = document.createTextNode('> ');
$$l.appendChild($$m);
var $$k = document.createElement('span');
$$k.setAttribute('class', 'invisible');
$$k.setAttribute('aria-hidden', 'true');
$$j.appendChild($$k);
var $$l = document.createTextNode(' <');
$$k.appendChild($$l);
$$j.appendChildren(this.getNick());
var $$n = document.createElement('span');
$$n.setAttribute('class', 'content');
$$g.appendChild($$n);
$$n.appendChildren(content.length ? content : null);
$$n.setAttribute('class', 'invisible');
$$n.setAttribute('aria-hidden', 'true');
$$j.appendChild($$n);
var $$o = document.createTextNode('> ');
$$n.appendChild($$o);
var $$p = document.createElement('span');
$$p.setAttribute('class', 'content');
$$i.appendChild($$p);
$$p.appendChildren(content.length ? content : null);
$$a.appendChildren(this.isAnchor ? function () {
var $$q = document.createElement('a');
$$q.setAttribute('class', 'more icon');
$$q.addEventListener('click', () => this.sendEvent('focus', []));
var $$r = document.createTextNode('list');
$$q.appendChild($$r);
return $$q;
var $$s = document.createElement('a');
$$s.setAttribute('class', 'more icon');
$$s.setAttribute('role', 'button');
$$s.setAttribute('aria-label', translation.context.show_hide);
$$s.addEventListener('click', () => this.sendEvent('focus', []));
var $$t = document.createTextNode('list');
$$s.appendChild($$t);
return $$s;
}.call(this) : null);
var $$s = document.createElement('br');
$$a.appendChild($$s);
var $$u = document.createElement('br');
$$a.appendChild($$u);
return $$a;
}.call(this);
}
......@@ -67,7 +80,7 @@ class Message extends Component {
const dateFormat = Storage.exists('dateformat') ? Storage.get('dateformat') : 'L';
const timeFormat = Storage.exists('timeformat') ? Storage.get('timeformat') : 'LT';
const dateTimeFormat = dateFormat + ' ' + timeFormat;
return moment(new Date(this.time.replace(' ', 'T') + 'Z')).format(dateTimeFormat);
return moment(new Date(this.time)).format(dateTimeFormat);
}
getNick() {
return this.sender.split('!')[0];
......
......@@ -4,7 +4,7 @@ class Message extends Component {
this.id = id;
this.type = type;
this.time = time;
this.time = time.replace(" ", "T") + "Z";
this.sender = sender;
this.content = content;
this.isAnchor = isAnchor;
......@@ -23,20 +23,23 @@ class Message extends Component {
return this.elem = (
<span className={classes.join(" ")}>
<div className="hidden">{JSON.stringify(MircColorHandler.render(this.content))}</div>
<span><time>{this.formatTime()}</time></span>
<span>
<span className="invisible" aria-hidden="true">[</span>
<time dateTime={this.time}>{this.formatTime()}</time>
<span className="invisible" aria-hidden="true">]</span>
</span>
<span className="container">
<span className="sender" data-sendercolor={SenderColorHandler.nickToColor(this.getNick())}>
<span className="invisible"> &lt;</span>
<span className="invisible" aria-hidden="true"> &lt;</span>
{this.getNick()}
<span className="invisible">&gt; </span>
<span className="invisible" aria-hidden="true">&gt; </span>
</span>
<span className="content">
{content.length ? content : null}
</span>
</span>
{this.isAnchor ? (
<a className="more icon" onClick={() => this.sendEvent("focus", [])}>list</a>
<a className="more icon" role="button" aria-label={translation.context.show_hide} onClick={() => this.sendEvent("focus", [])}>list</a>
) : null}
<br/>
</span>
......@@ -48,7 +51,7 @@ class Message extends Component {
const timeFormat = Storage.exists('timeformat') ? Storage.get('timeformat') : 'LT';
const dateTimeFormat = dateFormat + " " + timeFormat;
return moment(new Date(this.time.replace(" ", "T") + "Z")).format(dateTimeFormat);
return moment(new Date(this.time)).format(dateTimeFormat);
}
getNick() {
......
......@@ -9,7 +9,8 @@
},
"context": {
"load_later": "Ältere Nachrichten Laden",
"load_earlier": "Neuere Nachrichten Laden"
"load_earlier": "Neuere Nachrichten Laden",
"show_hide": "Nachrichtenkontext anzeigen/verstecken"
},
"history": {
"error_unavailable": "Keine vorherigen Suchbegriffe vorhanden"
......
......@@ -9,7 +9,8 @@
},
"context": {
"load_later": "Load Later Context",
"load_earlier": "Load Earlier Context"
"load_earlier": "Load Earlier Context",
"show_hide": "Toggle message context"
},
"history": {
"error_unavailable": "No search history available"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment