Заметная модалка подтверждения оплаты (не теряется на странице)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -898,6 +898,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Модалка «оплата прошла» -->
|
||||
<div id="pay-success-overlay" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:110;align-items:center;justify-content:center;padding:16px;">
|
||||
<div style="background:#fff;border-radius:16px;max-width:340px;width:100%;padding:28px 24px;box-shadow:0 12px 44px rgba(0,0,0,.28);text-align:center;">
|
||||
<div style="font-size:52px;line-height:1;margin-bottom:10px">✅</div>
|
||||
<div id="pay-success-msg" style="font-size:17px;font-weight:600;color:#1c2b45;margin-bottom:16px"></div>
|
||||
<button onclick="document.getElementById('pay-success-overlay').style.display='none'" style="padding:11px 28px;background:var(--blue,#007AFF);color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit" data-i18n="pay_ok_btn">Отлично</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
|
||||
<!-- Description -->
|
||||
@@ -1285,6 +1294,8 @@
|
||||
pay_creating: 'Создаём платёж…',
|
||||
pay_error: 'Не удалось создать платёж',
|
||||
pay_thanks: '✅ Спасибо за поддержку! Оплата прошла.',
|
||||
pay_thanks_file: 'Оплата прошла! Файл обрабатывается…',
|
||||
pay_ok_btn: 'Отлично',
|
||||
pay_canceled: 'Платёж отменён',
|
||||
paywall_title: 'Файл больше бесплатного лимита',
|
||||
paywall_desc: 'Бесплатно — до 50 МБ и 100 страниц. Для файлов больше — разовая оплата или подписка.',
|
||||
@@ -1408,6 +1419,8 @@
|
||||
pay_creating: 'Creating payment…',
|
||||
pay_error: 'Failed to create payment',
|
||||
pay_thanks: '✅ Thank you for your support! Payment received.',
|
||||
pay_thanks_file: 'Payment received! Your file is processing…',
|
||||
pay_ok_btn: 'Great',
|
||||
pay_canceled: 'Payment canceled',
|
||||
paywall_title: 'File exceeds the free limit',
|
||||
paywall_desc: 'Free up to 50 MB and 100 pages. Larger files — one-time payment or subscription.',
|
||||
@@ -1531,6 +1544,8 @@
|
||||
pay_creating: 'Zahlung wird erstellt…',
|
||||
pay_error: 'Zahlung konnte nicht erstellt werden',
|
||||
pay_thanks: '✅ Danke für die Unterstützung! Zahlung erhalten.',
|
||||
pay_thanks_file: 'Zahlung erhalten! Datei wird verarbeitet…',
|
||||
pay_ok_btn: 'Super',
|
||||
pay_canceled: 'Zahlung storniert',
|
||||
paywall_title: 'Datei über dem Gratis-Limit',
|
||||
paywall_desc: 'Kostenlos bis 50 MB und 100 Seiten. Größere Dateien — Einmalzahlung oder Abo.',
|
||||
@@ -1654,6 +1669,8 @@
|
||||
pay_creating: 'Création du paiement…',
|
||||
pay_error: 'Échec de création du paiement',
|
||||
pay_thanks: '✅ Merci pour votre soutien ! Paiement reçu.',
|
||||
pay_thanks_file: 'Paiement reçu ! Le fichier est en traitement…',
|
||||
pay_ok_btn: 'Parfait',
|
||||
pay_canceled: 'Paiement annulé',
|
||||
paywall_title: 'Fichier au-delà de la limite gratuite',
|
||||
paywall_desc: 'Gratuit : 50 Mo et 100 pages max. Au-delà — paiement unique ou abonnement.',
|
||||
@@ -1777,6 +1794,8 @@
|
||||
pay_creating: 'Creazione pagamento…',
|
||||
pay_error: 'Impossibile creare il pagamento',
|
||||
pay_thanks: '✅ Grazie per il supporto! Pagamento ricevuto.',
|
||||
pay_thanks_file: 'Pagamento ricevuto! Il file è in elaborazione…',
|
||||
pay_ok_btn: 'Ottimo',
|
||||
pay_canceled: 'Pagamento annullato',
|
||||
paywall_title: 'File oltre il limite gratuito',
|
||||
paywall_desc: 'Gratis fino a 50 MB e 100 pagine. File più grandi — pagamento singolo o abbonamento.',
|
||||
@@ -1900,6 +1919,8 @@
|
||||
pay_creating: 'Creando pago…',
|
||||
pay_error: 'No se pudo crear el pago',
|
||||
pay_thanks: '✅ ¡Gracias por tu apoyo! Pago recibido.',
|
||||
pay_thanks_file: 'Pago recibido! El archivo se está procesando…',
|
||||
pay_ok_btn: 'Genial',
|
||||
pay_canceled: 'Pago cancelado',
|
||||
paywall_title: 'Archivo supera el límite gratis',
|
||||
paywall_desc: 'Gratis hasta 50 MB y 100 páginas. Archivos mayores — pago único o suscripción.',
|
||||
@@ -2023,6 +2044,8 @@
|
||||
pay_creating: 'Criando pagamento…',
|
||||
pay_error: 'Falha ao criar o pagamento',
|
||||
pay_thanks: '✅ Obrigado pelo apoio! Pagamento recebido.',
|
||||
pay_thanks_file: 'Pagamento recebido! O arquivo está sendo processado…',
|
||||
pay_ok_btn: 'Ótimo',
|
||||
pay_canceled: 'Pagamento cancelado',
|
||||
paywall_title: 'Arquivo acima do limite grátis',
|
||||
paywall_desc: 'Grátis até 50 MB e 100 páginas. Arquivos maiores — pagamento único ou assinatura.',
|
||||
@@ -2202,6 +2225,10 @@
|
||||
if (!tgUser && !sessionUser) { document.getElementById('paywall-msg').textContent = t('paywall_need_login'); return; }
|
||||
_payViaKassa('sub');
|
||||
}
|
||||
function showPaySuccess(msg) {
|
||||
document.getElementById('pay-success-msg').textContent = msg;
|
||||
document.getElementById('pay-success-overlay').style.display = 'flex';
|
||||
}
|
||||
|
||||
// Возврат с ЮKassa: ?paid=... → опрашиваем статус, для file/sub запускаем обработку
|
||||
(function handlePayReturn() {
|
||||
@@ -2225,8 +2252,10 @@
|
||||
const pc = document.getElementById('paywall-card'); if (pc) pc.style.display = 'none';
|
||||
currentJobId = payJob; batchMode = false;
|
||||
setUiState('processing'); startPolling();
|
||||
showPaySuccess(t('pay_thanks_file'));
|
||||
} else {
|
||||
showPaySuccess(t('pay_thanks'));
|
||||
}
|
||||
showInfo(t('pay_thanks'));
|
||||
return;
|
||||
}
|
||||
if (d.status === 'canceled') {
|
||||
|
||||
Reference in New Issue
Block a user