Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UiSession: fix theme initialization #1001

Merged

Commits on May 21, 2024

  1. UiSession: fix theme initialization

    - URL param (?theme=xyz) always takes precedence over the current theme
    - Otherwise, if the model already has a theme set, use that one.
    - Otherwise, use the "current theme" from the request (session
      attribute, cookie or default value).
    
    A warning is only logged when the requested theme or the model theme is
    set but is not valid according to UiThemeHelper. When the model does not
    specify a theme, a default theme is assigned automatically without log
    message.
    
    When the theme is determined, it is written back to the model, so the
    logo URL and potentially other things can be adjusted.
    
    In Scout JS, we have no UiSession or ClientSession. For a similar
    functionality, the URL param is manually compared with the current
    theme (called "active theme").
    
    270127
    bschwarzent committed May 21, 2024
    Configuration menu
    Copy the full SHA
    ab45107 View commit details
    Browse the repository at this point in the history