mirror of https://github.com/rancher/dashboard.git
Update favicon when suse brand is used (#7151)
This commit is contained in:
parent
c8418e6181
commit
f759519c9d
Binary file not shown.
|
After Width: | Height: | Size: 447 B |
|
|
@ -7,7 +7,7 @@ export const DOCS_BASE = 'https://rancher.com/docs/rancher/v2.6/en';
|
||||||
|
|
||||||
const STANDARD_VENDOR = 'Rancher';
|
const STANDARD_VENDOR = 'Rancher';
|
||||||
const STANDARD_PRODUCT = 'Explorer';
|
const STANDARD_PRODUCT = 'Explorer';
|
||||||
const CUSTOM_VENDOR = { suse: 'SUSE Rancher' };
|
const CUSTOM_VENDOR = { suse: 'Rancher Prime' };
|
||||||
|
|
||||||
let mode = STANDARD;
|
let mode = STANDARD;
|
||||||
let vendor = STANDARD_VENDOR;
|
let vendor = STANDARD_VENDOR;
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,17 @@ export function haveSetFavIcon() {
|
||||||
export function setFavIcon(store) {
|
export function setFavIcon(store) {
|
||||||
const app = store.app;
|
const app = store.app;
|
||||||
const res = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FAVICON);
|
const res = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FAVICON);
|
||||||
|
const brandSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.BRAND);
|
||||||
const link = findIconLink(app.head.link);
|
const link = findIconLink(app.head.link);
|
||||||
|
|
||||||
if (link) {
|
if (link) {
|
||||||
link.href = res?.value || defaultFavIcon;
|
let brandImage;
|
||||||
|
|
||||||
|
if (brandSetting?.value === 'suse') {
|
||||||
|
brandImage = require('~shell/assets/brand/suse/favicon.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
link.href = res?.value || brandImage || defaultFavIcon;
|
||||||
favIconSet = true;
|
favIconSet = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue