添加聊天跳转,采用本地font-aweesome

This commit is contained in:
chicrobot committed 2025-11-15 00:49:14 +08:00
1 parent d31d35f81a
commit 5f5f730c98
2 files changed
+10 -5

No files matched your search

+7 -2
View File
@@ -46,17 +46,18 @@ updateActiveNavLink();
window.addEventListener('load', function() {
// 获取当前页面的域名或IP
const currentHost = window.location.hostname;
// 构建跳转URL (保持相同的协议和域名/IP,只修改端口)
// 构建跳转URL (保持相同的协议和域名/IP)
const portainerUrl = `${window.location.protocol}//${currentHost}:9000`;
const giteaUrl = `${window.location.protocol}//${currentHost}:3000`;
const grafanaUrl = `${window.location.protocol}//${currentHost}:3001`;
const jenkinsUrl = `${window.location.protocol}//${currentHost}:9095`;
const chatUrl = `${window.location.protocol}//${currentHost}/baseTalk`;
// 设置链接的href属性和target属性,确保在新标签中打开
const portainerLink = document.getElementById('portainerLink');
const giteaLink = document.getElementById('giteaLink');
const grafanaLink = document.getElementById('grafanaLink');
const jenkinsLink = document.getElementById('jenkinsLink');
const chatLink = document.getElementById('chatLink');
if (portainerLink) {
portainerLink.href = portainerUrl;
portainerLink.target = '_blank';
@@ -73,6 +74,10 @@ window.addEventListener('load', function() {
jenkinsLink.href = jenkinsUrl;
jenkinsLink.target = '_blank';
}
if (chatLink) {
chatLink.href = chatUrl;
chatLink.target = '_blank';
}
});
// 粒子背景效果