useContext work in JS
This commit is contained in:
parent
a4529617cc
commit
b27c608508
17 changed files with 87 additions and 176 deletions
|
@ -110,7 +110,7 @@ type Config struct {
|
|||
EnableEmailConfirm bool
|
||||
EnablePasswordReset bool
|
||||
EnablePayments bool
|
||||
EnableReserveTopics bool // Allow users with role "user" to own/reserve topics
|
||||
EnableReservations bool // Allow users with role "user" to own/reserve topics
|
||||
Version string // injected by App
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ import (
|
|||
UI:
|
||||
- flicker of upgrade banner
|
||||
- JS constants
|
||||
- useContext for account
|
||||
Sync:
|
||||
- "account topic" sync mechanism
|
||||
- "mute" setting
|
||||
|
@ -58,9 +57,7 @@ import (
|
|||
Refactor:
|
||||
- rename /access -> /reservation
|
||||
Later:
|
||||
- Password reset
|
||||
- Pricing
|
||||
- change email
|
||||
*/
|
||||
|
||||
// Server is the main server, providing the UI and API for ntfy
|
||||
|
@ -457,10 +454,10 @@ func (s *Server) handleWebConfig(w http.ResponseWriter, _ *http.Request, _ *visi
|
|||
EnableSignup: s.config.EnableSignup,
|
||||
EnablePasswordReset: s.config.EnablePasswordReset,
|
||||
EnablePayments: s.config.EnablePayments,
|
||||
EnableReserveTopics: s.config.EnableReserveTopics,
|
||||
EnableReservations: s.config.EnableReservations,
|
||||
DisallowedTopics: disallowedTopics,
|
||||
}
|
||||
b, err := json.Marshal(response)
|
||||
b, err := json.MarshalIndent(response, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -292,6 +292,6 @@ type apiConfigResponse struct {
|
|||
EnableSignup bool `json:"enable_signup"`
|
||||
EnablePasswordReset bool `json:"enable_password_reset"`
|
||||
EnablePayments bool `json:"enable_payments"`
|
||||
EnableReserveTopics bool `json:"enable_reserve_topics"`
|
||||
EnableReservations bool `json:"enable_reservations"`
|
||||
DisallowedTopics []string `json:"disallowed_topics"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue