相关优化、添加网页标题
This commit is contained in:
parent
963eb57978
commit
20b33fa134
|
@ -17,13 +17,27 @@ const Iframe = (props) => {
|
||||||
if (!current_user?.login) {
|
if (!current_user?.login) {
|
||||||
history.push("/login?go_page=/hiagent");
|
history.push("/login?go_page=/hiagent");
|
||||||
}
|
}
|
||||||
|
document.title = "GitLink-AI"
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
function iframeLoad() {
|
||||||
|
let myIframe = document.getElementById("iframe");
|
||||||
|
const toastRight = myIframe?.contentWindow?.document?.getElementsByClassName("arco-notification-wrapper-topRight")[0]
|
||||||
|
const toastTop = myIframe?.contentWindow?.document?.getElementsByClassName("arco-notification-wrapper-top")[0]
|
||||||
|
if (toastRight) {
|
||||||
|
toastRight.style.top = '60px'
|
||||||
|
}
|
||||||
|
if (toastTop) {
|
||||||
|
toastTop.style.top = '80px'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return current_user?.login ? <iframe
|
return current_user?.login ? <iframe
|
||||||
id="iframe"
|
id="iframe"
|
||||||
width="100%"
|
width="100%"
|
||||||
className="test-iframe"
|
className="test-iframe"
|
||||||
src={ settings?.common?.hiAgent }
|
src={ settings?.common?.hiAgent }
|
||||||
|
onLoad={iframeLoad}
|
||||||
></iframe> : ''
|
></iframe> : ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue