2020-06-11 10:58:23 +02:00
|
|
|
<template>
|
|
|
|
<div class="section container">
|
|
|
|
<h1 class="title">{{ $t("Let's define a few settings") }}</h1>
|
2020-11-13 13:39:52 +01:00
|
|
|
<b-steps v-model="realActualStepIndex" :has-navigation="false">
|
|
|
|
<b-step-item step="1" :label="$t('Settings')">
|
|
|
|
<settings-onboarding />
|
|
|
|
</b-step-item>
|
|
|
|
<b-step-item step="2" :label="$t('Participation notifications')">
|
|
|
|
<notifications-onboarding />
|
|
|
|
</b-step-item>
|
|
|
|
<b-step-item step="3" :label="$t('Profiles and federation')">
|
|
|
|
<profile-onboarding />
|
|
|
|
</b-step-item>
|
|
|
|
</b-steps>
|
|
|
|
<section class="has-text-centered section buttons">
|
|
|
|
<b-button
|
|
|
|
outlined
|
|
|
|
:disabled="realActualStepIndex < 1"
|
|
|
|
tag="router-link"
|
|
|
|
:to="{
|
|
|
|
name: RouteName.WELCOME_SCREEN,
|
|
|
|
params: { step: actualStepIndex - 1 },
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ $t("Previous") }}
|
|
|
|
</b-button>
|
|
|
|
<b-button
|
|
|
|
outlined
|
|
|
|
type="is-success"
|
|
|
|
v-if="realActualStepIndex < 2"
|
|
|
|
tag="router-link"
|
|
|
|
:to="{
|
|
|
|
name: RouteName.WELCOME_SCREEN,
|
|
|
|
params: { step: actualStepIndex + 1 },
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
{{ $t("Next") }}
|
|
|
|
</b-button>
|
|
|
|
<b-button
|
|
|
|
v-if="realActualStepIndex >= 2"
|
|
|
|
type="is-success"
|
|
|
|
size="is-big"
|
|
|
|
tag="router-link"
|
|
|
|
:to="{ name: RouteName.HOME }"
|
|
|
|
>
|
2020-06-11 10:58:23 +02:00
|
|
|
{{ $t("All good, let's continue!") }}
|
|
|
|
</b-button>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script lang="ts">
|
2020-11-13 13:39:52 +01:00
|
|
|
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
2020-06-11 10:58:23 +02:00
|
|
|
import { TIMEZONES } from "../../graphql/config";
|
2020-11-13 13:39:52 +01:00
|
|
|
import RouteName from "../../router/name";
|
2020-06-11 10:58:23 +02:00
|
|
|
import { IConfig } from "../../types/config.model";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
components: {
|
2020-11-30 10:24:11 +01:00
|
|
|
NotificationsOnboarding: () =>
|
|
|
|
import("../../components/Settings/NotificationsOnboarding.vue"),
|
|
|
|
SettingsOnboarding: () =>
|
|
|
|
import("../../components/Settings/SettingsOnboarding.vue"),
|
|
|
|
ProfileOnboarding: () =>
|
|
|
|
import("../../components/Account/ProfileOnboarding.vue"),
|
2020-06-11 10:58:23 +02:00
|
|
|
},
|
|
|
|
apollo: {
|
|
|
|
config: TIMEZONES,
|
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class SettingsOnboard extends Vue {
|
2020-11-13 13:39:52 +01:00
|
|
|
@Prop({ required: false, default: 1, type: Number }) step!: number;
|
|
|
|
|
2020-06-11 10:58:23 +02:00
|
|
|
config!: IConfig;
|
|
|
|
|
2020-11-13 13:39:52 +01:00
|
|
|
RouteName = RouteName;
|
|
|
|
|
|
|
|
actualStepIndex = this.step;
|
|
|
|
|
|
|
|
@Watch("step")
|
|
|
|
updateActualStep(): void {
|
|
|
|
if (this.step) {
|
|
|
|
this.actualStepIndex = this.step;
|
2020-06-11 10:58:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-13 13:39:52 +01:00
|
|
|
get realActualStepIndex(): number {
|
|
|
|
return this.actualStepIndex - 1;
|
2020-06-11 10:58:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2020-11-13 13:39:52 +01:00
|
|
|
<style scoped lang="scss">
|
|
|
|
.section.container {
|
|
|
|
.has-text-centered.section.buttons {
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|