Settings in groups; the log on its own page
Settings is grouped into Access (users, sign-in, iOS app and API tokens), Web interface (address and HTTPS, Decoy), Logs & history and Upkeep (updates, backup). Session length moved to Sign-in and no longer asks for a restart. Log level, log size and traffic history share one card; the country lookup is its own switch. Each card says how it saves. The log viewer moved to a new Log page in the sidebar, with a filter for changes only, and the Dashboard's Log link opens it.
This commit is contained in:
@@ -1022,12 +1022,19 @@ func (a *App) patchSettings(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
var restart bool
|
||||
err = a.store.Update(func(c *Config) error {
|
||||
before, _ := json.Marshal(c.Web)
|
||||
// Session length applies to the next sign-in; everything else in
|
||||
// web needs a restart.
|
||||
listen := func() string {
|
||||
w := c.Web
|
||||
w.SessionHours = 0
|
||||
b, _ := json.Marshal(w)
|
||||
return string(b)
|
||||
}
|
||||
before := listen()
|
||||
if err := field(m, "web", &c.Web); err != nil {
|
||||
return err
|
||||
}
|
||||
after, _ := json.Marshal(c.Web)
|
||||
restart = string(before) != string(after)
|
||||
restart = listen() != before
|
||||
if err := field(m, "stats", &c.Stats); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user