added basic help screen

This commit is contained in:
thilo 2020-03-21 22:40:01 +01:00
parent 83f73a6827
commit a7a44a847e
3 changed files with 11 additions and 2 deletions

View file

@ -28,7 +28,7 @@
v-for="answer in answers" v-for="answer in answers"
v-on:click="answerQuestion(answer.value)">{{ answer.text }}</button> v-on:click="answerQuestion(answer.value)">{{ answer.text }}</button>
</div> </div>
<router-link to="/questionmaire" style="text-decoration: none"><button class="alert">Ich brauche Hilfe zu dieser Frage</button></router-link> <router-link to="/questionnaire/help" style="text-decoration: none"><button class="alert">Ich brauche Hilfe zu dieser Frage</button></router-link>
<svg v-on:click="goBack()" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="48" height="48"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 11.333l10.223-6.815a.5.5 0 0 1 .777.416v14.132a.5.5 0 0 1-.777.416L8 12.667V19a1 1 0 0 1-2 0V5a1 1 0 1 1 2 0v6.333z"/></svg> <svg v-on:click="goBack()" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="48" height="48"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 11.333l10.223-6.815a.5.5 0 0 1 .777.416v14.132a.5.5 0 0 1-.777.416L8 12.667V19a1 1 0 0 1-2 0V5a1 1 0 1 1 2 0v6.333z"/></svg>
</div> </div>
</template> </template>

View file

@ -4,6 +4,7 @@ import Home from '../views/Home.vue'
import Warning from '../views/Warning' import Warning from '../views/Warning'
import Questionnaire from "@/views/Questionnaire"; import Questionnaire from "@/views/Questionnaire";
import Results from "@/views/Results"; import Results from "@/views/Results";
import HelpPage from "@/views/HelpPage";
Vue.use(VueRouter) Vue.use(VueRouter)
@ -23,6 +24,11 @@ const routes = [
name: 'Fragebogen', name: 'Fragebogen',
component: Questionnaire component: Questionnaire
}, },
{
path: '/questionnaire/help',
name: 'Hilfe',
component: HelpPage
},
{ {
path: '/results', path: '/results',
name: 'Ergebnisse', name: 'Ergebnisse',

View file

@ -1,6 +1,9 @@
<template> <template>
<div class="help"> <div class="help">
<p>{{ text }}</p> <p>{{ $store.state.questions[$store.state.currentQuestion].description }}</p>
<router-link to="/questionnaire"><button>Zurück zur Frage</button></router-link>
<br><br>
<router-link to="/questionnaire"><button v-on:click="$store.commit('nextQuestion')" class="alert">Ich möchte diese Frage überspringen</button></router-link>
</div> </div>
</template> </template>