mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Take timezone into consideration when calculating relative time
This commit is contained in:
parent
61bc012a62
commit
b5b1930599
16 changed files with 91 additions and 58 deletions
|
@ -1,5 +1,5 @@
|
|||
// Code generated by go generate; DO NOT EDIT.
|
||||
// 2018-02-03 15:28:45.540437885 -0800 PST m=+0.032377624
|
||||
// 2018-02-04 14:28:15.215257434 -0800 PST m=+0.025839096
|
||||
|
||||
package template
|
||||
|
||||
|
@ -179,7 +179,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
||||
</div>
|
||||
{{ template "item_meta" . }}
|
||||
{{ template "item_meta" dict "user" $.user "entry" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -404,7 +404,7 @@ var templateViewsMap = map[string]string{
|
|||
|
||||
<div class="panel">
|
||||
<ul>
|
||||
<li><strong>{{ t "Last checked:" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed .feed.CheckedAt }}</time></li>
|
||||
<li><strong>{{ t "Last checked:" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed $.user.Timezone .feed.CheckedAt }}</time></li>
|
||||
<li><strong>{{ t "ETag header:" }} </strong>{{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "None" }}{{ end }}</li>
|
||||
<li><strong>{{ t "LastModified header:" }} </strong>{{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "None" }}{{ end }}</li>
|
||||
</ul>
|
||||
|
@ -524,7 +524,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
</div>
|
||||
<div class="entry-date">
|
||||
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .entry.Date }}</time>
|
||||
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed $.user.Timezone .entry.Date }}</time>
|
||||
</div>
|
||||
</header>
|
||||
{{ if gt (len .entry.Content) 120 }}
|
||||
|
@ -613,7 +613,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
||||
</div>
|
||||
{{ template "item_meta" . }}
|
||||
{{ template "item_meta" dict "user" $.user "entry" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -666,7 +666,7 @@ var templateViewsMap = map[string]string{
|
|||
<a href="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
|
||||
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
|
@ -729,7 +729,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
||||
</div>
|
||||
{{ template "item_meta" . }}
|
||||
{{ template "item_meta" dict "user" $.user "entry" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -967,7 +967,7 @@ var templateViewsMap = map[string]string{
|
|||
</tr>
|
||||
{{ range .sessions }}
|
||||
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
||||
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed .CreatedAt }}</td>
|
||||
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
||||
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
||||
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
||||
<td class="column-20">
|
||||
|
@ -1094,7 +1094,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
||||
</div>
|
||||
{{ template "item_meta" . }}
|
||||
{{ template "item_meta" dict "user" $.user "entry" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -1135,7 +1135,7 @@ var templateViewsMap = map[string]string{
|
|||
</span>
|
||||
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
||||
</div>
|
||||
{{ template "item_meta" . }}
|
||||
{{ template "item_meta" dict "user" $.user "entry" . }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -1184,7 +1184,7 @@ var templateViewsMap = map[string]string{
|
|||
<td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td>
|
||||
<td>
|
||||
{{ if .LastLoginAt }}
|
||||
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed .LastLoginAt }}</time>
|
||||
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
|
||||
{{ else }}
|
||||
{{ t "Never" }}
|
||||
{{ end }}
|
||||
|
@ -1213,23 +1213,23 @@ var templateViewsMapChecksums = map[string]string{
|
|||
"about": "ad2fb778fc73c39b733b3f81b13e5c7d689b041fadd24ee2d4577f545aa788ad",
|
||||
"add_subscription": "053c920b0d7e109ea19dce6a448e304ce720db8633588ea04db16677f7209a7b",
|
||||
"categories": "ca1280cd157bb527d4fc907da67b05a8347378f6dce965b9389d4bcdf3600a11",
|
||||
"category_entries": "a92bd528d1162e7af4972f7ad25feddf7ceb17164db593805caf3d363ff32aac",
|
||||
"category_entries": "686132d71c52a665329670756ac09959d915f7bc3227970149c623059988b035",
|
||||
"choose_subscription": "a325f9c976ca2b2dc148e25c8fef0cf6ccab0e04e86e604e7812bb18dc4cdde1",
|
||||
"create_category": "2b82af5d2dcd67898dc5daa57a6461e6ff8121a6089b2a2a1be909f35e4a2275",
|
||||
"create_user": "233764778c915754141a20429ec8db9bf80ef2d7704867a2d7232c1e9df233ae",
|
||||
"edit_category": "cee720faadcec58289b707ad30af623d2ee66c1ce23a732965463250d7ff41c5",
|
||||
"edit_feed": "30ff6ee5526b8beb9b457526b77ede55938f53eb279b1acc719ce896359e2ed8",
|
||||
"edit_feed": "d2c1c8486d7faf4ee58151ccf3e3c690e53bd6872050d291c5db8452a83c3d53",
|
||||
"edit_user": "5edd693460330750ba5ee03319d4e3cb5aabbd9a0e48b3b760799bca72c5ec4e",
|
||||
"entry": "6b4405e0c8e4a7d31874659f8835f4e43e01dc3c20686091517ac750196dd70f",
|
||||
"feed_entries": "3a7b4d942d9ac9da7df5c09950fbadaa0ff564696953c4f1c302d955696cc2ee",
|
||||
"feeds": "65b0a47c4438810b9d51c60f3f3b2519690e56ff74029e6296c68626b83a470b",
|
||||
"history": "d2476fd727e4f53428b5ed1f3f9423063583337ec8cfe1dd9c931fcb03852a20",
|
||||
"entry": "27ea028515e79beb546f0b2792a3918c455fd877eea4c41d1a061f8e7b54a430",
|
||||
"feed_entries": "420da786e827a77fecc8794207d158af3a30e489ca2b2019f48d5228919af4a7",
|
||||
"feeds": "0c884b7a9dfc4541b988641516fd95df062a5bf05018d28276a3c0a10323cffd",
|
||||
"history": "967bc95236269ab3a77455910aca1939f43f93171fe1af77eb3b1b4eac579e55",
|
||||
"import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f",
|
||||
"integrations": "958b73d632a3e2a79368bb1582efb8aabc438cef4fa6e8dc1aa4932494916aca",
|
||||
"login": "7d83c3067c02f1f6aafdd8816c7f97a4eb5a5a4bdaaaa4cc1e2fbb9c17ea65e8",
|
||||
"sessions": "d8ef5900d8ea8395804b320002e5f45ed0ab8b790e43f674f61f8b9787041cbd",
|
||||
"sessions": "3fa79031dd883847eba92fbafe5f535fa3a4e1614bb610f20588b6f8fc8b3624",
|
||||
"settings": "ea2505b9d0a6d6bb594dba87a92079de19baa6d494f0651693a7685489fb7de9",
|
||||
"starred": "121b761ce218de472ebf70879c1aa2fe3b9ae8981c11f1ed53a355e34049b269",
|
||||
"unread": "17335b21dc5fb79207da317a8e8a6685a122bc94c323662cbda7cfdbf73dd2f9",
|
||||
"users": "a07201315fdb1d8f381f31699b8acee0066719c26cd29c2aeb9808282d69e0a3",
|
||||
"starred": "d006f5bcfca7abc7c68b6bb38fe25838acb81b65f960fbf06b97b259ba03b936",
|
||||
"unread": "ad71a7bdd46c1d650efecbeeb37b7606a046027c15284c0712912b77397f90d4",
|
||||
"users": "c6d91b0b29984b4cb3073bec6a2933cfb72981ec60f54b6c7aa05194f0e860bd",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue