diff --git a/web/src/app/css/app.css b/web/src/app/css/app.css index 81c9ae2..eccf2f9 100644 --- a/web/src/app/css/app.css +++ b/web/src/app/css/app.css @@ -96,7 +96,6 @@ img.avatar { filter: grayscale() !important; cursor: initial !important; user-select: none; - z-index: -1; } .button.floating { padding: 1.5em; @@ -523,6 +522,7 @@ main { overflow: auto; user-select: none; pointer-events: none; + z-index: 100; } #toasts { margin: auto; diff --git a/web/src/app/js/pages/quiz.js b/web/src/app/js/pages/quiz.js index e393075..10be435 100644 --- a/web/src/app/js/pages/quiz.js +++ b/web/src/app/js/pages/quiz.js @@ -157,7 +157,9 @@ app.pages.quiz = { } }, actions: { - discard: function() { + discard: async function() { + if (!await app.toast.warnConfirm(app.strings.app.confirm.crush_discard)) + return false; const dt = page().data; if (dt.from === undefined) return; // TODO: add unknown error? @@ -165,7 +167,9 @@ app.pages.quiz = { setTimeout(function(){ exit() }, app.toast.DEFAULT_MILLIS); }); }, - send: function() { + send: async function() { + if (!await app.toast.infoConfirm(app.strings.app.confirm.crush_send_quiz)) + return false; const form = document.querySelector('form#quiz'); var data = { quiz_id: page().data.id }; for (var i = 0; i < page().data.content.length; i++) { diff --git a/web/src/config/lang/en.php b/web/src/config/lang/en.php index fca39b4..9f130d4 100644 --- a/web/src/config/lang/en.php +++ b/web/src/config/lang/en.php @@ -44,6 +44,10 @@ $strings = [ 'discarded_success_2' => 'Maybe other person like you, but not me', 'discarded_success_3' => 'You\'ll find someone, but it won\'t be me', ], + 'confirm' => [ + 'crush_send_quiz' => 'Are you sure?. This Quiz will be sent to your Crush and you won\'t be able to modify it.', + 'crush_discard' => 'Are you sure?. You will no longer see your Crush anywhere on FediLove.', + ], 'warn' => [ 'already_following' => 'This person has already accepted being your crush', ], diff --git a/web/src/config/lang/es.php b/web/src/config/lang/es.php index 0d56ec1..cd17e0f 100644 --- a/web/src/config/lang/es.php +++ b/web/src/config/lang/es.php @@ -44,6 +44,10 @@ $strings = [ 'discarded_success_2' => 'Quizás le guste a otra persona, pero a mi no', 'discarded_success_3' => 'Encontrarás a alguien, pero no seré yo', ], + 'confirm' => [ + 'crush_send_quiz' => '¿Estás seguro?. Este Quiz se enviará a tu Crush y posteriormente no podrás modificarlo.', + 'crush_discard' => '¿Estás seguro?. No volverás a ver a tu Crush en ningún lugar de FediLove.', + ], 'warn' => [ 'already_following' => 'Esta persona ya te ha aceptado como su crush', ],