2017-11-20 06:10:04 +01:00
|
|
|
|
// Code generated by go generate; DO NOT EDIT.
|
|
|
|
|
|
2018-08-25 06:51:50 +02:00
|
|
|
|
package template // import "miniflux.app/template"
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
var templateViewsMap = map[string]string{
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"about": `{{ define "title"}}{{ t "page.about.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.about.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<div class="panel">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>Miniflux</h3>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<li><strong>{{ t "page.about.version" }}</strong> {{ .version }}</li>
|
|
|
|
|
<li><strong>{{ t "page.about.build_date" }}</strong> {{ .build_date }}</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="panel">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>{{ t "page.about.credits" }}</h3>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<li><strong>{{ t "page.about.author" }}</strong> Frédéric Guillot</li>
|
|
|
|
|
<li><strong>{{ t "page.about.license" }}</strong> Apache 2.0</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"add_subscription": `{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.add_feed.title" }}</h1>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
{{ template "feed_menu" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-url">{{ t "page.add_feed.label.url" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-category">{{ t "form.feed.label.category" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<select id="form-category" name="category_id">
|
|
|
|
|
{{ range .categories }}
|
2018-12-13 06:31:50 +01:00
|
|
|
|
<option value="{{ .ID }}" {{ if eq $.form.CategoryID .ID }}selected="selected"{{ end }}>{{ .Title }}</option>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-09-22 07:27:53 +02:00
|
|
|
|
<details>
|
|
|
|
|
<summary>{{ t "page.add_feed.legend.advanced_options" }}</summary>
|
|
|
|
|
<div class="details-content">
|
|
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label>
|
|
|
|
|
|
|
|
|
|
<label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label>
|
|
|
|
|
<input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}" autocomplete="off">
|
|
|
|
|
|
|
|
|
|
<label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label>
|
|
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label>
|
|
|
|
|
<!--
|
|
|
|
|
We are using the type "text" otherwise Firefox always autocomplete this password:
|
|
|
|
|
|
|
|
|
|
- autocomplete="off" or autocomplete="new-password" doesn't change anything
|
|
|
|
|
- Changing the input ID doesn't change anything
|
|
|
|
|
- Using a different input name doesn't change anything
|
|
|
|
|
-->
|
|
|
|
|
<input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}">
|
2019-11-29 20:17:14 +01:00
|
|
|
|
|
|
|
|
|
<label for="form-scraper-rules">{{ t "form.feed.label.scraper_rules" }}</label>
|
|
|
|
|
<input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-rewrite-rules">{{ t "form.feed.label.rewrite_rules" }}</label>
|
|
|
|
|
<input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}">
|
2018-09-22 07:27:53 +02:00
|
|
|
|
</div>
|
|
|
|
|
</details>
|
2017-12-13 04:19:36 +01:00
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "page.add_feed.submit" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2020-03-02 02:38:29 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"api_keys": `{{ define "title"}}{{ t "page.api_keys.title" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "page.api_keys.title" }}</h1>
|
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if .apiKeys }}
|
|
|
|
|
{{ range .apiKeys }}
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="column-25">{{ t "page.api_keys.table.description" }}</th>
|
|
|
|
|
<td>{{ .Description }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ t "page.api_keys.table.token" }}</th>
|
|
|
|
|
<td>{{ .Token }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ t "page.api_keys.table.last_used_at" }}</th>
|
|
|
|
|
<td>
|
|
|
|
|
{{ if .LastUsedAt }}
|
|
|
|
|
<time datetime="{{ isodate .LastUsedAt }}" title="{{ isodate .LastUsedAt }}">{{ elapsed $.user.Timezone .LastUsedAt }}</time>
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ t "page.api_keys.never_used" }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ t "page.api_keys.table.created_at" }}</th>
|
|
|
|
|
<td>
|
|
|
|
|
<time datetime="{{ isodate .CreatedAt }}" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</time>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ t "page.api_keys.table.actions" }}</th>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
|
data-url="{{ route "removeAPIKey" "keyID" .ID }}">{{ t "action.remove" }}</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<br>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<h3>{{ t "page.integration.miniflux_api" }}</h3>
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "page.integration.miniflux_api_endpoint" }} = <strong>{{ baseURL }}/v1/</strong>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "page.integration.miniflux_api_username" }} = <strong>{{ .user.Username }}</strong>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "page.integration.miniflux_api_password" }} = <strong>{{ t "page.integration.miniflux_api_password_value" }}</strong>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
<a href="{{ route "createAPIKey" }}" class="button button-primary">{{ t "menu.create_api_key" }}</a>
|
|
|
|
|
</p>
|
|
|
|
|
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"bookmark_entries": `{{ define "title"}}{{ t "page.starred.title" }} ({{ .total }}){{ end }}
|
2018-04-30 02:43:40 +02:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.starred.title" }} ({{ .total }})</h1>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert alert-info">{{ t "alert.no_bookmark" }}</p>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "starredEntry" "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"categories": `{{ define "title"}}{{ t "page.categories.title" }} ({{ .total }}){{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.categories.title" }} ({{ .total }})</h1>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-10-28 02:11:05 +02:00
|
|
|
|
<p class="alert alert-error">{{ t "alert.no_category" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .categories }}
|
|
|
|
|
<article class="item">
|
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
2019-11-18 04:44:12 +01:00
|
|
|
|
(<span title="{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}">{{ .FeedCount }}</span>)
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
<div class="item-meta">
|
2020-03-23 00:33:35 +01:00
|
|
|
|
<ul class="item-meta-info">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<li>
|
2020-06-15 04:00:41 +02:00
|
|
|
|
{{ if eq .FeedCount 0 }}{{ t "page.categories.no_feed" }}{{ else }}{{ plural "page.categories.feed_count" .FeedCount .FeedCount }}{{ end }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<ul class="item-meta-icons">
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ template "icon_entries" }}<span class="icon-label">{{ t "page.categories.entries" }}</span></a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryFeeds" "categoryID" .ID }}">{{ template "icon_feeds" }}<span class="icon-label">{{ t "page.categories.feeds" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2020-06-15 04:00:41 +02:00
|
|
|
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ template "icon_edit" }}<span class="icon-label">{{ t "menu.edit_category" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
{{ if eq .FeedCount 0 }}
|
|
|
|
|
<li>
|
2017-11-21 23:44:47 +01:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2020-06-15 04:00:41 +02:00
|
|
|
|
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ template "icon_delete" }}<span class="icon-label">{{ t "action.remove" }}</span></a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"category_entries": `{{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ .category.Title }} ({{ .total }})</h1>
|
|
|
|
|
<ul>
|
2018-12-14 09:54:25 +01:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
2017-12-02 07:55:00 +01:00
|
|
|
|
{{ end }}
|
2018-12-14 09:54:25 +01:00
|
|
|
|
{{ if .showOnlyUnreadEntries }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryEntriesAll" "categoryID" .category.ID }}">{{ t "menu.show_all_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.show_only_unread_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2019-11-18 04:44:12 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ t "menu.feeds" }}</a>
|
|
|
|
|
</li>
|
2018-12-14 09:54:25 +01:00
|
|
|
|
</ul>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2018-10-28 02:11:05 +02:00
|
|
|
|
<p class="alert">{{ t "alert.no_category_entry" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-03 00:01:05 +01:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
<section class="page-footer">
|
|
|
|
|
{{ if .entries }}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2019-11-18 04:44:12 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"category_feeds": `{{ define "title"}}{{ .category.Title }} > {{ t "page.feeds.title" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ .category.Title }} > {{ t "page.feeds.title" }} ({{ .total }})</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2020-06-11 05:33:58 +02:00
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .category.ID }}">{{ t "menu.feed_entries" }}</a>
|
2019-11-18 04:44:12 +01:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "editCategory" "categoryID" .category.ID }}">{{ t "menu.edit_category" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ if eq .total 0 }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
|
data-redirect-url="{{ route "categories" }}"
|
|
|
|
|
data-url="{{ route "removeCategory" "categoryID" .category.ID }}">{{ t "action.remove" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .feeds }}
|
|
|
|
|
<p class="alert">{{ t "alert.no_feed_in_category" }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"choose_subscription": `{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.add_feed.title" }}</h1>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
{{ template "feed_menu" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "chooseSubscription" }}" method="POST">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
2018-06-20 07:58:29 +02:00
|
|
|
|
<input type="hidden" name="category_id" value="{{ .form.CategoryID }}">
|
2018-09-20 03:19:24 +02:00
|
|
|
|
<input type="hidden" name="user_agent" value="{{ .form.UserAgent }}">
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="hidden" name="feed_username" value="{{ .form.Username }}">
|
|
|
|
|
<input type="hidden" name="feed_password" value="{{ .form.Password }}">
|
2019-11-29 20:17:14 +01:00
|
|
|
|
<input type="hidden" name="scraper_rules" value="{{ .form.ScraperRules }}">
|
|
|
|
|
<input type="hidden" name="rewrite_rules" value="{{ .form.RewriteRules }}">
|
2018-06-20 07:58:29 +02:00
|
|
|
|
{{ if .form.Crawler }}
|
|
|
|
|
<input type="hidden" name="crawler" value="1">
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>{{ t "page.add_feed.choose_feed" }}</h3>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ range .subscriptions }}
|
|
|
|
|
<div class="radio-group">
|
2020-01-02 20:06:57 +01:00
|
|
|
|
<label title="{{ .URL | safeURL }}"><input type="radio" name="url" value="{{ .URL | safeURL }}"> {{ .Title }}</label> ({{ .Type }})
|
|
|
|
|
<small title="Type = {{ .Type }}"><a href="{{ .URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .URL | safeURL }}</a></small>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "action.subscribe" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
2020-03-02 02:38:29 +01:00
|
|
|
|
`,
|
|
|
|
|
"create_api_key": `{{ define "title"}}{{ t "page.new_api_key.title" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "page.new_api_key.title" }}</h1>
|
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "saveAPIKey" }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<label for="form-description">{{ t "form.api_key.label.description" }}</label>
|
|
|
|
|
<input type="text" name="description" id="form-description" value="{{ .form.Description }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "apiKeys" }}">{{ t "action.cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"create_category": `{{ define "title"}}{{ t "page.new_category.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.new_category.title" }}</h1>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "categories" }}">{{ t "menu.categories" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "saveCategory" }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-title">{{ t "form.category.label.title" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "categories" }}">{{ t "action.cancel" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"create_user": `{{ define "title"}}{{ t "page.new_user.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.new_user.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "saveUser" }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-username">{{ t "form.user.label.username" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-password">{{ t "form.user.label.password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password" required>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" required>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "form.user.label.admin" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "users" }}">{{ t "action.cancel" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"edit_category": `{{ define "title"}}{{ t "page.edit_category.title" .category.Title }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.edit_category.title" .category.Title }}</h1>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "categories" }}">{{ t "menu.categories" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
2019-11-18 04:44:12 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categoryFeeds" "categoryID" .category.ID }}">{{ t "menu.feeds" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "updateCategory" "categoryID" .category.ID }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-title">{{ t "form.category.label.title" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2019-11-18 04:44:12 +01:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"edit_feed": `{{ define "title"}}{{ t "page.edit_feed.title" .feed.Title }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ .feed.Title }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .feed.ID }}">{{ t "menu.feed_entries" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
<a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "menu.refresh_feed" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
{{ if ne .feed.ParsingErrorCount 0 }}
|
|
|
|
|
<div class="alert alert-error">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>{{ t "page.edit_feed.last_parsing_error" }}</h3>
|
2018-01-05 03:32:36 +01:00
|
|
|
|
<p>{{ t .feed.ParsingErrorMsg }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "updateFeed" "feedID" .feed.ID }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-title">{{ t "form.feed.label.title" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-site-url">{{ t "form.feed.label.site_url" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="url" name="site_url" id="form-site-url" placeholder="https://domain.tld/" value="{{ .form.SiteURL }}" required>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-feed-url">{{ t "form.feed.label.feed_url" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="url" name="feed_url" id="form-feed-url" placeholder="https://domain.tld/" value="{{ .form.FeedURL }}" required>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label>
|
2018-07-09 03:21:56 +02:00
|
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label>
|
2018-07-09 03:21:56 +02:00
|
|
|
|
<!--
|
|
|
|
|
We are using the type "text" otherwise Firefox always autocomplete this password:
|
2018-06-20 07:58:29 +02:00
|
|
|
|
|
2018-07-09 03:21:56 +02:00
|
|
|
|
- autocomplete="off" or autocomplete="new-password" doesn't change anything
|
|
|
|
|
- Changing the input ID doesn't change anything
|
|
|
|
|
- Using a different input name doesn't change anything
|
|
|
|
|
-->
|
|
|
|
|
<input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}">
|
2018-06-20 07:58:29 +02:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label>
|
2018-09-20 03:19:24 +02:00
|
|
|
|
<input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-scraper-rules">{{ t "form.feed.label.scraper_rules" }}</label>
|
2017-12-11 05:51:04 +01:00
|
|
|
|
<input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-rewrite-rules">{{ t "form.feed.label.rewrite_rules" }}</label>
|
2017-12-12 07:16:32 +01:00
|
|
|
|
<input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-category">{{ t "form.feed.label.category" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<select id="form-category" name="category_id">
|
|
|
|
|
{{ range .categories }}
|
|
|
|
|
<option value="{{ .ID }}" {{ if eq .ID $.form.CategoryID }}selected="selected"{{ end }}>{{ .Title }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label>
|
2020-06-06 06:50:59 +02:00
|
|
|
|
<label><input type="checkbox" name="ignore_http_cache" value="1" {{ if .form.IgnoreHTTPCache }}checked{{ end }}> {{ t "form.feed.label.ignore_http_cache" }}</label>
|
2019-07-27 06:13:06 +02:00
|
|
|
|
<label><input type="checkbox" name="disabled" value="1" {{ if .form.Disabled }}checked{{ end }}> {{ t "form.feed.label.disabled" }}</label>
|
2017-12-13 04:19:36 +01:00
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> {{ t "action.or" }} <a href="{{ route "feeds" }}">{{ t "action.cancel" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2017-12-27 05:58:16 +01:00
|
|
|
|
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<ul>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<li><strong>{{ t "page.edit_feed.last_check" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed $.user.Timezone .feed.CheckedAt }}</time></li>
|
|
|
|
|
<li><strong>{{ t "page.edit_feed.etag_header" }} </strong>{{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "page.edit_feed.no_header" }}{{ end }}</li>
|
|
|
|
|
<li><strong>{{ t "page.edit_feed.last_modified_header" }} </strong>{{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "page.edit_feed.no_header" }}{{ end }}</li>
|
2017-12-27 05:58:16 +01:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2018-08-25 21:21:54 +02:00
|
|
|
|
|
|
|
|
|
<div class="alert alert-error">
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
2018-10-14 00:43:09 +02:00
|
|
|
|
data-action="remove-feed"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2018-08-25 21:21:54 +02:00
|
|
|
|
data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-redirect-url="{{ route "feeds" }}">{{ t "action.remove_feed" }}</a>
|
2018-08-25 21:21:54 +02:00
|
|
|
|
</div>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-10-14 00:43:09 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"edit_user": `{{ define "title"}}{{ t "page.edit_user.title" .selected_user.Username }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.edit_user.title" .selected_user.Username }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "updateUser" "userID" .selected_user.ID }}" method="post" autocomplete="off">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-username">{{ t "form.user.label.username" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-password">{{ t "form.user.label.password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "form.user.label.admin" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> {{ t "action.or" }} <a href="{{ route "users" }}">{{ t "action.cancel" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"entry": `{{ define "title"}}{{ .entry.Title }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
2018-08-29 05:44:34 +02:00
|
|
|
|
<section class="entry" data-id="{{ .entry.ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<header class="entry-header">
|
|
|
|
|
<h1>
|
2020-01-02 20:06:57 +01:00
|
|
|
|
<a href="{{ .entry.URL | safeURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</h1>
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-12-03 04:32:14 +01:00
|
|
|
|
<div class="entry-actions">
|
2017-12-11 04:01:38 +01:00
|
|
|
|
<ul>
|
2018-08-29 05:44:34 +02:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.status.title" }}"
|
2018-08-29 05:44:34 +02:00
|
|
|
|
data-toggle-status="true"
|
2020-03-26 04:22:40 +01:00
|
|
|
|
data-label-unread="✘ {{ t "entry.status.unread" }}"
|
|
|
|
|
data-label-read="✔︎ {{ t "entry.status.read" }}"
|
2020-03-28 18:45:31 +01:00
|
|
|
|
data-toast-unread="✘ {{ t "entry.status.toast.unread" }}"
|
|
|
|
|
data-toast-read="✔︎ {{ t "entry.status.toast.read" }}"
|
2018-08-29 05:44:34 +02:00
|
|
|
|
data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}"
|
2020-03-26 04:22:40 +01:00
|
|
|
|
><span class="icon-label">{{ if eq .entry.Status "unread" }}✔ {{ t "entry.status.read" }}{{ else }}✘ {{ t "entry.status.unread" }}{{ end }}</span></a>
|
2018-08-29 05:44:34 +02:00
|
|
|
|
</li>
|
2017-12-22 20:33:01 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-toggle-bookmark="true"
|
|
|
|
|
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.saving" }}"
|
|
|
|
|
data-label-star="☆ {{ t "entry.bookmark.toggle.on" }}"
|
|
|
|
|
data-label-unstar="★ {{ t "entry.bookmark.toggle.off" }}"
|
2019-10-07 05:55:15 +02:00
|
|
|
|
data-toast-star="★ {{ t "entry.bookmark.toast.on" }}"
|
|
|
|
|
data-toast-unstar="☆ {{ t "entry.bookmark.toast.off" }}"
|
2018-06-30 05:29:04 +02:00
|
|
|
|
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
|
2020-03-22 23:18:12 +01:00
|
|
|
|
><span class="icon-label">{{ if .entry.Starred }}★ {{ t "entry.bookmark.toggle.off" }}{{ else }}☆ {{ t "entry.bookmark.toggle.on" }}{{ end }}</span></a>
|
2017-12-22 20:33:01 +01:00
|
|
|
|
</li>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ if .hasSaveEntry }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.save.title" }}"
|
2018-04-30 02:43:40 +02:00
|
|
|
|
data-save-entry="true"
|
|
|
|
|
data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.saving" }}"
|
|
|
|
|
data-label-done="{{ t "entry.save.completed" }}"
|
2019-10-07 05:55:15 +02:00
|
|
|
|
data-toast-done="{{ t "entry.save.toast.completed" }}"
|
2020-03-22 23:18:12 +01:00
|
|
|
|
>{{ template "icon_save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></a>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
<li>
|
2020-03-23 02:48:14 +01:00
|
|
|
|
{{ if .entry.ShareCode }}
|
|
|
|
|
<a href="{{ route "sharedEntry" "shareCode" .entry.ShareCode }}"
|
|
|
|
|
title="{{ t "entry.shared_entry.title" }}"
|
|
|
|
|
target="_blank">{{ template "icon_share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="{{ route "shareEntry" "entryID" .entry.ID }}"
|
|
|
|
|
title="{{ t "entry.share.title" }}"
|
|
|
|
|
target="_blank">{{ template "icon_share" }}<span class="icon-label">{{ t "entry.share.label" }}</span></a>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
</li>
|
2017-12-11 04:01:38 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
title="{{ t "entry.scraper.title" }}"
|
2017-12-11 04:01:38 +01:00
|
|
|
|
data-fetch-content-entry="true"
|
|
|
|
|
data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-loading="{{ t "entry.state.loading" }}"
|
2020-03-22 23:18:12 +01:00
|
|
|
|
>{{ template "icon_scraper" }}<span class="icon-label">{{ t "entry.scraper.label" }}</span></a>
|
2017-12-11 04:01:38 +01:00
|
|
|
|
</li>
|
2018-04-07 22:50:45 +02:00
|
|
|
|
{{ if .entry.CommentsURL }}
|
|
|
|
|
<li>
|
2020-03-22 23:18:12 +01:00
|
|
|
|
<a href="{{ .entry.CommentsURL | safeURL }}"
|
|
|
|
|
title="{{ t "entry.comments.title" }}"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
referrerpolicy="no-referrer"
|
|
|
|
|
data-comments-link="true"
|
|
|
|
|
>{{ template "icon_comment" }}<span class="icon-label">{{ t "entry.comments.label" }}</span></a>
|
2018-04-07 22:50:45 +02:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2017-12-11 04:01:38 +01:00
|
|
|
|
</ul>
|
2017-12-03 04:32:14 +01:00
|
|
|
|
</div>
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="entry-meta">
|
|
|
|
|
<span class="entry-website">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if and .user (ne .entry.Feed.Icon.IconID 0) }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
2020-03-18 04:22:02 +01:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="{{ .entry.Feed.SiteURL | safeURL }}">{{ .entry.Feed.Title }}</a>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</span>
|
|
|
|
|
{{ if .entry.Author }}
|
|
|
|
|
<span class="entry-author">
|
2017-11-26 02:08:04 +01:00
|
|
|
|
{{ if isEmail .entry.Author }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
- <a href="mailto:{{ .entry.Author }}">{{ .entry.Author }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
– <em>{{ .entry.Author }}</em>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<span class="category">
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .entry.Feed.Category.ID }}">{{ .entry.Feed.Category.Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
<div class="entry-date">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed $.user.Timezone .entry.Date }}</time>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed "UTC" .entry.Date }}</time>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</header>
|
2017-12-05 06:09:08 +01:00
|
|
|
|
{{ if gt (len .entry.Content) 120 }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="pagination-top">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
2017-12-05 06:09:08 +01:00
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<article class="entry-content">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
|
|
|
|
{{ noescape (proxyFilter .entry.Content) }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ noescape .entry.Content }}
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ if .entry.Enclosures }}
|
2019-11-29 19:43:30 +01:00
|
|
|
|
<details class="entry-enclosures">
|
|
|
|
|
<summary>{{ t "page.entry.attachments" }} ({{ len .entry.Enclosures }})</summary>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ range .entry.Enclosures }}
|
2020-01-31 06:08:11 +01:00
|
|
|
|
{{ if ne .URL "" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="entry-enclosure">
|
|
|
|
|
{{ if hasPrefix .MimeType "audio/" }}
|
|
|
|
|
<div class="enclosure-audio">
|
|
|
|
|
<audio controls preload="metadata">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<source src="{{ .URL | safeURL }}" type="{{ .MimeType }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</audio>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "video/" }}
|
|
|
|
|
<div class="enclosure-video">
|
|
|
|
|
<video controls preload="metadata">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<source src="{{ .URL | safeURL }}" type="{{ .MimeType }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</video>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "image/" }}
|
|
|
|
|
<div class="enclosure-image">
|
2020-03-19 01:55:15 +01:00
|
|
|
|
{{ if $.user }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
<img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
|
|
|
|
|
{{ else }}
|
2020-03-19 01:55:15 +01:00
|
|
|
|
<img src="{{ .URL | safeURL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<div class="entry-enclosure-download">
|
2020-01-02 20:06:57 +01:00
|
|
|
|
<a href="{{ .URL | safeURL }}" title="{{ t "action.download" }}{{ if gt .Size 0 }} - {{ formatFileSize .Size }}{{ end }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .URL | safeURL }}</a>
|
2019-11-29 19:27:25 +01:00
|
|
|
|
<small>{{ if gt .Size 0 }} - <strong>{{ formatFileSize .Size }}</strong>{{ end }}</small>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-01-31 06:08:11 +01:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
2019-11-29 19:43:30 +01:00
|
|
|
|
</details>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ if .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="pagination-bottom">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
2019-10-05 13:30:25 +02:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
`,
|
|
|
|
|
"feed_entries": `{{ define "title"}}{{ .feed.Title }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2020-06-12 06:07:13 +02:00
|
|
|
|
<h1>
|
|
|
|
|
<a href="{{ .feed.SiteURL | safeURL }}" title="{{ .feed.SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ .feed.Title }}</a>
|
|
|
|
|
({{ .total }})
|
|
|
|
|
</h1>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
{{ end }}
|
2018-12-14 09:54:25 +01:00
|
|
|
|
{{ if .showOnlyUnreadEntries }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feedEntriesAll" "feedID" .feed.ID }}">{{ t "menu.show_all_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .feed.ID }}">{{ t "menu.show_only_unread_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "menu.refresh_feed" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "menu.edit_feed" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
2018-10-14 00:43:09 +02:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-action="remove-feed"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
|
data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
|
|
|
|
|
data-redirect-url="{{ route "feeds" }}">{{ t "action.remove_feed" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if ne .feed.ParsingErrorCount 0 }}
|
|
|
|
|
<div class="alert alert-error">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>{{ t "alert.feed_error" }}</h3>
|
2018-01-05 03:32:36 +01:00
|
|
|
|
<p>{{ t .feed.ParsingErrorMsg }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
2019-04-03 06:17:01 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2019-01-06 21:23:51 +01:00
|
|
|
|
{{ if .showOnlyUnreadEntries }}
|
|
|
|
|
<p class="alert">{{ t "alert.no_unread_entry" }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<p class="alert">{{ t "alert.no_feed_entry" }}</p>
|
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-03 00:01:05 +01:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "feedEntry" "feedID" .Feed.ID "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
<section class="page-footer">
|
|
|
|
|
{{ if .entries }}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }}</a>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"feeds": `{{ define "title"}}{{ t "page.feeds.title" }} ({{ .total }}){{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.feeds.title" }} ({{ .total }})</h1>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
{{ template "feed_menu" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .feeds }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert">{{ t "alert.no_feed" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
2019-11-18 04:44:12 +01:00
|
|
|
|
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"history_entries": `{{ define "title"}}{{ t "page.history.title" }} ({{ .total }}){{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.history.title" }} ({{ .total }})</h1>
|
2017-12-02 07:55:00 +01:00
|
|
|
|
{{ if .entries }}
|
2017-11-22 00:46:59 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2019-07-18 06:29:00 +02:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-url="{{ route "flushHistory" }}"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.flush_history" }}</a>
|
2017-11-22 00:46:59 +01:00
|
|
|
|
</li>
|
2020-03-23 02:48:14 +01:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sharedEntries" }}">{{ t "menu.shared_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sharedEntries" }}">{{ t "menu.shared_entries" }}</a>
|
|
|
|
|
</li>
|
2017-11-22 00:46:59 +01:00
|
|
|
|
</ul>
|
2017-12-02 07:55:00 +01:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert alert-info">{{ t "alert.no_history" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-03 00:01:05 +01:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "readEntry" "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"import": `{{ define "title"}}{{ t "page.import.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.import.title" }}</h1>
|
2020-01-02 22:03:34 +01:00
|
|
|
|
{{ template "feed_menu" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
2019-08-16 07:08:24 +02:00
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-file">{{ t "form.import.label.file" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="file" name="file" id="form-file">
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2019-08-16 07:08:24 +02:00
|
|
|
|
<hr>
|
2019-08-15 09:48:07 +02:00
|
|
|
|
<form action="{{ route "fetchOPML" }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-url">{{ t "form.import.label.url" }}</label>
|
2019-08-16 07:08:24 +02:00
|
|
|
|
<input type="url" name="url" id="form-url" required>
|
2019-08-15 09:48:07 +02:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2017-11-22 04:37:47 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"integrations": `{{ define "title"}}{{ t "page.integrations.title" }}{{ end }}
|
2017-11-22 04:37:47 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.integrations.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-22 04:37:47 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
2017-12-03 04:32:14 +01:00
|
|
|
|
<form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-12-04 02:44:27 +01:00
|
|
|
|
<h3>Fever</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "form.integration.fever_activate" }}
|
2017-12-04 02:44:27 +01:00
|
|
|
|
</label>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-fever-username">{{ t "form.integration.fever_username" }}</label>
|
2017-12-04 02:44:27 +01:00
|
|
|
|
<input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-fever-password">{{ t "form.integration.fever_password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}" autocomplete="new-password">
|
2018-02-01 06:57:20 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p>{{ t "form.integration.fever_endpoint" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p>
|
2017-12-04 02:44:27 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-12-03 04:32:14 +01:00
|
|
|
|
<h3>Pinboard</h3>
|
2017-12-03 06:12:03 +01:00
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "form.integration.pinboard_activate" }}
|
2017-12-03 06:12:03 +01:00
|
|
|
|
</label>
|
2017-12-03 04:32:14 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-pinboard-token">{{ t "form.integration.pinboard_token" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}" autocomplete="new-password">
|
2017-12-03 04:32:14 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-pinboard-tags">{{ t "form.integration.pinboard_tags" }}</label>
|
2017-12-03 06:12:03 +01:00
|
|
|
|
<input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">
|
2017-12-03 04:32:14 +01:00
|
|
|
|
|
2017-12-03 06:12:03 +01:00
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "form.integration.pinboard_bookmark" }}
|
2017-12-03 06:12:03 +01:00
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3>Instapaper</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "form.integration.instapaper_activate" }}
|
2017-12-03 06:12:03 +01:00
|
|
|
|
</label>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-instapaper-username">{{ t "form.integration.instapaper_username" }}</label>
|
2017-12-03 06:12:03 +01:00
|
|
|
|
<input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-instapaper-password">{{ t "form.integration.instapaper_password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}" autocomplete="new-password">
|
2017-12-03 06:12:03 +01:00
|
|
|
|
</div>
|
2017-12-03 04:32:14 +01:00
|
|
|
|
|
2018-05-21 00:29:14 +02:00
|
|
|
|
<h3>Pocket</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "form.integration.pocket_activate" }}
|
2018-05-21 00:29:14 +02:00
|
|
|
|
</label>
|
|
|
|
|
|
2018-05-21 21:19:56 +02:00
|
|
|
|
{{ if not .hasPocketConsumerKeyConfigured }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-pocket-consumer-key">{{ t "form.integration.pocket_consumer_key" }}</label>
|
2018-05-21 21:19:56 +02:00
|
|
|
|
<input type="text" name="pocket_consumer_key" id="form-pocket-consumer-key" value="{{ .form.PocketConsumerKey }}">
|
|
|
|
|
{{ end }}
|
2018-05-21 00:29:14 +02:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-pocket-access-token">{{ t "form.integration.pocket_access_token" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="pocket_access_token" id="form-pocket-access-token" value="{{ .form.PocketAccessToken }}" autocomplete="new-password">
|
2018-05-21 00:29:14 +02:00
|
|
|
|
|
|
|
|
|
{{ if not .form.PocketAccessToken }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p><a href="{{ route "pocketAuthorize" }}">{{ t "form.integration.pocket_connect_link" }}</a></p>
|
2018-05-21 00:29:14 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-12-19 05:52:46 +01:00
|
|
|
|
<h3>Wallabag</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "form.integration.wallabag_activate" }}
|
2017-12-19 05:52:46 +01:00
|
|
|
|
</label>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-wallabag-url">{{ t "form.integration.wallabag_endpoint" }}</label>
|
2017-12-19 05:52:46 +01:00
|
|
|
|
<input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-wallabag-client-id">{{ t "form.integration.wallabag_client_id" }}</label>
|
2017-12-19 05:52:46 +01:00
|
|
|
|
<input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-wallabag-client-secret">{{ t "form.integration.wallabag_client_secret" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}" autocomplete="new-password">
|
2017-12-19 05:52:46 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-wallabag-username">{{ t "form.integration.wallabag_username" }}</label>
|
2017-12-19 05:52:46 +01:00
|
|
|
|
<input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-wallabag-password">{{ t "form.integration.wallabag_password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}" autocomplete="new-password">
|
2017-12-19 05:52:46 +01:00
|
|
|
|
</div>
|
2018-05-20 22:31:56 +02:00
|
|
|
|
|
2018-02-25 20:49:08 +01:00
|
|
|
|
<h3>Nunux Keeper</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<input type="checkbox" name="nunux_keeper_enabled" value="1" {{ if .form.NunuxKeeperEnabled }}checked{{ end }}> {{ t "form.integration.nunux_keeper_activate" }}
|
2018-02-25 20:49:08 +01:00
|
|
|
|
</label>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-nunux-keeper-url">{{ t "form.integration.nunux_keeper_endpoint" }}</label>
|
2018-02-25 20:49:08 +01:00
|
|
|
|
<input type="url" name="nunux_keeper_url" id="form-nunux-keeper-url" value="{{ .form.NunuxKeeperURL }}" placeholder="https://api.nunux.org/keeper">
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-nunux-keeper-api-key">{{ t "form.integration.nunux_keeper_api_key" }}</label>
|
2018-02-25 20:49:08 +01:00
|
|
|
|
<input type="text" name="nunux_keeper_api_key" id="form-nunux-keeper-api-key" value="{{ .form.NunuxKeeperAPIKey }}">
|
|
|
|
|
</div>
|
2017-12-19 05:52:46 +01:00
|
|
|
|
|
2017-12-03 04:32:14 +01:00
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
|
2017-12-03 04:32:14 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h3>{{ t "page.integration.bookmarklet" }}</h3>
|
2017-11-22 04:37:47 +01:00
|
|
|
|
<div class="panel">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p>{{ t "page.integration.bookmarklet.help" }}</p>
|
2017-11-22 04:37:47 +01:00
|
|
|
|
|
|
|
|
|
<div class="bookmarklet">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "page.integration.bookmarklet.name" }}</a>
|
2017-11-22 04:37:47 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p>{{ t "page.integration.bookmarklet.instructions" }}</p>
|
2017-11-22 04:37:47 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"login": `{{ define "title"}}{{ t "page.login.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="login-form">
|
|
|
|
|
<form action="{{ route "checkLogin" }}" method="post">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-username">{{ t "form.user.label.username" }}</label>
|
2017-12-23 01:30:17 +01:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-password">{{ t "form.user.label.password" }}</label>
|
2017-12-23 01:30:17 +01:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
2019-03-27 04:47:04 +01:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "action.login" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2017-11-23 07:22:33 +01:00
|
|
|
|
{{ if hasOAuth2Provider "google" }}
|
|
|
|
|
<div class="oauth2">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.login.google_signin" }}</a>
|
2017-11-23 07:22:33 +01:00
|
|
|
|
</div>
|
2020-03-08 03:45:19 +01:00
|
|
|
|
{{ else if hasOAuth2Provider "oidc" }}
|
|
|
|
|
<div class="oauth2">
|
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.login.oidc_signin" }}</a>
|
|
|
|
|
</div>
|
2017-11-23 07:22:33 +01:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
2020-02-09 20:41:00 +01:00
|
|
|
|
<footer id="prompt-home-screen">
|
|
|
|
|
<a href="#" id="btn-add-to-home-screen">★ {{ t "action.home_screen" }}</a>
|
|
|
|
|
</footer>
|
2018-07-05 07:05:19 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"search_entries": `{{ define "title"}}{{ t "page.search.title" }} ({{ .total }}){{ end }}
|
2018-07-05 07:05:19 +02:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.search.title" }} ({{ .total }})</h1>
|
2018-07-05 07:05:19 +02:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert alert-info">{{ t "alert.no_search_result" }}</p>
|
2018-07-05 07:05:19 +02:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2018-07-05 07:05:19 +02:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "searchEntry" "entryID" .ID }}?q={{ $.searchQuery }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"sessions": `{{ define "title"}}{{ t "page.sessions.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.sessions.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
2017-11-21 23:44:47 +01:00
|
|
|
|
<table>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<tr>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<th>{{ t "page.sessions.table.date" }}</th>
|
|
|
|
|
<th>{{ t "page.sessions.table.ip" }}</th>
|
|
|
|
|
<th>{{ t "page.sessions.table.user_agent" }}</th>
|
|
|
|
|
<th>{{ t "page.sessions.table.actions" }}</th>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</tr>
|
|
|
|
|
{{ range .sessions }}
|
|
|
|
|
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
2018-02-04 23:37:42 +01:00
|
|
|
|
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
|
|
|
|
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
|
|
|
|
<td class="column-20">
|
|
|
|
|
{{ if eq .Token $.currentSessionToken }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
{{ t "page.sessions.table.current_session" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
2017-11-21 23:44:47 +01:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
|
data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"settings": `{{ define "title"}}{{ t "page.settings.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.settings.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form method="post" autocomplete="off" action="{{ route "updateSettings" }}">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-username">{{ t "form.user.label.username" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" required>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-password">{{ t "form.user.label.password" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label>
|
2018-07-01 03:05:51 +02:00
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-language">{{ t "form.prefs.label.language" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<select id="form-language" name="language">
|
|
|
|
|
{{ range $key, $value := .languages }}
|
|
|
|
|
<option value="{{ $key }}" {{ if eq $key $.form.Language }}selected="selected"{{ end }}>{{ $value }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-timezone">{{ t "form.prefs.label.timezone" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<select id="form-timezone" name="timezone">
|
|
|
|
|
{{ range $key, $value := .timezones }}
|
|
|
|
|
<option value="{{ $key }}" {{ if eq $key $.form.Timezone }}selected="selected"{{ end }}>{{ $value }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-theme">{{ t "form.prefs.label.theme" }}</label>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<select id="form-theme" name="theme">
|
|
|
|
|
{{ range $key, $value := .themes }}
|
|
|
|
|
<option value="{{ $key }}" {{ if eq $key $.form.Theme }}selected="selected"{{ end }}>{{ $value }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<label for="form-entry-direction">{{ t "form.prefs.label.entry_sorting" }}</label>
|
2017-12-03 02:04:01 +01:00
|
|
|
|
<select id="form-entry-direction" name="entry_direction">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.older_first" }}</option>
|
|
|
|
|
<option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.recent_first" }}</option>
|
2017-12-03 02:04:01 +01:00
|
|
|
|
</select>
|
|
|
|
|
|
2019-04-29 03:20:46 +02:00
|
|
|
|
<label><input type="checkbox" name="keyboard_shortcuts" value="1" {{ if .form.KeyboardShortcuts }}checked{{ end }}> {{ t "form.prefs.label.keyboard_shortcuts" }}</label>
|
|
|
|
|
|
2020-03-31 01:54:02 +02:00
|
|
|
|
<label>{{t "form.prefs.label.custom_css" }}</label><textarea name="custom_css" cols="40" rows="5">{{ .form.CustomCSS }}</textarea>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="buttons">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2017-11-25 01:09:10 +01:00
|
|
|
|
{{ if hasOAuth2Provider "google" }}
|
|
|
|
|
<div class="panel">
|
|
|
|
|
{{ if hasKey .user.Extra "google_id" }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "page.settings.unlink_google_account" }}</a>
|
2017-11-25 01:09:10 +01:00
|
|
|
|
{{ else }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.settings.link_google_account" }}</a>
|
2017-11-25 01:09:10 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2020-03-08 03:45:19 +01:00
|
|
|
|
{{ else if hasOAuth2Provider "oidc" }}
|
|
|
|
|
<div class="panel">
|
|
|
|
|
{{ if hasKey .user.Extra "oidc_id" }}
|
|
|
|
|
<a href="{{ route "oauth2Unlink" "provider" "oidc" }}">{{ t "page.settings.unlink_oidc_account" }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.settings.link_oidc_account" }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2017-11-25 01:09:10 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
2020-03-23 02:48:14 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"shared_entries": `{{ define "title"}}{{ t "page.shared_entries.title" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "page.shared_entries.title" }} ({{ .total }})</h1>
|
|
|
|
|
{{ if .entries }}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-url="{{ route "flushHistory" }}"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.flush_history" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sharedEntries" }}">{{ t "menu.shared_entries" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert alert-info">{{ t "alert.no_shared_entry" }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "readEntry" "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
{{ if .ShareCode }}
|
|
|
|
|
<a href="{{ route "sharedEntry" "shareCode" .ShareCode }}"
|
|
|
|
|
title="{{ t "entry.shared_entry.title" }}"
|
|
|
|
|
target="_blank">{{ template "icon_share" }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-meta">
|
|
|
|
|
<ul class="item-meta-info">
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .Feed.ID }}" title="{{ .Feed.SiteURL }}">{{ truncate .Feed.Title 35 }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<time datetime="{{ isodate .Date }}" title="{{ isodate .Date }}">{{ elapsed $.user.Timezone .Date }}</time>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<ul class="item-meta-icons">
|
|
|
|
|
<li>
|
|
|
|
|
{{ template "icon_delete" }}
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-url="{{ route "unshareEntry" "entryID" .ID }}"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "entry.unshare.label" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-12-22 20:33:01 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"unread_entries": `{{ define "title"}}{{ t "page.unread.title" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.unread.title" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1>
|
2017-12-02 07:55:00 +01:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</li>
|
2018-01-05 03:11:15 +01:00
|
|
|
|
<li>
|
2019-07-18 06:52:45 +02:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-url="{{ route "markAllAsRead" }}"
|
|
|
|
|
data-redirect-url="{{ route "unread" }}"
|
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_all_as_read" }}</a>
|
2018-01-05 03:11:15 +01:00
|
|
|
|
</li>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</ul>
|
2017-12-02 07:55:00 +01:00
|
|
|
|
{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert">{{ t "alert.no_unread_entry" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items hide-read-items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-03 00:01:05 +01:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2019-09-11 06:12:38 +02:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .Feed.Title }}">
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "unreadEntry" "entryID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
|
|
|
|
|
</div>
|
2018-04-30 02:43:40 +02:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
<section class="page-footer">
|
|
|
|
|
{{ if .entries }}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2019-07-18 02:44:32 +02:00
|
|
|
|
<a href="#"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-action="markPageAsRead"
|
2019-07-18 02:44:32 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
2019-07-18 06:07:29 +02:00
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }}</a>
|
2018-09-09 03:40:23 +02:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}`,
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"users": `{{ define "title"}}{{ t "page.users.title" }}{{ end }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<h1>{{ t "page.users.title" }}</h1>
|
2019-11-18 02:26:47 +01:00
|
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if eq (len .users) 1 }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<p class="alert">{{ t "alert.no_user" }}</p>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2018-09-22 19:39:33 +02:00
|
|
|
|
<th class="column-20">{{ t "page.users.username" }}</th>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<th>{{ t "page.users.is_admin" }}</th>
|
|
|
|
|
<th>{{ t "page.users.last_login" }}</th>
|
|
|
|
|
<th>{{ t "page.users.actions" }}</th>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</tr>
|
|
|
|
|
{{ range .users }}
|
|
|
|
|
{{ if ne .ID $.user.ID }}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ .Username }}</td>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<td>{{ if eq .IsAdmin true }}{{ t "page.users.admin.yes" }}{{ else }}{{ t "page.users.admin.no" }}{{ end }}</td>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
<td>
|
|
|
|
|
{{ if .LastLoginAt }}
|
2018-02-04 23:37:42 +01:00
|
|
|
|
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ else }}
|
2018-09-22 03:53:29 +02:00
|
|
|
|
{{ t "page.users.never_logged" }}
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
2018-09-22 03:53:29 +02:00
|
|
|
|
<a href="{{ route "editUser" "userID" .ID }}">{{ t "action.edit" }}</a>,
|
2017-11-21 23:44:47 +01:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
2018-09-22 03:53:29 +02:00
|
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
|
|
|
|
data-url="{{ route "removeUser" "userID" .ID }}">{{ t "action.remove" }}</a>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</table>
|
2020-03-02 02:38:29 +01:00
|
|
|
|
<br>
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
2020-03-02 02:38:29 +01:00
|
|
|
|
<p>
|
|
|
|
|
<a href="{{ route "createUser" }}" class="button button-primary">{{ t "menu.add_user" }}</a>
|
|
|
|
|
</p>
|
|
|
|
|
|
2017-11-20 06:10:04 +01:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var templateViewsMapChecksums = map[string]string{
|
2019-11-18 02:26:47 +01:00
|
|
|
|
"about": "4035658497363d7af7f79be83190404eb21ec633fe8ec636bdfc219d9fc78cfc",
|
2020-01-02 22:03:34 +01:00
|
|
|
|
"add_subscription": "0dbea93b6fc07423fa066122ad960c69616b829533371a2dbadec1e22d4f1ae0",
|
2020-03-02 02:38:29 +01:00
|
|
|
|
"api_keys": "27d401b31a72881d5232486ba17eb47edaf5246eaedce81de88698c15ebb2284",
|
2019-09-11 06:12:38 +02:00
|
|
|
|
"bookmark_entries": "65588da78665699dd3f287f68325e9777d511f1a57fee4131a5bb6d00bb68df8",
|
2020-06-15 04:00:41 +02:00
|
|
|
|
"categories": "21d2efb06d8330ab1fd363449c7144ce7191779bafa33d5c0cec63f2c443ec03",
|
2019-11-18 04:44:12 +01:00
|
|
|
|
"category_entries": "dee7b9cd60c6c46f01dd4289940679df31c1fce28ce4aa7249fa459023e1eeb4",
|
2020-06-11 05:33:58 +02:00
|
|
|
|
"category_feeds": "02b255603dc58122afbbcce573e88d648cad176b9cd0a7bba7e07f95694de75d",
|
2020-01-02 22:03:34 +01:00
|
|
|
|
"choose_subscription": "84c9730cadd78e6ee5a6b4c499aab33acddb4324ac01924d33387543eec4d702",
|
2020-03-02 02:38:29 +01:00
|
|
|
|
"create_api_key": "5f74d4e92a6684927f5305096378c8be278159a5cd88ce652c7be3280a7d1685",
|
2018-09-22 03:53:29 +02:00
|
|
|
|
"create_category": "6b22b5ce51abf4e225e23a79f81be09a7fb90acb265e93a8faf9446dff74018d",
|
2019-11-18 02:26:47 +01:00
|
|
|
|
"create_user": "9b73a55233615e461d1f07d99ad1d4d3b54532588ab960097ba3e090c85aaf3a",
|
2019-11-18 04:44:12 +01:00
|
|
|
|
"edit_category": "b1c0b38f1b714c5d884edcd61e5b5295a5f1c8b71c469b35391e4dcc97cc6d36",
|
2020-06-06 06:50:59 +02:00
|
|
|
|
"edit_feed": "635bb8f7b927f3216ccd35cc6d9edd4b2af96e8677a14766a86fb77fa9fb4e38",
|
2019-11-18 02:26:47 +01:00
|
|
|
|
"edit_user": "c692db9de1a084c57b93e95a14b041d39bf489846cbb91fc982a62b72b77062a",
|
2020-03-28 18:45:31 +01:00
|
|
|
|
"entry": "d8c30d412d58e14c946ba682166f7c582948e7b0f657d04dcbc3d004267627bb",
|
2020-06-12 06:07:13 +02:00
|
|
|
|
"feed_entries": "614357a9369237e54be45b40c516fe70a751bfb4311660746ae229e6be88fdac",
|
2020-01-02 22:03:34 +01:00
|
|
|
|
"feeds": "ec7d3fa96735bd8422ba69ef0927dcccddc1cc51327e0271f0312d3f881c64fd",
|
2020-03-23 02:48:14 +01:00
|
|
|
|
"history_entries": "93c0c4cc541eec7f07f5c2634f250ea82ac64024939179276b6f636b72c189bf",
|
2020-01-02 22:03:34 +01:00
|
|
|
|
"import": "1b59b3bd55c59fcbc6fbb346b414dcdd26d1b4e0c307e437bb58b3f92ef01ad1",
|
2020-03-02 02:38:29 +01:00
|
|
|
|
"integrations": "30329452743b35c668278f519245fd9be05c1726856e0384ba542f7c307f2788",
|
2020-03-08 03:45:19 +01:00
|
|
|
|
"login": "79ff2ca488c0a19b37c8fa227a21f73e94472eb357a51a077197c852f7713f11",
|
2019-09-11 06:12:38 +02:00
|
|
|
|
"search_entries": "274950d03298c24f3942e209c0faed580a6d57be9cf76a6c236175a7e766ac6a",
|
2019-11-18 02:26:47 +01:00
|
|
|
|
"sessions": "5d5c677bddbd027e0b0c9f7a0dd95b66d9d95b4e130959f31fb955b926c2201c",
|
2020-03-31 01:54:02 +02:00
|
|
|
|
"settings": "3ab566c3220c62edc3edc51f2e93c1101b728e9f62f52f23de6bc6322d86aeb6",
|
2020-03-23 02:48:14 +01:00
|
|
|
|
"shared_entries": "19caea053664220bb9519df295eb2a17cf5836eaa9104b7ee24c60b88bb524e9",
|
2019-09-11 06:12:38 +02:00
|
|
|
|
"unread_entries": "e38f7ffce17dfad3151b08cd33771a2cefe8ca9db42df04fc98bd1d675dd6075",
|
2020-03-02 02:38:29 +01:00
|
|
|
|
"users": "d7ff52efc582bbad10504f4a04fa3adcc12d15890e45dff51cac281e0c446e45",
|
2017-11-20 06:10:04 +01:00
|
|
|
|
}
|