Update favicon when suse brand is used (#7151)

This commit is contained in:
Neil MacDougall 2022-10-11 14:11:03 +01:00 committed by GitHub
parent c8418e6181
commit f759519c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

View File

@ -7,7 +7,7 @@ export const DOCS_BASE = 'https://rancher.com/docs/rancher/v2.6/en';
const STANDARD_VENDOR = 'Rancher';
const STANDARD_PRODUCT = 'Explorer';
const CUSTOM_VENDOR = { suse: 'SUSE Rancher' };
const CUSTOM_VENDOR = { suse: 'Rancher Prime' };
let mode = STANDARD;
let vendor = STANDARD_VENDOR;

View File

@ -10,11 +10,17 @@ export function haveSetFavIcon() {
export function setFavIcon(store) {
const app = store.app;
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);
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;
}
}