mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Make web app display mode configurable
The change is visible after reinstalling the web app. It's not compatible with all browsers. See https://developer.mozilla.org/en-US/docs/Web/Manifest/display
This commit is contained in:
parent
053b1d0f8d
commit
0d935a863f
23 changed files with 182 additions and 12 deletions
|
@ -83,7 +83,8 @@ func (s *Storage) CreateUser(userCreationRequest *model.UserCreationRequest) (*m
|
|||
entry_swipe,
|
||||
stylesheet,
|
||||
google_id,
|
||||
openid_connect_id
|
||||
openid_connect_id,
|
||||
display_mode
|
||||
`
|
||||
|
||||
tx, err := s.db.Begin()
|
||||
|
@ -114,6 +115,7 @@ func (s *Storage) CreateUser(userCreationRequest *model.UserCreationRequest) (*m
|
|||
&user.Stylesheet,
|
||||
&user.GoogleID,
|
||||
&user.OpenIDConnectID,
|
||||
&user.DisplayMode,
|
||||
)
|
||||
if err != nil {
|
||||
tx.Rollback()
|
||||
|
@ -162,9 +164,10 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
entry_swipe=$11,
|
||||
stylesheet=$12,
|
||||
google_id=$13,
|
||||
openid_connect_id=$14
|
||||
openid_connect_id=$14,
|
||||
display_mode=$15
|
||||
WHERE
|
||||
id=$15
|
||||
id=$16
|
||||
`
|
||||
|
||||
_, err = s.db.Exec(
|
||||
|
@ -183,6 +186,7 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
user.Stylesheet,
|
||||
user.GoogleID,
|
||||
user.OpenIDConnectID,
|
||||
user.DisplayMode,
|
||||
user.ID,
|
||||
)
|
||||
if err != nil {
|
||||
|
@ -203,9 +207,10 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
entry_swipe=$10,
|
||||
stylesheet=$11,
|
||||
google_id=$12,
|
||||
openid_connect_id=$13
|
||||
openid_connect_id=$13,
|
||||
display_mode=$14
|
||||
WHERE
|
||||
id=$14
|
||||
id=$15
|
||||
`
|
||||
|
||||
_, err := s.db.Exec(
|
||||
|
@ -223,6 +228,7 @@ func (s *Storage) UpdateUser(user *model.User) error {
|
|||
user.Stylesheet,
|
||||
user.GoogleID,
|
||||
user.OpenIDConnectID,
|
||||
user.DisplayMode,
|
||||
user.ID,
|
||||
)
|
||||
|
||||
|
@ -262,7 +268,8 @@ func (s *Storage) UserByID(userID int64) (*model.User, error) {
|
|||
last_login_at,
|
||||
stylesheet,
|
||||
google_id,
|
||||
openid_connect_id
|
||||
openid_connect_id,
|
||||
display_mode
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
|
@ -289,7 +296,8 @@ func (s *Storage) UserByUsername(username string) (*model.User, error) {
|
|||
last_login_at,
|
||||
stylesheet,
|
||||
google_id,
|
||||
openid_connect_id
|
||||
openid_connect_id,
|
||||
display_mode
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
|
@ -316,7 +324,8 @@ func (s *Storage) UserByField(field, value string) (*model.User, error) {
|
|||
last_login_at,
|
||||
stylesheet,
|
||||
google_id,
|
||||
openid_connect_id
|
||||
openid_connect_id,
|
||||
display_mode
|
||||
FROM
|
||||
users
|
||||
WHERE
|
||||
|
@ -350,7 +359,8 @@ func (s *Storage) UserByAPIKey(token string) (*model.User, error) {
|
|||
u.last_login_at,
|
||||
u.stylesheet,
|
||||
u.google_id,
|
||||
u.openid_connect_id
|
||||
u.openid_connect_id,
|
||||
u.display_mode
|
||||
FROM
|
||||
users u
|
||||
LEFT JOIN
|
||||
|
@ -379,6 +389,7 @@ func (s *Storage) fetchUser(query string, args ...interface{}) (*model.User, err
|
|||
&user.Stylesheet,
|
||||
&user.GoogleID,
|
||||
&user.OpenIDConnectID,
|
||||
&user.DisplayMode,
|
||||
)
|
||||
|
||||
if err == sql.ErrNoRows {
|
||||
|
@ -442,7 +453,8 @@ func (s *Storage) Users() (model.Users, error) {
|
|||
last_login_at,
|
||||
stylesheet,
|
||||
google_id,
|
||||
openid_connect_id
|
||||
openid_connect_id,
|
||||
display_mode
|
||||
FROM
|
||||
users
|
||||
ORDER BY username ASC
|
||||
|
@ -472,6 +484,7 @@ func (s *Storage) Users() (model.Users, error) {
|
|||
&user.Stylesheet,
|
||||
&user.GoogleID,
|
||||
&user.OpenIDConnectID,
|
||||
&user.DisplayMode,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue