mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Set favicon when loading APPM UI
This commit is contained in:
parent
22ef153d80
commit
13bdeee883
@ -64,6 +64,7 @@ class App extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.updateFavicon();
|
||||
axios.get(
|
||||
window.location.origin + "/publisher/public/conf/config.json",
|
||||
).then(res => {
|
||||
@ -130,6 +131,14 @@ class App extends React.Component {
|
||||
});
|
||||
};
|
||||
|
||||
updateFavicon = () =>{
|
||||
const link = document.querySelector("link[rel*='icon']") || document.createElement('link');
|
||||
link.type = 'image/x-icon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = window.location.origin+'/devicemgt/public/uuf.unit.favicon/img/favicon.png';
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
};
|
||||
|
||||
render() {
|
||||
const {loading, error} = this.state;
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ import {
|
||||
Select
|
||||
} from 'antd';
|
||||
import axios from "axios";
|
||||
import {withConfigContext} from "../../../../context/ConfigContext";
|
||||
import {withConfigContext} from "../../../context/ConfigContext";
|
||||
|
||||
const {TextArea} = Input;
|
||||
const InputGroup = Input.Group;
|
||||
|
||||
@ -64,6 +64,7 @@ class App extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.updateFavicon();
|
||||
axios.get(
|
||||
window.location.origin + "/store/public/conf/config.json",
|
||||
).then(res => {
|
||||
@ -77,6 +78,14 @@ class App extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
updateFavicon = () =>{
|
||||
const link = document.querySelector("link[rel*='icon']") || document.createElement('link');
|
||||
link.type = 'image/x-icon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = window.location.origin+'/devicemgt/public/uuf.unit.favicon/img/favicon.png';
|
||||
document.getElementsByTagName('head')[0].appendChild(link);
|
||||
};
|
||||
|
||||
checkUserLoggedIn = (config) => {
|
||||
axios.post(
|
||||
window.location.origin + "/store-ui-request-handler/user",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user