2017-11-20 00:10:04 -05:00
|
|
|
|
// Code generated by go generate; DO NOT EDIT.
|
|
|
|
|
|
2018-08-25 00:51:50 -04:00
|
|
|
|
package template // import "miniflux.app/template"
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
var templateViewsMap = map[string]string{
|
|
|
|
|
"about": `{{ define "title"}}{{ t "About" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "About" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ if .user.IsAdmin }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<h3>{{ t "Version" }}</h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><strong>{{ t "Version:" }}</strong> {{ .version }}</li>
|
|
|
|
|
<li><strong>{{ t "Build Date:" }}</strong> {{ .build_date }}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<h3>{{ t "Authors" }}</h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li><strong>{{ t "Author:" }}</strong> Frédéric Guillot</li>
|
|
|
|
|
<li><strong>{{ t "License:" }}</strong> Apache 2.0</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"add_subscription": `{{ define "title"}}{{ t "New Subscription" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "New Subscription" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "import" }}">{{ t "Import" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
|
|
|
|
<p class="alert alert-error">{{ t "There is no category. You must have at least one category." }}</p>
|
|
|
|
|
{{ 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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-url">{{ t "URL" }}</label>
|
|
|
|
|
<input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<label for="form-category">{{ t "Category" }}</label>
|
|
|
|
|
<select id="form-category" name="category_id">
|
|
|
|
|
{{ range .categories }}
|
|
|
|
|
<option value="{{ .ID }}">{{ .Title }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2018-06-20 01:58:29 -04:00
|
|
|
|
<fieldset>
|
|
|
|
|
<legend>{{ t "Advanced Options" }}</legend>
|
|
|
|
|
|
|
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
|
|
|
|
|
|
2018-07-08 21:21:56 -04:00
|
|
|
|
<label for="form-feed-username">{{ t "Feed Username" }}</label>
|
|
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-feed-password">{{ t "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 }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
|
</fieldset>
|
2017-12-12 22:19:36 -05:00
|
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2018-04-29 20:43:40 -04:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"bookmark_entries": `{{ define "title"}}{{ t "Favorites" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Favorites" }} ({{ .total }})</h1>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert alert-info">{{ t "There is no bookmark at the moment." }}</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 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2018-04-29 20:43:40 -04: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 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"categories": `{{ define "title"}}{{ t "Categories" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Categories" }} ({{ .total }})</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
|
|
|
|
<p class="alert alert-error">{{ t "There is no category." }}</p>
|
|
|
|
|
{{ 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>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-meta">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
{{ if eq .FeedCount 0 }}
|
|
|
|
|
{{ t "No feed." }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ plural "plural.categories.feed_count" .FeedCount .FeedCount }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "Edit" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ if eq .FeedCount 0 }}
|
|
|
|
|
<li>
|
2017-11-21 17:44:47 -05:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
|
data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05: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>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert">{{ t "There is no article in this category." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-02 18:01:05 -05:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2017-11-20 00:10:04 -05: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-29 20:43:40 -04:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"choose_subscription": `{{ define "title"}}{{ t "Choose a Subscription" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "New Subscription" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "import" }}">{{ t "Import" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "chooseSubscription" }}" method="POST">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
|
<input type="hidden" name="category_id" value="{{ .form.CategoryID }}">
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="hidden" name="feed_username" value="{{ .form.Username }}">
|
|
|
|
|
<input type="hidden" name="feed_password" value="{{ .form.Password }}">
|
2018-06-20 01:58:29 -04:00
|
|
|
|
{{ if .form.Crawler }}
|
|
|
|
|
<input type="hidden" name="crawler" value="1">
|
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<h3>{{ t "Choose a Subscription" }}</h3>
|
|
|
|
|
|
|
|
|
|
{{ range .subscriptions }}
|
|
|
|
|
<div class="radio-group">
|
|
|
|
|
<label title="{{ .URL }}"><input type="radio" name="url" value="{{ .URL }}"> {{ .Title }}</label> ({{ .Type }})
|
|
|
|
|
<small title="Type = {{ .Type }}"><a href="{{ .URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .URL }}</a></small>
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Subscribe" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"create_category": `{{ define "title"}}{{ t "New Category" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "New Category" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categories" }}">{{ t "Categories" }}</a>
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-title">{{ t "Title" }}</label>
|
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"create_user": `{{ define "title"}}{{ t "New User" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "New User" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
2018-02-01 01:03:21 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-username">{{ t "Username" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-password">{{ t "Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password" required>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-confirmation">{{ t "Confirmation" }}</label>
|
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" required>
|
|
|
|
|
|
2017-12-02 22:32:14 -05:00
|
|
|
|
<label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"edit_category": `{{ define "title"}}{{ t "Edit Category: %s" .category.Title }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Edit Category: %s" .category.Title }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "categories" }}">{{ t "Categories" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a>
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-title">{{ t "Title" }}</label>
|
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"edit_feed": `{{ define "title"}}{{ t "Edit Feed: %s" .feed.Title }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ .feed.Title }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "import" }}">{{ t "Import" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .categories }}
|
|
|
|
|
<p class="alert alert-error">{{ t "There is no category!" }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ if ne .feed.ParsingErrorCount 0 }}
|
|
|
|
|
<div class="alert alert-error">
|
|
|
|
|
<h3>{{ t "Last Parsing Error" }}</h3>
|
2018-01-04 21:32:36 -05:00
|
|
|
|
<p>{{ t .feed.ParsingErrorMsg }}</p>
|
2017-11-20 00:10:04 -05: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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-title">{{ t "Title" }}</label>
|
|
|
|
|
<input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
|
|
|
|
|
|
|
|
|
|
<label for="form-site-url">{{ t "Site URL" }}</label>
|
|
|
|
|
<input type="url" name="site_url" id="form-site-url" placeholder="https://domain.tld/" value="{{ .form.SiteURL }}" required>
|
|
|
|
|
|
|
|
|
|
<label for="form-feed-url">{{ t "Feed URL" }}</label>
|
|
|
|
|
<input type="url" name="feed_url" id="form-feed-url" placeholder="https://domain.tld/" value="{{ .form.FeedURL }}" required>
|
|
|
|
|
|
2018-07-08 21:21:56 -04:00
|
|
|
|
<label for="form-feed-username">{{ t "Feed Username" }}</label>
|
|
|
|
|
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-feed-password">{{ t "Feed Password" }}</label>
|
|
|
|
|
<!--
|
|
|
|
|
We are using the type "text" otherwise Firefox always autocomplete this password:
|
2018-06-20 01:58:29 -04:00
|
|
|
|
|
2018-07-08 21:21:56 -04: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 01:58:29 -04:00
|
|
|
|
|
2017-12-10 23:51:04 -05:00
|
|
|
|
<label for="form-scraper-rules">{{ t "Scraper Rules" }}</label>
|
|
|
|
|
<input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}">
|
|
|
|
|
|
2017-12-12 01:16:32 -05:00
|
|
|
|
<label for="form-rewrite-rules">{{ t "Rewrite Rules" }}</label>
|
|
|
|
|
<input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}">
|
|
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<label for="form-category">{{ t "Category" }}</label>
|
|
|
|
|
<select id="form-category" name="category_id">
|
|
|
|
|
{{ range .categories }}
|
|
|
|
|
<option value="{{ .ID }}" {{ if eq .ID $.form.CategoryID }}selected="selected"{{ end }}>{{ .Title }}</option>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</select>
|
|
|
|
|
|
2017-12-12 22:19:36 -05:00
|
|
|
|
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
|
|
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "feeds" }}">{{ t "cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2017-12-26 23:58:16 -05:00
|
|
|
|
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<ul>
|
2018-02-04 17:37:42 -05:00
|
|
|
|
<li><strong>{{ t "Last checked:" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed $.user.Timezone .feed.CheckedAt }}</time></li>
|
2017-12-27 22:45:59 -05:00
|
|
|
|
<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>
|
2017-12-26 23:58:16 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2018-08-25 15:21:54 -04:00
|
|
|
|
|
|
|
|
|
<div class="alert alert-error">
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
|
data-url="{{ route "removeFeed" "feedID" .feed.ID }}"
|
|
|
|
|
data-redirect-url="{{ route "feeds" }}">{{ t "Remove this feed" }}</a>
|
|
|
|
|
</div>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}`,
|
|
|
|
|
"edit_user": `{{ define "title"}}{{ t "Edit user: %s" .selected_user.Username }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2018-03-02 02:06:28 -05:00
|
|
|
|
<h1>{{ t "Edit user %s" .selected_user.Username }}</h1>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
|
|
|
|
</li>
|
2018-02-01 01:03:21 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-username">{{ t "Username" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-password">{{ t "Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-confirmation">{{ t "Confirmation" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
2017-12-02 22:32:14 -05:00
|
|
|
|
<label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"entry": `{{ define "title"}}{{ .entry.Title }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="entry">
|
|
|
|
|
<header class="entry-header">
|
|
|
|
|
<h1>
|
|
|
|
|
<a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
|
|
|
|
|
</h1>
|
2017-12-02 22:32:14 -05:00
|
|
|
|
<div class="entry-actions">
|
2017-12-10 22:01:38 -05:00
|
|
|
|
<ul>
|
2017-12-22 14:33:01 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
data-toggle-bookmark="true"
|
|
|
|
|
data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
|
|
|
|
|
data-label-loading="{{ t "Saving..." }}"
|
|
|
|
|
data-label-star="☆ {{ t "Star" }}"
|
|
|
|
|
data-label-unstar="★ {{ t "Unstar" }}"
|
2018-06-29 23:29:04 -04:00
|
|
|
|
data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}"
|
2017-12-22 14:33:01 -05:00
|
|
|
|
>{{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }}</a>
|
|
|
|
|
</li>
|
2018-04-29 20:43:40 -04:00
|
|
|
|
{{ if .hasSaveEntry }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
title="{{ t "Save this article" }}"
|
|
|
|
|
data-save-entry="true"
|
|
|
|
|
data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
|
|
|
|
|
data-label-loading="{{ t "Saving..." }}"
|
|
|
|
|
data-label-done="{{ t "Done!" }}"
|
|
|
|
|
>{{ t "Save" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2017-12-10 22:01:38 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#"
|
|
|
|
|
title="{{ t "Fetch original content" }}"
|
|
|
|
|
data-fetch-content-entry="true"
|
|
|
|
|
data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}"
|
|
|
|
|
data-label-loading="{{ t "Loading..." }}"
|
|
|
|
|
data-label-done="{{ t "Done!" }}"
|
|
|
|
|
>{{ t "Fetch original content" }}</a>
|
|
|
|
|
</li>
|
2018-04-07 16:50:45 -04:00
|
|
|
|
{{ if .entry.CommentsURL }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ .entry.CommentsURL }}" title="{{ t "View Comments" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Comments" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
2017-12-10 22:01:38 -05:00
|
|
|
|
</ul>
|
2017-12-02 22:32:14 -05:00
|
|
|
|
</div>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="entry-meta">
|
|
|
|
|
<span class="entry-website">
|
|
|
|
|
{{ if ne .entry.Feed.Icon.IconID 0 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" alt="{{ .entry.Feed.Title }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
{{ if .entry.Author }}
|
|
|
|
|
<span class="entry-author">
|
2017-11-25 20:08:04 -05:00
|
|
|
|
{{ if isEmail .entry.Author }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
- <a href="mailto:{{ .entry.Author }}">{{ .entry.Author }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
– <em>{{ .entry.Author }}</em>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<span class="category">
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .entry.Feed.Category.ID }}">{{ .entry.Feed.Category.Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="entry-date">
|
2018-02-04 17:37:42 -05:00
|
|
|
|
<time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed $.user.Timezone .entry.Date }}</time>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</div>
|
|
|
|
|
</header>
|
2017-12-05 00:09:08 -05:00
|
|
|
|
{{ if gt (len .entry.Content) 120 }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="pagination-top">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
2017-12-05 00:09:08 -05:00
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<article class="entry-content">
|
|
|
|
|
{{ noescape (proxyFilter .entry.Content) }}
|
|
|
|
|
</article>
|
|
|
|
|
{{ if .entry.Enclosures }}
|
|
|
|
|
<aside class="entry-enclosures">
|
|
|
|
|
<h3>{{ t "Attachments" }}</h3>
|
|
|
|
|
{{ range .entry.Enclosures }}
|
|
|
|
|
<div class="entry-enclosure">
|
|
|
|
|
{{ if hasPrefix .MimeType "audio/" }}
|
|
|
|
|
<div class="enclosure-audio">
|
|
|
|
|
<audio controls preload="metadata">
|
|
|
|
|
<source src="{{ .URL }}" type="{{ .MimeType }}">
|
|
|
|
|
</audio>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "video/" }}
|
|
|
|
|
<div class="enclosure-video">
|
|
|
|
|
<video controls preload="metadata">
|
|
|
|
|
<source src="{{ .URL }}" type="{{ .MimeType }}">
|
|
|
|
|
</video>
|
|
|
|
|
</div>
|
|
|
|
|
{{ else if hasPrefix .MimeType "image/" }}
|
|
|
|
|
<div class="enclosure-image">
|
2017-12-02 01:29:18 -05:00
|
|
|
|
<img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" alt="{{ .URL }} ({{ .MimeType }})">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<div class="entry-enclosure-download">
|
|
|
|
|
<a href="{{ .URL }}" title="{{ .URL }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Download" }}</a>
|
|
|
|
|
<small>({{ .URL }})</small>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</aside>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<div class="pagination-bottom">
|
|
|
|
|
{{ template "entry_pagination" . }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"feed_entries": `{{ define "title"}}{{ .feed.Title }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ .feed.Title }} ({{ .total }})</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "Refresh" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "Edit" }}</a>
|
|
|
|
|
</li>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
|
|
|
|
|
</li>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if ne .feed.ParsingErrorCount 0 }}
|
|
|
|
|
<div class="alert alert-error">
|
|
|
|
|
<h3>{{ t "There is a problem with this feed" }}</h3>
|
2018-01-04 21:32:36 -05:00
|
|
|
|
<p>{{ t .feed.ParsingErrorMsg }}</p>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</div>
|
|
|
|
|
{{ else if not .entries }}
|
|
|
|
|
<p class="alert">{{ t "There is no article for this feed." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-02 18:01:05 -05:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2017-11-20 00:10:04 -05: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-29 20:43:40 -04:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"feeds": `{{ define "title"}}{{ t "Feeds" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Feeds" }} ({{ .total }})</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "import" }}">{{ t "Import" }}</a>
|
|
|
|
|
</li>
|
2017-11-22 01:36:00 -05:00
|
|
|
|
<li>
|
2017-12-26 23:58:16 -05:00
|
|
|
|
<a href="{{ route "refreshAllFeeds" }}">{{ t "Refresh all feeds in background" }}</a>
|
2017-11-22 01:36:00 -05:00
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .feeds }}
|
|
|
|
|
<p class="alert">{{ t "You don't have any subscription." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .feeds }}
|
2017-12-26 23:42:43 -05:00
|
|
|
|
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
2017-12-24 21:04:34 -05:00
|
|
|
|
{{ if .Icon }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16" alt="{{ .Title }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
<a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="category">
|
|
|
|
|
<a href="{{ route "categoryEntries" "categoryID" .Category.ID }}">{{ .Category.Title }}</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-meta">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2018-07-17 22:01:28 -04:00
|
|
|
|
<a href="{{ .SiteURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2018-02-04 17:37:42 -05:00
|
|
|
|
{{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "refreshFeed" "feedID" .ID }}">{{ t "Refresh" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "editFeed" "feedID" .ID }}">{{ t "Edit" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2017-11-21 17:44:47 -05:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
|
data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2017-12-26 23:42:43 -05:00
|
|
|
|
{{ if ne .ParsingErrorCount 0 }}
|
|
|
|
|
<div class="parsing-error">
|
|
|
|
|
<strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
|
2018-02-23 22:58:08 -05:00
|
|
|
|
- <small class="parsing-error-message">{{ .ParsingErrorMsg }}</small>
|
2017-12-26 23:42:43 -05:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-04-29 20:43:40 -04:00
|
|
|
|
"history_entries": `{{ define "title"}}{{ t "History" }} ({{ .total }}){{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "History" }} ({{ .total }})</h1>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ if .entries }}
|
2017-11-21 18:46:59 -05:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "flushHistory" }}">{{ t "Flush history" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert alert-info">{{ t "There is no history at the moment." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-02 18:01:05 -05:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2017-11-20 00:10:04 -05: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-29 20:43:40 -04:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"import": `{{ define "title"}}{{ t "Import" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Import" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "export" }}">{{ t "Export" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
|
|
|
|
|
<input type="hidden" name="csrf" value="{{ .csrf }}">
|
|
|
|
|
|
|
|
|
|
{{ if .errorMessage }}
|
|
|
|
|
<div class="alert alert-error">{{ t .errorMessage }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
<label for="form-file">{{ t "OPML file" }}</label>
|
|
|
|
|
<input type="file" name="file" id="form-file">
|
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Import" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2017-11-21 22:37:47 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"integrations": `{{ define "title"}}{{ t "Integrations" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Integrations" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ if .user.IsAdmin }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
2017-12-02 22:32:14 -05: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-03 20:44:27 -05:00
|
|
|
|
<h3>Fever</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "Activate Fever API" }}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<label for="form-fever-username">{{ t "Fever Username" }}</label>
|
|
|
|
|
<input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-fever-password">{{ t "Fever Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}" autocomplete="new-password">
|
2018-02-01 00:57:20 -05:00
|
|
|
|
|
2018-02-03 18:33:17 -05:00
|
|
|
|
<p>{{ t "Fever API endpoint:" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p>
|
2017-12-03 20:44:27 -05:00
|
|
|
|
</div>
|
|
|
|
|
|
2017-12-02 22:32:14 -05:00
|
|
|
|
<h3>Pinboard</h3>
|
2017-12-03 00:12:03 -05:00
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2017-12-03 20:44:27 -05:00
|
|
|
|
<input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "Save articles to Pinboard" }}
|
2017-12-03 00:12:03 -05:00
|
|
|
|
</label>
|
2017-12-02 22:32:14 -05:00
|
|
|
|
|
2017-12-03 00:12:03 -05:00
|
|
|
|
<label for="form-pinboard-token">{{ t "Pinboard API Token" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}" autocomplete="new-password">
|
2017-12-02 22:32:14 -05:00
|
|
|
|
|
2017-12-03 00:12:03 -05:00
|
|
|
|
<label for="form-pinboard-tags">{{ t "Pinboard Tags" }}</label>
|
|
|
|
|
<input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">
|
2017-12-02 22:32:14 -05:00
|
|
|
|
|
2017-12-03 00:12:03 -05:00
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "Mark bookmark as unread" }}
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3>Instapaper</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
2017-12-03 20:44:27 -05:00
|
|
|
|
<input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "Save articles to Instapaper" }}
|
2017-12-03 00:12:03 -05:00
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<label for="form-instapaper-username">{{ t "Instapaper Username" }}</label>
|
|
|
|
|
<input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-instapaper-password">{{ t "Instapaper Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}" autocomplete="new-password">
|
2017-12-03 00:12:03 -05:00
|
|
|
|
</div>
|
2017-12-02 22:32:14 -05:00
|
|
|
|
|
2018-05-20 18:29:14 -04:00
|
|
|
|
<h3>Pocket</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "Save articles to Pocket" }}
|
|
|
|
|
</label>
|
|
|
|
|
|
2018-05-21 15:19:56 -04:00
|
|
|
|
{{ if not .hasPocketConsumerKeyConfigured }}
|
|
|
|
|
<label for="form-pocket-consumer-key">{{ t "Pocket Consumer Key" }}</label>
|
|
|
|
|
<input type="text" name="pocket_consumer_key" id="form-pocket-consumer-key" value="{{ .form.PocketConsumerKey }}">
|
|
|
|
|
{{ end }}
|
2018-05-20 18:29:14 -04:00
|
|
|
|
|
|
|
|
|
<label for="form-pocket-access-token">{{ t "Pocket Access Token" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="pocket_access_token" id="form-pocket-access-token" value="{{ .form.PocketAccessToken }}" autocomplete="new-password">
|
2018-05-20 18:29:14 -04:00
|
|
|
|
|
|
|
|
|
{{ if not .form.PocketAccessToken }}
|
|
|
|
|
<p><a href="{{ route "pocketAuthorize" }}">{{ t "Connect your Pocket account" }}</a></p>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-12-18 23:52:46 -05:00
|
|
|
|
<h3>Wallabag</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "Save articles to Wallabag" }}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<label for="form-wallabag-url">{{ t "Wallabag API Endpoint" }}</label>
|
|
|
|
|
<input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">
|
|
|
|
|
|
|
|
|
|
<label for="form-wallabag-client-id">{{ t "Wallabag Client ID" }}</label>
|
|
|
|
|
<input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-wallabag-client-secret">{{ t "Wallabag Client Secret" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}" autocomplete="new-password">
|
2017-12-18 23:52:46 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-wallabag-username">{{ t "Wallabag Username" }}</label>
|
|
|
|
|
<input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">
|
|
|
|
|
|
|
|
|
|
<label for="form-wallabag-password">{{ t "Wallabag Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}" autocomplete="new-password">
|
2017-12-18 23:52:46 -05:00
|
|
|
|
</div>
|
2018-05-20 16:31:56 -04:00
|
|
|
|
|
2018-02-25 14:49:08 -05:00
|
|
|
|
<h3>Nunux Keeper</h3>
|
|
|
|
|
<div class="form-section">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="checkbox" name="nunux_keeper_enabled" value="1" {{ if .form.NunuxKeeperEnabled }}checked{{ end }}> {{ t "Save articles to Nunux Keeper" }}
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<label for="form-nunux-keeper-url">{{ t "Nunux Keeper API Endpoint" }}</label>
|
|
|
|
|
<input type="url" name="nunux_keeper_url" id="form-nunux-keeper-url" value="{{ .form.NunuxKeeperURL }}" placeholder="https://api.nunux.org/keeper">
|
|
|
|
|
|
|
|
|
|
<label for="form-nunux-keeper-api-key">{{ t "Nunux Keeper API key" }}</label>
|
|
|
|
|
<input type="text" name="nunux_keeper_api_key" id="form-nunux-keeper-api-key" value="{{ .form.NunuxKeeperAPIKey }}">
|
|
|
|
|
</div>
|
2017-12-18 23:52:46 -05:00
|
|
|
|
|
2017-12-02 22:32:14 -05:00
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2018-02-01 00:57:20 -05:00
|
|
|
|
<h3>{{ t "Miniflux API" }}</h3>
|
|
|
|
|
<div class="panel">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "API Endpoint" }} = <strong>{{ baseURL }}/v1/</strong>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "Username" }} = <strong>{{ .user.Username }}</strong>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
{{ t "Password" }} = <strong>{{ t "Your account password" }}</strong>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h3>{{ t "Bookmarklet" }}</h3>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<div class="panel">
|
|
|
|
|
<p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p>
|
|
|
|
|
|
|
|
|
|
<div class="bookmarklet">
|
2018-02-03 18:33:17 -05:00
|
|
|
|
<a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p>{{ t "Drag and drop this link to your bookmarks." }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"login": `{{ define "title"}}{{ t "Sign In" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ 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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-username">{{ t "Username" }}</label>
|
2017-12-22 19:30:17 -05:00
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-password">{{ t "Password" }}</label>
|
2017-12-22 19:30:17 -05:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Sign in" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
2017-11-23 01:22:33 -05:00
|
|
|
|
{{ if hasOAuth2Provider "google" }}
|
|
|
|
|
<div class="oauth2">
|
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Sign in with Google" }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</section>
|
2018-07-05 01:05:19 -04:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"search_entries": `{{ define "title"}}{{ t "Search Results" }} ({{ .total }}){{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Search Results" }} ({{ .total }})</h1>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert alert-info">{{ t "There is no result for this search." }}</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 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2018-07-05 01:05:19 -04: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 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"sessions": `{{ define "title"}}{{ t "Sessions" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Sessions" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2018-01-05 21:07:15 -05:00
|
|
|
|
{{ if .user.IsAdmin }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
|
|
|
|
</li>
|
2018-01-05 21:07:15 -05:00
|
|
|
|
{{ end }}
|
2018-02-01 01:03:21 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
2017-11-21 17:44:47 -05:00
|
|
|
|
<table>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ t "Date" }}</th>
|
|
|
|
|
<th>{{ t "IP Address" }}</th>
|
|
|
|
|
<th>{{ t "User Agent" }}</th>
|
|
|
|
|
<th>{{ t "Actions" }}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ range .sessions }}
|
|
|
|
|
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
2018-02-04 17:37:42 -05:00
|
|
|
|
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
|
|
|
|
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
|
|
|
|
<td class="column-20">
|
|
|
|
|
{{ if eq .Token $.currentSessionToken }}
|
|
|
|
|
{{ t "Current session" }}
|
|
|
|
|
{{ else }}
|
2017-11-21 17:44:47 -05:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
|
data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
"settings": `{{ define "title"}}{{ t "Settings" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Settings" }}</h1>
|
|
|
|
|
<ul>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ if .user.IsAdmin }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "users" }}">{{ t "Users" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<label for="form-username">{{ t "Username" }}</label>
|
|
|
|
|
<input type="text" name="username" id="form-username" value="{{ .form.Username }}" required>
|
|
|
|
|
|
|
|
|
|
<label for="form-password">{{ t "Password" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-confirmation">{{ t "Confirmation" }}</label>
|
2018-06-30 21:05:51 -04:00
|
|
|
|
<input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
<label for="form-language">{{ t "Language" }}</label>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<label for="form-timezone">{{ t "Timezone" }}</label>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
<label for="form-theme">{{ t "Theme" }}</label>
|
|
|
|
|
<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>
|
|
|
|
|
|
2017-12-02 20:04:01 -05:00
|
|
|
|
<label for="form-entry-direction">{{ t "Entry Sorting" }}</label>
|
|
|
|
|
<select id="form-entry-direction" name="entry_direction">
|
|
|
|
|
<option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Older entries first" }}</option>
|
|
|
|
|
<option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Recent entries first" }}</option>
|
|
|
|
|
</select>
|
|
|
|
|
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="buttons">
|
|
|
|
|
<button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
2017-11-24 19:09:10 -05:00
|
|
|
|
{{ if hasOAuth2Provider "google" }}
|
|
|
|
|
<div class="panel">
|
|
|
|
|
{{ if hasKey .user.Extra "google_id" }}
|
|
|
|
|
<a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "Unlink my Google account" }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Link my Google account" }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2017-12-22 14:33:01 -05:00
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
2018-04-29 20:43:40 -04:00
|
|
|
|
"unread_entries": `{{ define "title"}}{{ t "Unread Items" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
2017-12-28 21:59:17 -05:00
|
|
|
|
<h1>{{ t "Unread" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ if .entries }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
|
|
|
|
|
</li>
|
2018-01-04 21:11:15 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "markAllAsRead" }}">{{ t "Mark all as read" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
2017-12-02 01:55:00 -05:00
|
|
|
|
{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if not .entries }}
|
|
|
|
|
<p class="alert">{{ t "There is no unread article." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<div class="items hide-read-items">
|
|
|
|
|
{{ range .entries }}
|
2017-12-02 18:01:05 -05:00
|
|
|
|
<article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<div class="item-header">
|
|
|
|
|
<span class="item-title">
|
|
|
|
|
{{ if ne .Feed.Icon.IconID 0 }}
|
2018-07-11 02:20:32 -04:00
|
|
|
|
<img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16" alt="{{ .Feed.Title }}">
|
2017-11-20 00:10:04 -05: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-29 20:43:40 -04:00
|
|
|
|
{{ template "item_meta" dict "user" $.user "entry" . "hasSaveEntry" $.hasSaveEntry }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</article>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ template "pagination" .pagination }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}`,
|
|
|
|
|
"users": `{{ define "title"}}{{ t "Users" }}{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
|
<section class="page-header">
|
|
|
|
|
<h1>{{ t "Users" }}</h1>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "settings" }}">{{ t "Settings" }}</a>
|
|
|
|
|
</li>
|
2017-11-21 22:37:47 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
|
|
|
|
|
</li>
|
2018-02-01 01:03:21 -05:00
|
|
|
|
<li>
|
|
|
|
|
<a href="{{ route "about" }}">{{ t "About" }}</a>
|
|
|
|
|
</li>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</ul>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
{{ if eq (len .users) 1 }}
|
|
|
|
|
<p class="alert">{{ t "You are the only user." }}</p>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="column-20">{{ t "Username" }}</th>
|
|
|
|
|
<th>{{ t "Administrator" }}</th>
|
|
|
|
|
<th>{{ t "Last Login" }}</th>
|
|
|
|
|
<th>{{ t "Actions" }}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ range .users }}
|
|
|
|
|
{{ if ne .ID $.user.ID }}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ .Username }}</td>
|
|
|
|
|
<td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td>
|
|
|
|
|
<td>
|
|
|
|
|
{{ if .LastLoginAt }}
|
2018-02-04 17:37:42 -05:00
|
|
|
|
<time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
{{ else }}
|
|
|
|
|
{{ t "Never" }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<a href="{{ route "editUser" "userID" .ID }}">{{ t "Edit" }}</a>,
|
2017-11-21 17:44:47 -05:00
|
|
|
|
<a href="#"
|
|
|
|
|
data-confirm="true"
|
|
|
|
|
data-label-question="{{ t "Are you sure?" }}"
|
|
|
|
|
data-label-yes="{{ t "yes" }}"
|
|
|
|
|
data-label-no="{{ t "no" }}"
|
|
|
|
|
data-label-loading="{{ t "Work in progress..." }}"
|
|
|
|
|
data-url="{{ route "removeUser" "userID" .ID }}">{{ t "Remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</table>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
`,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var templateViewsMapChecksums = map[string]string{
|
2017-11-21 22:37:47 -05:00
|
|
|
|
"about": "ad2fb778fc73c39b733b3f81b13e5c7d689b041fadd24ee2d4577f545aa788ad",
|
2018-07-08 21:21:56 -04:00
|
|
|
|
"add_subscription": "3fbcffefc94fb0fccfcf870d602f5ba78ce3ab7ebaeacd04198a6e529143cb29",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"bookmark_entries": "49423f84c05d77368e20c8e14c53ad237308cdaf4143413487d1b0e11c18d148",
|
2017-11-21 17:44:47 -05:00
|
|
|
|
"categories": "ca1280cd157bb527d4fc907da67b05a8347378f6dce965b9389d4bcdf3600a11",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"category_entries": "6d8f790b61abdf56edd6a6c88c9bf1eff34424fb47fee0463ee7cb198b34e309",
|
2018-06-30 21:05:51 -04:00
|
|
|
|
"choose_subscription": "7266b269ddbe145e757a24a57f3fbc7611e34a20383fbd887988204cebce2681",
|
2017-11-20 16:46:22 -05:00
|
|
|
|
"create_category": "2b82af5d2dcd67898dc5daa57a6461e6ff8121a6089b2a2a1be909f35e4a2275",
|
2018-06-30 21:05:51 -04:00
|
|
|
|
"create_user": "1ef0a1f9bf119d44929c81f13073a257d69650cf5064960cf06a63fe51923e86",
|
2017-11-20 16:46:22 -05:00
|
|
|
|
"edit_category": "cee720faadcec58289b707ad30af623d2ee66c1ce23a732965463250d7ff41c5",
|
2018-08-25 15:21:54 -04:00
|
|
|
|
"edit_feed": "1a8e342e4fac80e8b9c73537c7fe8aaf7f9e3e7af22f411927010897dd37e9c3",
|
2018-06-30 21:05:51 -04:00
|
|
|
|
"edit_user": "7373e09f805e6c017167001519b9feb04226be6c81c2875cbacd5ce94f2c24bf",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"entry": "c838ae7f19d775d473ee92c4999eb28a5063869411c834d26a3f4b686ce88dbf",
|
|
|
|
|
"feed_entries": "76e7e32cdd6552304e38931459fe12cefdb5354f65a7ac3bbed52a2979896d3e",
|
2018-07-17 22:01:28 -04:00
|
|
|
|
"feeds": "1006698abfe0962b656f27794bc44568515392da72b6fac0c03316de06024237",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"history_entries": "f94e15d37d7604500cede7b583e03bf79c06be81c6597a4a43693f5712af2e13",
|
2017-11-20 16:46:22 -05:00
|
|
|
|
"import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f",
|
2018-06-30 21:05:51 -04:00
|
|
|
|
"integrations": "20c1c82070b93235d189b10acccd0cda5694cc5684d0b3be23de2ba5ae83e73f",
|
2017-12-22 19:30:17 -05:00
|
|
|
|
"login": "7d83c3067c02f1f6aafdd8816c7f97a4eb5a5a4bdaaaa4cc1e2fbb9c17ea65e8",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"search_entries": "a6e69c3edf414558541e8a23bf197d7580b043f8ddaf53a5b609bcd678fd6f3d",
|
2018-02-04 17:37:42 -05:00
|
|
|
|
"sessions": "3fa79031dd883847eba92fbafe5f535fa3a4e1614bb610f20588b6f8fc8b3624",
|
2018-06-30 21:05:51 -04:00
|
|
|
|
"settings": "d435dc37e82896ce9a7a573b3c2aeda1db71eec62349e2472ebbf1d5c3e0bc21",
|
2018-07-11 02:20:32 -04:00
|
|
|
|
"unread_entries": "adbddbdd0ce70f5c622a2a2687b261121e397e15536dcb551f71bb11550ca46b",
|
2018-02-04 17:37:42 -05:00
|
|
|
|
"users": "c6d91b0b29984b4cb3073bec6a2933cfb72981ec60f54b6c7aa05194f0e860bd",
|
2017-11-20 00:10:04 -05:00
|
|
|
|
}
|