mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix (per-domain) favicon url
This commit is contained in:
@@ -2,6 +2,7 @@ import $ from "jquery";
|
||||
import Scratchbook from "layout/scratchbook";
|
||||
import QuotaMeter from "mvc/user/user-quotameter";
|
||||
import { getGalaxyInstance } from "app";
|
||||
import { getAppRoot } from "onload/loadConfig";
|
||||
import Masthead from "../components/Masthead/Masthead";
|
||||
import { mountVueComponent } from "../utils/mountVueComponent";
|
||||
|
||||
@@ -42,16 +43,21 @@ export class MastheadState {
|
||||
}
|
||||
}
|
||||
|
||||
function staticUrlToPrefixed(appRoot, url) {
|
||||
return url?.startsWith("/static/") ? `${appRoot}${url}` : url;
|
||||
}
|
||||
|
||||
export function mountMasthead(el, options, mastheadState) {
|
||||
const appRoot = getAppRoot();
|
||||
return mountVueComponent(Masthead)(
|
||||
{
|
||||
el: el,
|
||||
mastheadState: mastheadState,
|
||||
displayGalaxyBrand: options.display_galaxy_brand,
|
||||
brand: options.brand,
|
||||
brandLink: options.logo_url,
|
||||
brandImage: options.logo_src,
|
||||
brandImageSecondary: options.logo_src_secondary,
|
||||
brandLink: staticUrlToPrefixed(appRoot, options.logo_url),
|
||||
brandImage: staticUrlToPrefixed(appRoot, options.logo_src),
|
||||
brandImageSecondary: staticUrlToPrefixed(appRoot, options.logo_src_secondary),
|
||||
menuOptions: options,
|
||||
},
|
||||
el
|
||||
|
||||
@@ -1957,7 +1957,7 @@
|
||||
|
||||
:Description:
|
||||
The brand image source.
|
||||
:Default: ``static/favicon.png``
|
||||
:Default: ``/static/favicon.png``
|
||||
:Type: str
|
||||
|
||||
|
||||
|
||||
@@ -1024,7 +1024,7 @@ galaxy:
|
||||
#logo_url: /
|
||||
|
||||
# The brand image source.
|
||||
#logo_src: static/favicon.png
|
||||
#logo_src: /static/favicon.png
|
||||
|
||||
# The custom brand image source.
|
||||
#logo_src_secondary: null
|
||||
|
||||
@@ -1417,7 +1417,7 @@ mapping:
|
||||
|
||||
logo_src:
|
||||
type: str
|
||||
default: static/favicon.png
|
||||
default: /static/favicon.png
|
||||
required: false
|
||||
per_host: true
|
||||
desc: |
|
||||
|
||||
Reference in New Issue
Block a user