AddCorpus.vue 3.38 KB
Newer Older
1
<template>
Quentin David's avatar
Quentin David committed
2
3
4
  <v-container flex fill-height>
    <v-tabs grow
      v-model="tab"
5
    >
Quentin David's avatar
Quentin David committed
6
7
8
9
      <v-tab
        v-for="item in tab_items"
        :key="item.tab"
      >
Quentin David's avatar
Quentin David committed
10
        {{ $t(item.tab) }}
Quentin David's avatar
Quentin David committed
11
      </v-tab>
12

Quentin David's avatar
Quentin David committed
13
14
15
16
17
18
19
      <v-tabs-items v-model="tab" class="my-4" vertical>
        <v-tab-item>
          <v-card outlined height=8em>
            <v-card-text
              class="justify-center text-center"
            >
              <v-file-input
Quentin David's avatar
Quentin David committed
20
                :label="$t('local-file-label')"
Quentin David's avatar
Quentin David committed
21
                multiple
Quentin David's avatar
Quentin David committed
22
                :hint="$t('local-file-hint')"
Quentin David's avatar
Quentin David committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
                persistent-hint
                small-chips
              >
              </v-file-input>
            </v-card-text>
          </v-card>
        </v-tab-item>
        <v-tab-item>
          <InputText />
        </v-tab-item>
        <v-tab-item>
          <v-card outlined height=8em>
            <v-card-text>
              <v-select :items="test_profile_corpus"
Quentin David's avatar
Quentin David committed
37
38
                :label="$t('profile-corpus-label')"
                :hint="$t('profile-corpus-hint')"
Quentin David's avatar
Quentin David committed
39
40
41
42
43
44
45
46
47
48
49
50
51
                persistent-hint
                outlined
              >
              </v-select>
            </v-card-text>
          </v-card>
        </v-tab-item>
        <v-tab-item>
          <v-card outlined height=8em>
            <v-card-text
              class="justify-center text-center"
            > 
              <v-select :items="test_common_corpus"
Quentin David's avatar
Quentin David committed
52
                :label="$t('shared-corpus-label')"
Quentin David's avatar
Quentin David committed
53
54
55
56
57
58
59
60
61
                outlined
              >
              </v-select>
            </v-card-text>
          </v-card>
        </v-tab-item>
      </v-tabs-items>
    </v-tabs>
  </v-container>
62
63
64
65
66
67
68
69
</template>
<script>
  import InputText from '@/components/DefineCorpus/InputText';

  export default {
      data: () => ({
          tab: null,
          tab_items: [
Quentin David's avatar
Quentin David committed
70
71
72
73
            { tab: 'local-file', content: 'Fichier local'},
            { tab: 'input-text', content: InputText},
            { tab: 'profile-corpus', content: 'Corpus du profil'},
            { tab: 'shared-corpus', content: 'Corpus partagé'},
74
75
76
          ],
          selected: null,
          test: { "fr": false, "en": false},
Quentin David's avatar
Quentin David committed
77
78
          test_profile_corpus: ["My_Corpus1","À la recherche du temps perdu", "Libé_1980_2010"],
          test_common_corpus: ["CommonCorpus1", "LIPN_Articles", "Sequoia"]
79
80
81
82
83
      }),
      components: {
        InputText,
      }
  }
Quentin David's avatar
Quentin David committed
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
</script>
<i18n>
{
  "fr":{
    "local-file":"Depuis un fichier local",
    "input-text":"Depuis un champ de texte",
    "profile-corpus":"Depuis un corpus du profil",
    "shared-corpus":"Depuis un corpus partagé",
    "local-file-label":"Choisissez un ou plusieurs fichiers",
    "local-file-hint":"Formats acceptés: PDF, TXT, ...",
    "profile-corpus-label":"Choisissez le corpus que vous voulez traiter",
    "profile-corpus-hint":"Vous pouvez définir vos corpora dans votre profil",
    "shared-corpus-label":"Choisissez lecorpus que vous voulez traiter"
  },
  "en":{
    "local-file":"From a local file",
    "input-text":"From a text field",
    "profile-corpus":"From a profile corpus",
    "shared-corpus":"From a shared corpus",
    "local-file-label":"Chose one or multiple files",
    "local-file-hint":"Accepted formats: PDF, TXT, ...",
    "profile-corpus-label":"Chose the corpus you want to process",
    "profile-corpus-hint":"You can define your corpora in your profile",
    "shared-corpus-label":"Chose the corpus you want to process"
  }
}
</i18n>