Show hostname in non-javascript history page.

This commit is contained in:
Imran Sobir 2017-04-24 15:30:01 +05:00
parent 18082526f4
commit fe7d21dfbe
4 changed files with 14 additions and 11 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,14 +46,6 @@ table {
height: 40px;
text-align: center;
}
.hostname {
color: #858585;
font-size: 0.9em;
margin-left: 10px;
text-decoration: none;
}
{% 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 %}