迁移奖励金币弹窗入口
This commit is contained in:
@@ -79,6 +79,7 @@ export {
|
||||
renderRoomsOnlineStatusToContainer,
|
||||
resolveRoomUrl,
|
||||
} from "./chat-room/rooms.js";
|
||||
export { bindRewardModalControls, openRewardModal } from "./chat-room/reward-modal.js";
|
||||
export { createMessageQueue } from "./chat-room/message-queue.js";
|
||||
|
||||
import { escapeHtml, escapeHtmlWithLineBreaks } from "./chat-room/html.js";
|
||||
@@ -159,6 +160,7 @@ import {
|
||||
renderRoomsOnlineStatusToContainer,
|
||||
resolveRoomUrl,
|
||||
} from "./chat-room/rooms.js";
|
||||
import { bindRewardModalControls, openRewardModal } from "./chat-room/reward-modal.js";
|
||||
import { createMessageQueue } from "./chat-room/message-queue.js";
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
@@ -251,6 +253,8 @@ if (typeof window !== "undefined") {
|
||||
renderRoomsOnlineStatus,
|
||||
renderRoomsOnlineStatusToContainer,
|
||||
resolveRoomUrl,
|
||||
bindRewardModalControls,
|
||||
openRewardModal,
|
||||
createMessageQueue,
|
||||
};
|
||||
|
||||
@@ -265,6 +269,7 @@ if (typeof window !== "undefined") {
|
||||
window.loadMobileRoomList = loadMobileRoomList;
|
||||
window.openMobileDrawer = openMobileDrawer;
|
||||
window.openUserCard = openUserCard;
|
||||
window.openRewardModal = openRewardModal;
|
||||
window.renderMobileRoomList = renderMobileRoomList;
|
||||
window.renderMobileUserList = renderMobileUserList;
|
||||
window.scheduleRenderMobileUserList = scheduleRenderMobileUserList;
|
||||
@@ -316,6 +321,7 @@ if (typeof window !== "undefined") {
|
||||
bindVipControls();
|
||||
bindChatRightPanelControls();
|
||||
bindRoomStatusControls();
|
||||
bindRewardModalControls();
|
||||
bindMobileDrawerControls();
|
||||
bindWelcomeMenuControls();
|
||||
bindBlockMenuControls();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// 聊天室职务奖励金币弹窗入口,提供 openRewardModal 全局兼容函数。
|
||||
|
||||
/**
|
||||
* 打开奖励金币独立弹窗。
|
||||
*
|
||||
* @param {string} username
|
||||
* @returns {void}
|
||||
*/
|
||||
export function openRewardModal(username) {
|
||||
const container = document.getElementById("reward-modal-container");
|
||||
if (!window.Alpine || !container) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.Alpine.$data(container)?.open?.(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* 暴露奖励金币弹窗入口给存量按钮调用。
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
export function bindRewardModalControls() {
|
||||
if (typeof window === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
window.openRewardModal = openRewardModal;
|
||||
}
|
||||
Reference in New Issue
Block a user