ThemeDrawer: Change theme from anywhere and preview them (#100405)
* ThemeDrawer: Change theme from anywhere and preview them * Update * added subtitle * Use new component * Fixes * Fix runtime ony wrong prop * Fixed saving issue * update lang file * Fixed circular dep * fix import
This commit is contained in:
@@ -34,6 +34,7 @@ type FrontendSettingsAuthDTO struct {
|
||||
DisableLogin bool `json:"disableLogin"`
|
||||
BasicAuthStrongPasswordPolicy bool `json:"basicAuthStrongPasswordPolicy"`
|
||||
PasswordlessEnabled bool `json:"passwordlessEnabled"`
|
||||
DisableSignoutMenu bool `json:"disableSignoutMenu"`
|
||||
}
|
||||
|
||||
type FrontendSettingsBuildInfoDTO struct {
|
||||
|
||||
@@ -367,6 +367,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
OktaSkipOrgRoleSync: parseSkipOrgRoleSyncEnabled(oauthProviders[social.OktaProviderName]),
|
||||
DisableLogin: hs.Cfg.DisableLogin,
|
||||
BasicAuthStrongPasswordPolicy: hs.Cfg.BasicAuthStrongPasswordPolicy,
|
||||
DisableSignoutMenu: hs.Cfg.DisableSignoutMenu,
|
||||
}
|
||||
|
||||
if hs.Cfg.PasswordlessMagicLinkAuth.Enabled && hs.Features.IsEnabled(c.Req.Context(), featuremgmt.FlagPasswordlessMagicLinkAuthentication) {
|
||||
|
||||
@@ -296,18 +296,6 @@ func (s *ServiceImpl) getProfileNode(c *contextmodel.ReqContext) *navtree.NavLin
|
||||
})
|
||||
}
|
||||
|
||||
if !s.cfg.DisableSignoutMenu {
|
||||
// add sign out first
|
||||
children = append(children, &navtree.NavLink{
|
||||
Text: "Sign out",
|
||||
Id: "sign-out",
|
||||
Url: s.cfg.AppSubURL + "/logout",
|
||||
Icon: "arrow-from-right",
|
||||
Target: "_self",
|
||||
HideFromTabs: true,
|
||||
})
|
||||
}
|
||||
|
||||
return &navtree.NavLink{
|
||||
Text: c.SignedInUser.GetName(),
|
||||
SubTitle: login,
|
||||
|
||||
Reference in New Issue
Block a user