mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Show correct User Agent in input placeholders
This commit is contained in:
parent
e589a35c67
commit
2cf9bde1af
15 changed files with 37 additions and 64 deletions
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/ui/form"
|
||||
|
@ -68,7 +67,7 @@ func (h *handler) showEditFeedPage(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
view.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
view.Set("hasProxyConfigured", config.Opts.HasHTTPClientProxyConfigured())
|
||||
|
||||
html.OK(w, r, view.Render("edit_feed"))
|
||||
|
|
|
@ -7,7 +7,7 @@ package ui // import "miniflux.app/ui"
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
|
@ -53,7 +53,7 @@ func (h *handler) updateFeed(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
view.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
|
||||
if err := feedForm.ValidateModification(); err != nil {
|
||||
view.Set("errorMessage", err.Error())
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/crypto"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response"
|
||||
"miniflux.app/http/response/html"
|
||||
|
@ -46,7 +45,7 @@ func (h *handler) imageProxy(w http.ResponseWriter, r *http.Request) {
|
|||
html.ServerError(w, r, err)
|
||||
return
|
||||
}
|
||||
req.Header.Add("User-Agent", client.DefaultUserAgent)
|
||||
req.Header.Add("User-Agent", config.Opts.HTTPClientUserAgent())
|
||||
req.Header.Add("Connection", "close")
|
||||
|
||||
clt := &http.Client{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -404,10 +404,8 @@ textarea:focus {
|
|||
box-shadow: var(--input-focus-box-shadow);
|
||||
}
|
||||
|
||||
::-moz-placeholder,
|
||||
::-ms-input-placeholder,
|
||||
::-webkit-input-placeholder {
|
||||
color: #ddd;
|
||||
input::placeholder {
|
||||
color: var(--input-placeholder-color);
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
--input-border: 1px solid #555;
|
||||
--input-background: #333;
|
||||
--input-color: #ccc;
|
||||
--input-placeholder-color: #666;
|
||||
|
||||
--input-focus-color: #efefef;
|
||||
--input-focus-border-color: rgba(82, 168, 236, 0.8);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
--input-border: 1px solid #ccc;
|
||||
--input-background: #fff;
|
||||
--input-color: #333;
|
||||
--input-placeholder-color: #d0d0d0;
|
||||
|
||||
--input-focus-color: #000;
|
||||
--input-focus-border-color: rgba(82, 168, 236, 0.8);
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
--input-border: 1px solid #ccc;
|
||||
--input-background: #fff;
|
||||
--input-color: #333;
|
||||
--input-placeholder-color: #d0d0d0;
|
||||
|
||||
--input-focus-color: #000;
|
||||
--input-focus-border-color: rgba(82, 168, 236, 0.8);
|
||||
|
@ -139,6 +140,7 @@
|
|||
--input-border: 1px solid #555;
|
||||
--input-background: #333;
|
||||
--input-color: #ccc;
|
||||
--input-placeholder-color: #666;
|
||||
|
||||
--input-focus-color: #efefef;
|
||||
--input-focus-border-color: rgba(82, 168, 236, 0.8);
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/ui/form"
|
||||
|
@ -37,7 +36,7 @@ func (h *handler) showAddSubscriptionPage(w http.ResponseWriter, r *http.Request
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
view.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
view.Set("form", &form.SubscriptionForm{CategoryID: 0})
|
||||
view.Set("hasProxyConfigured", config.Opts.HasHTTPClientProxyConfigured())
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/ui/form"
|
||||
|
@ -40,7 +39,7 @@ func (h *handler) bookmarklet(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
view.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
view.Set("hasProxyConfigured", config.Opts.HasHTTPClientProxyConfigured())
|
||||
|
||||
html.OK(w, r, view.Render("add_subscription"))
|
||||
|
|
|
@ -7,7 +7,7 @@ package ui // import "miniflux.app/ui"
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
|
@ -37,7 +37,7 @@ func (h *handler) showChooseSubscriptionPage(w http.ResponseWriter, r *http.Requ
|
|||
view.Set("user", user)
|
||||
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
view.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
view.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
|
||||
subscriptionForm := form.NewSubscriptionForm(r)
|
||||
if err := subscriptionForm.Validate(); err != nil {
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http"
|
||||
|
||||
"miniflux.app/config"
|
||||
"miniflux.app/http/client"
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
|
@ -40,7 +39,7 @@ func (h *handler) submitSubscription(w http.ResponseWriter, r *http.Request) {
|
|||
v.Set("user", user)
|
||||
v.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|
||||
v.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(user.ID))
|
||||
v.Set("defaultUserAgent", client.DefaultUserAgent)
|
||||
v.Set("defaultUserAgent", config.Opts.HTTPClientUserAgent())
|
||||
v.Set("hasProxyConfigured", config.Opts.HasHTTPClientProxyConfigured())
|
||||
|
||||
subscriptionForm := form.NewSubscriptionForm(r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue