telegram-invite-automation/src/renderer/components/AppOverlays.jsx
2026-02-01 14:39:30 +04:00

101 lines
3.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from "react";
import ImportAccountsModal from "./ImportAccountsModal.jsx";
import NotificationsModal from "./NotificationsModal.jsx";
import InfoModal from "./InfoModal.jsx";
import ToastStack from "./ToastStack.jsx";
import ConfirmModal from "./ConfirmModal.jsx";
export default function AppOverlays({
importModalOpen,
setImportModalOpen,
manualLoginOpen,
setManualLoginOpen,
hasSelectedTask,
loginForm,
setLoginForm,
startLogin,
completeLogin,
loginStatus,
tdataForm,
setTdataForm,
importTdata,
tdataLoading,
tdataResult,
explainTdataError,
notificationsOpen,
setNotificationsOpen,
notificationsModalRef,
notifications,
filteredNotifications,
notificationFilter,
setNotificationFilter,
setNotifications,
infoOpen,
setInfoOpen,
infoTab,
setInfoTab,
liveConfirmOpen,
setLiveConfirmOpen,
liveConfirmContext,
onConfirmLiveInvite,
onCancelLiveInvite,
toasts,
dismissToast
}) {
return (
<>
<ImportAccountsModal
open={importModalOpen}
onClose={() => setImportModalOpen(false)}
manualLoginOpen={manualLoginOpen}
setManualLoginOpen={setManualLoginOpen}
hasSelectedTask={hasSelectedTask}
loginForm={loginForm}
setLoginForm={setLoginForm}
startLogin={startLogin}
completeLogin={completeLogin}
loginStatus={loginStatus}
tdataForm={tdataForm}
setTdataForm={setTdataForm}
importTdata={importTdata}
tdataLoading={tdataLoading}
tdataResult={tdataResult}
explainTdataError={explainTdataError}
/>
<NotificationsModal
open={notificationsOpen}
onClose={() => setNotificationsOpen(false)}
notificationsModalRef={notificationsModalRef}
notifications={notifications}
filteredNotifications={filteredNotifications}
notificationFilter={notificationFilter}
setNotificationFilter={setNotificationFilter}
setNotifications={setNotifications}
/>
<InfoModal
open={infoOpen}
onClose={() => setInfoOpen(false)}
infoTab={infoTab}
setInfoTab={setInfoTab}
/>
<ConfirmModal
open={liveConfirmOpen}
title="Liveинвайт"
message={
liveConfirmContext
? `Liveпрогон проверяет мониторинг, инвайт и подтверждение участия, а также видимость конкурентов (открытые/закрытые).\nДополнительно он делает один реальный инвайт из очереди для проверки фактической работы и ошибок Telegram.\n\nПользователь: ${liveConfirmContext.userId || "—"}${liveConfirmContext.username ? ` (@${liveConfirmContext.username})` : ""}\nИсточник: ${liveConfirmContext.sourceChat || "—"}`
: "Liveпрогон проверяет мониторинг, инвайт и подтверждение участия, а также видимость конкурентов (открытые/закрытые). Дополнительно он делает один реальный инвайт из очереди."
}
confirmLabel="Сделать инвайт"
cancelLabel="Отмена"
onConfirm={onConfirmLiveInvite}
onCancel={onCancelLiveInvite}
/>
<ToastStack
toasts={toasts}
onDismiss={dismissToast}
/>
</>
);
}