Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 1909fe57 authored by VIAUD Nathan's avatar VIAUD Nathan
Browse files

improvement: replace choice 1/2 by choice left/right for swipe response

parent 30ab695f
No related branches found
No related tags found
1 merge request!92Resolve "Replace Choice 1 & Choice 2 by Right & Left for swipe response"
Pipeline #894071 passed
......@@ -133,6 +133,14 @@ function dragOver(event: DragEvent) {
document.body.classList.add('cursor-move');
}
// Used to get "choice left/right" on swipe choice
function getLabelIdentifier(index) {
if(props.addButton === false) {
return index === 0 ? 'droite' : 'gauche';
}
else return index + 1;
}
</script>
<template>
......@@ -161,7 +169,7 @@ function dragOver(event: DragEvent) {
<div class="form-icon"><i :class="element.action.icon"></i></div>
<h3>{{ element.action.label }}</h3>
</div>
<h3 v-else>{{ label }} {{ index + 1 }}</h3>
<h3 v-else>{{ label }} {{ getLabelIdentifier(index) }}</h3>
<div v-if="addButton !== false" class="card-header-icon">
<i class="icon-supprimer delete" @click.stop="removeCard(index)"></i>
<hr v-if="!(isLast(index) && index === 0)" class="vertical-separator">
......
......@@ -317,7 +317,7 @@ export const swipeForm: Form = {
id: 'categories',
label: 'Choix',
type: 'repeat',
value: ['Gauche', 'Droite'],
value: ['Droite', 'Gauche'],
addButton: false,
inputs: [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment