Home.vue 1.62 KB
Newer Older
1
<template>
2
    <b-container class="tw-self-center">
3
        <div v-if="user.logged_in === true && user.steeringUser">
4
5
6
7
8
            <div align="center">
                <h1>{{ $t('home.welcome') }}</h1>
                <p>Here are some infos for you on how to use this interface...</p>
                <br>
            </div>
9

Richard Blechinger's avatar
Richard Blechinger committed
10
11
12
            <div
                :class="{
                    'tw-mx-auto tw-grid sm:tw-grid-cols-2 tw-gap-8 tw-text-center': true,
13
14
                    'md:tw-grid-cols-3 tw-max-w-3xl': user.steeringUser.is_superuser,
                    'md:tw-grid-cols-2 tw-max-w-lg': !user.steeringUser.is_superuser
Richard Blechinger's avatar
Richard Blechinger committed
15
16
17
18
19
20
21
                }"
            >
                <router-link
                        v-for="mod in modules.main"
                        :key="mod.slug"
                        :to="mod.slug"
                >
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
                    <img :src="mod.icon">
                    <p>{{ mod.title }}</p>
                </router-link>
            </div>
        </div>
        <div
                v-else
                align="center"
        >
            <p>You are not logged in yet.</p>
            <b-button
                    size="lg"
                    variant="outline-secondary"
                    @click="$parent.signIn"
            >
                Log in
            </b-button>
        </div>
    </b-container>
41
42
43
</template>

<script>
44
    export default {
Richard Blechinger's avatar
Richard Blechinger committed
45
46
47
48
        props: {
            modules: {
                type: Object,
                required: true,
49
50
51
52
53
            },

            user: {
                type: Object,
                required: true,
Richard Blechinger's avatar
Richard Blechinger committed
54
55
            }
        }
56
    }
57
58
59
60
61
</script>

<style>

</style>