Add separate GTK UI font setting
- commit
- 08a0a9d478e8378205426ab6b84f7bbb92667afd
- author
- brice · · 2026-05-17 05:58 UTC
- parent
- 7bebba6
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
18 files · +364 -296
M internal/application/dto/webui_config.go +1 -0
| @@ -70,6 +70,7 @@ type WebUIAppearanceConfig struct { | |||
| 70 | 70 | SansFont string `json:"sans_font"` | |
| 71 | 71 | SerifFont string `json:"serif_font"` | |
| 72 | 72 | MonospaceFont string `json:"monospace_font"` | |
| 73 | + | GtkFont string `json:"gtk_font"` | |
| 73 | 74 | DefaultFontSize int `json:"default_font_size"` | |
| 74 | 75 | ColorScheme string `json:"color_scheme"` | |
| 75 | 76 | LightPalette ColorPalette `json:"light_palette"` | |
| @@ -70,6 +70,7 @@ type WebUIAppearanceConfig struct { | |||||
| 70 | SansFont string `json:"sans_font"` | 70 | SansFont string `json:"sans_font"` | ||
| 71 | SerifFont string `json:"serif_font"` | 71 | SerifFont string `json:"serif_font"` | ||
| 72 | MonospaceFont string `json:"monospace_font"` | 72 | MonospaceFont string `json:"monospace_font"` | ||
| 73 | + | GtkFont string `json:"gtk_font"` | |||
| 73 | DefaultFontSize int `json:"default_font_size"` | 74 | DefaultFontSize int `json:"default_font_size"` | ||
| 74 | ColorScheme string `json:"color_scheme"` | 75 | ColorScheme string `json:"color_scheme"` | ||
| 75 | LightPalette ColorPalette `json:"light_palette"` | 76 | LightPalette ColorPalette `json:"light_palette"` | ||
M internal/application/usecase/save_webui_config.go +2 -0
| @@ -55,6 +55,7 @@ func normalizeWebUIConfig(cfg dto.WebUIConfig) dto.WebUIConfig { | |||
| 55 | 55 | cfg.Appearance.SansFont = strings.TrimSpace(cfg.Appearance.SansFont) | |
| 56 | 56 | cfg.Appearance.SerifFont = strings.TrimSpace(cfg.Appearance.SerifFont) | |
| 57 | 57 | cfg.Appearance.MonospaceFont = strings.TrimSpace(cfg.Appearance.MonospaceFont) | |
| 58 | + | cfg.Appearance.GtkFont = strings.TrimSpace(cfg.Appearance.GtkFont) | |
| 58 | 59 | cfg.Appearance.ColorScheme = strings.TrimSpace(cfg.Appearance.ColorScheme) | |
| 59 | 60 | cfg.DefaultSearchEngine = strings.TrimSpace(cfg.DefaultSearchEngine) | |
| 60 | 61 | if len(cfg.SearchShortcuts) > 0 { | |
| @@ -86,6 +87,7 @@ func validateWebUIConfig(cfg dto.WebUIConfig) error { | |||
| 86 | 87 | errs = append(errs, validation.ValidateFontFamily("appearance.sans_font", cfg.Appearance.SansFont)...) | |
| 87 | 88 | errs = append(errs, validation.ValidateFontFamily("appearance.serif_font", cfg.Appearance.SerifFont)...) | |
| 88 | 89 | errs = append(errs, validation.ValidateFontFamily("appearance.monospace_font", cfg.Appearance.MonospaceFont)...) | |
| 90 | + | errs = append(errs, validation.ValidateFontFamily("appearance.gtk_font", cfg.Appearance.GtkFont)...) | |
| 89 | 91 | ||
| 90 | 92 | for _, err := range validation.ValidateShortcutURL(cfg.DefaultSearchEngine) { | |
| 91 | 93 | errs = append(errs, fmt.Sprintf("default_search_engine: %s", err)) | |
| @@ -55,6 +55,7 @@ func normalizeWebUIConfig(cfg dto.WebUIConfig) dto.WebUIConfig { | |||||
| 55 | cfg.Appearance.SansFont = strings.TrimSpace(cfg.Appearance.SansFont) | 55 | cfg.Appearance.SansFont = strings.TrimSpace(cfg.Appearance.SansFont) | ||
| 56 | cfg.Appearance.SerifFont = strings.TrimSpace(cfg.Appearance.SerifFont) | 56 | cfg.Appearance.SerifFont = strings.TrimSpace(cfg.Appearance.SerifFont) | ||
| 57 | cfg.Appearance.MonospaceFont = strings.TrimSpace(cfg.Appearance.MonospaceFont) | 57 | cfg.Appearance.MonospaceFont = strings.TrimSpace(cfg.Appearance.MonospaceFont) | ||
| 58 | + | cfg.Appearance.GtkFont = strings.TrimSpace(cfg.Appearance.GtkFont) | |||
| 58 | cfg.Appearance.ColorScheme = strings.TrimSpace(cfg.Appearance.ColorScheme) | 59 | cfg.Appearance.ColorScheme = strings.TrimSpace(cfg.Appearance.ColorScheme) | ||
| 59 | cfg.DefaultSearchEngine = strings.TrimSpace(cfg.DefaultSearchEngine) | 60 | cfg.DefaultSearchEngine = strings.TrimSpace(cfg.DefaultSearchEngine) | ||
| 60 | if len(cfg.SearchShortcuts) > 0 { | 61 | if len(cfg.SearchShortcuts) > 0 { | ||
| @@ -86,6 +87,7 @@ func validateWebUIConfig(cfg dto.WebUIConfig) error { | |||||
| 86 | errs = append(errs, validation.ValidateFontFamily("appearance.sans_font", cfg.Appearance.SansFont)...) | 87 | errs = append(errs, validation.ValidateFontFamily("appearance.sans_font", cfg.Appearance.SansFont)...) | ||
| 87 | errs = append(errs, validation.ValidateFontFamily("appearance.serif_font", cfg.Appearance.SerifFont)...) | 88 | errs = append(errs, validation.ValidateFontFamily("appearance.serif_font", cfg.Appearance.SerifFont)...) | ||
| 88 | errs = append(errs, validation.ValidateFontFamily("appearance.monospace_font", cfg.Appearance.MonospaceFont)...) | 89 | errs = append(errs, validation.ValidateFontFamily("appearance.monospace_font", cfg.Appearance.MonospaceFont)...) | ||
| 90 | + | errs = append(errs, validation.ValidateFontFamily("appearance.gtk_font", cfg.Appearance.GtkFont)...) | |||
| 89 | 91 | ||||
| 90 | for _, err := range validation.ValidateShortcutURL(cfg.DefaultSearchEngine) { | 92 | for _, err := range validation.ValidateShortcutURL(cfg.DefaultSearchEngine) { | ||
| 91 | errs = append(errs, fmt.Sprintf("default_search_engine: %s", err)) | 93 | errs = append(errs, fmt.Sprintf("default_search_engine: %s", err)) | ||
M internal/application/usecase/save_webui_config_test.go +1 -0
| @@ -112,6 +112,7 @@ func validWebUIConfig() dto.WebUIConfig { | |||
| 112 | 112 | SansFont: "Inter", | |
| 113 | 113 | SerifFont: "Georgia", | |
| 114 | 114 | MonospaceFont: "JetBrains Mono", | |
| 115 | + | GtkFont: "Adwaita Sans", | |
| 115 | 116 | DefaultFontSize: 16, | |
| 116 | 117 | ColorScheme: "prefer-dark", | |
| 117 | 118 | LightPalette: palette, | |
| @@ -112,6 +112,7 @@ func validWebUIConfig() dto.WebUIConfig { | |||||
| 112 | SansFont: "Inter", | 112 | SansFont: "Inter", | ||
| 113 | SerifFont: "Georgia", | 113 | SerifFont: "Georgia", | ||
| 114 | MonospaceFont: "JetBrains Mono", | 114 | MonospaceFont: "JetBrains Mono", | ||
| 115 | + | GtkFont: "Adwaita Sans", | |||
| 115 | DefaultFontSize: 16, | 116 | DefaultFontSize: 16, | ||
| 116 | ColorScheme: "prefer-dark", | 117 | ColorScheme: "prefer-dark", | ||
| 117 | LightPalette: palette, | 118 | LightPalette: palette, | ||
M internal/domain/entity/config_types.go +1 -0
| @@ -9,6 +9,7 @@ type AppearanceConfig struct { | |||
| 9 | 9 | SansFont string `mapstructure:"sans_font" yaml:"sans_font" toml:"sans_font" json:"sans_font"` | |
| 10 | 10 | SerifFont string `mapstructure:"serif_font" yaml:"serif_font" toml:"serif_font" json:"serif_font"` | |
| 11 | 11 | MonospaceFont string `mapstructure:"monospace_font" yaml:"monospace_font" toml:"monospace_font" json:"monospace_font"` | |
| 12 | + | GtkFont string `mapstructure:"gtk_font" yaml:"gtk_font" toml:"gtk_font" json:"gtk_font"` | |
| 12 | 13 | DefaultFontSize int `mapstructure:"default_font_size" yaml:"default_font_size" toml:"default_font_size" json:"default_font_size"` | |
| 13 | 14 | LightPalette ColorPalette `mapstructure:"light_palette" yaml:"light_palette" toml:"light_palette" json:"light_palette"` | |
| 14 | 15 | DarkPalette ColorPalette `mapstructure:"dark_palette" yaml:"dark_palette" toml:"dark_palette" json:"dark_palette"` | |
| @@ -9,6 +9,7 @@ type AppearanceConfig struct { | |||||
| 9 | SansFont string `mapstructure:"sans_font" yaml:"sans_font" toml:"sans_font" json:"sans_font"` | 9 | SansFont string `mapstructure:"sans_font" yaml:"sans_font" toml:"sans_font" json:"sans_font"` | ||
| 10 | SerifFont string `mapstructure:"serif_font" yaml:"serif_font" toml:"serif_font" json:"serif_font"` | 10 | SerifFont string `mapstructure:"serif_font" yaml:"serif_font" toml:"serif_font" json:"serif_font"` | ||
| 11 | MonospaceFont string `mapstructure:"monospace_font" yaml:"monospace_font" toml:"monospace_font" json:"monospace_font"` | 11 | MonospaceFont string `mapstructure:"monospace_font" yaml:"monospace_font" toml:"monospace_font" json:"monospace_font"` | ||
| 12 | + | GtkFont string `mapstructure:"gtk_font" yaml:"gtk_font" toml:"gtk_font" json:"gtk_font"` | |||
| 12 | DefaultFontSize int `mapstructure:"default_font_size" yaml:"default_font_size" toml:"default_font_size" json:"default_font_size"` | 13 | DefaultFontSize int `mapstructure:"default_font_size" yaml:"default_font_size" toml:"default_font_size" json:"default_font_size"` | ||
| 13 | LightPalette ColorPalette `mapstructure:"light_palette" yaml:"light_palette" toml:"light_palette" json:"light_palette"` | 14 | LightPalette ColorPalette `mapstructure:"light_palette" yaml:"light_palette" toml:"light_palette" json:"light_palette"` | ||
| 14 | DarkPalette ColorPalette `mapstructure:"dark_palette" yaml:"dark_palette" toml:"dark_palette" json:"dark_palette"` | 15 | DarkPalette ColorPalette `mapstructure:"dark_palette" yaml:"dark_palette" toml:"dark_palette" json:"dark_palette"` | ||
M internal/infrastructure/config/defaults.go +1 -0
| @@ -136,6 +136,7 @@ func DefaultConfig() *Config { | |||
| 136 | 136 | SansFont: "Fira Sans", | |
| 137 | 137 | SerifFont: "Fira Sans", | |
| 138 | 138 | MonospaceFont: "Fira Code", | |
| 139 | + | GtkFont: "Adwaita Sans", | |
| 139 | 140 | DefaultFontSize: defaultFontSize, | |
| 140 | 141 | LightPalette: ColorPalette{ | |
| 141 | 142 | Background: "#fafafa", | |
| @@ -136,6 +136,7 @@ func DefaultConfig() *Config { | |||||
| 136 | SansFont: "Fira Sans", | 136 | SansFont: "Fira Sans", | ||
| 137 | SerifFont: "Fira Sans", | 137 | SerifFont: "Fira Sans", | ||
| 138 | MonospaceFont: "Fira Code", | 138 | MonospaceFont: "Fira Code", | ||
| 139 | + | GtkFont: "Adwaita Sans", | |||
| 139 | DefaultFontSize: defaultFontSize, | 140 | DefaultFontSize: defaultFontSize, | ||
| 140 | LightPalette: ColorPalette{ | 141 | LightPalette: ColorPalette{ | ||
| 141 | Background: "#fafafa", | 142 | Background: "#fafafa", | ||
M internal/infrastructure/config/loader.go +1 -0
| @@ -584,6 +584,7 @@ func (m *Manager) setAppearanceDefaults(defaults *Config) { | |||
| 584 | 584 | m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont) | |
| 585 | 585 | m.viper.SetDefault("appearance.serif_font", defaults.Appearance.SerifFont) | |
| 586 | 586 | m.viper.SetDefault("appearance.monospace_font", defaults.Appearance.MonospaceFont) | |
| 587 | + | m.viper.SetDefault("appearance.gtk_font", defaults.Appearance.GtkFont) | |
| 587 | 588 | m.viper.SetDefault("appearance.default_font_size", defaults.Appearance.DefaultFontSize) | |
| 588 | 589 | m.viper.SetDefault("appearance.light_palette", defaults.Appearance.LightPalette) | |
| 589 | 590 | m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette) | |
| @@ -584,6 +584,7 @@ func (m *Manager) setAppearanceDefaults(defaults *Config) { | |||||
| 584 | m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont) | 584 | m.viper.SetDefault("appearance.sans_font", defaults.Appearance.SansFont) | ||
| 585 | m.viper.SetDefault("appearance.serif_font", defaults.Appearance.SerifFont) | 585 | m.viper.SetDefault("appearance.serif_font", defaults.Appearance.SerifFont) | ||
| 586 | m.viper.SetDefault("appearance.monospace_font", defaults.Appearance.MonospaceFont) | 586 | m.viper.SetDefault("appearance.monospace_font", defaults.Appearance.MonospaceFont) | ||
| 587 | + | m.viper.SetDefault("appearance.gtk_font", defaults.Appearance.GtkFont) | |||
| 587 | m.viper.SetDefault("appearance.default_font_size", defaults.Appearance.DefaultFontSize) | 588 | m.viper.SetDefault("appearance.default_font_size", defaults.Appearance.DefaultFontSize) | ||
| 588 | m.viper.SetDefault("appearance.light_palette", defaults.Appearance.LightPalette) | 589 | m.viper.SetDefault("appearance.light_palette", defaults.Appearance.LightPalette) | ||
| 589 | m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette) | 590 | m.viper.SetDefault("appearance.dark_palette", defaults.Appearance.DarkPalette) | ||
M internal/infrastructure/config/schema_provider.go +7 -0
| @@ -138,6 +138,13 @@ func (*SchemaProvider) getAppearanceKeys(defaults *Config) []entity.ConfigKeyInf | |||
| 138 | 138 | Description: "Monospace font family for code", | |
| 139 | 139 | Section: SectionAppearance, | |
| 140 | 140 | }, | |
| 141 | + | { | |
| 142 | + | Key: "appearance.gtk_font", | |
| 143 | + | Type: "string", | |
| 144 | + | Default: defaults.Appearance.GtkFont, | |
| 145 | + | Description: "Native GTK UI font family for app chrome", | |
| 146 | + | Section: SectionAppearance, | |
| 147 | + | }, | |
| 141 | 148 | { | |
| 142 | 149 | Key: "default_webpage_zoom", | |
| 143 | 150 | Type: "float64", | |
| @@ -138,6 +138,13 @@ func (*SchemaProvider) getAppearanceKeys(defaults *Config) []entity.ConfigKeyInf | |||||
| 138 | Description: "Monospace font family for code", | 138 | Description: "Monospace font family for code", | ||
| 139 | Section: SectionAppearance, | 139 | Section: SectionAppearance, | ||
| 140 | }, | 140 | }, | ||
| 141 | + | { | |||
| 142 | + | Key: "appearance.gtk_font", | |||
| 143 | + | Type: "string", | |||
| 144 | + | Default: defaults.Appearance.GtkFont, | |||
| 145 | + | Description: "Native GTK UI font family for app chrome", | |||
| 146 | + | Section: SectionAppearance, | |||
| 147 | + | }, | |||
| 141 | { | 148 | { | ||
| 142 | Key: "default_webpage_zoom", | 149 | Key: "default_webpage_zoom", | ||
| 143 | Type: "float64", | 150 | Type: "float64", | ||
M internal/infrastructure/config/validation.go +1 -0
| @@ -72,6 +72,7 @@ func validateAppearance(config *Config) []string { | |||
| 72 | 72 | } | |
| 73 | 73 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.sans_font", config.Appearance.SansFont)...) | |
| 74 | 74 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.serif_font", config.Appearance.SerifFont)...) | |
| 75 | + | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.gtk_font", config.Appearance.GtkFont)...) | |
| 75 | 76 | validationErrors = append( | |
| 76 | 77 | validationErrors, | |
| 77 | 78 | domainvalidation.ValidateFontFamily("appearance.monospace_font", config.Appearance.MonospaceFont)..., | |
| @@ -72,6 +72,7 @@ func validateAppearance(config *Config) []string { | |||||
| 72 | } | 72 | } | ||
| 73 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.sans_font", config.Appearance.SansFont)...) | 73 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.sans_font", config.Appearance.SansFont)...) | ||
| 74 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.serif_font", config.Appearance.SerifFont)...) | 74 | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.serif_font", config.Appearance.SerifFont)...) | ||
| 75 | + | validationErrors = append(validationErrors, domainvalidation.ValidateFontFamily("appearance.gtk_font", config.Appearance.GtkFont)...) | |||
| 75 | validationErrors = append( | 76 | validationErrors = append( | ||
| 76 | validationErrors, | 77 | validationErrors, | ||
| 77 | domainvalidation.ValidateFontFamily("appearance.monospace_font", config.Appearance.MonospaceFont)..., | 78 | domainvalidation.ValidateFontFamily("appearance.monospace_font", config.Appearance.MonospaceFont)..., | ||
M internal/infrastructure/config/webui_gateway.go +1 -0
| @@ -43,6 +43,7 @@ func (g *WebUIConfigGateway) SaveWebUIConfig(ctx context.Context, cfg dto.WebUIC | |||
| 43 | 43 | current.Appearance.SansFont = cfg.Appearance.SansFont | |
| 44 | 44 | current.Appearance.SerifFont = cfg.Appearance.SerifFont | |
| 45 | 45 | current.Appearance.MonospaceFont = cfg.Appearance.MonospaceFont | |
| 46 | + | current.Appearance.GtkFont = cfg.Appearance.GtkFont | |
| 46 | 47 | current.Appearance.DefaultFontSize = cfg.Appearance.DefaultFontSize | |
| 47 | 48 | current.Appearance.ColorScheme = cfg.Appearance.ColorScheme | |
| 48 | 49 | current.Appearance.LightPalette = ColorPalette{ | |
| @@ -43,6 +43,7 @@ func (g *WebUIConfigGateway) SaveWebUIConfig(ctx context.Context, cfg dto.WebUIC | |||||
| 43 | current.Appearance.SansFont = cfg.Appearance.SansFont | 43 | current.Appearance.SansFont = cfg.Appearance.SansFont | ||
| 44 | current.Appearance.SerifFont = cfg.Appearance.SerifFont | 44 | current.Appearance.SerifFont = cfg.Appearance.SerifFont | ||
| 45 | current.Appearance.MonospaceFont = cfg.Appearance.MonospaceFont | 45 | current.Appearance.MonospaceFont = cfg.Appearance.MonospaceFont | ||
| 46 | + | current.Appearance.GtkFont = cfg.Appearance.GtkFont | |||
| 46 | current.Appearance.DefaultFontSize = cfg.Appearance.DefaultFontSize | 47 | current.Appearance.DefaultFontSize = cfg.Appearance.DefaultFontSize | ||
| 47 | current.Appearance.ColorScheme = cfg.Appearance.ColorScheme | 48 | current.Appearance.ColorScheme = cfg.Appearance.ColorScheme | ||
| 48 | current.Appearance.LightPalette = ColorPalette{ | 49 | current.Appearance.LightPalette = ColorPalette{ | ||
M internal/infrastructure/config/webui_payload.go +1 -0
| @@ -53,6 +53,7 @@ func buildSystemviewAppearancePayload(appearance AppearanceConfig) dto.WebUIAppe | |||
| 53 | 53 | SansFont: appearance.SansFont, | |
| 54 | 54 | SerifFont: appearance.SerifFont, | |
| 55 | 55 | MonospaceFont: appearance.MonospaceFont, | |
| 56 | + | GtkFont: appearance.GtkFont, | |
| 56 | 57 | DefaultFontSize: appearance.DefaultFontSize, | |
| 57 | 58 | ColorScheme: appearance.ColorScheme, | |
| 58 | 59 | LightPalette: buildSystemviewPalettePayload(appearance.LightPalette, defaults.LightPalette), | |
| @@ -53,6 +53,7 @@ func buildSystemviewAppearancePayload(appearance AppearanceConfig) dto.WebUIAppe | |||||
| 53 | SansFont: appearance.SansFont, | 53 | SansFont: appearance.SansFont, | ||
| 54 | SerifFont: appearance.SerifFont, | 54 | SerifFont: appearance.SerifFont, | ||
| 55 | MonospaceFont: appearance.MonospaceFont, | 55 | MonospaceFont: appearance.MonospaceFont, | ||
| 56 | + | GtkFont: appearance.GtkFont, | |||
| 56 | DefaultFontSize: appearance.DefaultFontSize, | 57 | DefaultFontSize: appearance.DefaultFontSize, | ||
| 57 | ColorScheme: appearance.ColorScheme, | 58 | ColorScheme: appearance.ColorScheme, | ||
| 58 | LightPalette: buildSystemviewPalettePayload(appearance.LightPalette, defaults.LightPalette), | 59 | LightPalette: buildSystemviewPalettePayload(appearance.LightPalette, defaults.LightPalette), | ||
M internal/ui/systemviews/config.templ +1 -0
| @@ -31,6 +31,7 @@ templ AppearanceForm(config dto.SystemviewConfigPayload) { | |||
| 31 | 31 | <label><span>Sans font</span><input name="sans_font" type="text" value={ config.Appearance.SansFont } required/></label> | |
| 32 | 32 | <label><span>Serif font</span><input name="serif_font" type="text" value={ config.Appearance.SerifFont } required/></label> | |
| 33 | 33 | <label><span>Monospace font</span><input name="monospace_font" type="text" value={ config.Appearance.MonospaceFont } required/></label> | |
| 34 | + | <label><span>GTK UI font</span><input name="gtk_font" type="text" value={ config.Appearance.GtkFont } required/></label> | |
| 34 | 35 | <label><span>Default font size</span><input name="default_font_size" type="number" min="1" max="72" value={ formatConfigInt(config.Appearance.DefaultFontSize) } required/></label> | |
| 35 | 36 | <label><span>UI scale</span><input name="default_ui_scale" type="number" min="0.5" max="3" step="0.05" value={ formatConfigFloat(config.DefaultUIScale) } required/></label> | |
| 36 | 37 | <label><span>Color scheme</span><select name="color_scheme"> | |
| @@ -31,6 +31,7 @@ templ AppearanceForm(config dto.SystemviewConfigPayload) { | |||||
| 31 | <label><span>Sans font</span><input name="sans_font" type="text" value={ config.Appearance.SansFont } required/></label> | 31 | <label><span>Sans font</span><input name="sans_font" type="text" value={ config.Appearance.SansFont } required/></label> | ||
| 32 | <label><span>Serif font</span><input name="serif_font" type="text" value={ config.Appearance.SerifFont } required/></label> | 32 | <label><span>Serif font</span><input name="serif_font" type="text" value={ config.Appearance.SerifFont } required/></label> | ||
| 33 | <label><span>Monospace font</span><input name="monospace_font" type="text" value={ config.Appearance.MonospaceFont } required/></label> | 33 | <label><span>Monospace font</span><input name="monospace_font" type="text" value={ config.Appearance.MonospaceFont } required/></label> | ||
| 34 | + | <label><span>GTK UI font</span><input name="gtk_font" type="text" value={ config.Appearance.GtkFont } required/></label> | |||
| 34 | <label><span>Default font size</span><input name="default_font_size" type="number" min="1" max="72" value={ formatConfigInt(config.Appearance.DefaultFontSize) } required/></label> | 35 | <label><span>Default font size</span><input name="default_font_size" type="number" min="1" max="72" value={ formatConfigInt(config.Appearance.DefaultFontSize) } required/></label> | ||
| 35 | <label><span>UI scale</span><input name="default_ui_scale" type="number" min="0.5" max="3" step="0.05" value={ formatConfigFloat(config.DefaultUIScale) } required/></label> | 36 | <label><span>UI scale</span><input name="default_ui_scale" type="number" min="0.5" max="3" step="0.05" value={ formatConfigFloat(config.DefaultUIScale) } required/></label> | ||
| 36 | <label><span>Color scheme</span><select name="color_scheme"> | 37 | <label><span>Color scheme</span><select name="color_scheme"> | ||
M internal/ui/systemviews/config_actions.go +1 -0
| @@ -99,6 +99,7 @@ func (a *App) saveAppearanceConfig(ctx context.Context, data map[string]string) | |||
| 99 | 99 | cfg.Appearance.SansFont = strings.TrimSpace(data["sans_font"]) | |
| 100 | 100 | cfg.Appearance.SerifFont = strings.TrimSpace(data["serif_font"]) | |
| 101 | 101 | cfg.Appearance.MonospaceFont = strings.TrimSpace(data["monospace_font"]) | |
| 102 | + | cfg.Appearance.GtkFont = strings.TrimSpace(data["gtk_font"]) | |
| 102 | 103 | cfg.Appearance.DefaultFontSize = fontSize | |
| 103 | 104 | cfg.Appearance.ColorScheme = strings.TrimSpace(data["color_scheme"]) | |
| 104 | 105 | cfg.Appearance.LightPalette = paletteFromForm(data, "light") | |
| @@ -99,6 +99,7 @@ func (a *App) saveAppearanceConfig(ctx context.Context, data map[string]string) | |||||
| 99 | cfg.Appearance.SansFont = strings.TrimSpace(data["sans_font"]) | 99 | cfg.Appearance.SansFont = strings.TrimSpace(data["sans_font"]) | ||
| 100 | cfg.Appearance.SerifFont = strings.TrimSpace(data["serif_font"]) | 100 | cfg.Appearance.SerifFont = strings.TrimSpace(data["serif_font"]) | ||
| 101 | cfg.Appearance.MonospaceFont = strings.TrimSpace(data["monospace_font"]) | 101 | cfg.Appearance.MonospaceFont = strings.TrimSpace(data["monospace_font"]) | ||
| 102 | + | cfg.Appearance.GtkFont = strings.TrimSpace(data["gtk_font"]) | |||
| 102 | cfg.Appearance.DefaultFontSize = fontSize | 103 | cfg.Appearance.DefaultFontSize = fontSize | ||
| 103 | cfg.Appearance.ColorScheme = strings.TrimSpace(data["color_scheme"]) | 104 | cfg.Appearance.ColorScheme = strings.TrimSpace(data["color_scheme"]) | ||
| 104 | cfg.Appearance.LightPalette = paletteFromForm(data, "light") | 105 | cfg.Appearance.LightPalette = paletteFromForm(data, "light") | ||
M internal/ui/systemviews/config_templ.go +304 -291
| @@ -189,11 +189,11 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 189 | 189 | return templ_7745c5c3_Err | |
| 190 | 190 | } | |
| 191 | 191 | var templ_7745c5c3_Var8 string | |
| 192 | - | templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.SansFont) | |
| 192 | + | templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.SansFont) | |
| 193 | 193 | if templ_7745c5c3_Err != nil { | |
| 194 | 194 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 31, Col: 101} | |
| 195 | 195 | } | |
| 196 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) | |
| 196 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8) | |
| 197 | 197 | if templ_7745c5c3_Err != nil { | |
| 198 | 198 | return templ_7745c5c3_Err | |
| 199 | 199 | } | |
| @@ -202,11 +202,11 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 202 | 202 | return templ_7745c5c3_Err | |
| 203 | 203 | } | |
| 204 | 204 | var templ_7745c5c3_Var9 string | |
| 205 | - | templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.SerifFont) | |
| 205 | + | templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.SerifFont) | |
| 206 | 206 | if templ_7745c5c3_Err != nil { | |
| 207 | 207 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 32, Col: 104} | |
| 208 | 208 | } | |
| 209 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) | |
| 209 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9) | |
| 210 | 210 | if templ_7745c5c3_Err != nil { | |
| 211 | 211 | return templ_7745c5c3_Err | |
| 212 | 212 | } | |
| @@ -215,71 +215,84 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 215 | 215 | return templ_7745c5c3_Err | |
| 216 | 216 | } | |
| 217 | 217 | var templ_7745c5c3_Var10 string | |
| 218 | - | templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.MonospaceFont) | |
| 218 | + | templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.MonospaceFont) | |
| 219 | 219 | if templ_7745c5c3_Err != nil { | |
| 220 | 220 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 33, Col: 116} | |
| 221 | 221 | } | |
| 222 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) | |
| 222 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10) | |
| 223 | 223 | if templ_7745c5c3_Err != nil { | |
| 224 | 224 | return templ_7745c5c3_Err | |
| 225 | 225 | } | |
| 226 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" required></label> <label><span>Default font size</span><input name=\"default_font_size\" type=\"number\" min=\"1\" max=\"72\" value=\"") | |
| 226 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" required></label> <label><span>GTK UI font</span><input name=\"gtk_font\" type=\"text\" value=\"") | |
| 227 | 227 | if templ_7745c5c3_Err != nil { | |
| 228 | 228 | return templ_7745c5c3_Err | |
| 229 | 229 | } | |
| 230 | 230 | var templ_7745c5c3_Var11 string | |
| 231 | - | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Appearance.DefaultFontSize)) | |
| 231 | + | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.GtkFont) | |
| 232 | 232 | if templ_7745c5c3_Err != nil { | |
| 233 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 34, Col: 160} | |
| 233 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 34, Col: 101} | |
| 234 | 234 | } | |
| 235 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) | |
| 235 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) | |
| 236 | 236 | if templ_7745c5c3_Err != nil { | |
| 237 | 237 | return templ_7745c5c3_Err | |
| 238 | 238 | } | |
| 239 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" required></label> <label><span>UI scale</span><input name=\"default_ui_scale\" type=\"number\" min=\"0.5\" max=\"3\" step=\"0.05\" value=\"") | |
| 239 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" required></label> <label><span>Default font size</span><input name=\"default_font_size\" type=\"number\" min=\"1\" max=\"72\" value=\"") | |
| 240 | 240 | if templ_7745c5c3_Err != nil { | |
| 241 | 241 | return templ_7745c5c3_Err | |
| 242 | 242 | } | |
| 243 | 243 | var templ_7745c5c3_Var12 string | |
| 244 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigFloat(config.DefaultUIScale)) | |
| 244 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Appearance.DefaultFontSize)) | |
| 245 | 245 | if templ_7745c5c3_Err != nil { | |
| 246 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 35, Col: 153} | |
| 246 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 35, Col: 160} | |
| 247 | 247 | } | |
| 248 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) | |
| 248 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12) | |
| 249 | 249 | if templ_7745c5c3_Err != nil { | |
| 250 | 250 | return templ_7745c5c3_Err | |
| 251 | 251 | } | |
| 252 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" required></label> <label><span>Color scheme</span><select name=\"color_scheme\"><option value=\"default\"") | |
| 252 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" required></label> <label><span>UI scale</span><input name=\"default_ui_scale\" type=\"number\" min=\"0.5\" max=\"3\" step=\"0.05\" value=\"") | |
| 253 | + | if templ_7745c5c3_Err != nil { | |
| 254 | + | return templ_7745c5c3_Err | |
| 255 | + | } | |
| 256 | + | var templ_7745c5c3_Var13 string | |
| 257 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigFloat(config.DefaultUIScale)) | |
| 258 | + | if templ_7745c5c3_Err != nil { | |
| 259 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 36, Col: 153} | |
| 260 | + | } | |
| 261 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) | |
| 262 | + | if templ_7745c5c3_Err != nil { | |
| 263 | + | return templ_7745c5c3_Err | |
| 264 | + | } | |
| 265 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" required></label> <label><span>Color scheme</span><select name=\"color_scheme\"><option value=\"default\"") | |
| 253 | 266 | if templ_7745c5c3_Err != nil { | |
| 254 | 267 | return templ_7745c5c3_Err | |
| 255 | 268 | } | |
| 256 | 269 | if colorSchemeSelected(config.Appearance.ColorScheme, "default") { | |
| 257 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, " selected") | |
| 270 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, " selected") | |
| 258 | 271 | if templ_7745c5c3_Err != nil { | |
| 259 | 272 | return templ_7745c5c3_Err | |
| 260 | 273 | } | |
| 261 | 274 | } | |
| 262 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, ">System default</option> <option value=\"prefer-light\"") | |
| 275 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, ">System default</option> <option value=\"prefer-light\"") | |
| 263 | 276 | if templ_7745c5c3_Err != nil { | |
| 264 | 277 | return templ_7745c5c3_Err | |
| 265 | 278 | } | |
| 266 | 279 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-light") { | |
| 267 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, " selected") | |
| 280 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " selected") | |
| 268 | 281 | if templ_7745c5c3_Err != nil { | |
| 269 | 282 | return templ_7745c5c3_Err | |
| 270 | 283 | } | |
| 271 | 284 | } | |
| 272 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, ">Prefer light</option> <option value=\"prefer-dark\"") | |
| 285 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, ">Prefer light</option> <option value=\"prefer-dark\"") | |
| 273 | 286 | if templ_7745c5c3_Err != nil { | |
| 274 | 287 | return templ_7745c5c3_Err | |
| 275 | 288 | } | |
| 276 | 289 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-dark") { | |
| 277 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, " selected") | |
| 290 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, " selected") | |
| 278 | 291 | if templ_7745c5c3_Err != nil { | |
| 279 | 292 | return templ_7745c5c3_Err | |
| 280 | 293 | } | |
| 281 | 294 | } | |
| 282 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, ">Prefer dark</option></select></label>") | |
| 295 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, ">Prefer dark</option></select></label>") | |
| 283 | 296 | if templ_7745c5c3_Err != nil { | |
| 284 | 297 | return templ_7745c5c3_Err | |
| 285 | 298 | } | |
| @@ -291,7 +304,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 291 | 304 | if templ_7745c5c3_Err != nil { | |
| 292 | 305 | return templ_7745c5c3_Err | |
| 293 | 306 | } | |
| 294 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<div class=\"sv-button-row sv-form-actions\"><button class=\"sv-button\" type=\"submit\">") | |
| 307 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div class=\"sv-button-row sv-form-actions\"><button class=\"sv-button\" type=\"submit\">") | |
| 295 | 308 | if templ_7745c5c3_Err != nil { | |
| 296 | 309 | return templ_7745c5c3_Err | |
| 297 | 310 | } | |
| @@ -299,7 +312,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 299 | 312 | if templ_7745c5c3_Err != nil { | |
| 300 | 313 | return templ_7745c5c3_Err | |
| 301 | 314 | } | |
| 302 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.appearance.reset\" data-sv-confirm=\"Reset appearance settings to defaults?\">") | |
| 315 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.appearance.reset\" data-sv-confirm=\"Reset appearance settings to defaults?\">") | |
| 303 | 316 | if templ_7745c5c3_Err != nil { | |
| 304 | 317 | return templ_7745c5c3_Err | |
| 305 | 318 | } | |
| @@ -307,7 +320,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||
| 307 | 320 | if templ_7745c5c3_Err != nil { | |
| 308 | 321 | return templ_7745c5c3_Err | |
| 309 | 322 | } | |
| 310 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</button></div></form>") | |
| 323 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</button></div></form>") | |
| 311 | 324 | if templ_7745c5c3_Err != nil { | |
| 312 | 325 | return templ_7745c5c3_Err | |
| 313 | 326 | } | |
| @@ -331,207 +344,207 @@ func PaletteFields(title string, prefix string, palette dto.ColorPalette) templ. | |||
| 331 | 344 | }() | |
| 332 | 345 | } | |
| 333 | 346 | ctx = templ.InitializeContext(ctx) | |
| 334 | - | templ_7745c5c3_Var13 := templ.GetChildren(ctx) | |
| 335 | - | if templ_7745c5c3_Var13 == nil { | |
| 336 | - | templ_7745c5c3_Var13 = templ.NopComponent | |
| 347 | + | templ_7745c5c3_Var14 := templ.GetChildren(ctx) | |
| 348 | + | if templ_7745c5c3_Var14 == nil { | |
| 349 | + | templ_7745c5c3_Var14 = templ.NopComponent | |
| 337 | 350 | } | |
| 338 | 351 | ctx = templ.ClearChildren(ctx) | |
| 339 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<fieldset class=\"sv-fieldset\"><legend>") | |
| 340 | - | if templ_7745c5c3_Err != nil { | |
| 341 | - | return templ_7745c5c3_Err | |
| 342 | - | } | |
| 343 | - | var templ_7745c5c3_Var14 string | |
| 344 | - | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(title) | |
| 345 | - | if templ_7745c5c3_Err != nil { | |
| 346 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 52, Col: 17} | |
| 347 | - | } | |
| 348 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) | |
| 349 | - | if templ_7745c5c3_Err != nil { | |
| 350 | - | return templ_7745c5c3_Err | |
| 351 | - | } | |
| 352 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</legend> <label><span>Background</span><input name=\"") | |
| 352 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<fieldset class=\"sv-fieldset\"><legend>") | |
| 353 | 353 | if templ_7745c5c3_Err != nil { | |
| 354 | 354 | return templ_7745c5c3_Err | |
| 355 | 355 | } | |
| 356 | 356 | var templ_7745c5c3_Var15 string | |
| 357 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_background") | |
| 357 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(title) | |
| 358 | 358 | if templ_7745c5c3_Err != nil { | |
| 359 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 68} | |
| 359 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 17} | |
| 360 | 360 | } | |
| 361 | 361 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | |
| 362 | 362 | if templ_7745c5c3_Err != nil { | |
| 363 | 363 | return templ_7745c5c3_Err | |
| 364 | 364 | } | |
| 365 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" type=\"text\" value=\"") | |
| 365 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</legend> <label><span>Background</span><input name=\"") | |
| 366 | 366 | if templ_7745c5c3_Err != nil { | |
| 367 | 367 | return templ_7745c5c3_Err | |
| 368 | 368 | } | |
| 369 | 369 | var templ_7745c5c3_Var16 string | |
| 370 | - | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Background) | |
| 370 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_background") | |
| 371 | 371 | if templ_7745c5c3_Err != nil { | |
| 372 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 109} | |
| 372 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 68} | |
| 373 | 373 | } | |
| 374 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) | |
| 374 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) | |
| 375 | 375 | if templ_7745c5c3_Err != nil { | |
| 376 | 376 | return templ_7745c5c3_Err | |
| 377 | 377 | } | |
| 378 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" required></label> <label><span>Surface</span><input name=\"") | |
| 378 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" type=\"text\" value=\"") | |
| 379 | 379 | if templ_7745c5c3_Err != nil { | |
| 380 | 380 | return templ_7745c5c3_Err | |
| 381 | 381 | } | |
| 382 | 382 | var templ_7745c5c3_Var17 string | |
| 383 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_surface") | |
| 383 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Background) | |
| 384 | 384 | if templ_7745c5c3_Err != nil { | |
| 385 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 62} | |
| 385 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 109} | |
| 386 | 386 | } | |
| 387 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) | |
| 387 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) | |
| 388 | 388 | if templ_7745c5c3_Err != nil { | |
| 389 | 389 | return templ_7745c5c3_Err | |
| 390 | 390 | } | |
| 391 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" type=\"text\" value=\"") | |
| 391 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" required></label> <label><span>Surface</span><input name=\"") | |
| 392 | 392 | if templ_7745c5c3_Err != nil { | |
| 393 | 393 | return templ_7745c5c3_Err | |
| 394 | 394 | } | |
| 395 | 395 | var templ_7745c5c3_Var18 string | |
| 396 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Surface) | |
| 396 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_surface") | |
| 397 | 397 | if templ_7745c5c3_Err != nil { | |
| 398 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 100} | |
| 398 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 62} | |
| 399 | 399 | } | |
| 400 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | |
| 400 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) | |
| 401 | 401 | if templ_7745c5c3_Err != nil { | |
| 402 | 402 | return templ_7745c5c3_Err | |
| 403 | 403 | } | |
| 404 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" required></label> <label><span>Surface variant</span><input name=\"") | |
| 404 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" type=\"text\" value=\"") | |
| 405 | 405 | if templ_7745c5c3_Err != nil { | |
| 406 | 406 | return templ_7745c5c3_Err | |
| 407 | 407 | } | |
| 408 | 408 | var templ_7745c5c3_Var19 string | |
| 409 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_surface_variant") | |
| 409 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Surface) | |
| 410 | 410 | if templ_7745c5c3_Err != nil { | |
| 411 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 78} | |
| 411 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 100} | |
| 412 | 412 | } | |
| 413 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | |
| 413 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) | |
| 414 | 414 | if templ_7745c5c3_Err != nil { | |
| 415 | 415 | return templ_7745c5c3_Err | |
| 416 | 416 | } | |
| 417 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" type=\"text\" value=\"") | |
| 417 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" required></label> <label><span>Surface variant</span><input name=\"") | |
| 418 | 418 | if templ_7745c5c3_Err != nil { | |
| 419 | 419 | return templ_7745c5c3_Err | |
| 420 | 420 | } | |
| 421 | 421 | var templ_7745c5c3_Var20 string | |
| 422 | - | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(palette.SurfaceVariant) | |
| 422 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_surface_variant") | |
| 423 | 423 | if templ_7745c5c3_Err != nil { | |
| 424 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 123} | |
| 424 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 78} | |
| 425 | 425 | } | |
| 426 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | |
| 426 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20) | |
| 427 | 427 | if templ_7745c5c3_Err != nil { | |
| 428 | 428 | return templ_7745c5c3_Err | |
| 429 | 429 | } | |
| 430 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" required></label> <label><span>Text</span><input name=\"") | |
| 430 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" type=\"text\" value=\"") | |
| 431 | 431 | if templ_7745c5c3_Err != nil { | |
| 432 | 432 | return templ_7745c5c3_Err | |
| 433 | 433 | } | |
| 434 | 434 | var templ_7745c5c3_Var21 string | |
| 435 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_text") | |
| 435 | + | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.SurfaceVariant) | |
| 436 | 436 | if templ_7745c5c3_Err != nil { | |
| 437 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 56} | |
| 437 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 123} | |
| 438 | 438 | } | |
| 439 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) | |
| 439 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21) | |
| 440 | 440 | if templ_7745c5c3_Err != nil { | |
| 441 | 441 | return templ_7745c5c3_Err | |
| 442 | 442 | } | |
| 443 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" type=\"text\" value=\"") | |
| 443 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" required></label> <label><span>Text</span><input name=\"") | |
| 444 | 444 | if templ_7745c5c3_Err != nil { | |
| 445 | 445 | return templ_7745c5c3_Err | |
| 446 | 446 | } | |
| 447 | 447 | var templ_7745c5c3_Var22 string | |
| 448 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Text) | |
| 448 | + | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_text") | |
| 449 | 449 | if templ_7745c5c3_Err != nil { | |
| 450 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 91} | |
| 450 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 56} | |
| 451 | 451 | } | |
| 452 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | |
| 452 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22) | |
| 453 | 453 | if templ_7745c5c3_Err != nil { | |
| 454 | 454 | return templ_7745c5c3_Err | |
| 455 | 455 | } | |
| 456 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" required></label> <label><span>Muted</span><input name=\"") | |
| 456 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" type=\"text\" value=\"") | |
| 457 | 457 | if templ_7745c5c3_Err != nil { | |
| 458 | 458 | return templ_7745c5c3_Err | |
| 459 | 459 | } | |
| 460 | 460 | var templ_7745c5c3_Var23 string | |
| 461 | - | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_muted") | |
| 461 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Text) | |
| 462 | 462 | if templ_7745c5c3_Err != nil { | |
| 463 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 58} | |
| 463 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 91} | |
| 464 | 464 | } | |
| 465 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | |
| 465 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23) | |
| 466 | 466 | if templ_7745c5c3_Err != nil { | |
| 467 | 467 | return templ_7745c5c3_Err | |
| 468 | 468 | } | |
| 469 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" type=\"text\" value=\"") | |
| 469 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" required></label> <label><span>Muted</span><input name=\"") | |
| 470 | 470 | if templ_7745c5c3_Err != nil { | |
| 471 | 471 | return templ_7745c5c3_Err | |
| 472 | 472 | } | |
| 473 | 473 | var templ_7745c5c3_Var24 string | |
| 474 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Muted) | |
| 474 | + | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_muted") | |
| 475 | 475 | if templ_7745c5c3_Err != nil { | |
| 476 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 94} | |
| 476 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 58} | |
| 477 | 477 | } | |
| 478 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) | |
| 478 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24) | |
| 479 | 479 | if templ_7745c5c3_Err != nil { | |
| 480 | 480 | return templ_7745c5c3_Err | |
| 481 | 481 | } | |
| 482 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" required></label> <label><span>Accent</span><input name=\"") | |
| 482 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" type=\"text\" value=\"") | |
| 483 | 483 | if templ_7745c5c3_Err != nil { | |
| 484 | 484 | return templ_7745c5c3_Err | |
| 485 | 485 | } | |
| 486 | 486 | var templ_7745c5c3_Var25 string | |
| 487 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_accent") | |
| 487 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Muted) | |
| 488 | 488 | if templ_7745c5c3_Err != nil { | |
| 489 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 60} | |
| 489 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 94} | |
| 490 | 490 | } | |
| 491 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | |
| 491 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25) | |
| 492 | 492 | if templ_7745c5c3_Err != nil { | |
| 493 | 493 | return templ_7745c5c3_Err | |
| 494 | 494 | } | |
| 495 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" type=\"text\" value=\"") | |
| 495 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" required></label> <label><span>Accent</span><input name=\"") | |
| 496 | 496 | if templ_7745c5c3_Err != nil { | |
| 497 | 497 | return templ_7745c5c3_Err | |
| 498 | 498 | } | |
| 499 | 499 | var templ_7745c5c3_Var26 string | |
| 500 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Accent) | |
| 500 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_accent") | |
| 501 | 501 | if templ_7745c5c3_Err != nil { | |
| 502 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 97} | |
| 502 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 60} | |
| 503 | 503 | } | |
| 504 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | |
| 504 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26) | |
| 505 | 505 | if templ_7745c5c3_Err != nil { | |
| 506 | 506 | return templ_7745c5c3_Err | |
| 507 | 507 | } | |
| 508 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" required></label> <label><span>Border</span><input name=\"") | |
| 508 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" type=\"text\" value=\"") | |
| 509 | 509 | if templ_7745c5c3_Err != nil { | |
| 510 | 510 | return templ_7745c5c3_Err | |
| 511 | 511 | } | |
| 512 | 512 | var templ_7745c5c3_Var27 string | |
| 513 | - | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_border") | |
| 513 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Accent) | |
| 514 | 514 | if templ_7745c5c3_Err != nil { | |
| 515 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 60} | |
| 515 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 97} | |
| 516 | 516 | } | |
| 517 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | |
| 517 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27) | |
| 518 | 518 | if templ_7745c5c3_Err != nil { | |
| 519 | 519 | return templ_7745c5c3_Err | |
| 520 | 520 | } | |
| 521 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" type=\"text\" value=\"") | |
| 521 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" required></label> <label><span>Border</span><input name=\"") | |
| 522 | 522 | if templ_7745c5c3_Err != nil { | |
| 523 | 523 | return templ_7745c5c3_Err | |
| 524 | 524 | } | |
| 525 | 525 | var templ_7745c5c3_Var28 string | |
| 526 | - | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Border) | |
| 526 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_border") | |
| 527 | 527 | if templ_7745c5c3_Err != nil { | |
| 528 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 97} | |
| 528 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 60, Col: 60} | |
| 529 | + | } | |
| 530 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28) | |
| 531 | + | if templ_7745c5c3_Err != nil { | |
| 532 | + | return templ_7745c5c3_Err | |
| 533 | + | } | |
| 534 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" type=\"text\" value=\"") | |
| 535 | + | if templ_7745c5c3_Err != nil { | |
| 536 | + | return templ_7745c5c3_Err | |
| 537 | + | } | |
| 538 | + | var templ_7745c5c3_Var29 string | |
| 539 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Border) | |
| 540 | + | if templ_7745c5c3_Err != nil { | |
| 541 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 60, Col: 97} | |
| 529 | 542 | } | |
| 530 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | |
| 543 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29) | |
| 531 | 544 | if templ_7745c5c3_Err != nil { | |
| 532 | 545 | return templ_7745c5c3_Err | |
| 533 | 546 | } | |
| 534 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" required></label></fieldset>") | |
| 547 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\" required></label></fieldset>") | |
| 535 | 548 | if templ_7745c5c3_Err != nil { | |
| 536 | 549 | return templ_7745c5c3_Err | |
| 537 | 550 | } | |
| @@ -555,25 +568,25 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 555 | 568 | }() | |
| 556 | 569 | } | |
| 557 | 570 | ctx = templ.InitializeContext(ctx) | |
| 558 | - | templ_7745c5c3_Var29 := templ.GetChildren(ctx) | |
| 559 | - | if templ_7745c5c3_Var29 == nil { | |
| 560 | - | templ_7745c5c3_Var29 = templ.NopComponent | |
| 571 | + | templ_7745c5c3_Var30 := templ.GetChildren(ctx) | |
| 572 | + | if templ_7745c5c3_Var30 == nil { | |
| 573 | + | templ_7745c5c3_Var30 = templ.NopComponent | |
| 561 | 574 | } | |
| 562 | 575 | ctx = templ.ClearChildren(ctx) | |
| 563 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<form class=\"sv-card-form\" data-sv-action=\"config.search.save\"><label><span>Default search engine</span><input name=\"default_search_engine\" type=\"text\" value=\"") | |
| 576 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<form class=\"sv-card-form\" data-sv-action=\"config.search.save\"><label><span>Default search engine</span><input name=\"default_search_engine\" type=\"text\" value=\"") | |
| 564 | 577 | if templ_7745c5c3_Err != nil { | |
| 565 | 578 | return templ_7745c5c3_Err | |
| 566 | 579 | } | |
| 567 | - | var templ_7745c5c3_Var30 string | |
| 568 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(config.DefaultSearchEngine) | |
| 580 | + | var templ_7745c5c3_Var31 string | |
| 581 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.DefaultSearchEngine) | |
| 569 | 582 | if templ_7745c5c3_Err != nil { | |
| 570 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 65, Col: 125} | |
| 583 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 66, Col: 125} | |
| 571 | 584 | } | |
| 572 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | |
| 585 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31) | |
| 573 | 586 | if templ_7745c5c3_Err != nil { | |
| 574 | 587 | return templ_7745c5c3_Err | |
| 575 | 588 | } | |
| 576 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" placeholder=\"https://duckduckgo.com/?q=%s\" required></label> <button class=\"sv-button\" type=\"submit\">") | |
| 589 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" placeholder=\"https://duckduckgo.com/?q=%s\" required></label> <button class=\"sv-button\" type=\"submit\">") | |
| 577 | 590 | if templ_7745c5c3_Err != nil { | |
| 578 | 591 | return templ_7745c5c3_Err | |
| 579 | 592 | } | |
| @@ -581,7 +594,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 581 | 594 | if templ_7745c5c3_Err != nil { | |
| 582 | 595 | return templ_7745c5c3_Err | |
| 583 | 596 | } | |
| 584 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</button></form><div class=\"sv-group\"><div class=\"sv-group-header\"><h4>Search shortcuts</h4></div><p class=\"sv-meta\">Shortcut URLs must include the %s placeholder for the search query.</p><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.create\"><label><span>Key</span><input name=\"key\" type=\"text\" placeholder=\"ddg\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" placeholder=\"https://duckduckgo.com/?q=%s\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" placeholder=\"DuckDuckGo\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 597 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></form><div class=\"sv-group\"><div class=\"sv-group-header\"><h4>Search shortcuts</h4></div><p class=\"sv-meta\">Shortcut URLs must include the %s placeholder for the search query.</p><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.create\"><label><span>Key</span><input name=\"key\" type=\"text\" placeholder=\"ddg\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" placeholder=\"https://duckduckgo.com/?q=%s\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" placeholder=\"DuckDuckGo\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 585 | 598 | if templ_7745c5c3_Err != nil { | |
| 586 | 599 | return templ_7745c5c3_Err | |
| 587 | 600 | } | |
| @@ -589,7 +602,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 589 | 602 | if templ_7745c5c3_Err != nil { | |
| 590 | 603 | return templ_7745c5c3_Err | |
| 591 | 604 | } | |
| 592 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></form>") | |
| 605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</button></form>") | |
| 593 | 606 | if templ_7745c5c3_Err != nil { | |
| 594 | 607 | return templ_7745c5c3_Err | |
| 595 | 608 | } | |
| @@ -600,7 +613,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 600 | 613 | return templ_7745c5c3_Err | |
| 601 | 614 | } | |
| 602 | 615 | } else { | |
| 603 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<ul class=\"sv-list\">") | |
| 616 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<ul class=\"sv-list\">") | |
| 604 | 617 | if templ_7745c5c3_Err != nil { | |
| 605 | 618 | return templ_7745c5c3_Err | |
| 606 | 619 | } | |
| @@ -610,12 +623,12 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 610 | 623 | return templ_7745c5c3_Err | |
| 611 | 624 | } | |
| 612 | 625 | } | |
| 613 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</ul>") | |
| 626 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</ul>") | |
| 614 | 627 | if templ_7745c5c3_Err != nil { | |
| 615 | 628 | return templ_7745c5c3_Err | |
| 616 | 629 | } | |
| 617 | 630 | } | |
| 618 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</div>") | |
| 631 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "</div>") | |
| 619 | 632 | if templ_7745c5c3_Err != nil { | |
| 620 | 633 | return templ_7745c5c3_Err | |
| 621 | 634 | } | |
| @@ -639,64 +652,64 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||
| 639 | 652 | }() | |
| 640 | 653 | } | |
| 641 | 654 | ctx = templ.InitializeContext(ctx) | |
| 642 | - | templ_7745c5c3_Var31 := templ.GetChildren(ctx) | |
| 643 | - | if templ_7745c5c3_Var31 == nil { | |
| 644 | - | templ_7745c5c3_Var31 = templ.NopComponent | |
| 655 | + | templ_7745c5c3_Var32 := templ.GetChildren(ctx) | |
| 656 | + | if templ_7745c5c3_Var32 == nil { | |
| 657 | + | templ_7745c5c3_Var32 = templ.NopComponent | |
| 645 | 658 | } | |
| 646 | 659 | ctx = templ.ClearChildren(ctx) | |
| 647 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<li class=\"sv-list-row\"><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.update\"><input type=\"hidden\" name=\"key\" value=\"") | |
| 660 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<li class=\"sv-list-row\"><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.update\"><input type=\"hidden\" name=\"key\" value=\"") | |
| 648 | 661 | if templ_7745c5c3_Err != nil { | |
| 649 | 662 | return templ_7745c5c3_Err | |
| 650 | 663 | } | |
| 651 | - | var templ_7745c5c3_Var32 string | |
| 652 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | |
| 664 | + | var templ_7745c5c3_Var33 string | |
| 665 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) | |
| 653 | 666 | if templ_7745c5c3_Err != nil { | |
| 654 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 93, Col: 55} | |
| 667 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 94, Col: 55} | |
| 655 | 668 | } | |
| 656 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) | |
| 669 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) | |
| 657 | 670 | if templ_7745c5c3_Err != nil { | |
| 658 | 671 | return templ_7745c5c3_Err | |
| 659 | 672 | } | |
| 660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\"> <label><span>Key</span><input name=\"new_key\" type=\"text\" value=\"") | |
| 673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\"> <label><span>Key</span><input name=\"new_key\" type=\"text\" value=\"") | |
| 661 | 674 | if templ_7745c5c3_Err != nil { | |
| 662 | 675 | return templ_7745c5c3_Err | |
| 663 | 676 | } | |
| 664 | - | var templ_7745c5c3_Var33 string | |
| 665 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | |
| 677 | + | var templ_7745c5c3_Var34 string | |
| 678 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) | |
| 666 | 679 | if templ_7745c5c3_Err != nil { | |
| 667 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 94, Col: 80} | |
| 680 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 95, Col: 80} | |
| 668 | 681 | } | |
| 669 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | |
| 682 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34) | |
| 670 | 683 | if templ_7745c5c3_Err != nil { | |
| 671 | 684 | return templ_7745c5c3_Err | |
| 672 | 685 | } | |
| 673 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" value=\"") | |
| 686 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" value=\"") | |
| 674 | 687 | if templ_7745c5c3_Err != nil { | |
| 675 | 688 | return templ_7745c5c3_Err | |
| 676 | 689 | } | |
| 677 | - | var templ_7745c5c3_Var34 string | |
| 678 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.URL) | |
| 690 | + | var templ_7745c5c3_Var35 string | |
| 691 | + | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.URL) | |
| 679 | 692 | if templ_7745c5c3_Err != nil { | |
| 680 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 95, Col: 76} | |
| 693 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 96, Col: 76} | |
| 681 | 694 | } | |
| 682 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | |
| 695 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) | |
| 683 | 696 | if templ_7745c5c3_Err != nil { | |
| 684 | 697 | return templ_7745c5c3_Err | |
| 685 | 698 | } | |
| 686 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" value=\"") | |
| 699 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" value=\"") | |
| 687 | 700 | if templ_7745c5c3_Err != nil { | |
| 688 | 701 | return templ_7745c5c3_Err | |
| 689 | 702 | } | |
| 690 | - | var templ_7745c5c3_Var35 string | |
| 691 | - | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Description) | |
| 703 | + | var templ_7745c5c3_Var36 string | |
| 704 | + | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Description) | |
| 692 | 705 | if templ_7745c5c3_Err != nil { | |
| 693 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 96, Col: 100} | |
| 706 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 97, Col: 100} | |
| 694 | 707 | } | |
| 695 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) | |
| 708 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36) | |
| 696 | 709 | if templ_7745c5c3_Err != nil { | |
| 697 | 710 | return templ_7745c5c3_Err | |
| 698 | 711 | } | |
| 699 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 712 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 700 | 713 | if templ_7745c5c3_Err != nil { | |
| 701 | 714 | return templ_7745c5c3_Err | |
| 702 | 715 | } | |
| @@ -704,33 +717,33 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||
| 704 | 717 | if templ_7745c5c3_Err != nil { | |
| 705 | 718 | return templ_7745c5c3_Err | |
| 706 | 719 | } | |
| 707 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</button> <button class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" type=\"button\" data-sv-action=\"config.searchShortcut.delete\" data-key=\"") | |
| 720 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</button> <button class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" type=\"button\" data-sv-action=\"config.searchShortcut.delete\" data-key=\"") | |
| 708 | 721 | if templ_7745c5c3_Err != nil { | |
| 709 | 722 | return templ_7745c5c3_Err | |
| 710 | 723 | } | |
| 711 | - | var templ_7745c5c3_Var36 string | |
| 712 | - | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | |
| 724 | + | var templ_7745c5c3_Var37 string | |
| 725 | + | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) | |
| 713 | 726 | if templ_7745c5c3_Err != nil { | |
| 714 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 98, Col: 169} | |
| 727 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 99, Col: 169} | |
| 715 | 728 | } | |
| 716 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) | |
| 729 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37) | |
| 717 | 730 | if templ_7745c5c3_Err != nil { | |
| 718 | 731 | return templ_7745c5c3_Err | |
| 719 | 732 | } | |
| 720 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\" data-sv-confirm=\"Delete this search shortcut?\" aria-label=\"") | |
| 733 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" data-sv-confirm=\"Delete this search shortcut?\" aria-label=\"") | |
| 721 | 734 | if templ_7745c5c3_Err != nil { | |
| 722 | 735 | return templ_7745c5c3_Err | |
| 723 | 736 | } | |
| 724 | - | var templ_7745c5c3_Var37 string | |
| 725 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs("Delete search shortcut " + shortcut.Key) | |
| 737 | + | var templ_7745c5c3_Var38 string | |
| 738 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue("Delete search shortcut " + shortcut.Key) | |
| 726 | 739 | if templ_7745c5c3_Err != nil { | |
| 727 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 98, Col: 272} | |
| 740 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 99, Col: 272} | |
| 728 | 741 | } | |
| 729 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | |
| 742 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38) | |
| 730 | 743 | if templ_7745c5c3_Err != nil { | |
| 731 | 744 | return templ_7745c5c3_Err | |
| 732 | 745 | } | |
| 733 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\">") | |
| 746 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\">") | |
| 734 | 747 | if templ_7745c5c3_Err != nil { | |
| 735 | 748 | return templ_7745c5c3_Err | |
| 736 | 749 | } | |
| @@ -738,7 +751,7 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||
| 738 | 751 | if templ_7745c5c3_Err != nil { | |
| 739 | 752 | return templ_7745c5c3_Err | |
| 740 | 753 | } | |
| 741 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</button></form></li>") | |
| 754 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</button></form></li>") | |
| 742 | 755 | if templ_7745c5c3_Err != nil { | |
| 743 | 756 | return templ_7745c5c3_Err | |
| 744 | 757 | } | |
| @@ -762,178 +775,178 @@ func PerformanceSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 762 | 775 | }() | |
| 763 | 776 | } | |
| 764 | 777 | ctx = templ.InitializeContext(ctx) | |
| 765 | - | templ_7745c5c3_Var38 := templ.GetChildren(ctx) | |
| 766 | - | if templ_7745c5c3_Var38 == nil { | |
| 767 | - | templ_7745c5c3_Var38 = templ.NopComponent | |
| 778 | + | templ_7745c5c3_Var39 := templ.GetChildren(ctx) | |
| 779 | + | if templ_7745c5c3_Var39 == nil { | |
| 780 | + | templ_7745c5c3_Var39 = templ.NopComponent | |
| 768 | 781 | } | |
| 769 | 782 | ctx = templ.ClearChildren(ctx) | |
| 770 | 783 | customProfile := performanceProfileSelected(config.Performance.Profile, "custom") | |
| 771 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<form class=\"sv-card-form sv-config-form\" data-sv-action=\"config.performance.save\" data-sv-performance-form><label><span>Profile</span><select name=\"profile\" data-sv-performance-profile><option value=\"default\"") | |
| 784 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<form class=\"sv-card-form sv-config-form\" data-sv-action=\"config.performance.save\" data-sv-performance-form><label><span>Profile</span><select name=\"profile\" data-sv-performance-profile><option value=\"default\"") | |
| 772 | 785 | if templ_7745c5c3_Err != nil { | |
| 773 | 786 | return templ_7745c5c3_Err | |
| 774 | 787 | } | |
| 775 | 788 | if performanceProfileSelected(config.Performance.Profile, "default") { | |
| 776 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, " selected") | |
| 789 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, " selected") | |
| 777 | 790 | if templ_7745c5c3_Err != nil { | |
| 778 | 791 | return templ_7745c5c3_Err | |
| 779 | 792 | } | |
| 780 | 793 | } | |
| 781 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, ">Default</option> <option value=\"balanced\"") | |
| 794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, ">Default</option> <option value=\"balanced\"") | |
| 782 | 795 | if templ_7745c5c3_Err != nil { | |
| 783 | 796 | return templ_7745c5c3_Err | |
| 784 | 797 | } | |
| 785 | 798 | if performanceProfileSelected(config.Performance.Profile, "balanced") { | |
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, " selected") | |
| 799 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, " selected") | |
| 787 | 800 | if templ_7745c5c3_Err != nil { | |
| 788 | 801 | return templ_7745c5c3_Err | |
| 789 | 802 | } | |
| 790 | 803 | } | |
| 791 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, ">Balanced</option> <option value=\"lite\"") | |
| 804 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, ">Balanced</option> <option value=\"lite\"") | |
| 792 | 805 | if templ_7745c5c3_Err != nil { | |
| 793 | 806 | return templ_7745c5c3_Err | |
| 794 | 807 | } | |
| 795 | 808 | if performanceProfileSelected(config.Performance.Profile, "lite") { | |
| 796 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, " selected") | |
| 809 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, " selected") | |
| 797 | 810 | if templ_7745c5c3_Err != nil { | |
| 798 | 811 | return templ_7745c5c3_Err | |
| 799 | 812 | } | |
| 800 | 813 | } | |
| 801 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, ">Lite</option> <option value=\"max\"") | |
| 814 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, ">Lite</option> <option value=\"max\"") | |
| 802 | 815 | if templ_7745c5c3_Err != nil { | |
| 803 | 816 | return templ_7745c5c3_Err | |
| 804 | 817 | } | |
| 805 | 818 | if performanceProfileSelected(config.Performance.Profile, "max") { | |
| 806 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, " selected") | |
| 819 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, " selected") | |
| 807 | 820 | if templ_7745c5c3_Err != nil { | |
| 808 | 821 | return templ_7745c5c3_Err | |
| 809 | 822 | } | |
| 810 | 823 | } | |
| 811 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, ">Max</option> <option value=\"custom\"") | |
| 824 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, ">Max</option> <option value=\"custom\"") | |
| 812 | 825 | if templ_7745c5c3_Err != nil { | |
| 813 | 826 | return templ_7745c5c3_Err | |
| 814 | 827 | } | |
| 815 | 828 | if performanceProfileSelected(config.Performance.Profile, "custom") { | |
| 816 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, " selected") | |
| 829 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, " selected") | |
| 817 | 830 | if templ_7745c5c3_Err != nil { | |
| 818 | 831 | return templ_7745c5c3_Err | |
| 819 | 832 | } | |
| 820 | 833 | } | |
| 821 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, ">Custom</option></select></label><p class=\"sv-meta\">Choose Custom to edit individual performance values.</p><label><span>Skia CPU threads</span><input name=\"skia_cpu_threads\" type=\"number\" min=\"0\" max=\"8\" value=\"") | |
| 834 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, ">Custom</option></select></label><p class=\"sv-meta\">Choose Custom to edit individual performance values.</p><label><span>Skia CPU threads</span><input name=\"skia_cpu_threads\" type=\"number\" min=\"0\" max=\"8\" value=\"") | |
| 822 | 835 | if templ_7745c5c3_Err != nil { | |
| 823 | 836 | return templ_7745c5c3_Err | |
| 824 | 837 | } | |
| 825 | - | var templ_7745c5c3_Var39 string | |
| 826 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.SkiaCPUThreads)) | |
| 838 | + | var templ_7745c5c3_Var40 string | |
| 839 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.SkiaCPUThreads)) | |
| 827 | 840 | if templ_7745c5c3_Err != nil { | |
| 828 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 114, Col: 164} | |
| 841 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 115, Col: 164} | |
| 829 | 842 | } | |
| 830 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | |
| 843 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var40) | |
| 831 | 844 | if templ_7745c5c3_Err != nil { | |
| 832 | 845 | return templ_7745c5c3_Err | |
| 833 | 846 | } | |
| 834 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\"") | |
| 847 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "\"") | |
| 835 | 848 | if templ_7745c5c3_Err != nil { | |
| 836 | 849 | return templ_7745c5c3_Err | |
| 837 | 850 | } | |
| 838 | 851 | if !customProfile { | |
| 839 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " disabled") | |
| 852 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, " disabled") | |
| 840 | 853 | if templ_7745c5c3_Err != nil { | |
| 841 | 854 | return templ_7745c5c3_Err | |
| 842 | 855 | } | |
| 843 | 856 | } | |
| 844 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, " data-sv-performance-custom></label> <label><span>Skia GPU threads</span><input name=\"skia_gpu_threads\" type=\"number\" min=\"-1\" max=\"8\" value=\"") | |
| 857 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, " data-sv-performance-custom></label> <label><span>Skia GPU threads</span><input name=\"skia_gpu_threads\" type=\"number\" min=\"-1\" max=\"8\" value=\"") | |
| 845 | 858 | if templ_7745c5c3_Err != nil { | |
| 846 | 859 | return templ_7745c5c3_Err | |
| 847 | 860 | } | |
| 848 | - | var templ_7745c5c3_Var40 string | |
| 849 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.SkiaGPUThreads)) | |
| 861 | + | var templ_7745c5c3_Var41 string | |
| 862 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.SkiaGPUThreads)) | |
| 850 | 863 | if templ_7745c5c3_Err != nil { | |
| 851 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 115, Col: 165} | |
| 864 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 116, Col: 165} | |
| 852 | 865 | } | |
| 853 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | |
| 866 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var41) | |
| 854 | 867 | if templ_7745c5c3_Err != nil { | |
| 855 | 868 | return templ_7745c5c3_Err | |
| 856 | 869 | } | |
| 857 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\"") | |
| 870 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\"") | |
| 858 | 871 | if templ_7745c5c3_Err != nil { | |
| 859 | 872 | return templ_7745c5c3_Err | |
| 860 | 873 | } | |
| 861 | 874 | if !customProfile { | |
| 862 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " disabled") | |
| 875 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " disabled") | |
| 863 | 876 | if templ_7745c5c3_Err != nil { | |
| 864 | 877 | return templ_7745c5c3_Err | |
| 865 | 878 | } | |
| 866 | 879 | } | |
| 867 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " data-sv-performance-custom></label> <label><span>Web process memory MB</span><input name=\"web_process_memory_mb\" type=\"number\" min=\"0\" max=\"16384\" value=\"") | |
| 880 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " data-sv-performance-custom></label> <label><span>Web process memory MB</span><input name=\"web_process_memory_mb\" type=\"number\" min=\"0\" max=\"16384\" value=\"") | |
| 868 | 881 | if templ_7745c5c3_Err != nil { | |
| 869 | 882 | return templ_7745c5c3_Err | |
| 870 | 883 | } | |
| 871 | - | var templ_7745c5c3_Var41 string | |
| 872 | - | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.WebProcessMemoryMB)) | |
| 884 | + | var templ_7745c5c3_Var42 string | |
| 885 | + | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.WebProcessMemoryMB)) | |
| 873 | 886 | if templ_7745c5c3_Err != nil { | |
| 874 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 116, Col: 182} | |
| 887 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 117, Col: 182} | |
| 875 | 888 | } | |
| 876 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) | |
| 889 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42) | |
| 877 | 890 | if templ_7745c5c3_Err != nil { | |
| 878 | 891 | return templ_7745c5c3_Err | |
| 879 | 892 | } | |
| 880 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\"") | |
| 893 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"") | |
| 881 | 894 | if templ_7745c5c3_Err != nil { | |
| 882 | 895 | return templ_7745c5c3_Err | |
| 883 | 896 | } | |
| 884 | 897 | if !customProfile { | |
| 885 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " disabled") | |
| 898 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " disabled") | |
| 886 | 899 | if templ_7745c5c3_Err != nil { | |
| 887 | 900 | return templ_7745c5c3_Err | |
| 888 | 901 | } | |
| 889 | 902 | } | |
| 890 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " data-sv-performance-custom></label> <label><span>Network process memory MB</span><input name=\"network_process_memory_mb\" type=\"number\" min=\"0\" max=\"4096\" value=\"") | |
| 903 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, " data-sv-performance-custom></label> <label><span>Network process memory MB</span><input name=\"network_process_memory_mb\" type=\"number\" min=\"0\" max=\"4096\" value=\"") | |
| 891 | 904 | if templ_7745c5c3_Err != nil { | |
| 892 | 905 | return templ_7745c5c3_Err | |
| 893 | 906 | } | |
| 894 | - | var templ_7745c5c3_Var42 string | |
| 895 | - | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.NetworkProcessMemoryMB)) | |
| 907 | + | var templ_7745c5c3_Var43 string | |
| 908 | + | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.NetworkProcessMemoryMB)) | |
| 896 | 909 | if templ_7745c5c3_Err != nil { | |
| 897 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 117, Col: 193} | |
| 910 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 118, Col: 193} | |
| 898 | 911 | } | |
| 899 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | |
| 912 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43) | |
| 900 | 913 | if templ_7745c5c3_Err != nil { | |
| 901 | 914 | return templ_7745c5c3_Err | |
| 902 | 915 | } | |
| 903 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\"") | |
| 916 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\"") | |
| 904 | 917 | if templ_7745c5c3_Err != nil { | |
| 905 | 918 | return templ_7745c5c3_Err | |
| 906 | 919 | } | |
| 907 | 920 | if !customProfile { | |
| 908 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, " disabled") | |
| 921 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " disabled") | |
| 909 | 922 | if templ_7745c5c3_Err != nil { | |
| 910 | 923 | return templ_7745c5c3_Err | |
| 911 | 924 | } | |
| 912 | 925 | } | |
| 913 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " data-sv-performance-custom></label> <label><span>WebView pool prewarm</span><input name=\"webview_pool_prewarm\" type=\"number\" min=\"0\" max=\"20\" value=\"") | |
| 926 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, " data-sv-performance-custom></label> <label><span>WebView pool prewarm</span><input name=\"webview_pool_prewarm\" type=\"number\" min=\"0\" max=\"20\" value=\"") | |
| 914 | 927 | if templ_7745c5c3_Err != nil { | |
| 915 | 928 | return templ_7745c5c3_Err | |
| 916 | 929 | } | |
| 917 | - | var templ_7745c5c3_Var43 string | |
| 918 | - | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.WebViewPoolPrewarm)) | |
| 930 | + | var templ_7745c5c3_Var44 string | |
| 931 | + | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.WebViewPoolPrewarm)) | |
| 919 | 932 | if templ_7745c5c3_Err != nil { | |
| 920 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 118, Col: 177} | |
| 933 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 119, Col: 177} | |
| 921 | 934 | } | |
| 922 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43)) | |
| 935 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44) | |
| 923 | 936 | if templ_7745c5c3_Err != nil { | |
| 924 | 937 | return templ_7745c5c3_Err | |
| 925 | 938 | } | |
| 926 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\"") | |
| 939 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"") | |
| 927 | 940 | if templ_7745c5c3_Err != nil { | |
| 928 | 941 | return templ_7745c5c3_Err | |
| 929 | 942 | } | |
| 930 | 943 | if !customProfile { | |
| 931 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, " disabled") | |
| 944 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " disabled") | |
| 932 | 945 | if templ_7745c5c3_Err != nil { | |
| 933 | 946 | return templ_7745c5c3_Err | |
| 934 | 947 | } | |
| 935 | 948 | } | |
| 936 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " data-sv-performance-custom></label> <button class=\"sv-button\" type=\"submit\">") | |
| 949 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, " data-sv-performance-custom></label> <button class=\"sv-button\" type=\"submit\">") | |
| 937 | 950 | if templ_7745c5c3_Err != nil { | |
| 938 | 951 | return templ_7745c5c3_Err | |
| 939 | 952 | } | |
| @@ -941,69 +954,69 @@ func PerformanceSettings(config dto.SystemviewConfigPayload) templ.Component { | |||
| 941 | 954 | if templ_7745c5c3_Err != nil { | |
| 942 | 955 | return templ_7745c5c3_Err | |
| 943 | 956 | } | |
| 944 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</button></form><div class=\"sv-stat-grid\"><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 957 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</button></form><div class=\"sv-stat-grid\"><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 945 | 958 | if templ_7745c5c3_Err != nil { | |
| 946 | 959 | return templ_7745c5c3_Err | |
| 947 | 960 | } | |
| 948 | - | var templ_7745c5c3_Var44 string | |
| 949 | - | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.CPUThreads)) | |
| 961 | + | var templ_7745c5c3_Var45 string | |
| 962 | + | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.CPUThreads)) | |
| 950 | 963 | if templ_7745c5c3_Err != nil { | |
| 951 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 122, Col: 113} | |
| 964 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 123, Col: 113} | |
| 952 | 965 | } | |
| 953 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44)) | |
| 966 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) | |
| 954 | 967 | if templ_7745c5c3_Err != nil { | |
| 955 | 968 | return templ_7745c5c3_Err | |
| 956 | 969 | } | |
| 957 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</span><span class=\"sv-stat-label\">CPU threads</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 970 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span><span class=\"sv-stat-label\">CPU threads</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 958 | 971 | if templ_7745c5c3_Err != nil { | |
| 959 | 972 | return templ_7745c5c3_Err | |
| 960 | 973 | } | |
| 961 | - | var templ_7745c5c3_Var45 string | |
| 962 | - | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.TotalRAMMB)) | |
| 974 | + | var templ_7745c5c3_Var46 string | |
| 975 | + | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.TotalRAMMB)) | |
| 963 | 976 | if templ_7745c5c3_Err != nil { | |
| 964 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 123, Col: 113} | |
| 977 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 124, Col: 113} | |
| 965 | 978 | } | |
| 966 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) | |
| 979 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | |
| 967 | 980 | if templ_7745c5c3_Err != nil { | |
| 968 | 981 | return templ_7745c5c3_Err | |
| 969 | 982 | } | |
| 970 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span><span class=\"sv-stat-label\">RAM MB</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 983 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span><span class=\"sv-stat-label\">RAM MB</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 971 | 984 | if templ_7745c5c3_Err != nil { | |
| 972 | 985 | return templ_7745c5c3_Err | |
| 973 | 986 | } | |
| 974 | - | var templ_7745c5c3_Var46 string | |
| 975 | - | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(config.Performance.Hardware.GPUName) | |
| 987 | + | var templ_7745c5c3_Var47 string | |
| 988 | + | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(config.Performance.Hardware.GPUName) | |
| 976 | 989 | if templ_7745c5c3_Err != nil { | |
| 977 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 124, Col: 93} | |
| 990 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 125, Col: 93} | |
| 978 | 991 | } | |
| 979 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | |
| 992 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | |
| 980 | 993 | if templ_7745c5c3_Err != nil { | |
| 981 | 994 | return templ_7745c5c3_Err | |
| 982 | 995 | } | |
| 983 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span><span class=\"sv-stat-label\">GPU</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 996 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</span><span class=\"sv-stat-label\">GPU</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | |
| 984 | 997 | if templ_7745c5c3_Err != nil { | |
| 985 | 998 | return templ_7745c5c3_Err | |
| 986 | 999 | } | |
| 987 | - | var templ_7745c5c3_Var47 string | |
| 988 | - | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(config.EngineType) | |
| 1000 | + | var templ_7745c5c3_Var48 string | |
| 1001 | + | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(config.EngineType) | |
| 989 | 1002 | if templ_7745c5c3_Err != nil { | |
| 990 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 125, Col: 75} | |
| 1003 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 126, Col: 75} | |
| 991 | 1004 | } | |
| 992 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | |
| 1005 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) | |
| 993 | 1006 | if templ_7745c5c3_Err != nil { | |
| 994 | 1007 | return templ_7745c5c3_Err | |
| 995 | 1008 | } | |
| 996 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</span><span class=\"sv-stat-label\">Engine</span></div></div>") | |
| 1009 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</span><span class=\"sv-stat-label\">Engine</span></div></div>") | |
| 997 | 1010 | if templ_7745c5c3_Err != nil { | |
| 998 | 1011 | return templ_7745c5c3_Err | |
| 999 | 1012 | } | |
| 1000 | 1013 | if !engineIsWebKit(config.EngineType) { | |
| 1001 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<p class=\"sv-meta\">Performance tuning applies only to the WebKit engine.</p>") | |
| 1014 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<p class=\"sv-meta\">Performance tuning applies only to the WebKit engine.</p>") | |
| 1002 | 1015 | if templ_7745c5c3_Err != nil { | |
| 1003 | 1016 | return templ_7745c5c3_Err | |
| 1004 | 1017 | } | |
| 1005 | 1018 | } else { | |
| 1006 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<p class=\"sv-meta\">Performance profile changes may require restarting the browser to affect existing engine processes.</p>") | |
| 1019 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<p class=\"sv-meta\">Performance profile changes may require restarting the browser to affect existing engine processes.</p>") | |
| 1007 | 1020 | if templ_7745c5c3_Err != nil { | |
| 1008 | 1021 | return templ_7745c5c3_Err | |
| 1009 | 1022 | } | |
| @@ -1028,9 +1041,9 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||
| 1028 | 1041 | }() | |
| 1029 | 1042 | } | |
| 1030 | 1043 | ctx = templ.InitializeContext(ctx) | |
| 1031 | - | templ_7745c5c3_Var48 := templ.GetChildren(ctx) | |
| 1032 | - | if templ_7745c5c3_Var48 == nil { | |
| 1033 | - | templ_7745c5c3_Var48 = templ.NopComponent | |
| 1044 | + | templ_7745c5c3_Var49 := templ.GetChildren(ctx) | |
| 1045 | + | if templ_7745c5c3_Var49 == nil { | |
| 1046 | + | templ_7745c5c3_Var49 = templ.NopComponent | |
| 1034 | 1047 | } | |
| 1035 | 1048 | ctx = templ.ClearChildren(ctx) | |
| 1036 | 1049 | groups := configKeybindingGroups(keybindings) | |
| @@ -1045,7 +1058,7 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||
| 1045 | 1058 | return templ_7745c5c3_Err | |
| 1046 | 1059 | } | |
| 1047 | 1060 | } else { | |
| 1048 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<div class=\"sv-button-row\"><button class=\"sv-button sv-button-secondary sv-button-danger\" type=\"button\" data-sv-action=\"config.keybinding.resetAll\" data-sv-confirm=\"Reset all keybindings to defaults?\">") | |
| 1061 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<div class=\"sv-button-row\"><button class=\"sv-button sv-button-secondary sv-button-danger\" type=\"button\" data-sv-action=\"config.keybinding.resetAll\" data-sv-confirm=\"Reset all keybindings to defaults?\">") | |
| 1049 | 1062 | if templ_7745c5c3_Err != nil { | |
| 1050 | 1063 | return templ_7745c5c3_Err | |
| 1051 | 1064 | } | |
| @@ -1053,7 +1066,7 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||
| 1053 | 1066 | if templ_7745c5c3_Err != nil { | |
| 1054 | 1067 | return templ_7745c5c3_Err | |
| 1055 | 1068 | } | |
| 1056 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</button></div>") | |
| 1069 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "</button></div>") | |
| 1057 | 1070 | if templ_7745c5c3_Err != nil { | |
| 1058 | 1071 | return templ_7745c5c3_Err | |
| 1059 | 1072 | } | |
| @@ -1084,48 +1097,48 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||
| 1084 | 1097 | }() | |
| 1085 | 1098 | } | |
| 1086 | 1099 | ctx = templ.InitializeContext(ctx) | |
| 1087 | - | templ_7745c5c3_Var49 := templ.GetChildren(ctx) | |
| 1088 | - | if templ_7745c5c3_Var49 == nil { | |
| 1089 | - | templ_7745c5c3_Var49 = templ.NopComponent | |
| 1100 | + | templ_7745c5c3_Var50 := templ.GetChildren(ctx) | |
| 1101 | + | if templ_7745c5c3_Var50 == nil { | |
| 1102 | + | templ_7745c5c3_Var50 = templ.NopComponent | |
| 1090 | 1103 | } | |
| 1091 | 1104 | ctx = templ.ClearChildren(ctx) | |
| 1092 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<div class=\"sv-group\"><div class=\"sv-group-header\"><div><h4>") | |
| 1105 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<div class=\"sv-group\"><div class=\"sv-group-header\"><div><h4>") | |
| 1093 | 1106 | if templ_7745c5c3_Err != nil { | |
| 1094 | 1107 | return templ_7745c5c3_Err | |
| 1095 | 1108 | } | |
| 1096 | - | var templ_7745c5c3_Var50 string | |
| 1097 | - | templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupTitle(group)) | |
| 1109 | + | var templ_7745c5c3_Var51 string | |
| 1110 | + | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupTitle(group)) | |
| 1098 | 1111 | if templ_7745c5c3_Err != nil { | |
| 1099 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 154, Col: 37} | |
| 1112 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 155, Col: 37} | |
| 1100 | 1113 | } | |
| 1101 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) | |
| 1114 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | |
| 1102 | 1115 | if templ_7745c5c3_Err != nil { | |
| 1103 | 1116 | return templ_7745c5c3_Err | |
| 1104 | 1117 | } | |
| 1105 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "</h4>") | |
| 1118 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</h4>") | |
| 1106 | 1119 | if templ_7745c5c3_Err != nil { | |
| 1107 | 1120 | return templ_7745c5c3_Err | |
| 1108 | 1121 | } | |
| 1109 | 1122 | if keybindingGroupMeta(group) != "" { | |
| 1110 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<p class=\"sv-meta\">") | |
| 1123 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<p class=\"sv-meta\">") | |
| 1111 | 1124 | if templ_7745c5c3_Err != nil { | |
| 1112 | 1125 | return templ_7745c5c3_Err | |
| 1113 | 1126 | } | |
| 1114 | - | var templ_7745c5c3_Var51 string | |
| 1115 | - | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupMeta(group)) | |
| 1127 | + | var templ_7745c5c3_Var52 string | |
| 1128 | + | templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupMeta(group)) | |
| 1116 | 1129 | if templ_7745c5c3_Err != nil { | |
| 1117 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 156, Col: 52} | |
| 1130 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 157, Col: 52} | |
| 1118 | 1131 | } | |
| 1119 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | |
| 1132 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52)) | |
| 1120 | 1133 | if templ_7745c5c3_Err != nil { | |
| 1121 | 1134 | return templ_7745c5c3_Err | |
| 1122 | 1135 | } | |
| 1123 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</p>") | |
| 1136 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</p>") | |
| 1124 | 1137 | if templ_7745c5c3_Err != nil { | |
| 1125 | 1138 | return templ_7745c5c3_Err | |
| 1126 | 1139 | } | |
| 1127 | 1140 | } | |
| 1128 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</div></div><div class=\"sv-group-body\">") | |
| 1141 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</div></div><div class=\"sv-group-body\">") | |
| 1129 | 1142 | if templ_7745c5c3_Err != nil { | |
| 1130 | 1143 | return templ_7745c5c3_Err | |
| 1131 | 1144 | } | |
| @@ -1135,7 +1148,7 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||
| 1135 | 1148 | return templ_7745c5c3_Err | |
| 1136 | 1149 | } | |
| 1137 | 1150 | } else { | |
| 1138 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<ul class=\"sv-list\">") | |
| 1151 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<ul class=\"sv-list\">") | |
| 1139 | 1152 | if templ_7745c5c3_Err != nil { | |
| 1140 | 1153 | return templ_7745c5c3_Err | |
| 1141 | 1154 | } | |
| @@ -1145,12 +1158,12 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||
| 1145 | 1158 | return templ_7745c5c3_Err | |
| 1146 | 1159 | } | |
| 1147 | 1160 | } | |
| 1148 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "</ul>") | |
| 1161 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</ul>") | |
| 1149 | 1162 | if templ_7745c5c3_Err != nil { | |
| 1150 | 1163 | return templ_7745c5c3_Err | |
| 1151 | 1164 | } | |
| 1152 | 1165 | } | |
| 1153 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</div></div>") | |
| 1166 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</div></div>") | |
| 1154 | 1167 | if templ_7745c5c3_Err != nil { | |
| 1155 | 1168 | return templ_7745c5c3_Err | |
| 1156 | 1169 | } | |
| @@ -1174,38 +1187,38 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||
| 1174 | 1187 | }() | |
| 1175 | 1188 | } | |
| 1176 | 1189 | ctx = templ.InitializeContext(ctx) | |
| 1177 | - | templ_7745c5c3_Var52 := templ.GetChildren(ctx) | |
| 1178 | - | if templ_7745c5c3_Var52 == nil { | |
| 1179 | - | templ_7745c5c3_Var52 = templ.NopComponent | |
| 1190 | + | templ_7745c5c3_Var53 := templ.GetChildren(ctx) | |
| 1191 | + | if templ_7745c5c3_Var53 == nil { | |
| 1192 | + | templ_7745c5c3_Var53 = templ.NopComponent | |
| 1180 | 1193 | } | |
| 1181 | 1194 | ctx = templ.ClearChildren(ctx) | |
| 1182 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<li class=\"sv-list-row\"><div class=\"sv-keybinding-row\"><div><strong>") | |
| 1195 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<li class=\"sv-list-row\"><div class=\"sv-keybinding-row\"><div><strong>") | |
| 1183 | 1196 | if templ_7745c5c3_Err != nil { | |
| 1184 | 1197 | return templ_7745c5c3_Err | |
| 1185 | 1198 | } | |
| 1186 | - | var templ_7745c5c3_Var53 string | |
| 1187 | - | templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingDescription(binding)) | |
| 1199 | + | var templ_7745c5c3_Var54 string | |
| 1200 | + | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingDescription(binding)) | |
| 1188 | 1201 | if templ_7745c5c3_Err != nil { | |
| 1189 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 178, Col: 44} | |
| 1202 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 179, Col: 44} | |
| 1190 | 1203 | } | |
| 1191 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) | |
| 1204 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | |
| 1192 | 1205 | if templ_7745c5c3_Err != nil { | |
| 1193 | 1206 | return templ_7745c5c3_Err | |
| 1194 | 1207 | } | |
| 1195 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</strong><p class=\"sv-meta\">") | |
| 1208 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</strong><p class=\"sv-meta\">") | |
| 1196 | 1209 | if templ_7745c5c3_Err != nil { | |
| 1197 | 1210 | return templ_7745c5c3_Err | |
| 1198 | 1211 | } | |
| 1199 | - | var templ_7745c5c3_Var54 string | |
| 1200 | - | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingAction(binding)) | |
| 1212 | + | var templ_7745c5c3_Var55 string | |
| 1213 | + | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingAction(binding)) | |
| 1201 | 1214 | if templ_7745c5c3_Err != nil { | |
| 1202 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 179, Col: 50} | |
| 1215 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 180, Col: 50} | |
| 1203 | 1216 | } | |
| 1204 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | |
| 1217 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | |
| 1205 | 1218 | if templ_7745c5c3_Err != nil { | |
| 1206 | 1219 | return templ_7745c5c3_Err | |
| 1207 | 1220 | } | |
| 1208 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</p><div class=\"sv-binding-keys\">") | |
| 1221 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "</p><div class=\"sv-binding-keys\">") | |
| 1209 | 1222 | if templ_7745c5c3_Err != nil { | |
| 1210 | 1223 | return templ_7745c5c3_Err | |
| 1211 | 1224 | } | |
| @@ -1213,25 +1226,25 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||
| 1213 | 1226 | if templ_7745c5c3_Err != nil { | |
| 1214 | 1227 | return templ_7745c5c3_Err | |
| 1215 | 1228 | } | |
| 1216 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<span class=\"sv-badge\">") | |
| 1229 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<span class=\"sv-badge\">") | |
| 1217 | 1230 | if templ_7745c5c3_Err != nil { | |
| 1218 | 1231 | return templ_7745c5c3_Err | |
| 1219 | 1232 | } | |
| 1220 | - | var templ_7745c5c3_Var55 string | |
| 1221 | - | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingStatus(binding)) | |
| 1233 | + | var templ_7745c5c3_Var56 string | |
| 1234 | + | templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingStatus(binding)) | |
| 1222 | 1235 | if templ_7745c5c3_Err != nil { | |
| 1223 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 182, Col: 55} | |
| 1236 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 183, Col: 55} | |
| 1224 | 1237 | } | |
| 1225 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | |
| 1238 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) | |
| 1226 | 1239 | if templ_7745c5c3_Err != nil { | |
| 1227 | 1240 | return templ_7745c5c3_Err | |
| 1228 | 1241 | } | |
| 1229 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</span> ") | |
| 1242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</span> ") | |
| 1230 | 1243 | if templ_7745c5c3_Err != nil { | |
| 1231 | 1244 | return templ_7745c5c3_Err | |
| 1232 | 1245 | } | |
| 1233 | 1246 | if keybindingIsCustom(binding) && len(binding.DefaultKeys) > 0 { | |
| 1234 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"sv-meta\">default:</span>") | |
| 1247 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<span class=\"sv-meta\">default:</span>") | |
| 1235 | 1248 | if templ_7745c5c3_Err != nil { | |
| 1236 | 1249 | return templ_7745c5c3_Err | |
| 1237 | 1250 | } | |
| @@ -1240,46 +1253,46 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||
| 1240 | 1253 | return templ_7745c5c3_Err | |
| 1241 | 1254 | } | |
| 1242 | 1255 | } | |
| 1243 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</div></div><form class=\"sv-inline-form\" data-sv-action=\"config.keybinding.set\"><input type=\"hidden\" name=\"mode\" value=\"") | |
| 1256 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</div></div><form class=\"sv-inline-form\" data-sv-action=\"config.keybinding.set\"><input type=\"hidden\" name=\"mode\" value=\"") | |
| 1244 | 1257 | if templ_7745c5c3_Err != nil { | |
| 1245 | 1258 | return templ_7745c5c3_Err | |
| 1246 | 1259 | } | |
| 1247 | - | var templ_7745c5c3_Var56 string | |
| 1248 | - | templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(group.Mode) | |
| 1260 | + | var templ_7745c5c3_Var57 string | |
| 1261 | + | templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Mode) | |
| 1249 | 1262 | if templ_7745c5c3_Err != nil { | |
| 1250 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 190, Col: 55} | |
| 1263 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 191, Col: 55} | |
| 1251 | 1264 | } | |
| 1252 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) | |
| 1265 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var57) | |
| 1253 | 1266 | if templ_7745c5c3_Err != nil { | |
| 1254 | 1267 | return templ_7745c5c3_Err | |
| 1255 | 1268 | } | |
| 1256 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "\"> <input type=\"hidden\" name=\"action\" value=\"") | |
| 1269 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\"> <input type=\"hidden\" name=\"action\" value=\"") | |
| 1257 | 1270 | if templ_7745c5c3_Err != nil { | |
| 1258 | 1271 | return templ_7745c5c3_Err | |
| 1259 | 1272 | } | |
| 1260 | - | var templ_7745c5c3_Var57 string | |
| 1261 | - | templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(binding.Action) | |
| 1273 | + | var templ_7745c5c3_Var58 string | |
| 1274 | + | templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.ResolveAttributeValue(binding.Action) | |
| 1262 | 1275 | if templ_7745c5c3_Err != nil { | |
| 1263 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 191, Col: 61} | |
| 1276 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 192, Col: 61} | |
| 1264 | 1277 | } | |
| 1265 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57)) | |
| 1278 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var58) | |
| 1266 | 1279 | if templ_7745c5c3_Err != nil { | |
| 1267 | 1280 | return templ_7745c5c3_Err | |
| 1268 | 1281 | } | |
| 1269 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\"> <label><span>Keys</span><input name=\"keys\" type=\"text\" value=\"") | |
| 1282 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "\"> <label><span>Keys</span><input name=\"keys\" type=\"text\" value=\"") | |
| 1270 | 1283 | if templ_7745c5c3_Err != nil { | |
| 1271 | 1284 | return templ_7745c5c3_Err | |
| 1272 | 1285 | } | |
| 1273 | - | var templ_7745c5c3_Var58 string | |
| 1274 | - | templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingKeysValue(binding.Keys)) | |
| 1286 | + | var templ_7745c5c3_Var59 string | |
| 1287 | + | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(keybindingKeysValue(binding.Keys)) | |
| 1275 | 1288 | if templ_7745c5c3_Err != nil { | |
| 1276 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 192, Col: 100} | |
| 1289 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 193, Col: 100} | |
| 1277 | 1290 | } | |
| 1278 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58)) | |
| 1291 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var59) | |
| 1279 | 1292 | if templ_7745c5c3_Err != nil { | |
| 1280 | 1293 | return templ_7745c5c3_Err | |
| 1281 | 1294 | } | |
| 1282 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "\" placeholder=\"ctrl+h, ctrl+shift+h\" required></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 1295 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "\" placeholder=\"ctrl+h, ctrl+shift+h\" required></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | |
| 1283 | 1296 | if templ_7745c5c3_Err != nil { | |
| 1284 | 1297 | return templ_7745c5c3_Err | |
| 1285 | 1298 | } | |
| @@ -1287,33 +1300,33 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||
| 1287 | 1300 | if templ_7745c5c3_Err != nil { | |
| 1288 | 1301 | return templ_7745c5c3_Err | |
| 1289 | 1302 | } | |
| 1290 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.keybinding.reset\" data-mode=\"") | |
| 1303 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.keybinding.reset\" data-mode=\"") | |
| 1291 | 1304 | if templ_7745c5c3_Err != nil { | |
| 1292 | 1305 | return templ_7745c5c3_Err | |
| 1293 | 1306 | } | |
| 1294 | - | var templ_7745c5c3_Var59 string | |
| 1295 | - | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(group.Mode) | |
| 1307 | + | var templ_7745c5c3_Var60 string | |
| 1308 | + | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Mode) | |
| 1296 | 1309 | if templ_7745c5c3_Err != nil { | |
| 1297 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 194, Col: 127} | |
| 1310 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 195, Col: 127} | |
| 1298 | 1311 | } | |
| 1299 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59)) | |
| 1312 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60) | |
| 1300 | 1313 | if templ_7745c5c3_Err != nil { | |
| 1301 | 1314 | return templ_7745c5c3_Err | |
| 1302 | 1315 | } | |
| 1303 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "\" data-action=\"") | |
| 1316 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" data-action=\"") | |
| 1304 | 1317 | if templ_7745c5c3_Err != nil { | |
| 1305 | 1318 | return templ_7745c5c3_Err | |
| 1306 | 1319 | } | |
| 1307 | - | var templ_7745c5c3_Var60 string | |
| 1308 | - | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(binding.Action) | |
| 1320 | + | var templ_7745c5c3_Var61 string | |
| 1321 | + | templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.ResolveAttributeValue(binding.Action) | |
| 1309 | 1322 | if templ_7745c5c3_Err != nil { | |
| 1310 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 194, Col: 158} | |
| 1323 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 195, Col: 158} | |
| 1311 | 1324 | } | |
| 1312 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60)) | |
| 1325 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var61) | |
| 1313 | 1326 | if templ_7745c5c3_Err != nil { | |
| 1314 | 1327 | return templ_7745c5c3_Err | |
| 1315 | 1328 | } | |
| 1316 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\">") | |
| 1329 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\">") | |
| 1317 | 1330 | if templ_7745c5c3_Err != nil { | |
| 1318 | 1331 | return templ_7745c5c3_Err | |
| 1319 | 1332 | } | |
| @@ -1321,7 +1334,7 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||
| 1321 | 1334 | if templ_7745c5c3_Err != nil { | |
| 1322 | 1335 | return templ_7745c5c3_Err | |
| 1323 | 1336 | } | |
| 1324 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "</button></form></div></li>") | |
| 1337 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "</button></form></div></li>") | |
| 1325 | 1338 | if templ_7745c5c3_Err != nil { | |
| 1326 | 1339 | return templ_7745c5c3_Err | |
| 1327 | 1340 | } | |
| @@ -189,11 +189,11 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 189 | return templ_7745c5c3_Err | 189 | return templ_7745c5c3_Err | ||
| 190 | } | 190 | } | ||
| 191 | var templ_7745c5c3_Var8 string | 191 | var templ_7745c5c3_Var8 string | ||
| 192 | - | templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.SansFont) | 192 | + | templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.SansFont) |
| 193 | if templ_7745c5c3_Err != nil { | 193 | if templ_7745c5c3_Err != nil { | ||
| 194 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 31, Col: 101} | 194 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 31, Col: 101} | ||
| 195 | } | 195 | } | ||
| 196 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) | 196 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var8) |
| 197 | if templ_7745c5c3_Err != nil { | 197 | if templ_7745c5c3_Err != nil { | ||
| 198 | return templ_7745c5c3_Err | 198 | return templ_7745c5c3_Err | ||
| 199 | } | 199 | } | ||
| @@ -202,11 +202,11 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 202 | return templ_7745c5c3_Err | 202 | return templ_7745c5c3_Err | ||
| 203 | } | 203 | } | ||
| 204 | var templ_7745c5c3_Var9 string | 204 | var templ_7745c5c3_Var9 string | ||
| 205 | - | templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.SerifFont) | 205 | + | templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.SerifFont) |
| 206 | if templ_7745c5c3_Err != nil { | 206 | if templ_7745c5c3_Err != nil { | ||
| 207 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 32, Col: 104} | 207 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 32, Col: 104} | ||
| 208 | } | 208 | } | ||
| 209 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) | 209 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9) |
| 210 | if templ_7745c5c3_Err != nil { | 210 | if templ_7745c5c3_Err != nil { | ||
| 211 | return templ_7745c5c3_Err | 211 | return templ_7745c5c3_Err | ||
| 212 | } | 212 | } | ||
| @@ -215,71 +215,84 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 215 | return templ_7745c5c3_Err | 215 | return templ_7745c5c3_Err | ||
| 216 | } | 216 | } | ||
| 217 | var templ_7745c5c3_Var10 string | 217 | var templ_7745c5c3_Var10 string | ||
| 218 | - | templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(config.Appearance.MonospaceFont) | 218 | + | templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.MonospaceFont) |
| 219 | if templ_7745c5c3_Err != nil { | 219 | if templ_7745c5c3_Err != nil { | ||
| 220 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 33, Col: 116} | 220 | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 33, Col: 116} | ||
| 221 | } | 221 | } | ||
| 222 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) | 222 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var10) |
| 223 | if templ_7745c5c3_Err != nil { | 223 | if templ_7745c5c3_Err != nil { | ||
| 224 | return templ_7745c5c3_Err | 224 | return templ_7745c5c3_Err | ||
| 225 | } | 225 | } | ||
| 226 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" required></label> <label><span>Default font size</span><input name=\"default_font_size\" type=\"number\" min=\"1\" max=\"72\" value=\"") | 226 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\" required></label> <label><span>GTK UI font</span><input name=\"gtk_font\" type=\"text\" value=\"") |
| 227 | if templ_7745c5c3_Err != nil { | 227 | if templ_7745c5c3_Err != nil { | ||
| 228 | return templ_7745c5c3_Err | 228 | return templ_7745c5c3_Err | ||
| 229 | } | 229 | } | ||
| 230 | var templ_7745c5c3_Var11 string | 230 | var templ_7745c5c3_Var11 string | ||
| 231 | - | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Appearance.DefaultFontSize)) | 231 | + | templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.Appearance.GtkFont) |
| 232 | if templ_7745c5c3_Err != nil { | 232 | if templ_7745c5c3_Err != nil { | ||
| 233 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 34, Col: 160} | 233 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 34, Col: 101} |
| 234 | } | 234 | } | ||
| 235 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) | 235 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var11) |
| 236 | if templ_7745c5c3_Err != nil { | 236 | if templ_7745c5c3_Err != nil { | ||
| 237 | return templ_7745c5c3_Err | 237 | return templ_7745c5c3_Err | ||
| 238 | } | 238 | } | ||
| 239 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" required></label> <label><span>UI scale</span><input name=\"default_ui_scale\" type=\"number\" min=\"0.5\" max=\"3\" step=\"0.05\" value=\"") | 239 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "\" required></label> <label><span>Default font size</span><input name=\"default_font_size\" type=\"number\" min=\"1\" max=\"72\" value=\"") |
| 240 | if templ_7745c5c3_Err != nil { | 240 | if templ_7745c5c3_Err != nil { | ||
| 241 | return templ_7745c5c3_Err | 241 | return templ_7745c5c3_Err | ||
| 242 | } | 242 | } | ||
| 243 | var templ_7745c5c3_Var12 string | 243 | var templ_7745c5c3_Var12 string | ||
| 244 | - | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigFloat(config.DefaultUIScale)) | 244 | + | templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Appearance.DefaultFontSize)) |
| 245 | if templ_7745c5c3_Err != nil { | 245 | if templ_7745c5c3_Err != nil { | ||
| 246 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 35, Col: 153} | 246 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 35, Col: 160} |
| 247 | } | 247 | } | ||
| 248 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) | 248 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var12) |
| 249 | if templ_7745c5c3_Err != nil { | 249 | if templ_7745c5c3_Err != nil { | ||
| 250 | return templ_7745c5c3_Err | 250 | return templ_7745c5c3_Err | ||
| 251 | } | 251 | } | ||
| 252 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" required></label> <label><span>Color scheme</span><select name=\"color_scheme\"><option value=\"default\"") | 252 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" required></label> <label><span>UI scale</span><input name=\"default_ui_scale\" type=\"number\" min=\"0.5\" max=\"3\" step=\"0.05\" value=\"") |
| 253 | + | if templ_7745c5c3_Err != nil { | |||
| 254 | + | return templ_7745c5c3_Err | |||
| 255 | + | } | |||
| 256 | + | var templ_7745c5c3_Var13 string | |||
| 257 | + | templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigFloat(config.DefaultUIScale)) | |||
| 258 | + | if templ_7745c5c3_Err != nil { | |||
| 259 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 36, Col: 153} | |||
| 260 | + | } | |||
| 261 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var13) | |||
| 262 | + | if templ_7745c5c3_Err != nil { | |||
| 263 | + | return templ_7745c5c3_Err | |||
| 264 | + | } | |||
| 265 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\" required></label> <label><span>Color scheme</span><select name=\"color_scheme\"><option value=\"default\"") | |||
| 253 | if templ_7745c5c3_Err != nil { | 266 | if templ_7745c5c3_Err != nil { | ||
| 254 | return templ_7745c5c3_Err | 267 | return templ_7745c5c3_Err | ||
| 255 | } | 268 | } | ||
| 256 | if colorSchemeSelected(config.Appearance.ColorScheme, "default") { | 269 | if colorSchemeSelected(config.Appearance.ColorScheme, "default") { | ||
| 257 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, " selected") | 270 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, " selected") |
| 258 | if templ_7745c5c3_Err != nil { | 271 | if templ_7745c5c3_Err != nil { | ||
| 259 | return templ_7745c5c3_Err | 272 | return templ_7745c5c3_Err | ||
| 260 | } | 273 | } | ||
| 261 | } | 274 | } | ||
| 262 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, ">System default</option> <option value=\"prefer-light\"") | 275 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, ">System default</option> <option value=\"prefer-light\"") |
| 263 | if templ_7745c5c3_Err != nil { | 276 | if templ_7745c5c3_Err != nil { | ||
| 264 | return templ_7745c5c3_Err | 277 | return templ_7745c5c3_Err | ||
| 265 | } | 278 | } | ||
| 266 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-light") { | 279 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-light") { | ||
| 267 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, " selected") | 280 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " selected") |
| 268 | if templ_7745c5c3_Err != nil { | 281 | if templ_7745c5c3_Err != nil { | ||
| 269 | return templ_7745c5c3_Err | 282 | return templ_7745c5c3_Err | ||
| 270 | } | 283 | } | ||
| 271 | } | 284 | } | ||
| 272 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, ">Prefer light</option> <option value=\"prefer-dark\"") | 285 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, ">Prefer light</option> <option value=\"prefer-dark\"") |
| 273 | if templ_7745c5c3_Err != nil { | 286 | if templ_7745c5c3_Err != nil { | ||
| 274 | return templ_7745c5c3_Err | 287 | return templ_7745c5c3_Err | ||
| 275 | } | 288 | } | ||
| 276 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-dark") { | 289 | if colorSchemeSelected(config.Appearance.ColorScheme, "prefer-dark") { | ||
| 277 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, " selected") | 290 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, " selected") |
| 278 | if templ_7745c5c3_Err != nil { | 291 | if templ_7745c5c3_Err != nil { | ||
| 279 | return templ_7745c5c3_Err | 292 | return templ_7745c5c3_Err | ||
| 280 | } | 293 | } | ||
| 281 | } | 294 | } | ||
| 282 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, ">Prefer dark</option></select></label>") | 295 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, ">Prefer dark</option></select></label>") |
| 283 | if templ_7745c5c3_Err != nil { | 296 | if templ_7745c5c3_Err != nil { | ||
| 284 | return templ_7745c5c3_Err | 297 | return templ_7745c5c3_Err | ||
| 285 | } | 298 | } | ||
| @@ -291,7 +304,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 291 | if templ_7745c5c3_Err != nil { | 304 | if templ_7745c5c3_Err != nil { | ||
| 292 | return templ_7745c5c3_Err | 305 | return templ_7745c5c3_Err | ||
| 293 | } | 306 | } | ||
| 294 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<div class=\"sv-button-row sv-form-actions\"><button class=\"sv-button\" type=\"submit\">") | 307 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div class=\"sv-button-row sv-form-actions\"><button class=\"sv-button\" type=\"submit\">") |
| 295 | if templ_7745c5c3_Err != nil { | 308 | if templ_7745c5c3_Err != nil { | ||
| 296 | return templ_7745c5c3_Err | 309 | return templ_7745c5c3_Err | ||
| 297 | } | 310 | } | ||
| @@ -299,7 +312,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 299 | if templ_7745c5c3_Err != nil { | 312 | if templ_7745c5c3_Err != nil { | ||
| 300 | return templ_7745c5c3_Err | 313 | return templ_7745c5c3_Err | ||
| 301 | } | 314 | } | ||
| 302 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.appearance.reset\" data-sv-confirm=\"Reset appearance settings to defaults?\">") | 315 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.appearance.reset\" data-sv-confirm=\"Reset appearance settings to defaults?\">") |
| 303 | if templ_7745c5c3_Err != nil { | 316 | if templ_7745c5c3_Err != nil { | ||
| 304 | return templ_7745c5c3_Err | 317 | return templ_7745c5c3_Err | ||
| 305 | } | 318 | } | ||
| @@ -307,7 +320,7 @@ func AppearanceForm(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 307 | if templ_7745c5c3_Err != nil { | 320 | if templ_7745c5c3_Err != nil { | ||
| 308 | return templ_7745c5c3_Err | 321 | return templ_7745c5c3_Err | ||
| 309 | } | 322 | } | ||
| 310 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</button></div></form>") | 323 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</button></div></form>") |
| 311 | if templ_7745c5c3_Err != nil { | 324 | if templ_7745c5c3_Err != nil { | ||
| 312 | return templ_7745c5c3_Err | 325 | return templ_7745c5c3_Err | ||
| 313 | } | 326 | } | ||
| @@ -331,207 +344,207 @@ func PaletteFields(title string, prefix string, palette dto.ColorPalette) templ. | |||||
| 331 | }() | 344 | }() | ||
| 332 | } | 345 | } | ||
| 333 | ctx = templ.InitializeContext(ctx) | 346 | ctx = templ.InitializeContext(ctx) | ||
| 334 | - | templ_7745c5c3_Var13 := templ.GetChildren(ctx) | 347 | + | templ_7745c5c3_Var14 := templ.GetChildren(ctx) |
| 335 | - | if templ_7745c5c3_Var13 == nil { | 348 | + | if templ_7745c5c3_Var14 == nil { |
| 336 | - | templ_7745c5c3_Var13 = templ.NopComponent | 349 | + | templ_7745c5c3_Var14 = templ.NopComponent |
| 337 | } | 350 | } | ||
| 338 | ctx = templ.ClearChildren(ctx) | 351 | ctx = templ.ClearChildren(ctx) | ||
| 339 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<fieldset class=\"sv-fieldset\"><legend>") | 352 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<fieldset class=\"sv-fieldset\"><legend>") |
| 340 | - | if templ_7745c5c3_Err != nil { | |||
| 341 | - | return templ_7745c5c3_Err | |||
| 342 | - | } | |||
| 343 | - | var templ_7745c5c3_Var14 string | |||
| 344 | - | templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(title) | |||
| 345 | - | if templ_7745c5c3_Err != nil { | |||
| 346 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 52, Col: 17} | |||
| 347 | - | } | |||
| 348 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) | |||
| 349 | - | if templ_7745c5c3_Err != nil { | |||
| 350 | - | return templ_7745c5c3_Err | |||
| 351 | - | } | |||
| 352 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</legend> <label><span>Background</span><input name=\"") | |||
| 353 | if templ_7745c5c3_Err != nil { | 353 | if templ_7745c5c3_Err != nil { | ||
| 354 | return templ_7745c5c3_Err | 354 | return templ_7745c5c3_Err | ||
| 355 | } | 355 | } | ||
| 356 | var templ_7745c5c3_Var15 string | 356 | var templ_7745c5c3_Var15 string | ||
| 357 | - | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_background") | 357 | + | templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(title) |
| 358 | if templ_7745c5c3_Err != nil { | 358 | if templ_7745c5c3_Err != nil { | ||
| 359 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 68} | 359 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 17} |
| 360 | } | 360 | } | ||
| 361 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | 361 | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) | ||
| 362 | if templ_7745c5c3_Err != nil { | 362 | if templ_7745c5c3_Err != nil { | ||
| 363 | return templ_7745c5c3_Err | 363 | return templ_7745c5c3_Err | ||
| 364 | } | 364 | } | ||
| 365 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\" type=\"text\" value=\"") | 365 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</legend> <label><span>Background</span><input name=\"") |
| 366 | if templ_7745c5c3_Err != nil { | 366 | if templ_7745c5c3_Err != nil { | ||
| 367 | return templ_7745c5c3_Err | 367 | return templ_7745c5c3_Err | ||
| 368 | } | 368 | } | ||
| 369 | var templ_7745c5c3_Var16 string | 369 | var templ_7745c5c3_Var16 string | ||
| 370 | - | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Background) | 370 | + | templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_background") |
| 371 | if templ_7745c5c3_Err != nil { | 371 | if templ_7745c5c3_Err != nil { | ||
| 372 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 53, Col: 109} | 372 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 68} |
| 373 | } | 373 | } | ||
| 374 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) | 374 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16) |
| 375 | if templ_7745c5c3_Err != nil { | 375 | if templ_7745c5c3_Err != nil { | ||
| 376 | return templ_7745c5c3_Err | 376 | return templ_7745c5c3_Err | ||
| 377 | } | 377 | } | ||
| 378 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" required></label> <label><span>Surface</span><input name=\"") | 378 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "\" type=\"text\" value=\"") |
| 379 | if templ_7745c5c3_Err != nil { | 379 | if templ_7745c5c3_Err != nil { | ||
| 380 | return templ_7745c5c3_Err | 380 | return templ_7745c5c3_Err | ||
| 381 | } | 381 | } | ||
| 382 | var templ_7745c5c3_Var17 string | 382 | var templ_7745c5c3_Var17 string | ||
| 383 | - | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_surface") | 383 | + | templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Background) |
| 384 | if templ_7745c5c3_Err != nil { | 384 | if templ_7745c5c3_Err != nil { | ||
| 385 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 62} | 385 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 109} |
| 386 | } | 386 | } | ||
| 387 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) | 387 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var17) |
| 388 | if templ_7745c5c3_Err != nil { | 388 | if templ_7745c5c3_Err != nil { | ||
| 389 | return templ_7745c5c3_Err | 389 | return templ_7745c5c3_Err | ||
| 390 | } | 390 | } | ||
| 391 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" type=\"text\" value=\"") | 391 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" required></label> <label><span>Surface</span><input name=\"") |
| 392 | if templ_7745c5c3_Err != nil { | 392 | if templ_7745c5c3_Err != nil { | ||
| 393 | return templ_7745c5c3_Err | 393 | return templ_7745c5c3_Err | ||
| 394 | } | 394 | } | ||
| 395 | var templ_7745c5c3_Var18 string | 395 | var templ_7745c5c3_Var18 string | ||
| 396 | - | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Surface) | 396 | + | templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_surface") |
| 397 | if templ_7745c5c3_Err != nil { | 397 | if templ_7745c5c3_Err != nil { | ||
| 398 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 54, Col: 100} | 398 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 62} |
| 399 | } | 399 | } | ||
| 400 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) | 400 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var18) |
| 401 | if templ_7745c5c3_Err != nil { | 401 | if templ_7745c5c3_Err != nil { | ||
| 402 | return templ_7745c5c3_Err | 402 | return templ_7745c5c3_Err | ||
| 403 | } | 403 | } | ||
| 404 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" required></label> <label><span>Surface variant</span><input name=\"") | 404 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\" type=\"text\" value=\"") |
| 405 | if templ_7745c5c3_Err != nil { | 405 | if templ_7745c5c3_Err != nil { | ||
| 406 | return templ_7745c5c3_Err | 406 | return templ_7745c5c3_Err | ||
| 407 | } | 407 | } | ||
| 408 | var templ_7745c5c3_Var19 string | 408 | var templ_7745c5c3_Var19 string | ||
| 409 | - | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_surface_variant") | 409 | + | templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Surface) |
| 410 | if templ_7745c5c3_Err != nil { | 410 | if templ_7745c5c3_Err != nil { | ||
| 411 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 78} | 411 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 100} |
| 412 | } | 412 | } | ||
| 413 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) | 413 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var19) |
| 414 | if templ_7745c5c3_Err != nil { | 414 | if templ_7745c5c3_Err != nil { | ||
| 415 | return templ_7745c5c3_Err | 415 | return templ_7745c5c3_Err | ||
| 416 | } | 416 | } | ||
| 417 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" type=\"text\" value=\"") | 417 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\" required></label> <label><span>Surface variant</span><input name=\"") |
| 418 | if templ_7745c5c3_Err != nil { | 418 | if templ_7745c5c3_Err != nil { | ||
| 419 | return templ_7745c5c3_Err | 419 | return templ_7745c5c3_Err | ||
| 420 | } | 420 | } | ||
| 421 | var templ_7745c5c3_Var20 string | 421 | var templ_7745c5c3_Var20 string | ||
| 422 | - | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(palette.SurfaceVariant) | 422 | + | templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_surface_variant") |
| 423 | if templ_7745c5c3_Err != nil { | 423 | if templ_7745c5c3_Err != nil { | ||
| 424 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 55, Col: 123} | 424 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 78} |
| 425 | } | 425 | } | ||
| 426 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) | 426 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var20) |
| 427 | if templ_7745c5c3_Err != nil { | 427 | if templ_7745c5c3_Err != nil { | ||
| 428 | return templ_7745c5c3_Err | 428 | return templ_7745c5c3_Err | ||
| 429 | } | 429 | } | ||
| 430 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" required></label> <label><span>Text</span><input name=\"") | 430 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" type=\"text\" value=\"") |
| 431 | if templ_7745c5c3_Err != nil { | 431 | if templ_7745c5c3_Err != nil { | ||
| 432 | return templ_7745c5c3_Err | 432 | return templ_7745c5c3_Err | ||
| 433 | } | 433 | } | ||
| 434 | var templ_7745c5c3_Var21 string | 434 | var templ_7745c5c3_Var21 string | ||
| 435 | - | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_text") | 435 | + | templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.SurfaceVariant) |
| 436 | if templ_7745c5c3_Err != nil { | 436 | if templ_7745c5c3_Err != nil { | ||
| 437 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 56} | 437 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 123} |
| 438 | } | 438 | } | ||
| 439 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21)) | 439 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var21) |
| 440 | if templ_7745c5c3_Err != nil { | 440 | if templ_7745c5c3_Err != nil { | ||
| 441 | return templ_7745c5c3_Err | 441 | return templ_7745c5c3_Err | ||
| 442 | } | 442 | } | ||
| 443 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" type=\"text\" value=\"") | 443 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" required></label> <label><span>Text</span><input name=\"") |
| 444 | if templ_7745c5c3_Err != nil { | 444 | if templ_7745c5c3_Err != nil { | ||
| 445 | return templ_7745c5c3_Err | 445 | return templ_7745c5c3_Err | ||
| 446 | } | 446 | } | ||
| 447 | var templ_7745c5c3_Var22 string | 447 | var templ_7745c5c3_Var22 string | ||
| 448 | - | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Text) | 448 | + | templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_text") |
| 449 | if templ_7745c5c3_Err != nil { | 449 | if templ_7745c5c3_Err != nil { | ||
| 450 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 56, Col: 91} | 450 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 56} |
| 451 | } | 451 | } | ||
| 452 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22)) | 452 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var22) |
| 453 | if templ_7745c5c3_Err != nil { | 453 | if templ_7745c5c3_Err != nil { | ||
| 454 | return templ_7745c5c3_Err | 454 | return templ_7745c5c3_Err | ||
| 455 | } | 455 | } | ||
| 456 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" required></label> <label><span>Muted</span><input name=\"") | 456 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\" type=\"text\" value=\"") |
| 457 | if templ_7745c5c3_Err != nil { | 457 | if templ_7745c5c3_Err != nil { | ||
| 458 | return templ_7745c5c3_Err | 458 | return templ_7745c5c3_Err | ||
| 459 | } | 459 | } | ||
| 460 | var templ_7745c5c3_Var23 string | 460 | var templ_7745c5c3_Var23 string | ||
| 461 | - | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_muted") | 461 | + | templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Text) |
| 462 | if templ_7745c5c3_Err != nil { | 462 | if templ_7745c5c3_Err != nil { | ||
| 463 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 58} | 463 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 91} |
| 464 | } | 464 | } | ||
| 465 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23)) | 465 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var23) |
| 466 | if templ_7745c5c3_Err != nil { | 466 | if templ_7745c5c3_Err != nil { | ||
| 467 | return templ_7745c5c3_Err | 467 | return templ_7745c5c3_Err | ||
| 468 | } | 468 | } | ||
| 469 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" type=\"text\" value=\"") | 469 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\" required></label> <label><span>Muted</span><input name=\"") |
| 470 | if templ_7745c5c3_Err != nil { | 470 | if templ_7745c5c3_Err != nil { | ||
| 471 | return templ_7745c5c3_Err | 471 | return templ_7745c5c3_Err | ||
| 472 | } | 472 | } | ||
| 473 | var templ_7745c5c3_Var24 string | 473 | var templ_7745c5c3_Var24 string | ||
| 474 | - | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Muted) | 474 | + | templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_muted") |
| 475 | if templ_7745c5c3_Err != nil { | 475 | if templ_7745c5c3_Err != nil { | ||
| 476 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 57, Col: 94} | 476 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 58} |
| 477 | } | 477 | } | ||
| 478 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24)) | 478 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var24) |
| 479 | if templ_7745c5c3_Err != nil { | 479 | if templ_7745c5c3_Err != nil { | ||
| 480 | return templ_7745c5c3_Err | 480 | return templ_7745c5c3_Err | ||
| 481 | } | 481 | } | ||
| 482 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" required></label> <label><span>Accent</span><input name=\"") | 482 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\" type=\"text\" value=\"") |
| 483 | if templ_7745c5c3_Err != nil { | 483 | if templ_7745c5c3_Err != nil { | ||
| 484 | return templ_7745c5c3_Err | 484 | return templ_7745c5c3_Err | ||
| 485 | } | 485 | } | ||
| 486 | var templ_7745c5c3_Var25 string | 486 | var templ_7745c5c3_Var25 string | ||
| 487 | - | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_accent") | 487 | + | templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Muted) |
| 488 | if templ_7745c5c3_Err != nil { | 488 | if templ_7745c5c3_Err != nil { | ||
| 489 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 60} | 489 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 94} |
| 490 | } | 490 | } | ||
| 491 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) | 491 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var25) |
| 492 | if templ_7745c5c3_Err != nil { | 492 | if templ_7745c5c3_Err != nil { | ||
| 493 | return templ_7745c5c3_Err | 493 | return templ_7745c5c3_Err | ||
| 494 | } | 494 | } | ||
| 495 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" type=\"text\" value=\"") | 495 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\" required></label> <label><span>Accent</span><input name=\"") |
| 496 | if templ_7745c5c3_Err != nil { | 496 | if templ_7745c5c3_Err != nil { | ||
| 497 | return templ_7745c5c3_Err | 497 | return templ_7745c5c3_Err | ||
| 498 | } | 498 | } | ||
| 499 | var templ_7745c5c3_Var26 string | 499 | var templ_7745c5c3_Var26 string | ||
| 500 | - | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Accent) | 500 | + | templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_accent") |
| 501 | if templ_7745c5c3_Err != nil { | 501 | if templ_7745c5c3_Err != nil { | ||
| 502 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 58, Col: 97} | 502 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 60} |
| 503 | } | 503 | } | ||
| 504 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) | 504 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var26) |
| 505 | if templ_7745c5c3_Err != nil { | 505 | if templ_7745c5c3_Err != nil { | ||
| 506 | return templ_7745c5c3_Err | 506 | return templ_7745c5c3_Err | ||
| 507 | } | 507 | } | ||
| 508 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" required></label> <label><span>Border</span><input name=\"") | 508 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\" type=\"text\" value=\"") |
| 509 | if templ_7745c5c3_Err != nil { | 509 | if templ_7745c5c3_Err != nil { | ||
| 510 | return templ_7745c5c3_Err | 510 | return templ_7745c5c3_Err | ||
| 511 | } | 511 | } | ||
| 512 | var templ_7745c5c3_Var27 string | 512 | var templ_7745c5c3_Var27 string | ||
| 513 | - | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(prefix + "_border") | 513 | + | templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Accent) |
| 514 | if templ_7745c5c3_Err != nil { | 514 | if templ_7745c5c3_Err != nil { | ||
| 515 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 60} | 515 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 97} |
| 516 | } | 516 | } | ||
| 517 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27)) | 517 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var27) |
| 518 | if templ_7745c5c3_Err != nil { | 518 | if templ_7745c5c3_Err != nil { | ||
| 519 | return templ_7745c5c3_Err | 519 | return templ_7745c5c3_Err | ||
| 520 | } | 520 | } | ||
| 521 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" type=\"text\" value=\"") | 521 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\" required></label> <label><span>Border</span><input name=\"") |
| 522 | if templ_7745c5c3_Err != nil { | 522 | if templ_7745c5c3_Err != nil { | ||
| 523 | return templ_7745c5c3_Err | 523 | return templ_7745c5c3_Err | ||
| 524 | } | 524 | } | ||
| 525 | var templ_7745c5c3_Var28 string | 525 | var templ_7745c5c3_Var28 string | ||
| 526 | - | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(palette.Border) | 526 | + | templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.ResolveAttributeValue(prefix + "_border") |
| 527 | if templ_7745c5c3_Err != nil { | 527 | if templ_7745c5c3_Err != nil { | ||
| 528 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 59, Col: 97} | 528 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 60, Col: 60} |
| 529 | + | } | |||
| 530 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var28) | |||
| 531 | + | if templ_7745c5c3_Err != nil { | |||
| 532 | + | return templ_7745c5c3_Err | |||
| 533 | + | } | |||
| 534 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" type=\"text\" value=\"") | |||
| 535 | + | if templ_7745c5c3_Err != nil { | |||
| 536 | + | return templ_7745c5c3_Err | |||
| 537 | + | } | |||
| 538 | + | var templ_7745c5c3_Var29 string | |||
| 539 | + | templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(palette.Border) | |||
| 540 | + | if templ_7745c5c3_Err != nil { | |||
| 541 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 60, Col: 97} | |||
| 529 | } | 542 | } | ||
| 530 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28)) | 543 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29) |
| 531 | if templ_7745c5c3_Err != nil { | 544 | if templ_7745c5c3_Err != nil { | ||
| 532 | return templ_7745c5c3_Err | 545 | return templ_7745c5c3_Err | ||
| 533 | } | 546 | } | ||
| 534 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\" required></label></fieldset>") | 547 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\" required></label></fieldset>") |
| 535 | if templ_7745c5c3_Err != nil { | 548 | if templ_7745c5c3_Err != nil { | ||
| 536 | return templ_7745c5c3_Err | 549 | return templ_7745c5c3_Err | ||
| 537 | } | 550 | } | ||
| @@ -555,25 +568,25 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 555 | }() | 568 | }() | ||
| 556 | } | 569 | } | ||
| 557 | ctx = templ.InitializeContext(ctx) | 570 | ctx = templ.InitializeContext(ctx) | ||
| 558 | - | templ_7745c5c3_Var29 := templ.GetChildren(ctx) | 571 | + | templ_7745c5c3_Var30 := templ.GetChildren(ctx) |
| 559 | - | if templ_7745c5c3_Var29 == nil { | 572 | + | if templ_7745c5c3_Var30 == nil { |
| 560 | - | templ_7745c5c3_Var29 = templ.NopComponent | 573 | + | templ_7745c5c3_Var30 = templ.NopComponent |
| 561 | } | 574 | } | ||
| 562 | ctx = templ.ClearChildren(ctx) | 575 | ctx = templ.ClearChildren(ctx) | ||
| 563 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<form class=\"sv-card-form\" data-sv-action=\"config.search.save\"><label><span>Default search engine</span><input name=\"default_search_engine\" type=\"text\" value=\"") | 576 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<form class=\"sv-card-form\" data-sv-action=\"config.search.save\"><label><span>Default search engine</span><input name=\"default_search_engine\" type=\"text\" value=\"") |
| 564 | if templ_7745c5c3_Err != nil { | 577 | if templ_7745c5c3_Err != nil { | ||
| 565 | return templ_7745c5c3_Err | 578 | return templ_7745c5c3_Err | ||
| 566 | } | 579 | } | ||
| 567 | - | var templ_7745c5c3_Var30 string | 580 | + | var templ_7745c5c3_Var31 string |
| 568 | - | templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(config.DefaultSearchEngine) | 581 | + | templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(config.DefaultSearchEngine) |
| 569 | if templ_7745c5c3_Err != nil { | 582 | if templ_7745c5c3_Err != nil { | ||
| 570 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 65, Col: 125} | 583 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 66, Col: 125} |
| 571 | } | 584 | } | ||
| 572 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) | 585 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31) |
| 573 | if templ_7745c5c3_Err != nil { | 586 | if templ_7745c5c3_Err != nil { | ||
| 574 | return templ_7745c5c3_Err | 587 | return templ_7745c5c3_Err | ||
| 575 | } | 588 | } | ||
| 576 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" placeholder=\"https://duckduckgo.com/?q=%s\" required></label> <button class=\"sv-button\" type=\"submit\">") | 589 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" placeholder=\"https://duckduckgo.com/?q=%s\" required></label> <button class=\"sv-button\" type=\"submit\">") |
| 577 | if templ_7745c5c3_Err != nil { | 590 | if templ_7745c5c3_Err != nil { | ||
| 578 | return templ_7745c5c3_Err | 591 | return templ_7745c5c3_Err | ||
| 579 | } | 592 | } | ||
| @@ -581,7 +594,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 581 | if templ_7745c5c3_Err != nil { | 594 | if templ_7745c5c3_Err != nil { | ||
| 582 | return templ_7745c5c3_Err | 595 | return templ_7745c5c3_Err | ||
| 583 | } | 596 | } | ||
| 584 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "</button></form><div class=\"sv-group\"><div class=\"sv-group-header\"><h4>Search shortcuts</h4></div><p class=\"sv-meta\">Shortcut URLs must include the %s placeholder for the search query.</p><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.create\"><label><span>Key</span><input name=\"key\" type=\"text\" placeholder=\"ddg\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" placeholder=\"https://duckduckgo.com/?q=%s\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" placeholder=\"DuckDuckGo\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | 597 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></form><div class=\"sv-group\"><div class=\"sv-group-header\"><h4>Search shortcuts</h4></div><p class=\"sv-meta\">Shortcut URLs must include the %s placeholder for the search query.</p><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.create\"><label><span>Key</span><input name=\"key\" type=\"text\" placeholder=\"ddg\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" placeholder=\"https://duckduckgo.com/?q=%s\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" placeholder=\"DuckDuckGo\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") |
| 585 | if templ_7745c5c3_Err != nil { | 598 | if templ_7745c5c3_Err != nil { | ||
| 586 | return templ_7745c5c3_Err | 599 | return templ_7745c5c3_Err | ||
| 587 | } | 600 | } | ||
| @@ -589,7 +602,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 589 | if templ_7745c5c3_Err != nil { | 602 | if templ_7745c5c3_Err != nil { | ||
| 590 | return templ_7745c5c3_Err | 603 | return templ_7745c5c3_Err | ||
| 591 | } | 604 | } | ||
| 592 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></form>") | 605 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</button></form>") |
| 593 | if templ_7745c5c3_Err != nil { | 606 | if templ_7745c5c3_Err != nil { | ||
| 594 | return templ_7745c5c3_Err | 607 | return templ_7745c5c3_Err | ||
| 595 | } | 608 | } | ||
| @@ -600,7 +613,7 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 600 | return templ_7745c5c3_Err | 613 | return templ_7745c5c3_Err | ||
| 601 | } | 614 | } | ||
| 602 | } else { | 615 | } else { | ||
| 603 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "<ul class=\"sv-list\">") | 616 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<ul class=\"sv-list\">") |
| 604 | if templ_7745c5c3_Err != nil { | 617 | if templ_7745c5c3_Err != nil { | ||
| 605 | return templ_7745c5c3_Err | 618 | return templ_7745c5c3_Err | ||
| 606 | } | 619 | } | ||
| @@ -610,12 +623,12 @@ func SearchSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 610 | return templ_7745c5c3_Err | 623 | return templ_7745c5c3_Err | ||
| 611 | } | 624 | } | ||
| 612 | } | 625 | } | ||
| 613 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</ul>") | 626 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</ul>") |
| 614 | if templ_7745c5c3_Err != nil { | 627 | if templ_7745c5c3_Err != nil { | ||
| 615 | return templ_7745c5c3_Err | 628 | return templ_7745c5c3_Err | ||
| 616 | } | 629 | } | ||
| 617 | } | 630 | } | ||
| 618 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</div>") | 631 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "</div>") |
| 619 | if templ_7745c5c3_Err != nil { | 632 | if templ_7745c5c3_Err != nil { | ||
| 620 | return templ_7745c5c3_Err | 633 | return templ_7745c5c3_Err | ||
| 621 | } | 634 | } | ||
| @@ -639,64 +652,64 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||||
| 639 | }() | 652 | }() | ||
| 640 | } | 653 | } | ||
| 641 | ctx = templ.InitializeContext(ctx) | 654 | ctx = templ.InitializeContext(ctx) | ||
| 642 | - | templ_7745c5c3_Var31 := templ.GetChildren(ctx) | 655 | + | templ_7745c5c3_Var32 := templ.GetChildren(ctx) |
| 643 | - | if templ_7745c5c3_Var31 == nil { | 656 | + | if templ_7745c5c3_Var32 == nil { |
| 644 | - | templ_7745c5c3_Var31 = templ.NopComponent | 657 | + | templ_7745c5c3_Var32 = templ.NopComponent |
| 645 | } | 658 | } | ||
| 646 | ctx = templ.ClearChildren(ctx) | 659 | ctx = templ.ClearChildren(ctx) | ||
| 647 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<li class=\"sv-list-row\"><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.update\"><input type=\"hidden\" name=\"key\" value=\"") | 660 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<li class=\"sv-list-row\"><form class=\"sv-inline-form\" data-sv-action=\"config.searchShortcut.update\"><input type=\"hidden\" name=\"key\" value=\"") |
| 648 | if templ_7745c5c3_Err != nil { | 661 | if templ_7745c5c3_Err != nil { | ||
| 649 | return templ_7745c5c3_Err | 662 | return templ_7745c5c3_Err | ||
| 650 | } | 663 | } | ||
| 651 | - | var templ_7745c5c3_Var32 string | 664 | + | var templ_7745c5c3_Var33 string |
| 652 | - | templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | 665 | + | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) |
| 653 | if templ_7745c5c3_Err != nil { | 666 | if templ_7745c5c3_Err != nil { | ||
| 654 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 93, Col: 55} | 667 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 94, Col: 55} |
| 655 | } | 668 | } | ||
| 656 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32)) | 669 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33) |
| 657 | if templ_7745c5c3_Err != nil { | 670 | if templ_7745c5c3_Err != nil { | ||
| 658 | return templ_7745c5c3_Err | 671 | return templ_7745c5c3_Err | ||
| 659 | } | 672 | } | ||
| 660 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\"> <label><span>Key</span><input name=\"new_key\" type=\"text\" value=\"") | 673 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\"> <label><span>Key</span><input name=\"new_key\" type=\"text\" value=\"") |
| 661 | if templ_7745c5c3_Err != nil { | 674 | if templ_7745c5c3_Err != nil { | ||
| 662 | return templ_7745c5c3_Err | 675 | return templ_7745c5c3_Err | ||
| 663 | } | 676 | } | ||
| 664 | - | var templ_7745c5c3_Var33 string | 677 | + | var templ_7745c5c3_Var34 string |
| 665 | - | templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | 678 | + | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) |
| 666 | if templ_7745c5c3_Err != nil { | 679 | if templ_7745c5c3_Err != nil { | ||
| 667 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 94, Col: 80} | 680 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 95, Col: 80} |
| 668 | } | 681 | } | ||
| 669 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33)) | 682 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34) |
| 670 | if templ_7745c5c3_Err != nil { | 683 | if templ_7745c5c3_Err != nil { | ||
| 671 | return templ_7745c5c3_Err | 684 | return templ_7745c5c3_Err | ||
| 672 | } | 685 | } | ||
| 673 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" value=\"") | 686 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" required></label> <label><span>URL</span><input name=\"url\" type=\"text\" value=\"") |
| 674 | if templ_7745c5c3_Err != nil { | 687 | if templ_7745c5c3_Err != nil { | ||
| 675 | return templ_7745c5c3_Err | 688 | return templ_7745c5c3_Err | ||
| 676 | } | 689 | } | ||
| 677 | - | var templ_7745c5c3_Var34 string | 690 | + | var templ_7745c5c3_Var35 string |
| 678 | - | templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.URL) | 691 | + | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.URL) |
| 679 | if templ_7745c5c3_Err != nil { | 692 | if templ_7745c5c3_Err != nil { | ||
| 680 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 95, Col: 76} | 693 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 96, Col: 76} |
| 681 | } | 694 | } | ||
| 682 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34)) | 695 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var35) |
| 683 | if templ_7745c5c3_Err != nil { | 696 | if templ_7745c5c3_Err != nil { | ||
| 684 | return templ_7745c5c3_Err | 697 | return templ_7745c5c3_Err | ||
| 685 | } | 698 | } | ||
| 686 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" value=\"") | 699 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\" pattern=\".*%s.*\" required></label> <label><span>Description</span><input name=\"description\" type=\"text\" value=\"") |
| 687 | if templ_7745c5c3_Err != nil { | 700 | if templ_7745c5c3_Err != nil { | ||
| 688 | return templ_7745c5c3_Err | 701 | return templ_7745c5c3_Err | ||
| 689 | } | 702 | } | ||
| 690 | - | var templ_7745c5c3_Var35 string | 703 | + | var templ_7745c5c3_Var36 string |
| 691 | - | templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Description) | 704 | + | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Description) |
| 692 | if templ_7745c5c3_Err != nil { | 705 | if templ_7745c5c3_Err != nil { | ||
| 693 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 96, Col: 100} | 706 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 97, Col: 100} |
| 694 | } | 707 | } | ||
| 695 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35)) | 708 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36) |
| 696 | if templ_7745c5c3_Err != nil { | 709 | if templ_7745c5c3_Err != nil { | ||
| 697 | return templ_7745c5c3_Err | 710 | return templ_7745c5c3_Err | ||
| 698 | } | 711 | } | ||
| 699 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | 712 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\"></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") |
| 700 | if templ_7745c5c3_Err != nil { | 713 | if templ_7745c5c3_Err != nil { | ||
| 701 | return templ_7745c5c3_Err | 714 | return templ_7745c5c3_Err | ||
| 702 | } | 715 | } | ||
| @@ -704,33 +717,33 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||||
| 704 | if templ_7745c5c3_Err != nil { | 717 | if templ_7745c5c3_Err != nil { | ||
| 705 | return templ_7745c5c3_Err | 718 | return templ_7745c5c3_Err | ||
| 706 | } | 719 | } | ||
| 707 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "</button> <button class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" type=\"button\" data-sv-action=\"config.searchShortcut.delete\" data-key=\"") | 720 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</button> <button class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" type=\"button\" data-sv-action=\"config.searchShortcut.delete\" data-key=\"") |
| 708 | if templ_7745c5c3_Err != nil { | 721 | if templ_7745c5c3_Err != nil { | ||
| 709 | return templ_7745c5c3_Err | 722 | return templ_7745c5c3_Err | ||
| 710 | } | 723 | } | ||
| 711 | - | var templ_7745c5c3_Var36 string | 724 | + | var templ_7745c5c3_Var37 string |
| 712 | - | templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(shortcut.Key) | 725 | + | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.ResolveAttributeValue(shortcut.Key) |
| 713 | if templ_7745c5c3_Err != nil { | 726 | if templ_7745c5c3_Err != nil { | ||
| 714 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 98, Col: 169} | 727 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 99, Col: 169} |
| 715 | } | 728 | } | ||
| 716 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36)) | 729 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var37) |
| 717 | if templ_7745c5c3_Err != nil { | 730 | if templ_7745c5c3_Err != nil { | ||
| 718 | return templ_7745c5c3_Err | 731 | return templ_7745c5c3_Err | ||
| 719 | } | 732 | } | ||
| 720 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\" data-sv-confirm=\"Delete this search shortcut?\" aria-label=\"") | 733 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\" data-sv-confirm=\"Delete this search shortcut?\" aria-label=\"") |
| 721 | if templ_7745c5c3_Err != nil { | 734 | if templ_7745c5c3_Err != nil { | ||
| 722 | return templ_7745c5c3_Err | 735 | return templ_7745c5c3_Err | ||
| 723 | } | 736 | } | ||
| 724 | - | var templ_7745c5c3_Var37 string | 737 | + | var templ_7745c5c3_Var38 string |
| 725 | - | templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs("Delete search shortcut " + shortcut.Key) | 738 | + | templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.ResolveAttributeValue("Delete search shortcut " + shortcut.Key) |
| 726 | if templ_7745c5c3_Err != nil { | 739 | if templ_7745c5c3_Err != nil { | ||
| 727 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 98, Col: 272} | 740 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 99, Col: 272} |
| 728 | } | 741 | } | ||
| 729 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37)) | 742 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var38) |
| 730 | if templ_7745c5c3_Err != nil { | 743 | if templ_7745c5c3_Err != nil { | ||
| 731 | return templ_7745c5c3_Err | 744 | return templ_7745c5c3_Err | ||
| 732 | } | 745 | } | ||
| 733 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "\">") | 746 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\">") |
| 734 | if templ_7745c5c3_Err != nil { | 747 | if templ_7745c5c3_Err != nil { | ||
| 735 | return templ_7745c5c3_Err | 748 | return templ_7745c5c3_Err | ||
| 736 | } | 749 | } | ||
| @@ -738,7 +751,7 @@ func SearchShortcutItem(shortcut searchShortcutRow) templ.Component { | |||||
| 738 | if templ_7745c5c3_Err != nil { | 751 | if templ_7745c5c3_Err != nil { | ||
| 739 | return templ_7745c5c3_Err | 752 | return templ_7745c5c3_Err | ||
| 740 | } | 753 | } | ||
| 741 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</button></form></li>") | 754 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</button></form></li>") |
| 742 | if templ_7745c5c3_Err != nil { | 755 | if templ_7745c5c3_Err != nil { | ||
| 743 | return templ_7745c5c3_Err | 756 | return templ_7745c5c3_Err | ||
| 744 | } | 757 | } | ||
| @@ -762,178 +775,178 @@ func PerformanceSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 762 | }() | 775 | }() | ||
| 763 | } | 776 | } | ||
| 764 | ctx = templ.InitializeContext(ctx) | 777 | ctx = templ.InitializeContext(ctx) | ||
| 765 | - | templ_7745c5c3_Var38 := templ.GetChildren(ctx) | 778 | + | templ_7745c5c3_Var39 := templ.GetChildren(ctx) |
| 766 | - | if templ_7745c5c3_Var38 == nil { | 779 | + | if templ_7745c5c3_Var39 == nil { |
| 767 | - | templ_7745c5c3_Var38 = templ.NopComponent | 780 | + | templ_7745c5c3_Var39 = templ.NopComponent |
| 768 | } | 781 | } | ||
| 769 | ctx = templ.ClearChildren(ctx) | 782 | ctx = templ.ClearChildren(ctx) | ||
| 770 | customProfile := performanceProfileSelected(config.Performance.Profile, "custom") | 783 | customProfile := performanceProfileSelected(config.Performance.Profile, "custom") | ||
| 771 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<form class=\"sv-card-form sv-config-form\" data-sv-action=\"config.performance.save\" data-sv-performance-form><label><span>Profile</span><select name=\"profile\" data-sv-performance-profile><option value=\"default\"") | 784 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<form class=\"sv-card-form sv-config-form\" data-sv-action=\"config.performance.save\" data-sv-performance-form><label><span>Profile</span><select name=\"profile\" data-sv-performance-profile><option value=\"default\"") |
| 772 | if templ_7745c5c3_Err != nil { | 785 | if templ_7745c5c3_Err != nil { | ||
| 773 | return templ_7745c5c3_Err | 786 | return templ_7745c5c3_Err | ||
| 774 | } | 787 | } | ||
| 775 | if performanceProfileSelected(config.Performance.Profile, "default") { | 788 | if performanceProfileSelected(config.Performance.Profile, "default") { | ||
| 776 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, " selected") | 789 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, " selected") |
| 777 | if templ_7745c5c3_Err != nil { | 790 | if templ_7745c5c3_Err != nil { | ||
| 778 | return templ_7745c5c3_Err | 791 | return templ_7745c5c3_Err | ||
| 779 | } | 792 | } | ||
| 780 | } | 793 | } | ||
| 781 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, ">Default</option> <option value=\"balanced\"") | 794 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, ">Default</option> <option value=\"balanced\"") |
| 782 | if templ_7745c5c3_Err != nil { | 795 | if templ_7745c5c3_Err != nil { | ||
| 783 | return templ_7745c5c3_Err | 796 | return templ_7745c5c3_Err | ||
| 784 | } | 797 | } | ||
| 785 | if performanceProfileSelected(config.Performance.Profile, "balanced") { | 798 | if performanceProfileSelected(config.Performance.Profile, "balanced") { | ||
| 786 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, " selected") | 799 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, " selected") |
| 787 | if templ_7745c5c3_Err != nil { | 800 | if templ_7745c5c3_Err != nil { | ||
| 788 | return templ_7745c5c3_Err | 801 | return templ_7745c5c3_Err | ||
| 789 | } | 802 | } | ||
| 790 | } | 803 | } | ||
| 791 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, ">Balanced</option> <option value=\"lite\"") | 804 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, ">Balanced</option> <option value=\"lite\"") |
| 792 | if templ_7745c5c3_Err != nil { | 805 | if templ_7745c5c3_Err != nil { | ||
| 793 | return templ_7745c5c3_Err | 806 | return templ_7745c5c3_Err | ||
| 794 | } | 807 | } | ||
| 795 | if performanceProfileSelected(config.Performance.Profile, "lite") { | 808 | if performanceProfileSelected(config.Performance.Profile, "lite") { | ||
| 796 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, " selected") | 809 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, " selected") |
| 797 | if templ_7745c5c3_Err != nil { | 810 | if templ_7745c5c3_Err != nil { | ||
| 798 | return templ_7745c5c3_Err | 811 | return templ_7745c5c3_Err | ||
| 799 | } | 812 | } | ||
| 800 | } | 813 | } | ||
| 801 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, ">Lite</option> <option value=\"max\"") | 814 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, ">Lite</option> <option value=\"max\"") |
| 802 | if templ_7745c5c3_Err != nil { | 815 | if templ_7745c5c3_Err != nil { | ||
| 803 | return templ_7745c5c3_Err | 816 | return templ_7745c5c3_Err | ||
| 804 | } | 817 | } | ||
| 805 | if performanceProfileSelected(config.Performance.Profile, "max") { | 818 | if performanceProfileSelected(config.Performance.Profile, "max") { | ||
| 806 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, " selected") | 819 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, " selected") |
| 807 | if templ_7745c5c3_Err != nil { | 820 | if templ_7745c5c3_Err != nil { | ||
| 808 | return templ_7745c5c3_Err | 821 | return templ_7745c5c3_Err | ||
| 809 | } | 822 | } | ||
| 810 | } | 823 | } | ||
| 811 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, ">Max</option> <option value=\"custom\"") | 824 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, ">Max</option> <option value=\"custom\"") |
| 812 | if templ_7745c5c3_Err != nil { | 825 | if templ_7745c5c3_Err != nil { | ||
| 813 | return templ_7745c5c3_Err | 826 | return templ_7745c5c3_Err | ||
| 814 | } | 827 | } | ||
| 815 | if performanceProfileSelected(config.Performance.Profile, "custom") { | 828 | if performanceProfileSelected(config.Performance.Profile, "custom") { | ||
| 816 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, " selected") | 829 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, " selected") |
| 817 | if templ_7745c5c3_Err != nil { | 830 | if templ_7745c5c3_Err != nil { | ||
| 818 | return templ_7745c5c3_Err | 831 | return templ_7745c5c3_Err | ||
| 819 | } | 832 | } | ||
| 820 | } | 833 | } | ||
| 821 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, ">Custom</option></select></label><p class=\"sv-meta\">Choose Custom to edit individual performance values.</p><label><span>Skia CPU threads</span><input name=\"skia_cpu_threads\" type=\"number\" min=\"0\" max=\"8\" value=\"") | 834 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, ">Custom</option></select></label><p class=\"sv-meta\">Choose Custom to edit individual performance values.</p><label><span>Skia CPU threads</span><input name=\"skia_cpu_threads\" type=\"number\" min=\"0\" max=\"8\" value=\"") |
| 822 | if templ_7745c5c3_Err != nil { | 835 | if templ_7745c5c3_Err != nil { | ||
| 823 | return templ_7745c5c3_Err | 836 | return templ_7745c5c3_Err | ||
| 824 | } | 837 | } | ||
| 825 | - | var templ_7745c5c3_Var39 string | 838 | + | var templ_7745c5c3_Var40 string |
| 826 | - | templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.SkiaCPUThreads)) | 839 | + | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.SkiaCPUThreads)) |
| 827 | if templ_7745c5c3_Err != nil { | 840 | if templ_7745c5c3_Err != nil { | ||
| 828 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 114, Col: 164} | 841 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 115, Col: 164} |
| 829 | } | 842 | } | ||
| 830 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) | 843 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var40) |
| 831 | if templ_7745c5c3_Err != nil { | 844 | if templ_7745c5c3_Err != nil { | ||
| 832 | return templ_7745c5c3_Err | 845 | return templ_7745c5c3_Err | ||
| 833 | } | 846 | } | ||
| 834 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\"") | 847 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "\"") |
| 835 | if templ_7745c5c3_Err != nil { | 848 | if templ_7745c5c3_Err != nil { | ||
| 836 | return templ_7745c5c3_Err | 849 | return templ_7745c5c3_Err | ||
| 837 | } | 850 | } | ||
| 838 | if !customProfile { | 851 | if !customProfile { | ||
| 839 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " disabled") | 852 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, " disabled") |
| 840 | if templ_7745c5c3_Err != nil { | 853 | if templ_7745c5c3_Err != nil { | ||
| 841 | return templ_7745c5c3_Err | 854 | return templ_7745c5c3_Err | ||
| 842 | } | 855 | } | ||
| 843 | } | 856 | } | ||
| 844 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, " data-sv-performance-custom></label> <label><span>Skia GPU threads</span><input name=\"skia_gpu_threads\" type=\"number\" min=\"-1\" max=\"8\" value=\"") | 857 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, " data-sv-performance-custom></label> <label><span>Skia GPU threads</span><input name=\"skia_gpu_threads\" type=\"number\" min=\"-1\" max=\"8\" value=\"") |
| 845 | if templ_7745c5c3_Err != nil { | 858 | if templ_7745c5c3_Err != nil { | ||
| 846 | return templ_7745c5c3_Err | 859 | return templ_7745c5c3_Err | ||
| 847 | } | 860 | } | ||
| 848 | - | var templ_7745c5c3_Var40 string | 861 | + | var templ_7745c5c3_Var41 string |
| 849 | - | templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.SkiaGPUThreads)) | 862 | + | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.SkiaGPUThreads)) |
| 850 | if templ_7745c5c3_Err != nil { | 863 | if templ_7745c5c3_Err != nil { | ||
| 851 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 115, Col: 165} | 864 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 116, Col: 165} |
| 852 | } | 865 | } | ||
| 853 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40)) | 866 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var41) |
| 854 | if templ_7745c5c3_Err != nil { | 867 | if templ_7745c5c3_Err != nil { | ||
| 855 | return templ_7745c5c3_Err | 868 | return templ_7745c5c3_Err | ||
| 856 | } | 869 | } | ||
| 857 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "\"") | 870 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\"") |
| 858 | if templ_7745c5c3_Err != nil { | 871 | if templ_7745c5c3_Err != nil { | ||
| 859 | return templ_7745c5c3_Err | 872 | return templ_7745c5c3_Err | ||
| 860 | } | 873 | } | ||
| 861 | if !customProfile { | 874 | if !customProfile { | ||
| 862 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, " disabled") | 875 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " disabled") |
| 863 | if templ_7745c5c3_Err != nil { | 876 | if templ_7745c5c3_Err != nil { | ||
| 864 | return templ_7745c5c3_Err | 877 | return templ_7745c5c3_Err | ||
| 865 | } | 878 | } | ||
| 866 | } | 879 | } | ||
| 867 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " data-sv-performance-custom></label> <label><span>Web process memory MB</span><input name=\"web_process_memory_mb\" type=\"number\" min=\"0\" max=\"16384\" value=\"") | 880 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, " data-sv-performance-custom></label> <label><span>Web process memory MB</span><input name=\"web_process_memory_mb\" type=\"number\" min=\"0\" max=\"16384\" value=\"") |
| 868 | if templ_7745c5c3_Err != nil { | 881 | if templ_7745c5c3_Err != nil { | ||
| 869 | return templ_7745c5c3_Err | 882 | return templ_7745c5c3_Err | ||
| 870 | } | 883 | } | ||
| 871 | - | var templ_7745c5c3_Var41 string | 884 | + | var templ_7745c5c3_Var42 string |
| 872 | - | templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.WebProcessMemoryMB)) | 885 | + | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.WebProcessMemoryMB)) |
| 873 | if templ_7745c5c3_Err != nil { | 886 | if templ_7745c5c3_Err != nil { | ||
| 874 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 116, Col: 182} | 887 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 117, Col: 182} |
| 875 | } | 888 | } | ||
| 876 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) | 889 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var42) |
| 877 | if templ_7745c5c3_Err != nil { | 890 | if templ_7745c5c3_Err != nil { | ||
| 878 | return templ_7745c5c3_Err | 891 | return templ_7745c5c3_Err | ||
| 879 | } | 892 | } | ||
| 880 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "\"") | 893 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\"") |
| 881 | if templ_7745c5c3_Err != nil { | 894 | if templ_7745c5c3_Err != nil { | ||
| 882 | return templ_7745c5c3_Err | 895 | return templ_7745c5c3_Err | ||
| 883 | } | 896 | } | ||
| 884 | if !customProfile { | 897 | if !customProfile { | ||
| 885 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " disabled") | 898 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " disabled") |
| 886 | if templ_7745c5c3_Err != nil { | 899 | if templ_7745c5c3_Err != nil { | ||
| 887 | return templ_7745c5c3_Err | 900 | return templ_7745c5c3_Err | ||
| 888 | } | 901 | } | ||
| 889 | } | 902 | } | ||
| 890 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, " data-sv-performance-custom></label> <label><span>Network process memory MB</span><input name=\"network_process_memory_mb\" type=\"number\" min=\"0\" max=\"4096\" value=\"") | 903 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, " data-sv-performance-custom></label> <label><span>Network process memory MB</span><input name=\"network_process_memory_mb\" type=\"number\" min=\"0\" max=\"4096\" value=\"") |
| 891 | if templ_7745c5c3_Err != nil { | 904 | if templ_7745c5c3_Err != nil { | ||
| 892 | return templ_7745c5c3_Err | 905 | return templ_7745c5c3_Err | ||
| 893 | } | 906 | } | ||
| 894 | - | var templ_7745c5c3_Var42 string | 907 | + | var templ_7745c5c3_Var43 string |
| 895 | - | templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.NetworkProcessMemoryMB)) | 908 | + | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.NetworkProcessMemoryMB)) |
| 896 | if templ_7745c5c3_Err != nil { | 909 | if templ_7745c5c3_Err != nil { | ||
| 897 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 117, Col: 193} | 910 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 118, Col: 193} |
| 898 | } | 911 | } | ||
| 899 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42)) | 912 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var43) |
| 900 | if templ_7745c5c3_Err != nil { | 913 | if templ_7745c5c3_Err != nil { | ||
| 901 | return templ_7745c5c3_Err | 914 | return templ_7745c5c3_Err | ||
| 902 | } | 915 | } | ||
| 903 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\"") | 916 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "\"") |
| 904 | if templ_7745c5c3_Err != nil { | 917 | if templ_7745c5c3_Err != nil { | ||
| 905 | return templ_7745c5c3_Err | 918 | return templ_7745c5c3_Err | ||
| 906 | } | 919 | } | ||
| 907 | if !customProfile { | 920 | if !customProfile { | ||
| 908 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, " disabled") | 921 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " disabled") |
| 909 | if templ_7745c5c3_Err != nil { | 922 | if templ_7745c5c3_Err != nil { | ||
| 910 | return templ_7745c5c3_Err | 923 | return templ_7745c5c3_Err | ||
| 911 | } | 924 | } | ||
| 912 | } | 925 | } | ||
| 913 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, " data-sv-performance-custom></label> <label><span>WebView pool prewarm</span><input name=\"webview_pool_prewarm\" type=\"number\" min=\"0\" max=\"20\" value=\"") | 926 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, " data-sv-performance-custom></label> <label><span>WebView pool prewarm</span><input name=\"webview_pool_prewarm\" type=\"number\" min=\"0\" max=\"20\" value=\"") |
| 914 | if templ_7745c5c3_Err != nil { | 927 | if templ_7745c5c3_Err != nil { | ||
| 915 | return templ_7745c5c3_Err | 928 | return templ_7745c5c3_Err | ||
| 916 | } | 929 | } | ||
| 917 | - | var templ_7745c5c3_Var43 string | 930 | + | var templ_7745c5c3_Var44 string |
| 918 | - | templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Custom.WebViewPoolPrewarm)) | 931 | + | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.ResolveAttributeValue(formatConfigInt(config.Performance.Custom.WebViewPoolPrewarm)) |
| 919 | if templ_7745c5c3_Err != nil { | 932 | if templ_7745c5c3_Err != nil { | ||
| 920 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 118, Col: 177} | 933 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 119, Col: 177} |
| 921 | } | 934 | } | ||
| 922 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43)) | 935 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var44) |
| 923 | if templ_7745c5c3_Err != nil { | 936 | if templ_7745c5c3_Err != nil { | ||
| 924 | return templ_7745c5c3_Err | 937 | return templ_7745c5c3_Err | ||
| 925 | } | 938 | } | ||
| 926 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "\"") | 939 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, "\"") |
| 927 | if templ_7745c5c3_Err != nil { | 940 | if templ_7745c5c3_Err != nil { | ||
| 928 | return templ_7745c5c3_Err | 941 | return templ_7745c5c3_Err | ||
| 929 | } | 942 | } | ||
| 930 | if !customProfile { | 943 | if !customProfile { | ||
| 931 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 73, " disabled") | 944 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " disabled") |
| 932 | if templ_7745c5c3_Err != nil { | 945 | if templ_7745c5c3_Err != nil { | ||
| 933 | return templ_7745c5c3_Err | 946 | return templ_7745c5c3_Err | ||
| 934 | } | 947 | } | ||
| 935 | } | 948 | } | ||
| 936 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 74, " data-sv-performance-custom></label> <button class=\"sv-button\" type=\"submit\">") | 949 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, " data-sv-performance-custom></label> <button class=\"sv-button\" type=\"submit\">") |
| 937 | if templ_7745c5c3_Err != nil { | 950 | if templ_7745c5c3_Err != nil { | ||
| 938 | return templ_7745c5c3_Err | 951 | return templ_7745c5c3_Err | ||
| 939 | } | 952 | } | ||
| @@ -941,69 +954,69 @@ func PerformanceSettings(config dto.SystemviewConfigPayload) templ.Component { | |||||
| 941 | if templ_7745c5c3_Err != nil { | 954 | if templ_7745c5c3_Err != nil { | ||
| 942 | return templ_7745c5c3_Err | 955 | return templ_7745c5c3_Err | ||
| 943 | } | 956 | } | ||
| 944 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 75, "</button></form><div class=\"sv-stat-grid\"><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | 957 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</button></form><div class=\"sv-stat-grid\"><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") |
| 945 | if templ_7745c5c3_Err != nil { | 958 | if templ_7745c5c3_Err != nil { | ||
| 946 | return templ_7745c5c3_Err | 959 | return templ_7745c5c3_Err | ||
| 947 | } | 960 | } | ||
| 948 | - | var templ_7745c5c3_Var44 string | 961 | + | var templ_7745c5c3_Var45 string |
| 949 | - | templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.CPUThreads)) | 962 | + | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.CPUThreads)) |
| 950 | if templ_7745c5c3_Err != nil { | 963 | if templ_7745c5c3_Err != nil { | ||
| 951 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 122, Col: 113} | 964 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 123, Col: 113} |
| 952 | } | 965 | } | ||
| 953 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44)) | 966 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) |
| 954 | if templ_7745c5c3_Err != nil { | 967 | if templ_7745c5c3_Err != nil { | ||
| 955 | return templ_7745c5c3_Err | 968 | return templ_7745c5c3_Err | ||
| 956 | } | 969 | } | ||
| 957 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 76, "</span><span class=\"sv-stat-label\">CPU threads</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | 970 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span><span class=\"sv-stat-label\">CPU threads</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") |
| 958 | if templ_7745c5c3_Err != nil { | 971 | if templ_7745c5c3_Err != nil { | ||
| 959 | return templ_7745c5c3_Err | 972 | return templ_7745c5c3_Err | ||
| 960 | } | 973 | } | ||
| 961 | - | var templ_7745c5c3_Var45 string | 974 | + | var templ_7745c5c3_Var46 string |
| 962 | - | templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.TotalRAMMB)) | 975 | + | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(formatConfigInt(config.Performance.Hardware.TotalRAMMB)) |
| 963 | if templ_7745c5c3_Err != nil { | 976 | if templ_7745c5c3_Err != nil { | ||
| 964 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 123, Col: 113} | 977 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 124, Col: 113} |
| 965 | } | 978 | } | ||
| 966 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45)) | 979 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) |
| 967 | if templ_7745c5c3_Err != nil { | 980 | if templ_7745c5c3_Err != nil { | ||
| 968 | return templ_7745c5c3_Err | 981 | return templ_7745c5c3_Err | ||
| 969 | } | 982 | } | ||
| 970 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 77, "</span><span class=\"sv-stat-label\">RAM MB</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | 983 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span><span class=\"sv-stat-label\">RAM MB</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") |
| 971 | if templ_7745c5c3_Err != nil { | 984 | if templ_7745c5c3_Err != nil { | ||
| 972 | return templ_7745c5c3_Err | 985 | return templ_7745c5c3_Err | ||
| 973 | } | 986 | } | ||
| 974 | - | var templ_7745c5c3_Var46 string | 987 | + | var templ_7745c5c3_Var47 string |
| 975 | - | templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinStringErrs(config.Performance.Hardware.GPUName) | 988 | + | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(config.Performance.Hardware.GPUName) |
| 976 | if templ_7745c5c3_Err != nil { | 989 | if templ_7745c5c3_Err != nil { | ||
| 977 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 124, Col: 93} | 990 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 125, Col: 93} |
| 978 | } | 991 | } | ||
| 979 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46)) | 992 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) |
| 980 | if templ_7745c5c3_Err != nil { | 993 | if templ_7745c5c3_Err != nil { | ||
| 981 | return templ_7745c5c3_Err | 994 | return templ_7745c5c3_Err | ||
| 982 | } | 995 | } | ||
| 983 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 78, "</span><span class=\"sv-stat-label\">GPU</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") | 996 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</span><span class=\"sv-stat-label\">GPU</span></div><div class=\"sv-stat-card\"><span class=\"sv-stat-value\">") |
| 984 | if templ_7745c5c3_Err != nil { | 997 | if templ_7745c5c3_Err != nil { | ||
| 985 | return templ_7745c5c3_Err | 998 | return templ_7745c5c3_Err | ||
| 986 | } | 999 | } | ||
| 987 | - | var templ_7745c5c3_Var47 string | 1000 | + | var templ_7745c5c3_Var48 string |
| 988 | - | templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(config.EngineType) | 1001 | + | templ_7745c5c3_Var48, templ_7745c5c3_Err = templ.JoinStringErrs(config.EngineType) |
| 989 | if templ_7745c5c3_Err != nil { | 1002 | if templ_7745c5c3_Err != nil { | ||
| 990 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 125, Col: 75} | 1003 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 126, Col: 75} |
| 991 | } | 1004 | } | ||
| 992 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47)) | 1005 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var48)) |
| 993 | if templ_7745c5c3_Err != nil { | 1006 | if templ_7745c5c3_Err != nil { | ||
| 994 | return templ_7745c5c3_Err | 1007 | return templ_7745c5c3_Err | ||
| 995 | } | 1008 | } | ||
| 996 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 79, "</span><span class=\"sv-stat-label\">Engine</span></div></div>") | 1009 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "</span><span class=\"sv-stat-label\">Engine</span></div></div>") |
| 997 | if templ_7745c5c3_Err != nil { | 1010 | if templ_7745c5c3_Err != nil { | ||
| 998 | return templ_7745c5c3_Err | 1011 | return templ_7745c5c3_Err | ||
| 999 | } | 1012 | } | ||
| 1000 | if !engineIsWebKit(config.EngineType) { | 1013 | if !engineIsWebKit(config.EngineType) { | ||
| 1001 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 80, "<p class=\"sv-meta\">Performance tuning applies only to the WebKit engine.</p>") | 1014 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<p class=\"sv-meta\">Performance tuning applies only to the WebKit engine.</p>") |
| 1002 | if templ_7745c5c3_Err != nil { | 1015 | if templ_7745c5c3_Err != nil { | ||
| 1003 | return templ_7745c5c3_Err | 1016 | return templ_7745c5c3_Err | ||
| 1004 | } | 1017 | } | ||
| 1005 | } else { | 1018 | } else { | ||
| 1006 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 81, "<p class=\"sv-meta\">Performance profile changes may require restarting the browser to affect existing engine processes.</p>") | 1019 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<p class=\"sv-meta\">Performance profile changes may require restarting the browser to affect existing engine processes.</p>") |
| 1007 | if templ_7745c5c3_Err != nil { | 1020 | if templ_7745c5c3_Err != nil { | ||
| 1008 | return templ_7745c5c3_Err | 1021 | return templ_7745c5c3_Err | ||
| 1009 | } | 1022 | } | ||
| @@ -1028,9 +1041,9 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||||
| 1028 | }() | 1041 | }() | ||
| 1029 | } | 1042 | } | ||
| 1030 | ctx = templ.InitializeContext(ctx) | 1043 | ctx = templ.InitializeContext(ctx) | ||
| 1031 | - | templ_7745c5c3_Var48 := templ.GetChildren(ctx) | 1044 | + | templ_7745c5c3_Var49 := templ.GetChildren(ctx) |
| 1032 | - | if templ_7745c5c3_Var48 == nil { | 1045 | + | if templ_7745c5c3_Var49 == nil { |
| 1033 | - | templ_7745c5c3_Var48 = templ.NopComponent | 1046 | + | templ_7745c5c3_Var49 = templ.NopComponent |
| 1034 | } | 1047 | } | ||
| 1035 | ctx = templ.ClearChildren(ctx) | 1048 | ctx = templ.ClearChildren(ctx) | ||
| 1036 | groups := configKeybindingGroups(keybindings) | 1049 | groups := configKeybindingGroups(keybindings) | ||
| @@ -1045,7 +1058,7 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||||
| 1045 | return templ_7745c5c3_Err | 1058 | return templ_7745c5c3_Err | ||
| 1046 | } | 1059 | } | ||
| 1047 | } else { | 1060 | } else { | ||
| 1048 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 82, "<div class=\"sv-button-row\"><button class=\"sv-button sv-button-secondary sv-button-danger\" type=\"button\" data-sv-action=\"config.keybinding.resetAll\" data-sv-confirm=\"Reset all keybindings to defaults?\">") | 1061 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "<div class=\"sv-button-row\"><button class=\"sv-button sv-button-secondary sv-button-danger\" type=\"button\" data-sv-action=\"config.keybinding.resetAll\" data-sv-confirm=\"Reset all keybindings to defaults?\">") |
| 1049 | if templ_7745c5c3_Err != nil { | 1062 | if templ_7745c5c3_Err != nil { | ||
| 1050 | return templ_7745c5c3_Err | 1063 | return templ_7745c5c3_Err | ||
| 1051 | } | 1064 | } | ||
| @@ -1053,7 +1066,7 @@ func ConfigKeybindings(keybindings port.KeybindingsConfig) templ.Component { | |||||
| 1053 | if templ_7745c5c3_Err != nil { | 1066 | if templ_7745c5c3_Err != nil { | ||
| 1054 | return templ_7745c5c3_Err | 1067 | return templ_7745c5c3_Err | ||
| 1055 | } | 1068 | } | ||
| 1056 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 83, "</button></div>") | 1069 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "</button></div>") |
| 1057 | if templ_7745c5c3_Err != nil { | 1070 | if templ_7745c5c3_Err != nil { | ||
| 1058 | return templ_7745c5c3_Err | 1071 | return templ_7745c5c3_Err | ||
| 1059 | } | 1072 | } | ||
| @@ -1084,48 +1097,48 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||||
| 1084 | }() | 1097 | }() | ||
| 1085 | } | 1098 | } | ||
| 1086 | ctx = templ.InitializeContext(ctx) | 1099 | ctx = templ.InitializeContext(ctx) | ||
| 1087 | - | templ_7745c5c3_Var49 := templ.GetChildren(ctx) | 1100 | + | templ_7745c5c3_Var50 := templ.GetChildren(ctx) |
| 1088 | - | if templ_7745c5c3_Var49 == nil { | 1101 | + | if templ_7745c5c3_Var50 == nil { |
| 1089 | - | templ_7745c5c3_Var49 = templ.NopComponent | 1102 | + | templ_7745c5c3_Var50 = templ.NopComponent |
| 1090 | } | 1103 | } | ||
| 1091 | ctx = templ.ClearChildren(ctx) | 1104 | ctx = templ.ClearChildren(ctx) | ||
| 1092 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 84, "<div class=\"sv-group\"><div class=\"sv-group-header\"><div><h4>") | 1105 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "<div class=\"sv-group\"><div class=\"sv-group-header\"><div><h4>") |
| 1093 | if templ_7745c5c3_Err != nil { | 1106 | if templ_7745c5c3_Err != nil { | ||
| 1094 | return templ_7745c5c3_Err | 1107 | return templ_7745c5c3_Err | ||
| 1095 | } | 1108 | } | ||
| 1096 | - | var templ_7745c5c3_Var50 string | 1109 | + | var templ_7745c5c3_Var51 string |
| 1097 | - | templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupTitle(group)) | 1110 | + | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupTitle(group)) |
| 1098 | if templ_7745c5c3_Err != nil { | 1111 | if templ_7745c5c3_Err != nil { | ||
| 1099 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 154, Col: 37} | 1112 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 155, Col: 37} |
| 1100 | } | 1113 | } | ||
| 1101 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50)) | 1114 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) |
| 1102 | if templ_7745c5c3_Err != nil { | 1115 | if templ_7745c5c3_Err != nil { | ||
| 1103 | return templ_7745c5c3_Err | 1116 | return templ_7745c5c3_Err | ||
| 1104 | } | 1117 | } | ||
| 1105 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 85, "</h4>") | 1118 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "</h4>") |
| 1106 | if templ_7745c5c3_Err != nil { | 1119 | if templ_7745c5c3_Err != nil { | ||
| 1107 | return templ_7745c5c3_Err | 1120 | return templ_7745c5c3_Err | ||
| 1108 | } | 1121 | } | ||
| 1109 | if keybindingGroupMeta(group) != "" { | 1122 | if keybindingGroupMeta(group) != "" { | ||
| 1110 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 86, "<p class=\"sv-meta\">") | 1123 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "<p class=\"sv-meta\">") |
| 1111 | if templ_7745c5c3_Err != nil { | 1124 | if templ_7745c5c3_Err != nil { | ||
| 1112 | return templ_7745c5c3_Err | 1125 | return templ_7745c5c3_Err | ||
| 1113 | } | 1126 | } | ||
| 1114 | - | var templ_7745c5c3_Var51 string | 1127 | + | var templ_7745c5c3_Var52 string |
| 1115 | - | templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupMeta(group)) | 1128 | + | templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingGroupMeta(group)) |
| 1116 | if templ_7745c5c3_Err != nil { | 1129 | if templ_7745c5c3_Err != nil { | ||
| 1117 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 156, Col: 52} | 1130 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 157, Col: 52} |
| 1118 | } | 1131 | } | ||
| 1119 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) | 1132 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52)) |
| 1120 | if templ_7745c5c3_Err != nil { | 1133 | if templ_7745c5c3_Err != nil { | ||
| 1121 | return templ_7745c5c3_Err | 1134 | return templ_7745c5c3_Err | ||
| 1122 | } | 1135 | } | ||
| 1123 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 87, "</p>") | 1136 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</p>") |
| 1124 | if templ_7745c5c3_Err != nil { | 1137 | if templ_7745c5c3_Err != nil { | ||
| 1125 | return templ_7745c5c3_Err | 1138 | return templ_7745c5c3_Err | ||
| 1126 | } | 1139 | } | ||
| 1127 | } | 1140 | } | ||
| 1128 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 88, "</div></div><div class=\"sv-group-body\">") | 1141 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "</div></div><div class=\"sv-group-body\">") |
| 1129 | if templ_7745c5c3_Err != nil { | 1142 | if templ_7745c5c3_Err != nil { | ||
| 1130 | return templ_7745c5c3_Err | 1143 | return templ_7745c5c3_Err | ||
| 1131 | } | 1144 | } | ||
| @@ -1135,7 +1148,7 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||||
| 1135 | return templ_7745c5c3_Err | 1148 | return templ_7745c5c3_Err | ||
| 1136 | } | 1149 | } | ||
| 1137 | } else { | 1150 | } else { | ||
| 1138 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 89, "<ul class=\"sv-list\">") | 1151 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "<ul class=\"sv-list\">") |
| 1139 | if templ_7745c5c3_Err != nil { | 1152 | if templ_7745c5c3_Err != nil { | ||
| 1140 | return templ_7745c5c3_Err | 1153 | return templ_7745c5c3_Err | ||
| 1141 | } | 1154 | } | ||
| @@ -1145,12 +1158,12 @@ func ConfigKeybindingGroup(group renderedKeybindingGroup) templ.Component { | |||||
| 1145 | return templ_7745c5c3_Err | 1158 | return templ_7745c5c3_Err | ||
| 1146 | } | 1159 | } | ||
| 1147 | } | 1160 | } | ||
| 1148 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 90, "</ul>") | 1161 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</ul>") |
| 1149 | if templ_7745c5c3_Err != nil { | 1162 | if templ_7745c5c3_Err != nil { | ||
| 1150 | return templ_7745c5c3_Err | 1163 | return templ_7745c5c3_Err | ||
| 1151 | } | 1164 | } | ||
| 1152 | } | 1165 | } | ||
| 1153 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 91, "</div></div>") | 1166 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "</div></div>") |
| 1154 | if templ_7745c5c3_Err != nil { | 1167 | if templ_7745c5c3_Err != nil { | ||
| 1155 | return templ_7745c5c3_Err | 1168 | return templ_7745c5c3_Err | ||
| 1156 | } | 1169 | } | ||
| @@ -1174,38 +1187,38 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||||
| 1174 | }() | 1187 | }() | ||
| 1175 | } | 1188 | } | ||
| 1176 | ctx = templ.InitializeContext(ctx) | 1189 | ctx = templ.InitializeContext(ctx) | ||
| 1177 | - | templ_7745c5c3_Var52 := templ.GetChildren(ctx) | 1190 | + | templ_7745c5c3_Var53 := templ.GetChildren(ctx) |
| 1178 | - | if templ_7745c5c3_Var52 == nil { | 1191 | + | if templ_7745c5c3_Var53 == nil { |
| 1179 | - | templ_7745c5c3_Var52 = templ.NopComponent | 1192 | + | templ_7745c5c3_Var53 = templ.NopComponent |
| 1180 | } | 1193 | } | ||
| 1181 | ctx = templ.ClearChildren(ctx) | 1194 | ctx = templ.ClearChildren(ctx) | ||
| 1182 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 92, "<li class=\"sv-list-row\"><div class=\"sv-keybinding-row\"><div><strong>") | 1195 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "<li class=\"sv-list-row\"><div class=\"sv-keybinding-row\"><div><strong>") |
| 1183 | if templ_7745c5c3_Err != nil { | 1196 | if templ_7745c5c3_Err != nil { | ||
| 1184 | return templ_7745c5c3_Err | 1197 | return templ_7745c5c3_Err | ||
| 1185 | } | 1198 | } | ||
| 1186 | - | var templ_7745c5c3_Var53 string | 1199 | + | var templ_7745c5c3_Var54 string |
| 1187 | - | templ_7745c5c3_Var53, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingDescription(binding)) | 1200 | + | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingDescription(binding)) |
| 1188 | if templ_7745c5c3_Err != nil { | 1201 | if templ_7745c5c3_Err != nil { | ||
| 1189 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 178, Col: 44} | 1202 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 179, Col: 44} |
| 1190 | } | 1203 | } | ||
| 1191 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var53)) | 1204 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) |
| 1192 | if templ_7745c5c3_Err != nil { | 1205 | if templ_7745c5c3_Err != nil { | ||
| 1193 | return templ_7745c5c3_Err | 1206 | return templ_7745c5c3_Err | ||
| 1194 | } | 1207 | } | ||
| 1195 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 93, "</strong><p class=\"sv-meta\">") | 1208 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</strong><p class=\"sv-meta\">") |
| 1196 | if templ_7745c5c3_Err != nil { | 1209 | if templ_7745c5c3_Err != nil { | ||
| 1197 | return templ_7745c5c3_Err | 1210 | return templ_7745c5c3_Err | ||
| 1198 | } | 1211 | } | ||
| 1199 | - | var templ_7745c5c3_Var54 string | 1212 | + | var templ_7745c5c3_Var55 string |
| 1200 | - | templ_7745c5c3_Var54, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingAction(binding)) | 1213 | + | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingAction(binding)) |
| 1201 | if templ_7745c5c3_Err != nil { | 1214 | if templ_7745c5c3_Err != nil { | ||
| 1202 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 179, Col: 50} | 1215 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 180, Col: 50} |
| 1203 | } | 1216 | } | ||
| 1204 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var54)) | 1217 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) |
| 1205 | if templ_7745c5c3_Err != nil { | 1218 | if templ_7745c5c3_Err != nil { | ||
| 1206 | return templ_7745c5c3_Err | 1219 | return templ_7745c5c3_Err | ||
| 1207 | } | 1220 | } | ||
| 1208 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 94, "</p><div class=\"sv-binding-keys\">") | 1221 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "</p><div class=\"sv-binding-keys\">") |
| 1209 | if templ_7745c5c3_Err != nil { | 1222 | if templ_7745c5c3_Err != nil { | ||
| 1210 | return templ_7745c5c3_Err | 1223 | return templ_7745c5c3_Err | ||
| 1211 | } | 1224 | } | ||
| @@ -1213,25 +1226,25 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||||
| 1213 | if templ_7745c5c3_Err != nil { | 1226 | if templ_7745c5c3_Err != nil { | ||
| 1214 | return templ_7745c5c3_Err | 1227 | return templ_7745c5c3_Err | ||
| 1215 | } | 1228 | } | ||
| 1216 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 95, "<span class=\"sv-badge\">") | 1229 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "<span class=\"sv-badge\">") |
| 1217 | if templ_7745c5c3_Err != nil { | 1230 | if templ_7745c5c3_Err != nil { | ||
| 1218 | return templ_7745c5c3_Err | 1231 | return templ_7745c5c3_Err | ||
| 1219 | } | 1232 | } | ||
| 1220 | - | var templ_7745c5c3_Var55 string | 1233 | + | var templ_7745c5c3_Var56 string |
| 1221 | - | templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingStatus(binding)) | 1234 | + | templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingStatus(binding)) |
| 1222 | if templ_7745c5c3_Err != nil { | 1235 | if templ_7745c5c3_Err != nil { | ||
| 1223 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 182, Col: 55} | 1236 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 183, Col: 55} |
| 1224 | } | 1237 | } | ||
| 1225 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55)) | 1238 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) |
| 1226 | if templ_7745c5c3_Err != nil { | 1239 | if templ_7745c5c3_Err != nil { | ||
| 1227 | return templ_7745c5c3_Err | 1240 | return templ_7745c5c3_Err | ||
| 1228 | } | 1241 | } | ||
| 1229 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 96, "</span> ") | 1242 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "</span> ") |
| 1230 | if templ_7745c5c3_Err != nil { | 1243 | if templ_7745c5c3_Err != nil { | ||
| 1231 | return templ_7745c5c3_Err | 1244 | return templ_7745c5c3_Err | ||
| 1232 | } | 1245 | } | ||
| 1233 | if keybindingIsCustom(binding) && len(binding.DefaultKeys) > 0 { | 1246 | if keybindingIsCustom(binding) && len(binding.DefaultKeys) > 0 { | ||
| 1234 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 97, "<span class=\"sv-meta\">default:</span>") | 1247 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "<span class=\"sv-meta\">default:</span>") |
| 1235 | if templ_7745c5c3_Err != nil { | 1248 | if templ_7745c5c3_Err != nil { | ||
| 1236 | return templ_7745c5c3_Err | 1249 | return templ_7745c5c3_Err | ||
| 1237 | } | 1250 | } | ||
| @@ -1240,46 +1253,46 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||||
| 1240 | return templ_7745c5c3_Err | 1253 | return templ_7745c5c3_Err | ||
| 1241 | } | 1254 | } | ||
| 1242 | } | 1255 | } | ||
| 1243 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 98, "</div></div><form class=\"sv-inline-form\" data-sv-action=\"config.keybinding.set\"><input type=\"hidden\" name=\"mode\" value=\"") | 1256 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "</div></div><form class=\"sv-inline-form\" data-sv-action=\"config.keybinding.set\"><input type=\"hidden\" name=\"mode\" value=\"") |
| 1244 | if templ_7745c5c3_Err != nil { | 1257 | if templ_7745c5c3_Err != nil { | ||
| 1245 | return templ_7745c5c3_Err | 1258 | return templ_7745c5c3_Err | ||
| 1246 | } | 1259 | } | ||
| 1247 | - | var templ_7745c5c3_Var56 string | 1260 | + | var templ_7745c5c3_Var57 string |
| 1248 | - | templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(group.Mode) | 1261 | + | templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Mode) |
| 1249 | if templ_7745c5c3_Err != nil { | 1262 | if templ_7745c5c3_Err != nil { | ||
| 1250 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 190, Col: 55} | 1263 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 191, Col: 55} |
| 1251 | } | 1264 | } | ||
| 1252 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56)) | 1265 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var57) |
| 1253 | if templ_7745c5c3_Err != nil { | 1266 | if templ_7745c5c3_Err != nil { | ||
| 1254 | return templ_7745c5c3_Err | 1267 | return templ_7745c5c3_Err | ||
| 1255 | } | 1268 | } | ||
| 1256 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 99, "\"> <input type=\"hidden\" name=\"action\" value=\"") | 1269 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\"> <input type=\"hidden\" name=\"action\" value=\"") |
| 1257 | if templ_7745c5c3_Err != nil { | 1270 | if templ_7745c5c3_Err != nil { | ||
| 1258 | return templ_7745c5c3_Err | 1271 | return templ_7745c5c3_Err | ||
| 1259 | } | 1272 | } | ||
| 1260 | - | var templ_7745c5c3_Var57 string | 1273 | + | var templ_7745c5c3_Var58 string |
| 1261 | - | templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(binding.Action) | 1274 | + | templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.ResolveAttributeValue(binding.Action) |
| 1262 | if templ_7745c5c3_Err != nil { | 1275 | if templ_7745c5c3_Err != nil { | ||
| 1263 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 191, Col: 61} | 1276 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 192, Col: 61} |
| 1264 | } | 1277 | } | ||
| 1265 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57)) | 1278 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var58) |
| 1266 | if templ_7745c5c3_Err != nil { | 1279 | if templ_7745c5c3_Err != nil { | ||
| 1267 | return templ_7745c5c3_Err | 1280 | return templ_7745c5c3_Err | ||
| 1268 | } | 1281 | } | ||
| 1269 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 100, "\"> <label><span>Keys</span><input name=\"keys\" type=\"text\" value=\"") | 1282 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "\"> <label><span>Keys</span><input name=\"keys\" type=\"text\" value=\"") |
| 1270 | if templ_7745c5c3_Err != nil { | 1283 | if templ_7745c5c3_Err != nil { | ||
| 1271 | return templ_7745c5c3_Err | 1284 | return templ_7745c5c3_Err | ||
| 1272 | } | 1285 | } | ||
| 1273 | - | var templ_7745c5c3_Var58 string | 1286 | + | var templ_7745c5c3_Var59 string |
| 1274 | - | templ_7745c5c3_Var58, templ_7745c5c3_Err = templ.JoinStringErrs(keybindingKeysValue(binding.Keys)) | 1287 | + | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.ResolveAttributeValue(keybindingKeysValue(binding.Keys)) |
| 1275 | if templ_7745c5c3_Err != nil { | 1288 | if templ_7745c5c3_Err != nil { | ||
| 1276 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 192, Col: 100} | 1289 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 193, Col: 100} |
| 1277 | } | 1290 | } | ||
| 1278 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var58)) | 1291 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var59) |
| 1279 | if templ_7745c5c3_Err != nil { | 1292 | if templ_7745c5c3_Err != nil { | ||
| 1280 | return templ_7745c5c3_Err | 1293 | return templ_7745c5c3_Err | ||
| 1281 | } | 1294 | } | ||
| 1282 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 101, "\" placeholder=\"ctrl+h, ctrl+shift+h\" required></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") | 1295 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "\" placeholder=\"ctrl+h, ctrl+shift+h\" required></label> <button class=\"sv-button sv-button-secondary\" type=\"submit\">") |
| 1283 | if templ_7745c5c3_Err != nil { | 1296 | if templ_7745c5c3_Err != nil { | ||
| 1284 | return templ_7745c5c3_Err | 1297 | return templ_7745c5c3_Err | ||
| 1285 | } | 1298 | } | ||
| @@ -1287,33 +1300,33 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||||
| 1287 | if templ_7745c5c3_Err != nil { | 1300 | if templ_7745c5c3_Err != nil { | ||
| 1288 | return templ_7745c5c3_Err | 1301 | return templ_7745c5c3_Err | ||
| 1289 | } | 1302 | } | ||
| 1290 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 102, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.keybinding.reset\" data-mode=\"") | 1303 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"config.keybinding.reset\" data-mode=\"") |
| 1291 | if templ_7745c5c3_Err != nil { | 1304 | if templ_7745c5c3_Err != nil { | ||
| 1292 | return templ_7745c5c3_Err | 1305 | return templ_7745c5c3_Err | ||
| 1293 | } | 1306 | } | ||
| 1294 | - | var templ_7745c5c3_Var59 string | 1307 | + | var templ_7745c5c3_Var60 string |
| 1295 | - | templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(group.Mode) | 1308 | + | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.ResolveAttributeValue(group.Mode) |
| 1296 | if templ_7745c5c3_Err != nil { | 1309 | if templ_7745c5c3_Err != nil { | ||
| 1297 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 194, Col: 127} | 1310 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 195, Col: 127} |
| 1298 | } | 1311 | } | ||
| 1299 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59)) | 1312 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var60) |
| 1300 | if templ_7745c5c3_Err != nil { | 1313 | if templ_7745c5c3_Err != nil { | ||
| 1301 | return templ_7745c5c3_Err | 1314 | return templ_7745c5c3_Err | ||
| 1302 | } | 1315 | } | ||
| 1303 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 103, "\" data-action=\"") | 1316 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\" data-action=\"") |
| 1304 | if templ_7745c5c3_Err != nil { | 1317 | if templ_7745c5c3_Err != nil { | ||
| 1305 | return templ_7745c5c3_Err | 1318 | return templ_7745c5c3_Err | ||
| 1306 | } | 1319 | } | ||
| 1307 | - | var templ_7745c5c3_Var60 string | 1320 | + | var templ_7745c5c3_Var61 string |
| 1308 | - | templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(binding.Action) | 1321 | + | templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.ResolveAttributeValue(binding.Action) |
| 1309 | if templ_7745c5c3_Err != nil { | 1322 | if templ_7745c5c3_Err != nil { | ||
| 1310 | - | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 194, Col: 158} | 1323 | + | return templ.Error{Err: templ_7745c5c3_Err, FileName: `config.templ`, Line: 195, Col: 158} |
| 1311 | } | 1324 | } | ||
| 1312 | - | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60)) | 1325 | + | _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var61) |
| 1313 | if templ_7745c5c3_Err != nil { | 1326 | if templ_7745c5c3_Err != nil { | ||
| 1314 | return templ_7745c5c3_Err | 1327 | return templ_7745c5c3_Err | ||
| 1315 | } | 1328 | } | ||
| 1316 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 104, "\">") | 1329 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "\">") |
| 1317 | if templ_7745c5c3_Err != nil { | 1330 | if templ_7745c5c3_Err != nil { | ||
| 1318 | return templ_7745c5c3_Err | 1331 | return templ_7745c5c3_Err | ||
| 1319 | } | 1332 | } | ||
| @@ -1321,7 +1334,7 @@ func ConfigKeybinding(group renderedKeybindingGroup, binding renderedKeybinding) | |||||
| 1321 | if templ_7745c5c3_Err != nil { | 1334 | if templ_7745c5c3_Err != nil { | ||
| 1322 | return templ_7745c5c3_Err | 1335 | return templ_7745c5c3_Err | ||
| 1323 | } | 1336 | } | ||
| 1324 | - | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 105, "</button></form></div></li>") | 1337 | + | templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 106, "</button></form></div></li>") |
| 1325 | if templ_7745c5c3_Err != nil { | 1338 | if templ_7745c5c3_Err != nil { | ||
| 1326 | return templ_7745c5c3_Err | 1339 | return templ_7745c5c3_Err | ||
| 1327 | } | 1340 | } | ||
M internal/ui/systemviews/theme.go +1 -0
| @@ -184,6 +184,7 @@ func isZeroAppearance(appearance dto.WebUIAppearanceConfig) bool { | |||
| 184 | 184 | appearance.SansFont == "" && | |
| 185 | 185 | appearance.SerifFont == "" && | |
| 186 | 186 | appearance.MonospaceFont == "" && | |
| 187 | + | appearance.GtkFont == "" && | |
| 187 | 188 | appearance.DefaultFontSize == 0 && | |
| 188 | 189 | appearance.LightPalette == (dto.ColorPalette{}) && | |
| 189 | 190 | appearance.DarkPalette == (dto.ColorPalette{}) | |
| @@ -184,6 +184,7 @@ func isZeroAppearance(appearance dto.WebUIAppearanceConfig) bool { | |||||
| 184 | appearance.SansFont == "" && | 184 | appearance.SansFont == "" && | ||
| 185 | appearance.SerifFont == "" && | 185 | appearance.SerifFont == "" && | ||
| 186 | appearance.MonospaceFont == "" && | 186 | appearance.MonospaceFont == "" && | ||
| 187 | + | appearance.GtkFont == "" && | |||
| 187 | appearance.DefaultFontSize == 0 && | 188 | appearance.DefaultFontSize == 0 && | ||
| 188 | appearance.LightPalette == (dto.ColorPalette{}) && | 189 | appearance.LightPalette == (dto.ColorPalette{}) && | ||
| 189 | appearance.DarkPalette == (dto.ColorPalette{}) | 190 | appearance.DarkPalette == (dto.ColorPalette{}) | ||
M internal/ui/theme/css.go +5 -1
| @@ -21,6 +21,7 @@ func GenerateCSSWithScale(p Palette, scale float64) string { | |||
| 21 | 21 | type FontConfig struct { | |
| 22 | 22 | SansFont string | |
| 23 | 23 | MonospaceFont string | |
| 24 | + | GtkFont string | |
| 24 | 25 | } | |
| 25 | 26 | ||
| 26 | 27 | // DefaultFontConfig returns safe font fallbacks. | |
| @@ -28,6 +29,7 @@ func DefaultFontConfig() FontConfig { | |||
| 28 | 29 | return FontConfig{ | |
| 29 | 30 | SansFont: "sans-serif", | |
| 30 | 31 | MonospaceFont: "monospace", | |
| 32 | + | GtkFont: DefaultGTKFont(), | |
| 31 | 33 | } | |
| 32 | 34 | } | |
| 33 | 35 | ||
| @@ -37,13 +39,14 @@ func FontCSSVars(fonts FontConfig) string { | |||
| 37 | 39 | // Quote the configured family; include generic fallback. | |
| 38 | 40 | fmt.Fprintf(&sb, " --font-sans: %q, sans-serif;\n", fonts.SansFont) | |
| 39 | 41 | fmt.Fprintf(&sb, " --font-mono: %q, monospace;\n", fonts.MonospaceFont) | |
| 42 | + | fmt.Fprintf(&sb, " --font-gtk: %q, sans-serif;\n", fonts.GtkFont) | |
| 40 | 43 | return sb.String() | |
| 41 | 44 | } | |
| 42 | 45 | ||
| 43 | 46 | func generateFontCSS() string { | |
| 44 | 47 | return `/* Font styling */ | |
| 45 | 48 | window, tooltip, popover { | |
| 46 | - | font-family: var(--font-sans); | |
| 49 | + | font-family: var(--font-gtk); | |
| 47 | 50 | } | |
| 48 | 51 | ` | |
| 49 | 52 | } | |
| @@ -62,6 +65,7 @@ func GenerateCSSFull(p Palette, _ float64, fonts FontConfig, modeColors ModeColo | |||
| 62 | 65 | fonts = FontConfig{ | |
| 63 | 66 | SansFont: Coalesce(fonts.SansFont, defaults.SansFont), | |
| 64 | 67 | MonospaceFont: Coalesce(fonts.MonospaceFont, defaults.MonospaceFont), | |
| 68 | + | GtkFont: Coalesce(fonts.GtkFont, defaults.GtkFont), | |
| 65 | 69 | } | |
| 66 | 70 | ||
| 67 | 71 | var sb strings.Builder | |
| @@ -21,6 +21,7 @@ func GenerateCSSWithScale(p Palette, scale float64) string { | |||||
| 21 | type FontConfig struct { | 21 | type FontConfig struct { | ||
| 22 | SansFont string | 22 | SansFont string | ||
| 23 | MonospaceFont string | 23 | MonospaceFont string | ||
| 24 | + | GtkFont string | |||
| 24 | } | 25 | } | ||
| 25 | 26 | ||||
| 26 | // DefaultFontConfig returns safe font fallbacks. | 27 | // DefaultFontConfig returns safe font fallbacks. | ||
| @@ -28,6 +29,7 @@ func DefaultFontConfig() FontConfig { | |||||
| 28 | return FontConfig{ | 29 | return FontConfig{ | ||
| 29 | SansFont: "sans-serif", | 30 | SansFont: "sans-serif", | ||
| 30 | MonospaceFont: "monospace", | 31 | MonospaceFont: "monospace", | ||
| 32 | + | GtkFont: DefaultGTKFont(), | |||
| 31 | } | 33 | } | ||
| 32 | } | 34 | } | ||
| 33 | 35 | ||||
| @@ -37,13 +39,14 @@ func FontCSSVars(fonts FontConfig) string { | |||||
| 37 | // Quote the configured family; include generic fallback. | 39 | // Quote the configured family; include generic fallback. | ||
| 38 | fmt.Fprintf(&sb, " --font-sans: %q, sans-serif;\n", fonts.SansFont) | 40 | fmt.Fprintf(&sb, " --font-sans: %q, sans-serif;\n", fonts.SansFont) | ||
| 39 | fmt.Fprintf(&sb, " --font-mono: %q, monospace;\n", fonts.MonospaceFont) | 41 | fmt.Fprintf(&sb, " --font-mono: %q, monospace;\n", fonts.MonospaceFont) | ||
| 42 | + | fmt.Fprintf(&sb, " --font-gtk: %q, sans-serif;\n", fonts.GtkFont) | |||
| 40 | return sb.String() | 43 | return sb.String() | ||
| 41 | } | 44 | } | ||
| 42 | 45 | ||||
| 43 | func generateFontCSS() string { | 46 | func generateFontCSS() string { | ||
| 44 | return `/* Font styling */ | 47 | return `/* Font styling */ | ||
| 45 | window, tooltip, popover { | 48 | window, tooltip, popover { | ||
| 46 | - | font-family: var(--font-sans); | 49 | + | font-family: var(--font-gtk); |
| 47 | } | 50 | } | ||
| 48 | ` | 51 | ` | ||
| 49 | } | 52 | } | ||
| @@ -62,6 +65,7 @@ func GenerateCSSFull(p Palette, _ float64, fonts FontConfig, modeColors ModeColo | |||||
| 62 | fonts = FontConfig{ | 65 | fonts = FontConfig{ | ||
| 63 | SansFont: Coalesce(fonts.SansFont, defaults.SansFont), | 66 | SansFont: Coalesce(fonts.SansFont, defaults.SansFont), | ||
| 64 | MonospaceFont: Coalesce(fonts.MonospaceFont, defaults.MonospaceFont), | 67 | MonospaceFont: Coalesce(fonts.MonospaceFont, defaults.MonospaceFont), | ||
| 68 | + | GtkFont: Coalesce(fonts.GtkFont, defaults.GtkFont), | |||
| 65 | } | 69 | } | ||
| 66 | 70 | ||||
| 67 | var sb strings.Builder | 71 | var sb strings.Builder | ||
M internal/ui/theme/css_test.go +14 -0
| @@ -8,6 +8,20 @@ import ( | |||
| 8 | 8 | "github.com/stretchr/testify/assert" | |
| 9 | 9 | ) | |
| 10 | 10 | ||
| 11 | + | func TestGenerateCSS_UsesGTKFontForNativeWidgets(t *testing.T) { | |
| 12 | + | css := GenerateCSSWithScaleAndFonts(DefaultDarkPalette(), 1.0, FontConfig{ | |
| 13 | + | SansFont: "Fira Sans", | |
| 14 | + | MonospaceFont: "Fira Code", | |
| 15 | + | GtkFont: "Adwaita Sans", | |
| 16 | + | }) | |
| 17 | + | ||
| 18 | + | assert.Contains(t, css, `--font-sans: "Fira Sans", sans-serif;`) | |
| 19 | + | assert.Contains(t, css, `--font-mono: "Fira Code", monospace;`) | |
| 20 | + | assert.Contains(t, css, `--font-gtk: "Adwaita Sans", sans-serif;`) | |
| 21 | + | assert.Contains(t, css, "window, tooltip, popover {\n\tfont-family: var(--font-gtk);\n}") | |
| 22 | + | assert.NotContains(t, css, "window, tooltip, popover {\n\tfont-family: var(--font-sans);\n}") | |
| 23 | + | } | |
| 24 | + | ||
| 11 | 25 | func TestGenerateCSS_StandaloneOmniboxWindowUsesTransparentBackground(t *testing.T) { | |
| 12 | 26 | css := GenerateCSS(DefaultDarkPalette()) | |
| 13 | 27 | ||
| @@ -8,6 +8,20 @@ import ( | |||||
| 8 | "github.com/stretchr/testify/assert" | 8 | "github.com/stretchr/testify/assert" | ||
| 9 | ) | 9 | ) | ||
| 10 | 10 | ||||
| 11 | + | func TestGenerateCSS_UsesGTKFontForNativeWidgets(t *testing.T) { | |||
| 12 | + | css := GenerateCSSWithScaleAndFonts(DefaultDarkPalette(), 1.0, FontConfig{ | |||
| 13 | + | SansFont: "Fira Sans", | |||
| 14 | + | MonospaceFont: "Fira Code", | |||
| 15 | + | GtkFont: "Adwaita Sans", | |||
| 16 | + | }) | |||
| 17 | + | ||||
| 18 | + | assert.Contains(t, css, `--font-sans: "Fira Sans", sans-serif;`) | |||
| 19 | + | assert.Contains(t, css, `--font-mono: "Fira Code", monospace;`) | |||
| 20 | + | assert.Contains(t, css, `--font-gtk: "Adwaita Sans", sans-serif;`) | |||
| 21 | + | assert.Contains(t, css, "window, tooltip, popover {\n\tfont-family: var(--font-gtk);\n}") | |||
| 22 | + | assert.NotContains(t, css, "window, tooltip, popover {\n\tfont-family: var(--font-sans);\n}") | |||
| 23 | + | } | |||
| 24 | + | ||||
| 11 | func TestGenerateCSS_StandaloneOmniboxWindowUsesTransparentBackground(t *testing.T) { | 25 | func TestGenerateCSS_StandaloneOmniboxWindowUsesTransparentBackground(t *testing.T) { | ||
| 12 | css := GenerateCSS(DefaultDarkPalette()) | 26 | css := GenerateCSS(DefaultDarkPalette()) | ||
| 13 | 27 | ||||
M internal/ui/theme/manager.go +13 -2
| @@ -21,6 +21,7 @@ type Manager struct { | |||
| 21 | 21 | darkPalette Palette // Dark theme colors | |
| 22 | 22 | uiScale float64 // UI scaling factor (1.0 = 100%) | |
| 23 | 23 | fonts FontConfig | |
| 24 | + | gtkFont string | |
| 24 | 25 | modeColors ModeColors // Modal mode indicator colors | |
| 25 | 26 | cssProvider *gtk.CssProvider | |
| 26 | 27 | appliedFont string | |
| @@ -68,9 +69,12 @@ func NewManager( | |||
| 68 | 69 | } | |
| 69 | 70 | ||
| 70 | 71 | fonts := DefaultFontConfig() | |
| 72 | + | gtkFont := DefaultGTKFont() | |
| 71 | 73 | if appearance != nil { | |
| 72 | 74 | fonts.SansFont = Coalesce(appearance.SansFont, fonts.SansFont) | |
| 73 | 75 | fonts.MonospaceFont = Coalesce(appearance.MonospaceFont, fonts.MonospaceFont) | |
| 76 | + | gtkFont = Coalesce(appearance.GtkFont, gtkFont) | |
| 77 | + | fonts.GtkFont = gtkFont | |
| 74 | 78 | } | |
| 75 | 79 | ||
| 76 | 80 | // Build mode colors from config | |
| @@ -82,6 +86,7 @@ func NewManager( | |||
| 82 | 86 | Float64("ui_scale", uiScale). | |
| 83 | 87 | Str("sans_font", fonts.SansFont). | |
| 84 | 88 | Str("monospace_font", fonts.MonospaceFont). | |
| 89 | + | Str("gtk_font", gtkFont). | |
| 85 | 90 | Msg("theme manager initialized") | |
| 86 | 91 | ||
| 87 | 92 | return &Manager{ | |
| @@ -91,6 +96,7 @@ func NewManager( | |||
| 91 | 96 | darkPalette: darkPalette, | |
| 92 | 97 | uiScale: uiScale, | |
| 93 | 98 | fonts: fonts, | |
| 99 | + | gtkFont: gtkFont, | |
| 94 | 100 | modeColors: modeColors, | |
| 95 | 101 | colorResolver: resolver, | |
| 96 | 102 | } | |
| @@ -155,10 +161,12 @@ func (m *Manager) GetWebUIThemeCSS() string { | |||
| 155 | 161 | ||
| 156 | 162 | const gtkDefaultFontPointSize = 11 | |
| 157 | 163 | ||
| 164 | + | func DefaultGTKFont() string { return "Adwaita Sans" } | |
| 165 | + | ||
| 158 | 166 | func formatGTKFontName(family string, uiScale float64) string { | |
| 159 | 167 | family = strings.TrimSpace(family) | |
| 160 | 168 | if family == "" { | |
| 161 | - | family = DefaultFontConfig().SansFont | |
| 169 | + | family = DefaultGTKFont() | |
| 162 | 170 | } | |
| 163 | 171 | if uiScale <= 0 { | |
| 164 | 172 | uiScale = 1.0 | |
| @@ -186,7 +194,7 @@ func (m *Manager) ApplyToDisplay(ctx context.Context, display *gdk.Display) { | |||
| 186 | 194 | // Generate CSS with current palette, UI scale, fonts, and mode colors | |
| 187 | 195 | palette := m.GetCurrentPalette() | |
| 188 | 196 | css := GenerateCSSFull(palette, m.uiScale, m.fonts, m.modeColors) | |
| 189 | - | fontName := formatGTKFontName(m.fonts.SansFont, m.uiScale) | |
| 197 | + | fontName := formatGTKFontName(m.gtkFont, m.uiScale) | |
| 190 | 198 | ||
| 191 | 199 | settings := gtk.SettingsGetForDisplay(display) | |
| 192 | 200 | if settings == nil { | |
| @@ -279,9 +287,11 @@ func (m *Manager) UpdateFromConfig( | |||
| 279 | 287 | } | |
| 280 | 288 | ||
| 281 | 289 | defaults := DefaultFontConfig() | |
| 290 | + | m.gtkFont = Coalesce(appearance.GtkFont, DefaultGTKFont()) | |
| 282 | 291 | m.fonts = FontConfig{ | |
| 283 | 292 | SansFont: Coalesce(appearance.SansFont, defaults.SansFont), | |
| 284 | 293 | MonospaceFont: Coalesce(appearance.MonospaceFont, defaults.MonospaceFont), | |
| 294 | + | GtkFont: m.gtkFont, | |
| 285 | 295 | } | |
| 286 | 296 | ||
| 287 | 297 | // Update mode colors | |
| @@ -295,6 +305,7 @@ func (m *Manager) UpdateFromConfig( | |||
| 295 | 305 | Float64("ui_scale", m.uiScale). | |
| 296 | 306 | Str("sans_font", m.fonts.SansFont). | |
| 297 | 307 | Str("monospace_font", m.fonts.MonospaceFont). | |
| 308 | + | Str("gtk_font", m.gtkFont). | |
| 298 | 309 | Msg("theme manager updated from config") | |
| 299 | 310 | ||
| 300 | 311 | // Re-apply CSS if display is available | |
| @@ -21,6 +21,7 @@ type Manager struct { | |||||
| 21 | darkPalette Palette // Dark theme colors | 21 | darkPalette Palette // Dark theme colors | ||
| 22 | uiScale float64 // UI scaling factor (1.0 = 100%) | 22 | uiScale float64 // UI scaling factor (1.0 = 100%) | ||
| 23 | fonts FontConfig | 23 | fonts FontConfig | ||
| 24 | + | gtkFont string | |||
| 24 | modeColors ModeColors // Modal mode indicator colors | 25 | modeColors ModeColors // Modal mode indicator colors | ||
| 25 | cssProvider *gtk.CssProvider | 26 | cssProvider *gtk.CssProvider | ||
| 26 | appliedFont string | 27 | appliedFont string | ||
| @@ -68,9 +69,12 @@ func NewManager( | |||||
| 68 | } | 69 | } | ||
| 69 | 70 | ||||
| 70 | fonts := DefaultFontConfig() | 71 | fonts := DefaultFontConfig() | ||
| 72 | + | gtkFont := DefaultGTKFont() | |||
| 71 | if appearance != nil { | 73 | if appearance != nil { | ||
| 72 | fonts.SansFont = Coalesce(appearance.SansFont, fonts.SansFont) | 74 | fonts.SansFont = Coalesce(appearance.SansFont, fonts.SansFont) | ||
| 73 | fonts.MonospaceFont = Coalesce(appearance.MonospaceFont, fonts.MonospaceFont) | 75 | fonts.MonospaceFont = Coalesce(appearance.MonospaceFont, fonts.MonospaceFont) | ||
| 76 | + | gtkFont = Coalesce(appearance.GtkFont, gtkFont) | |||
| 77 | + | fonts.GtkFont = gtkFont | |||
| 74 | } | 78 | } | ||
| 75 | 79 | ||||
| 76 | // Build mode colors from config | 80 | // Build mode colors from config | ||
| @@ -82,6 +86,7 @@ func NewManager( | |||||
| 82 | Float64("ui_scale", uiScale). | 86 | Float64("ui_scale", uiScale). | ||
| 83 | Str("sans_font", fonts.SansFont). | 87 | Str("sans_font", fonts.SansFont). | ||
| 84 | Str("monospace_font", fonts.MonospaceFont). | 88 | Str("monospace_font", fonts.MonospaceFont). | ||
| 89 | + | Str("gtk_font", gtkFont). | |||
| 85 | Msg("theme manager initialized") | 90 | Msg("theme manager initialized") | ||
| 86 | 91 | ||||
| 87 | return &Manager{ | 92 | return &Manager{ | ||
| @@ -91,6 +96,7 @@ func NewManager( | |||||
| 91 | darkPalette: darkPalette, | 96 | darkPalette: darkPalette, | ||
| 92 | uiScale: uiScale, | 97 | uiScale: uiScale, | ||
| 93 | fonts: fonts, | 98 | fonts: fonts, | ||
| 99 | + | gtkFont: gtkFont, | |||
| 94 | modeColors: modeColors, | 100 | modeColors: modeColors, | ||
| 95 | colorResolver: resolver, | 101 | colorResolver: resolver, | ||
| 96 | } | 102 | } | ||
| @@ -155,10 +161,12 @@ func (m *Manager) GetWebUIThemeCSS() string { | |||||
| 155 | 161 | ||||
| 156 | const gtkDefaultFontPointSize = 11 | 162 | const gtkDefaultFontPointSize = 11 | ||
| 157 | 163 | ||||
| 164 | + | func DefaultGTKFont() string { return "Adwaita Sans" } | |||
| 165 | + | ||||
| 158 | func formatGTKFontName(family string, uiScale float64) string { | 166 | func formatGTKFontName(family string, uiScale float64) string { | ||
| 159 | family = strings.TrimSpace(family) | 167 | family = strings.TrimSpace(family) | ||
| 160 | if family == "" { | 168 | if family == "" { | ||
| 161 | - | family = DefaultFontConfig().SansFont | 169 | + | family = DefaultGTKFont() |
| 162 | } | 170 | } | ||
| 163 | if uiScale <= 0 { | 171 | if uiScale <= 0 { | ||
| 164 | uiScale = 1.0 | 172 | uiScale = 1.0 | ||
| @@ -186,7 +194,7 @@ func (m *Manager) ApplyToDisplay(ctx context.Context, display *gdk.Display) { | |||||
| 186 | // Generate CSS with current palette, UI scale, fonts, and mode colors | 194 | // Generate CSS with current palette, UI scale, fonts, and mode colors | ||
| 187 | palette := m.GetCurrentPalette() | 195 | palette := m.GetCurrentPalette() | ||
| 188 | css := GenerateCSSFull(palette, m.uiScale, m.fonts, m.modeColors) | 196 | css := GenerateCSSFull(palette, m.uiScale, m.fonts, m.modeColors) | ||
| 189 | - | fontName := formatGTKFontName(m.fonts.SansFont, m.uiScale) | 197 | + | fontName := formatGTKFontName(m.gtkFont, m.uiScale) |
| 190 | 198 | ||||
| 191 | settings := gtk.SettingsGetForDisplay(display) | 199 | settings := gtk.SettingsGetForDisplay(display) | ||
| 192 | if settings == nil { | 200 | if settings == nil { | ||
| @@ -279,9 +287,11 @@ func (m *Manager) UpdateFromConfig( | |||||
| 279 | } | 287 | } | ||
| 280 | 288 | ||||
| 281 | defaults := DefaultFontConfig() | 289 | defaults := DefaultFontConfig() | ||
| 290 | + | m.gtkFont = Coalesce(appearance.GtkFont, DefaultGTKFont()) | |||
| 282 | m.fonts = FontConfig{ | 291 | m.fonts = FontConfig{ | ||
| 283 | SansFont: Coalesce(appearance.SansFont, defaults.SansFont), | 292 | SansFont: Coalesce(appearance.SansFont, defaults.SansFont), | ||
| 284 | MonospaceFont: Coalesce(appearance.MonospaceFont, defaults.MonospaceFont), | 293 | MonospaceFont: Coalesce(appearance.MonospaceFont, defaults.MonospaceFont), | ||
| 294 | + | GtkFont: m.gtkFont, | |||
| 285 | } | 295 | } | ||
| 286 | 296 | ||||
| 287 | // Update mode colors | 297 | // Update mode colors | ||
| @@ -295,6 +305,7 @@ func (m *Manager) UpdateFromConfig( | |||||
| 295 | Float64("ui_scale", m.uiScale). | 305 | Float64("ui_scale", m.uiScale). | ||
| 296 | Str("sans_font", m.fonts.SansFont). | 306 | Str("sans_font", m.fonts.SansFont). | ||
| 297 | Str("monospace_font", m.fonts.MonospaceFont). | 307 | Str("monospace_font", m.fonts.MonospaceFont). | ||
| 308 | + | Str("gtk_font", m.gtkFont). | |||
| 298 | Msg("theme manager updated from config") | 309 | Msg("theme manager updated from config") | ||
| 299 | 310 | ||||
| 300 | // Re-apply CSS if display is available | 311 | // Re-apply CSS if display is available | ||
M internal/ui/theme/manager_test.go +8 -2
| @@ -276,6 +276,7 @@ func TestManager_Fonts(t *testing.T) { | |||
| 276 | 276 | appearance := &entity.AppearanceConfig{ | |
| 277 | 277 | SansFont: "Inter", | |
| 278 | 278 | MonospaceFont: "JetBrains Mono", | |
| 279 | + | GtkFont: "Adwaita Sans", | |
| 279 | 280 | } | |
| 280 | 281 | ||
| 281 | 282 | mockResolver := mocks.NewMockColorSchemeResolver(t) | |
| @@ -314,13 +315,18 @@ func TestManager_ModeColors(t *testing.T) { | |||
| 314 | 315 | assert.Equal(t, "#ffff00", modeColors.ResizeMode) | |
| 315 | 316 | } | |
| 316 | 317 | ||
| 317 | - | func TestFormatGTKFontName_UsesScaledConfiguredSansFont(t *testing.T) { | |
| 318 | - | assert.Equal(t, "Fira Sans 14", formatGTKFontName("Fira Sans", 1.3)) | |
| 318 | + | func TestDefaultGTKFont(t *testing.T) { | |
| 319 | + | assert.Equal(t, "Adwaita Sans", DefaultGTKFont()) | |
| 320 | + | } | |
| 321 | + | ||
| 322 | + | func TestFormatGTKFontName_UsesScaledConfiguredGTKFont(t *testing.T) { | |
| 323 | + | assert.Equal(t, "Adwaita Sans 14", formatGTKFontName("Adwaita Sans", 1.3)) | |
| 319 | 324 | } | |
| 320 | 325 | ||
| 321 | 326 | func TestFormatGTKFontName_DefaultsScaleAndRoundsToNearestPoint(t *testing.T) { | |
| 322 | 327 | assert.Equal(t, "Inter 11", formatGTKFontName("Inter", 0)) | |
| 323 | 328 | assert.Equal(t, "Inter 12", formatGTKFontName("Inter", 1.05)) | |
| 329 | + | assert.Equal(t, "Adwaita Sans 11", formatGTKFontName("", 1.0)) | |
| 324 | 330 | } | |
| 325 | 331 | ||
| 326 | 332 | func TestShouldApplyGTKFontName(t *testing.T) { | |
| @@ -276,6 +276,7 @@ func TestManager_Fonts(t *testing.T) { | |||||
| 276 | appearance := &entity.AppearanceConfig{ | 276 | appearance := &entity.AppearanceConfig{ | ||
| 277 | SansFont: "Inter", | 277 | SansFont: "Inter", | ||
| 278 | MonospaceFont: "JetBrains Mono", | 278 | MonospaceFont: "JetBrains Mono", | ||
| 279 | + | GtkFont: "Adwaita Sans", | |||
| 279 | } | 280 | } | ||
| 280 | 281 | ||||
| 281 | mockResolver := mocks.NewMockColorSchemeResolver(t) | 282 | mockResolver := mocks.NewMockColorSchemeResolver(t) | ||
| @@ -314,13 +315,18 @@ func TestManager_ModeColors(t *testing.T) { | |||||
| 314 | assert.Equal(t, "#ffff00", modeColors.ResizeMode) | 315 | assert.Equal(t, "#ffff00", modeColors.ResizeMode) | ||
| 315 | } | 316 | } | ||
| 316 | 317 | ||||
| 317 | - | func TestFormatGTKFontName_UsesScaledConfiguredSansFont(t *testing.T) { | 318 | + | func TestDefaultGTKFont(t *testing.T) { |
| 318 | - | assert.Equal(t, "Fira Sans 14", formatGTKFontName("Fira Sans", 1.3)) | 319 | + | assert.Equal(t, "Adwaita Sans", DefaultGTKFont()) |
| 320 | + | } | |||
| 321 | + | ||||
| 322 | + | func TestFormatGTKFontName_UsesScaledConfiguredGTKFont(t *testing.T) { | |||
| 323 | + | assert.Equal(t, "Adwaita Sans 14", formatGTKFontName("Adwaita Sans", 1.3)) | |||
| 319 | } | 324 | } | ||
| 320 | 325 | ||||
| 321 | func TestFormatGTKFontName_DefaultsScaleAndRoundsToNearestPoint(t *testing.T) { | 326 | func TestFormatGTKFontName_DefaultsScaleAndRoundsToNearestPoint(t *testing.T) { | ||
| 322 | assert.Equal(t, "Inter 11", formatGTKFontName("Inter", 0)) | 327 | assert.Equal(t, "Inter 11", formatGTKFontName("Inter", 0)) | ||
| 323 | assert.Equal(t, "Inter 12", formatGTKFontName("Inter", 1.05)) | 328 | assert.Equal(t, "Inter 12", formatGTKFontName("Inter", 1.05)) | ||
| 329 | + | assert.Equal(t, "Adwaita Sans 11", formatGTKFontName("", 1.0)) | |||
| 324 | } | 330 | } | ||
| 325 | 331 | ||||
| 326 | func TestShouldApplyGTKFontName(t *testing.T) { | 332 | func TestShouldApplyGTKFontName(t *testing.T) { | ||