TopNav.vue 2.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<template>
  <div>
    <v-app-bar 
      color="primary"
      app
      dark
      dense
    >
      <v-toolbar-title>CheneTAL</v-toolbar-title>
      
      <v-spacer></v-spacer>
      
      <v-toolbar-items>
        <v-btn to="/" text>
          <v-icon small left>fa-home</v-icon>
          Home
        </v-btn>
        <v-btn to="/treatment" text>
          Modules
        </v-btn>
Quentin David's avatar
Quentin David committed
21
        <v-btn to="/validation" text>
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
          Result
        </v-btn>
        <v-spacer/>
        <v-menu offset-y>
          <template v-slot:activator="{ on, attrs }">
            <v-btn
              v-bind="attrs"
              v-on="on"
              text
            >
            <v-icon left>mdi-translate</v-icon>
            {{ chosen_language }}
            <v-icon right>fa-caret-down</v-icon>
            </v-btn>
          </template>
          <v-list>
            <v-list-item
              v-for="lang in web_languages"
              :key="lang"
            >
              <v-list-item-title> {{ lang }}
              </v-list-item-title>
            </v-list-item>
          </v-list>
        </v-menu>
        <v-menu offset-y>
          <template v-slot:activator="{on,attrs}">
            <v-btn text v-on="on" v-bind="attrs">
              <v-icon small left>fa-user</v-icon>
                John Doe
            </v-btn>
          </template>
            <v-list>
              <v-list-item
                v-for="item in items"
                :key="item.title"
                :to="item.link"
                link
              >
Quentin David's avatar
Quentin David committed
61
62
                <v-list-item-icon class="mr-2">
                  <v-icon small>{{ item.icon }}</v-icon>
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
                </v-list-item-icon>
                <v-list-item-content>
                  <v-list-item-title>{{ item.title }}</v-list-item-title>
                </v-list-item-content>
              </v-list-item>
            </v-list>
        </v-menu>
      </v-toolbar-items>
    </v-app-bar>
  </div>
</template>

<script>
module.exports = {
  data() {
    return {
      drawer: false,
      items: [
Quentin David's avatar
Quentin David committed
81
        { title: 'Mon profil', link: '/profile', icon: 'fa-address-card' },
Quentin David's avatar
Quentin David committed
82
83
        { title: 'Mes traitements', link: '/user/list', icon: 'fa-cogs' },
        { title: 'Mes corpus', link: 'cart', icon: 'fa-copy' }
84
85
86
87
88
89
90
      ],
      web_languages: ["Français", "English"],
      chosen_language: "Français",
    }
  }
}
</script>