Merge commit 'fe7d21dfbe0b9dabcb66eaa61c20a5d16c9e175c'

This commit is contained in:
Florian Bruhin 2017-04-26 08:54:39 +02:00
commit 95b866e4f4
5 changed files with 18 additions and 4 deletions

View File

@ -311,7 +311,8 @@ def qute_history(url):
start_time = time.mktime(next_date.timetuple()) - 1
history = [
(i["url"], i["title"],
datetime.datetime.fromtimestamp(i["time"]/1000))
datetime.datetime.fromtimestamp(i["time"]/1000),
QUrl(i["url"]).host())
for i in history_data(start_time) if "next" not in i
]

View File

@ -46,7 +46,6 @@ table {
height: 40px;
text-align: center;
}
{% endblock %}
{% block content %}
<h1>Browsing history</h1>

View File

@ -42,9 +42,12 @@ table {
<table>
<caption class="date">{{curr_date.strftime("%a, %d %B %Y")}}</caption>
<tbody>
{% for url, title, time in history %}
{% for url, title, time, host in history %}
<tr>
<td class="title"><a href="{{url}}">{{title}}</a></td>
<td class="title">
<a href="{{url}}">{{title}}</a>
<span class="hostname">{{host}}</span>
</td>
<td class="time">{{time.strftime("%X")}}</td>
</tr>
{% endfor %}

View File

@ -38,4 +38,11 @@ td {
padding: 2px 5px;
text-align: left;
}
.hostname {
color: #858585;
font-size: 0.9em;
margin-left: 10px;
text-decoration: none;
}
{% endblock %}

View File

@ -111,7 +111,11 @@ window.loadHistory = (function() {
var link = document.createElement("a");
link.href = itemUrl;
link.innerHTML = itemTitle;
var host = document.createElement("span");
host.className = "hostname";
host.innerHTML = link.hostname;
title.appendChild(link);
title.appendChild(host);
var time = document.createElement("td");
time.className = "time";