feat(web): choose where the search sits, and controls no longer select text
ci / api / api (push) Successful in 36s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 48s
ci / ts / ts (packages + web) (push) Canceled after 12s
ci / db / db (push) Successful in 2m43s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 59s
ci / api / api (push) Successful in 36s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 48s
ci / ts / ts (packages + web) (push) Canceled after 12s
ci / db / db (push) Successful in 2m43s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 59s
- settings get a search position (left, center by default, right); the top bar is three zones and the suggestions open towards the free space - buttons, chips, tabs, menu items and the home screen controls are not text-selectable, so clicks and double clicks no longer highlight labels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d2f17d8d62
commit
860072e542
15 files changed
+369
-270
No files matched your search
@@ -241,13 +241,14 @@ func MeDTO(u User) gen.Me {
|
||||
|
||||
func uiPrefsDTO(p UIPrefs) gen.UiPrefs {
|
||||
return gen.UiPrefs{
|
||||
Theme: (*gen.UiPrefsTheme)(p.Theme),
|
||||
WaveVariant: (*gen.UiPrefsWaveVariant)(p.WaveVariant),
|
||||
WebPlayer: (*gen.UiPrefsWebPlayer)(p.WebPlayer),
|
||||
MobilePlayer: (*gen.UiPrefsMobilePlayer)(p.MobilePlayer),
|
||||
Ambient: p.Ambient,
|
||||
CrossfadeS: p.CrossfadeS,
|
||||
Normalize: p.Normalize,
|
||||
Theme: (*gen.UiPrefsTheme)(p.Theme),
|
||||
WaveVariant: (*gen.UiPrefsWaveVariant)(p.WaveVariant),
|
||||
WebPlayer: (*gen.UiPrefsWebPlayer)(p.WebPlayer),
|
||||
SearchPosition: (*gen.UiPrefsSearchPosition)(p.SearchPos),
|
||||
MobilePlayer: (*gen.UiPrefsMobilePlayer)(p.MobilePlayer),
|
||||
Ambient: p.Ambient,
|
||||
CrossfadeS: p.CrossfadeS,
|
||||
Normalize: p.Normalize,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,6 +257,7 @@ func uiPrefsFromDTO(p gen.UiPrefs) UIPrefs {
|
||||
Theme: (*string)(p.Theme),
|
||||
WaveVariant: (*string)(p.WaveVariant),
|
||||
WebPlayer: (*string)(p.WebPlayer),
|
||||
SearchPos: (*string)(p.SearchPosition),
|
||||
MobilePlayer: (*string)(p.MobilePlayer),
|
||||
Ambient: p.Ambient,
|
||||
CrossfadeS: p.CrossfadeS,
|
||||
|
||||
@@ -37,6 +37,7 @@ type UIPrefs struct {
|
||||
Theme *string `json:"theme,omitempty"`
|
||||
WaveVariant *string `json:"wave_variant,omitempty"`
|
||||
WebPlayer *string `json:"web_player,omitempty"`
|
||||
SearchPos *string `json:"search_position,omitempty"`
|
||||
MobilePlayer *string `json:"mobile_player,omitempty"`
|
||||
Ambient *bool `json:"ambient,omitempty"`
|
||||
CrossfadeS *int `json:"crossfade_s,omitempty"`
|
||||
|
||||
@@ -86,10 +86,11 @@ var commonPasswords = func() map[string]struct{} {
|
||||
}()
|
||||
|
||||
var uiPrefEnums = map[string][]string{
|
||||
"theme": {"dark", "light", "system"},
|
||||
"wave_variant": {"orb", "liquid"},
|
||||
"web_player": {"bar", "island"},
|
||||
"mobile_player": {"cover", "wave"},
|
||||
"theme": {"dark", "light", "system"},
|
||||
"wave_variant": {"orb", "liquid"},
|
||||
"web_player": {"bar", "island"},
|
||||
"search_position": {"center", "left", "right"},
|
||||
"mobile_player": {"cover", "wave"},
|
||||
}
|
||||
|
||||
// ValidateUIPrefs проверяет значения перечислений и диапазон кроссфейда.
|
||||
@@ -107,6 +108,7 @@ func ValidateUIPrefs(p UIPrefs) error {
|
||||
}
|
||||
for name, v := range map[string]*string{
|
||||
"theme": p.Theme, "wave_variant": p.WaveVariant, "web_player": p.WebPlayer, "mobile_player": p.MobilePlayer,
|
||||
"search_position": p.SearchPos,
|
||||
} {
|
||||
if err := check(name, v); err != nil {
|
||||
return err
|
||||
@@ -130,6 +132,9 @@ func MergeUIPrefs(base, patch UIPrefs) UIPrefs {
|
||||
if patch.WebPlayer != nil {
|
||||
base.WebPlayer = patch.WebPlayer
|
||||
}
|
||||
if patch.SearchPos != nil {
|
||||
base.SearchPos = patch.SearchPos
|
||||
}
|
||||
if patch.MobilePlayer != nil {
|
||||
base.MobilePlayer = patch.MobilePlayer
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user