Add confirmation on quiz.send and discard actions + Some z-index fixes
This commit is contained in:
parent
3519aba243
commit
08bc50fcea
|
@ -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;
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue