fix bug
This commit is contained in:
@@ -97,6 +97,22 @@
|
||||
window.__APP_CONFIG__ = config
|
||||
window.__CONFIG_READY__ = true
|
||||
|
||||
if (config?.user?.name_fa) {
|
||||
document.title = config.user.name_fa
|
||||
}
|
||||
|
||||
if (config?.user?.avatar) {
|
||||
const faviconUrl = config.user.avatar
|
||||
const existingIcons = document.querySelectorAll('link[rel*="icon"]')
|
||||
existingIcons.forEach((icon) => icon.remove())
|
||||
|
||||
const link = document.createElement('link')
|
||||
link.rel = 'icon'
|
||||
link.type = 'image/png'
|
||||
link.href = faviconUrl + '?v=' + Date.now()
|
||||
document.head.appendChild(link)
|
||||
}
|
||||
|
||||
// Resolve the promise
|
||||
if (configResolve) {
|
||||
configResolve(config)
|
||||
|
||||
Reference in New Issue
Block a user