mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
feat: make logo link point to welcome page (#11519)
This commit is contained in:
parent
e3b6dbe62d
commit
854a4614a8
@ -257,22 +257,6 @@ class BaseSupersetView(BaseView):
|
||||
|
||||
def menu_data() -> Dict[str, Any]:
|
||||
menu = appbuilder.menu.get_data()
|
||||
root_path = "#"
|
||||
logo_target_path = ""
|
||||
if not g.user.is_anonymous:
|
||||
try:
|
||||
logo_target_path = (
|
||||
appbuilder.app.config["LOGO_TARGET_PATH"]
|
||||
or f"/profile/{g.user.username}/"
|
||||
)
|
||||
# when user object has no username
|
||||
except NameError as ex:
|
||||
logger.exception(ex)
|
||||
|
||||
if logo_target_path.startswith("/"):
|
||||
root_path = f"/superset{logo_target_path}"
|
||||
else:
|
||||
root_path = logo_target_path
|
||||
|
||||
languages = {}
|
||||
for lang in appbuilder.languages:
|
||||
@ -283,7 +267,7 @@ def menu_data() -> Dict[str, Any]:
|
||||
return {
|
||||
"menu": menu,
|
||||
"brand": {
|
||||
"path": root_path,
|
||||
"path": appbuilder.app.config["LOGO_TARGET_PATH"] or "/",
|
||||
"icon": appbuilder.app_icon,
|
||||
"alt": appbuilder.app_name,
|
||||
"width": appbuilder.app.config["APP_ICON_WIDTH"],
|
||||
|
Loading…
Reference in New Issue
Block a user