2026-04-25 03:34:31 +08:00
|
|
|
// 聊天室 Vite 入口,集中导出从 Blade 内联脚本迁移出的纯前端工具。
|
|
|
|
|
|
2026-04-25 04:00:38 +08:00
|
|
|
// 统一转发各子模块导出,方便测试或后续模块继续复用同一组工具。
|
2026-04-25 03:34:31 +08:00
|
|
|
export { escapeHtml, escapeHtmlWithLineBreaks } from "./chat-room/html.js";
|
2026-04-25 03:54:23 +08:00
|
|
|
export { bindGlobalDialogControls } from "./chat-room/dialog.js";
|
2026-04-25 03:40:30 +08:00
|
|
|
export { applyFontSize, bindChatFontSizeControl, CHAT_FONT_SIZE_STORAGE_KEY, restoreChatFontSize } from "./chat-room/font-size.js";
|
2026-04-25 03:41:45 +08:00
|
|
|
export { bindChatImageUploadControl } from "./chat-room/image-upload.js";
|
2026-04-25 03:58:26 +08:00
|
|
|
export { bindFriendPanelControls, closeFriendPanel, friendSearch, loadFriends, openFriendPanel } from "./chat-room/friend-panel.js";
|
2026-04-25 03:36:30 +08:00
|
|
|
export { closeChatImageLightbox, initChatImageLightboxEvents, openChatImageLightbox } from "./chat-room/lightbox.js";
|
2026-04-25 03:44:04 +08:00
|
|
|
export { bindMobileDrawerControls } from "./chat-room/mobile-drawer.js";
|
2026-04-25 03:59:53 +08:00
|
|
|
export { bindToolbarControls } from "./chat-room/toolbar.js";
|
2026-04-25 03:49:13 +08:00
|
|
|
export { bindWelcomeMenuControls } from "./chat-room/welcome-menu.js";
|
2026-04-25 04:03:13 +08:00
|
|
|
export { bindAdminMenuControls } from "./chat-room/admin-menu.js";
|
2026-04-25 04:05:32 +08:00
|
|
|
export {
|
|
|
|
|
bindBaccaratLossCoverAdminControls,
|
|
|
|
|
closeAdminBaccaratLossCoverModal,
|
|
|
|
|
closeCurrentBaccaratLossCoverEvent,
|
|
|
|
|
loadAdminCurrentLossCoverEvent,
|
|
|
|
|
openAdminBaccaratLossCoverModal,
|
|
|
|
|
submitBaccaratLossCoverEvent,
|
|
|
|
|
} from "./chat-room/baccarat-loss-cover-admin.js";
|
2026-04-25 04:03:13 +08:00
|
|
|
export { bindFishingControls } from "./chat-room/fishing.js";
|
2026-04-25 08:04:22 +08:00
|
|
|
export { bindProfileControls } from "./chat-room/profile-controls.js";
|
2026-04-25 08:05:33 +08:00
|
|
|
export { bindShopControls } from "./chat-room/shop-controls.js";
|
2026-04-25 03:34:31 +08:00
|
|
|
export {
|
|
|
|
|
BLOCKABLE_SYSTEM_SENDERS,
|
|
|
|
|
BLOCKED_SYSTEM_SENDERS_STORAGE_KEY,
|
|
|
|
|
CHAT_SOUND_MUTED_STORAGE_KEY,
|
2026-04-25 03:45:30 +08:00
|
|
|
bindBlockMenuControls,
|
2026-04-25 03:39:31 +08:00
|
|
|
bindSoundMuteControl,
|
2026-04-25 03:38:27 +08:00
|
|
|
isSoundMuted,
|
|
|
|
|
loadBlockedSystemSenders,
|
2026-04-25 03:34:31 +08:00
|
|
|
normalizeChatPreferences,
|
|
|
|
|
normalizeDailyStatus,
|
|
|
|
|
parseDailyStatusExpiry,
|
2026-04-25 03:38:27 +08:00
|
|
|
persistBlockedSystemSenders,
|
|
|
|
|
setSoundMuted,
|
|
|
|
|
shouldMigrateLocalChatPreferences,
|
2026-04-25 03:34:31 +08:00
|
|
|
} from "./chat-room/preferences-status.js";
|
2026-04-25 03:42:54 +08:00
|
|
|
export { bindChatRightPanelControls } from "./chat-room/right-panel.js";
|
2026-04-25 03:34:31 +08:00
|
|
|
export {
|
|
|
|
|
normalizeRoomStatus,
|
|
|
|
|
renderRoomStatusRow,
|
|
|
|
|
renderRoomsOnlineStatus,
|
|
|
|
|
renderRoomsOnlineStatusToContainer,
|
|
|
|
|
resolveRoomUrl,
|
|
|
|
|
} from "./chat-room/rooms.js";
|
|
|
|
|
export { createMessageQueue } from "./chat-room/message-queue.js";
|
|
|
|
|
|
|
|
|
|
import { escapeHtml, escapeHtmlWithLineBreaks } from "./chat-room/html.js";
|
2026-04-25 03:54:23 +08:00
|
|
|
import { bindGlobalDialogControls } from "./chat-room/dialog.js";
|
2026-04-25 03:40:30 +08:00
|
|
|
import { applyFontSize, bindChatFontSizeControl, CHAT_FONT_SIZE_STORAGE_KEY, restoreChatFontSize } from "./chat-room/font-size.js";
|
2026-04-25 03:41:45 +08:00
|
|
|
import { bindChatImageUploadControl } from "./chat-room/image-upload.js";
|
2026-04-25 03:58:26 +08:00
|
|
|
import { bindFriendPanelControls, closeFriendPanel, friendSearch, loadFriends, openFriendPanel } from "./chat-room/friend-panel.js";
|
2026-04-25 03:36:30 +08:00
|
|
|
import { closeChatImageLightbox, initChatImageLightboxEvents, openChatImageLightbox } from "./chat-room/lightbox.js";
|
2026-04-25 03:44:04 +08:00
|
|
|
import { bindMobileDrawerControls } from "./chat-room/mobile-drawer.js";
|
2026-04-25 03:59:53 +08:00
|
|
|
import { bindToolbarControls } from "./chat-room/toolbar.js";
|
2026-04-25 03:49:13 +08:00
|
|
|
import { bindWelcomeMenuControls } from "./chat-room/welcome-menu.js";
|
2026-04-25 04:03:13 +08:00
|
|
|
import { bindAdminMenuControls } from "./chat-room/admin-menu.js";
|
2026-04-25 04:05:32 +08:00
|
|
|
import {
|
|
|
|
|
bindBaccaratLossCoverAdminControls,
|
|
|
|
|
closeAdminBaccaratLossCoverModal,
|
|
|
|
|
closeCurrentBaccaratLossCoverEvent,
|
|
|
|
|
loadAdminCurrentLossCoverEvent,
|
|
|
|
|
openAdminBaccaratLossCoverModal,
|
|
|
|
|
submitBaccaratLossCoverEvent,
|
|
|
|
|
} from "./chat-room/baccarat-loss-cover-admin.js";
|
2026-04-25 04:03:13 +08:00
|
|
|
import { bindFishingControls } from "./chat-room/fishing.js";
|
2026-04-25 08:04:22 +08:00
|
|
|
import { bindProfileControls } from "./chat-room/profile-controls.js";
|
2026-04-25 08:05:33 +08:00
|
|
|
import { bindShopControls } from "./chat-room/shop-controls.js";
|
2026-04-25 03:34:31 +08:00
|
|
|
import {
|
|
|
|
|
BLOCKABLE_SYSTEM_SENDERS,
|
|
|
|
|
BLOCKED_SYSTEM_SENDERS_STORAGE_KEY,
|
|
|
|
|
CHAT_SOUND_MUTED_STORAGE_KEY,
|
2026-04-25 03:45:30 +08:00
|
|
|
bindBlockMenuControls,
|
2026-04-25 03:39:31 +08:00
|
|
|
bindSoundMuteControl,
|
2026-04-25 03:38:27 +08:00
|
|
|
isSoundMuted,
|
|
|
|
|
loadBlockedSystemSenders,
|
2026-04-25 03:34:31 +08:00
|
|
|
normalizeChatPreferences,
|
|
|
|
|
normalizeDailyStatus,
|
|
|
|
|
parseDailyStatusExpiry,
|
2026-04-25 03:38:27 +08:00
|
|
|
persistBlockedSystemSenders,
|
|
|
|
|
setSoundMuted,
|
|
|
|
|
shouldMigrateLocalChatPreferences,
|
2026-04-25 03:34:31 +08:00
|
|
|
} from "./chat-room/preferences-status.js";
|
2026-04-25 03:42:54 +08:00
|
|
|
import { bindChatRightPanelControls } from "./chat-room/right-panel.js";
|
2026-04-25 03:34:31 +08:00
|
|
|
import {
|
|
|
|
|
normalizeRoomStatus,
|
|
|
|
|
renderRoomStatusRow,
|
|
|
|
|
renderRoomsOnlineStatus,
|
|
|
|
|
renderRoomsOnlineStatusToContainer,
|
|
|
|
|
resolveRoomUrl,
|
|
|
|
|
} from "./chat-room/rooms.js";
|
|
|
|
|
import { createMessageQueue } from "./chat-room/message-queue.js";
|
|
|
|
|
|
|
|
|
|
if (typeof window !== "undefined") {
|
2026-04-25 04:00:38 +08:00
|
|
|
// 保留聚合入口,给仍在 Blade 内的存量脚本按需读取已迁移工具。
|
2026-04-25 03:34:31 +08:00
|
|
|
window.ChatRoomTools = {
|
|
|
|
|
escapeHtml,
|
|
|
|
|
escapeHtmlWithLineBreaks,
|
2026-04-25 03:54:23 +08:00
|
|
|
bindGlobalDialogControls,
|
2026-04-25 03:34:31 +08:00
|
|
|
applyFontSize,
|
2026-04-25 03:40:30 +08:00
|
|
|
bindChatFontSizeControl,
|
2026-04-25 03:41:45 +08:00
|
|
|
bindChatImageUploadControl,
|
2026-04-25 03:58:26 +08:00
|
|
|
bindFriendPanelControls,
|
|
|
|
|
closeFriendPanel,
|
|
|
|
|
friendSearch,
|
|
|
|
|
loadFriends,
|
|
|
|
|
openFriendPanel,
|
2026-04-25 03:44:04 +08:00
|
|
|
bindMobileDrawerControls,
|
2026-04-25 03:59:53 +08:00
|
|
|
bindToolbarControls,
|
2026-04-25 03:49:13 +08:00
|
|
|
bindWelcomeMenuControls,
|
2026-04-25 04:03:13 +08:00
|
|
|
bindAdminMenuControls,
|
2026-04-25 04:05:32 +08:00
|
|
|
bindBaccaratLossCoverAdminControls,
|
|
|
|
|
closeAdminBaccaratLossCoverModal,
|
|
|
|
|
closeCurrentBaccaratLossCoverEvent,
|
|
|
|
|
loadAdminCurrentLossCoverEvent,
|
|
|
|
|
openAdminBaccaratLossCoverModal,
|
|
|
|
|
submitBaccaratLossCoverEvent,
|
2026-04-25 04:03:13 +08:00
|
|
|
bindFishingControls,
|
2026-04-25 08:04:22 +08:00
|
|
|
bindProfileControls,
|
2026-04-25 08:05:33 +08:00
|
|
|
bindShopControls,
|
2026-04-25 03:34:31 +08:00
|
|
|
CHAT_FONT_SIZE_STORAGE_KEY,
|
|
|
|
|
restoreChatFontSize,
|
|
|
|
|
closeChatImageLightbox,
|
2026-04-25 03:36:30 +08:00
|
|
|
initChatImageLightboxEvents,
|
2026-04-25 03:34:31 +08:00
|
|
|
openChatImageLightbox,
|
|
|
|
|
BLOCKABLE_SYSTEM_SENDERS,
|
|
|
|
|
BLOCKED_SYSTEM_SENDERS_STORAGE_KEY,
|
|
|
|
|
CHAT_SOUND_MUTED_STORAGE_KEY,
|
2026-04-25 03:45:30 +08:00
|
|
|
bindBlockMenuControls,
|
2026-04-25 03:39:31 +08:00
|
|
|
bindSoundMuteControl,
|
2026-04-25 03:38:27 +08:00
|
|
|
isSoundMuted,
|
|
|
|
|
loadBlockedSystemSenders,
|
2026-04-25 03:34:31 +08:00
|
|
|
normalizeChatPreferences,
|
|
|
|
|
normalizeDailyStatus,
|
|
|
|
|
parseDailyStatusExpiry,
|
2026-04-25 03:38:27 +08:00
|
|
|
persistBlockedSystemSenders,
|
|
|
|
|
setSoundMuted,
|
|
|
|
|
shouldMigrateLocalChatPreferences,
|
2026-04-25 03:42:54 +08:00
|
|
|
bindChatRightPanelControls,
|
2026-04-25 03:34:31 +08:00
|
|
|
normalizeRoomStatus,
|
|
|
|
|
renderRoomStatusRow,
|
|
|
|
|
renderRoomsOnlineStatus,
|
|
|
|
|
renderRoomsOnlineStatusToContainer,
|
|
|
|
|
resolveRoomUrl,
|
|
|
|
|
createMessageQueue,
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-25 04:00:38 +08:00
|
|
|
// 兼容存量 Blade 调用点,避免一次性重构所有 window.* 入口。
|
2026-04-25 03:34:31 +08:00
|
|
|
window.closeChatImageLightbox = closeChatImageLightbox;
|
|
|
|
|
window.openChatImageLightbox = openChatImageLightbox;
|
2026-04-25 03:58:26 +08:00
|
|
|
window.closeFriendPanel = closeFriendPanel;
|
|
|
|
|
window.friendSearch = friendSearch;
|
|
|
|
|
window.openFriendPanel = openFriendPanel;
|
2026-04-25 04:05:32 +08:00
|
|
|
window.closeAdminBaccaratLossCoverModal = closeAdminBaccaratLossCoverModal;
|
|
|
|
|
window.closeCurrentBaccaratLossCoverEvent = closeCurrentBaccaratLossCoverEvent;
|
|
|
|
|
window.openAdminBaccaratLossCoverModal = openAdminBaccaratLossCoverModal;
|
|
|
|
|
window.submitBaccaratLossCoverEvent = submitBaccaratLossCoverEvent;
|
2026-04-25 03:34:31 +08:00
|
|
|
window.applyFontSize = applyFontSize;
|
2026-04-25 04:00:38 +08:00
|
|
|
|
|
|
|
|
// 页面加载后立即注册事件委托,具体业务逻辑仍由各子模块负责。
|
2026-04-25 03:54:23 +08:00
|
|
|
bindGlobalDialogControls();
|
2026-04-25 03:40:30 +08:00
|
|
|
bindChatFontSizeControl();
|
2026-04-25 03:41:45 +08:00
|
|
|
bindChatImageUploadControl();
|
2026-04-25 03:58:26 +08:00
|
|
|
bindFriendPanelControls();
|
2026-04-25 03:59:53 +08:00
|
|
|
bindToolbarControls();
|
2026-04-25 04:03:13 +08:00
|
|
|
bindAdminMenuControls();
|
2026-04-25 04:05:32 +08:00
|
|
|
bindBaccaratLossCoverAdminControls();
|
2026-04-25 04:03:13 +08:00
|
|
|
bindFishingControls();
|
2026-04-25 08:04:22 +08:00
|
|
|
bindProfileControls();
|
2026-04-25 08:05:33 +08:00
|
|
|
bindShopControls();
|
2026-04-25 03:42:54 +08:00
|
|
|
bindChatRightPanelControls();
|
2026-04-25 03:44:04 +08:00
|
|
|
bindMobileDrawerControls();
|
2026-04-25 03:49:13 +08:00
|
|
|
bindWelcomeMenuControls();
|
2026-04-25 03:45:30 +08:00
|
|
|
bindBlockMenuControls();
|
2026-04-25 03:34:31 +08:00
|
|
|
}
|