diff options
author | 2021-08-30 16:53:05 +0200 | |
---|---|---|
committer | 2022-07-17 19:35:24 -0700 | |
commit | 6e50ce32931f1feda9b4f63d34a7487791e73dc8 (patch) | |
tree | c8701e380f4ed3277369fdcb2440e9f98d6f6cac /client | |
parent | 3a0aaddafdbb88a62d497e7636599369fd047a24 (diff) | |
download | v2-6e50ce32931f1feda9b4f63d34a7487791e73dc8.tar.gz v2-6e50ce32931f1feda9b4f63d34a7487791e73dc8.tar.zst v2-6e50ce32931f1feda9b4f63d34a7487791e73dc8.zip |
Make reading speed user-configurable
Diffstat (limited to 'client')
-rw-r--r-- | client/model.go | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/client/model.go b/client/model.go index 660b2829..c54f1113 100644 --- a/client/model.go +++ b/client/model.go @@ -18,24 +18,26 @@ const ( // User represents a user in the system. type User struct { - ID int64 `json:"id"` - Username string `json:"username"` - Password string `json:"password,omitempty"` - IsAdmin bool `json:"is_admin"` - Theme string `json:"theme"` - Language string `json:"language"` - Timezone string `json:"timezone"` - EntryDirection string `json:"entry_sorting_direction"` - EntryOrder string `json:"entry_sorting_order"` - Stylesheet string `json:"stylesheet"` - GoogleID string `json:"google_id"` - OpenIDConnectID string `json:"openid_connect_id"` - EntriesPerPage int `json:"entries_per_page"` - KeyboardShortcuts bool `json:"keyboard_shortcuts"` - ShowReadingTime bool `json:"show_reading_time"` - EntrySwipe bool `json:"entry_swipe"` - LastLoginAt *time.Time `json:"last_login_at"` - DisplayMode string `json:"display_mode"` + ID int64 `json:"id"` + Username string `json:"username"` + Password string `json:"password,omitempty"` + IsAdmin bool `json:"is_admin"` + Theme string `json:"theme"` + Language string `json:"language"` + Timezone string `json:"timezone"` + EntryDirection string `json:"entry_sorting_direction"` + EntryOrder string `json:"entry_sorting_order"` + Stylesheet string `json:"stylesheet"` + GoogleID string `json:"google_id"` + OpenIDConnectID string `json:"openid_connect_id"` + EntriesPerPage int `json:"entries_per_page"` + KeyboardShortcuts bool `json:"keyboard_shortcuts"` + ShowReadingTime bool `json:"show_reading_time"` + EntrySwipe bool `json:"entry_swipe"` + LastLoginAt *time.Time `json:"last_login_at"` + DisplayMode string `json:"display_mode"` + DefaultReadingSpeed int `json:"default_reading_speed"` + CJKReadingSpeed int `json:"cjk_reading_speed"` } func (u User) String() string { @@ -53,22 +55,24 @@ type UserCreationRequest struct { // UserModificationRequest represents the request to update a user. type UserModificationRequest struct { - Username *string `json:"username"` - Password *string `json:"password"` - IsAdmin *bool `json:"is_admin"` - Theme *string `json:"theme"` - Language *string `json:"language"` - Timezone *string `json:"timezone"` - EntryDirection *string `json:"entry_sorting_direction"` - EntryOrder *string `json:"entry_sorting_order"` - Stylesheet *string `json:"stylesheet"` - GoogleID *string `json:"google_id"` - OpenIDConnectID *string `json:"openid_connect_id"` - EntriesPerPage *int `json:"entries_per_page"` - KeyboardShortcuts *bool `json:"keyboard_shortcuts"` - ShowReadingTime *bool `json:"show_reading_time"` - EntrySwipe *bool `json:"entry_swipe"` - DisplayMode *string `json:"display_mode"` + Username *string `json:"username"` + Password *string `json:"password"` + IsAdmin *bool `json:"is_admin"` + Theme *string `json:"theme"` + Language *string `json:"language"` + Timezone *string `json:"timezone"` + EntryDirection *string `json:"entry_sorting_direction"` + EntryOrder *string `json:"entry_sorting_order"` + Stylesheet *string `json:"stylesheet"` + GoogleID *string `json:"google_id"` + OpenIDConnectID *string `json:"openid_connect_id"` + EntriesPerPage *int `json:"entries_per_page"` + KeyboardShortcuts *bool `json:"keyboard_shortcuts"` + ShowReadingTime *bool `json:"show_reading_time"` + EntrySwipe *bool `json:"entry_swipe"` + DisplayMode *string `json:"display_mode"` + DefaultReadingSpeed *int `json:"default_reading_speed"` + CJKReadingSpeed *int `json:"cjk_reading_speed"` } // Users represents a list of users. |