fix cookie -- not working

This commit is contained in:
2026-05-12 11:25:32 +02:00
parent 669d24c6a3
commit 8c4e664ca8
23 changed files with 836 additions and 166 deletions
+7 -7
View File
@@ -92,11 +92,11 @@ func Layout(title string, cssPath string, jsPath string, menu []pscatalog.MenuIt
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = LocalePicker("Market", locale.CurrentCountry, locale.Countries, true).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = LocalePicker("Market", locale.CurrentCountry, locale.Countries, true, false).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = LocalePicker("Language", locale.CurrentLanguage, locale.Languages, true).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = LocalePicker("Language", locale.CurrentLanguage, locale.Languages, true, true).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -147,7 +147,7 @@ func Layout(title string, cssPath string, jsPath string, menu []pscatalog.MenuIt
})
}
func LocalePicker(title string, current pscatalog.LocaleOption, options []pscatalog.LocaleOption, navigable bool) templ.Component {
func LocalePicker(title string, current pscatalog.LocaleOption, options []pscatalog.LocaleOption, navigable bool, showMeta bool) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@@ -197,7 +197,7 @@ func LocalePicker(title string, current pscatalog.LocaleOption, options []pscata
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if current.Code != "" {
if showMeta && current.Code != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<span class=\"locale-picker__code\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -292,7 +292,7 @@ func LocalePicker(title string, current pscatalog.LocaleOption, options []pscata
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if option.Meta != "" {
if showMeta && option.Meta != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "<span class=\"locale-picker__item-meta\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -310,7 +310,7 @@ func LocalePicker(title string, current pscatalog.LocaleOption, options []pscata
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else if option.Code != "" {
} else if showMeta && option.Code != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<span class=\"locale-picker__item-meta\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
@@ -369,7 +369,7 @@ func LocalePicker(title string, current pscatalog.LocaleOption, options []pscata
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if option.Meta != "" {
if showMeta && option.Meta != "" {
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<span class=\"locale-picker__item-meta\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err