| 1 |
{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }} |
| 2 |
|
| 3 |
{{ define "page_header"}} |
| 4 |
<section class="page-header" aria-labelledby="page-header-title"> |
| 5 |
<h1 id="page-header-title">{{ t "page.add_feed.title" }}</h1> |
| 6 |
{{ template "feed_menu" dict "csrf" .csrf }} |
| 7 |
</section> |
| 8 |
{{ end }} |
| 9 |
|
| 10 |
{{ define "content"}} |
| 11 |
{{ if not .categories }} |
| 12 |
<p role="alert" class="alert alert-error">{{ t "page.add_feed.no_category" }}</p> |
| 13 |
{{ else }} |
| 14 |
<form action="{{ routePath "/subscribe" }}" method="post" autocomplete="off"> |
| 15 |
<input type="hidden" name="csrf" value="{{ .csrf }}"> |
| 16 |
|
| 17 |
{{ if .errorMessage }} |
| 18 |
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div> |
| 19 |
{{ end }} |
| 20 |
|
| 21 |
<label for="form-url">{{ t "page.add_feed.label.url" }}</label> |
| 22 |
<input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" spellcheck="false" required autofocus> |
| 23 |
|
| 24 |
<label for="form-category">{{ t "form.feed.label.category" }}</label> |
| 25 |
<select id="form-category" name="category_id"> |
| 26 |
{{ range .categories }} |
| 27 |
<option value="{{ .ID }}" {{ if eq $.form.CategoryID .ID }}selected="selected"{{ end }}>{{ .Title }}</option> |
| 28 |
{{ end }} |
| 29 |
</select> |
| 30 |
|
| 31 |
<details> |
| 32 |
<summary>{{ t "page.add_feed.legend.advanced_options" }}</summary> |
| 33 |
<div class="details-content"> |
| 34 |
<label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label> |
| 35 |
<label><input type="checkbox" name="ignore_entry_updates" value="1" {{ if .form.IgnoreEntryUpdates }}checked{{ end }}> {{ t "form.feed.label.ignore_entry_updates" }}</label> |
| 36 |
<label><input type="checkbox" name="allow_self_signed_certificates" value="1" {{ if .form.AllowSelfSignedCertificates }}checked{{ end }}> {{ t "form.feed.label.allow_self_signed_certificates" }}</label> |
| 37 |
<label><input type="checkbox" name="disable_http2" value="1" {{ if .form.DisableHTTP2 }}checked{{ end }}> {{ t "form.feed.label.disable_http2" }}</label> |
| 38 |
|
| 39 |
{{ if .hasProxyConfigured }} |
| 40 |
<label><input type="checkbox" name="fetch_via_proxy" value="1" {{ if .form.FetchViaProxy }}checked{{ end }}> {{ t "form.feed.label.fetch_via_proxy" }}</label> |
| 41 |
{{ end }} |
| 42 |
|
| 43 |
<label for="form-proxy-url">{{ t "form.feed.label.proxy_url" }}</label> |
| 44 |
<input type="url" name="proxy_url" id="form-proxy-url" value="{{ .form.ProxyURL }}" spellcheck="false"> |
| 45 |
|
| 46 |
<label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label> |
| 47 |
<input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}" spellcheck="false" autocomplete="off"> |
| 48 |
|
| 49 |
<label for="form-cookie">{{ t "form.feed.label.cookie" }}</label> |
| 50 |
<input type="text" name="cookie" id="form-cookie" value="{{ .form.Cookie }}" spellcheck="false" autocomplete="off"> |
| 51 |
|
| 52 |
<label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label> |
| 53 |
<input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}" spellcheck="false"> |
| 54 |
|
| 55 |
<label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label> |
| 56 |
<!-- |
| 57 |
We are using the type "text" otherwise Firefox always autocomplete this password: |
| 58 |
|
| 59 |
- autocomplete="off" or autocomplete="new-password" doesn't change anything |
| 60 |
- Changing the input ID doesn't change anything |
| 61 |
- Using a different input name doesn't change anything |
| 62 |
--> |
| 63 |
<input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}" spellcheck="false"> |
| 64 |
|
| 65 |
<div class="form-label-row"> |
| 66 |
<label for="form-scraper-rules"> |
| 67 |
{{ t "form.feed.label.scraper_rules" }} |
| 68 |
</label> |
| 69 |
|
| 70 |
<a href="https://miniflux.app/docs/rules.html#scraper-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 71 |
{{ icon "external-link" }} |
| 72 |
</a> |
| 73 |
</div> |
| 74 |
<input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}" spellcheck="false"> |
| 75 |
|
| 76 |
<div class="form-label-row"> |
| 77 |
<label for="form-rewrite-rules"> |
| 78 |
{{ t "form.feed.label.rewrite_rules" }} |
| 79 |
</label> |
| 80 |
|
| 81 |
<a href="https://miniflux.app/docs/rules.html#rewrite-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 82 |
{{ icon "external-link" }} |
| 83 |
</a> |
| 84 |
</div> |
| 85 |
<input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}" spellcheck="false"> |
| 86 |
|
| 87 |
<div class="form-label-row"> |
| 88 |
<label for="form-urlrewrite-rules"> |
| 89 |
{{ t "form.feed.label.urlrewrite_rules" }} |
| 90 |
</label> |
| 91 |
|
| 92 |
<a href=" https://miniflux.app/docs/rules.html#rewriteurl-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 93 |
{{ icon "external-link" }} |
| 94 |
</a> |
| 95 |
</div> |
| 96 |
<input type="text" name="urlrewrite_rules" id="form-urlrewrite-rules" value="{{ .form.UrlRewriteRules }}" spellcheck="false"> |
| 97 |
|
| 98 |
<div class="form-label-row"> |
| 99 |
<label for="form-blocklist-rules"> |
| 100 |
{{ t "form.feed.label.blocklist_rules" }} |
| 101 |
</label> |
| 102 |
|
| 103 |
<a href=" https://miniflux.app/docs/rules.html#feed-filtering-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 104 |
{{ icon "external-link" }} |
| 105 |
</a> |
| 106 |
</div> |
| 107 |
<input type="text" name="blocklist_rules" id="form-blocklist-rules" value="{{ .form.BlocklistRules }}" spellcheck="false"> |
| 108 |
|
| 109 |
<div class="form-label-row"> |
| 110 |
<label for="form-keeplist-rules"> |
| 111 |
{{ t "form.feed.label.keeplist_rules" }} |
| 112 |
</label> |
| 113 |
|
| 114 |
<a href=" https://miniflux.app/docs/rules.html#feed-filtering-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 115 |
{{ icon "external-link" }} |
| 116 |
</a> |
| 117 |
</div> |
| 118 |
<input type="text" name="keeplist_rules" id="form-keeplist-rules" value="{{ .form.KeeplistRules }}" spellcheck="false"> |
| 119 |
|
| 120 |
<div class="form-label-row"> |
| 121 |
<label for="form-block-filter-rules"> |
| 122 |
{{ t "form.feed.label.block_filter_entry_rules" }} |
| 123 |
</label> |
| 124 |
|
| 125 |
<a href=" https://miniflux.app/docs/rules.html#filtering-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 126 |
{{ icon "external-link" }} |
| 127 |
</a> |
| 128 |
</div> |
| 129 |
<textarea id="form-block-filter-rules" name="block_filter_entry_rules" cols="40" rows="10" spellcheck="false">{{ .form.BlockFilterEntryRules }}</textarea> |
| 130 |
|
| 131 |
<div class="form-label-row"> |
| 132 |
<label for="form-keep-filter-rules"> |
| 133 |
{{ t "form.feed.label.keep_filter_entry_rules" }} |
| 134 |
</label> |
| 135 |
|
| 136 |
<a href=" https://miniflux.app/docs/rules.html#filtering-rules" {{ if $.user.OpenExternalLinksInNewTab }}target="_blank"{{ end }}> |
| 137 |
{{ icon "external-link" }} |
| 138 |
</a> |
| 139 |
</div> |
| 140 |
<textarea id="form-keep-filter-rules" name="keep_filter_entry_rules" cols="40" rows="10" spellcheck="false">{{ .form.KeepFilterEntryRules }}</textarea> |
| 141 |
</div> |
| 142 |
</details> |
| 143 |
|
| 144 |
<div class="buttons"> |
| 145 |
<button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "page.add_feed.submit" }}</button> |
| 146 |
</div> |
| 147 |
</form> |
| 148 |
{{ end }} |
| 149 |
|
| 150 |
{{ end }} |