@saooti/octopus-sdk 31.0.7 → 31.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/index.ts +5 -2
- package/package.json +1 -1
- package/src/components/form/ClassicSelect.vue +68 -0
- package/src/components/misc/Footer.vue +28 -11
- package/src/locale/de.ts +1 -1
- package/src/locale/en.ts +1 -1
- package/src/locale/es.ts +1 -1
- package/src/locale/fr.ts +1 -1
- package/src/locale/it.ts +1 -1
- package/src/locale/sl.ts +1 -1
- package/src/main.ts +12 -0
package/README.md
CHANGED
package/index.ts
CHANGED
|
@@ -56,6 +56,7 @@ import ClassicSearch from "./src/components/form/ClassicSearch.vue";
|
|
|
56
56
|
import ClassicCheckbox from "./src/components/form/ClassicCheckbox.vue";
|
|
57
57
|
import ClassicRadio from "./src/components/form/ClassicRadio.vue";
|
|
58
58
|
import ClassicLoading from "./src/components/form/ClassicLoading.vue";
|
|
59
|
+
import ClassicSelect from "./src/components/form/ClassicSelect.vue";
|
|
59
60
|
|
|
60
61
|
//mixins
|
|
61
62
|
import {selenium} from "./src/components/mixins/functions";
|
|
@@ -114,7 +115,8 @@ const components = {
|
|
|
114
115
|
ClassicRadio,
|
|
115
116
|
ClassicLoading,
|
|
116
117
|
AdvancedSearch,
|
|
117
|
-
PodcastPlaylistInlineList
|
|
118
|
+
PodcastPlaylistInlineList,
|
|
119
|
+
ClassicSelect
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
export default components;
|
|
@@ -168,5 +170,6 @@ export {
|
|
|
168
170
|
ClassicRadio,
|
|
169
171
|
ClassicLoading,
|
|
170
172
|
AdvancedSearch,
|
|
171
|
-
PodcastPlaylistInlineList
|
|
173
|
+
PodcastPlaylistInlineList,
|
|
174
|
+
ClassicSelect
|
|
172
175
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="classic-select">
|
|
3
|
+
<label
|
|
4
|
+
:for="idSelect"
|
|
5
|
+
class="form-label mt-2"
|
|
6
|
+
:class="displayLabel?'':'d-none'"
|
|
7
|
+
>{{ label }}</label>
|
|
8
|
+
<select
|
|
9
|
+
:id="idSelect"
|
|
10
|
+
v-model="textValue"
|
|
11
|
+
:disabled="isDisabled"
|
|
12
|
+
class="c-hand"
|
|
13
|
+
>
|
|
14
|
+
<option
|
|
15
|
+
v-for="option in options"
|
|
16
|
+
:key="option.title"
|
|
17
|
+
:value="option.value"
|
|
18
|
+
>
|
|
19
|
+
{{ option.title }}
|
|
20
|
+
</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { defineComponent } from 'vue';
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
name: 'ClassicSelect',
|
|
28
|
+
|
|
29
|
+
props: {
|
|
30
|
+
idSelect: { default: '', type: String },
|
|
31
|
+
label: { default: '', type: String },
|
|
32
|
+
displayLabel:{default: true, type: Boolean},
|
|
33
|
+
isDisabled: { default: false, type: Boolean },
|
|
34
|
+
options: { default: ()=>[], type: Array as () => Array<{title: string, value: string|undefined}> },
|
|
35
|
+
textInit: { default: undefined, type: String },
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
emits: ['update:textInit'],
|
|
39
|
+
|
|
40
|
+
data() {
|
|
41
|
+
return {
|
|
42
|
+
textValue: undefined as string|undefined,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
watch: {
|
|
46
|
+
textValue(){
|
|
47
|
+
if(this.textInit !== this.textValue){
|
|
48
|
+
this.$emit('update:textInit', this.textValue)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
textInit(){
|
|
52
|
+
if(this.textInit !== this.textValue){
|
|
53
|
+
this.textValue =this.textInit;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
mounted(){
|
|
58
|
+
this.textValue = this.textInit;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
|
62
|
+
<style lang="scss">
|
|
63
|
+
.octopus-app{
|
|
64
|
+
.classic-select select{
|
|
65
|
+
width: inherit;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -92,12 +92,18 @@
|
|
|
92
92
|
$t('Used libraries')
|
|
93
93
|
}}
|
|
94
94
|
</router-link>
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
$t('Change locale')
|
|
100
|
-
|
|
95
|
+
<ClassicSelect
|
|
96
|
+
v-model:textInit="language"
|
|
97
|
+
:display-label="false"
|
|
98
|
+
id-select="language-chooser-select"
|
|
99
|
+
:label="$t('Change locale')"
|
|
100
|
+
:options="[{title:'Deutsch', value:'de'},
|
|
101
|
+
{title:'English', value:'en'},
|
|
102
|
+
{title:'Español', value:'es'},
|
|
103
|
+
{title:'Français', value:'fr'},
|
|
104
|
+
{title:'Italiano', value:'it'},
|
|
105
|
+
{title:'Slovenščina', value:'sl'}]"
|
|
106
|
+
/>
|
|
101
107
|
</div>
|
|
102
108
|
</div>
|
|
103
109
|
<hr class="show-phone">
|
|
@@ -136,6 +142,7 @@
|
|
|
136
142
|
</template>
|
|
137
143
|
|
|
138
144
|
<script lang="ts">
|
|
145
|
+
import ClassicSelect from '../form/ClassicSelect.vue';
|
|
139
146
|
import Player from './Player.vue';
|
|
140
147
|
import { state } from '../../store/paramStore';
|
|
141
148
|
import octopusApi from '@saooti/octopus-api';
|
|
@@ -147,8 +154,16 @@ export default defineComponent({
|
|
|
147
154
|
name: 'Footer',
|
|
148
155
|
components: {
|
|
149
156
|
Player,
|
|
157
|
+
ClassicSelect
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
data() {
|
|
161
|
+
return {
|
|
162
|
+
language: this.$i18n.locale as string,
|
|
163
|
+
};
|
|
150
164
|
},
|
|
151
165
|
|
|
166
|
+
|
|
152
167
|
computed: {
|
|
153
168
|
isPodcastmaker(): boolean {
|
|
154
169
|
return (state.generalParameters.podcastmaker as boolean);
|
|
@@ -167,6 +182,12 @@ export default defineComponent({
|
|
|
167
182
|
},
|
|
168
183
|
},
|
|
169
184
|
|
|
185
|
+
watch:{
|
|
186
|
+
language(){
|
|
187
|
+
this.changeLanguage();
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
|
|
170
191
|
methods: {
|
|
171
192
|
showBlackBorder(hide: boolean): void {
|
|
172
193
|
const footerElement = document.getElementById('footer');
|
|
@@ -178,11 +199,7 @@ export default defineComponent({
|
|
|
178
199
|
}
|
|
179
200
|
},
|
|
180
201
|
changeLanguage(): void{
|
|
181
|
-
|
|
182
|
-
this.$i18n.locale= "en";
|
|
183
|
-
}else{
|
|
184
|
-
this.$i18n.locale= "fr";
|
|
185
|
-
}
|
|
202
|
+
this.$i18n.locale= this.language;
|
|
186
203
|
moment.locale(this.$i18n.locale);
|
|
187
204
|
octopusApi.fetchCategories({ lang: this.$i18n.locale }).then((data: Array<Category>) => {
|
|
188
205
|
this.$store.commit('categoriesSet', data);
|
package/src/locale/de.ts
CHANGED
|
@@ -282,7 +282,7 @@ export default{
|
|
|
282
282
|
'Display my podcasts to validate': "Meine noch nicht validierten Podcasts anzeigen",
|
|
283
283
|
'Podcast not validated': "Nicht validierter Podcast",
|
|
284
284
|
'Podcast to validate': "Podcast noch nicht validiert",
|
|
285
|
-
'Change locale': "
|
|
285
|
+
'Change locale': "Ändere die Sprache",
|
|
286
286
|
'Refresh': "Aktualisieren",
|
|
287
287
|
'See associated article':"Artikel lesen",
|
|
288
288
|
"Display associated article":"Zugehörigen Artikel anzeigen",
|
package/src/locale/en.ts
CHANGED
|
@@ -282,7 +282,7 @@ export default{
|
|
|
282
282
|
'Display my podcasts to validate': 'Display my podcasts to validate',
|
|
283
283
|
'Podcast not validated': "Podcast not validated",
|
|
284
284
|
'Podcast to validate': 'Podcast to validate',
|
|
285
|
-
'Change locale': '
|
|
285
|
+
'Change locale': 'Change the language',
|
|
286
286
|
'Refresh': 'Refresh',
|
|
287
287
|
'See associated article':"Read the article",
|
|
288
288
|
"Display associated article":"Display associated article",
|
package/src/locale/es.ts
CHANGED
|
@@ -282,7 +282,7 @@ export default{
|
|
|
282
282
|
'Display my podcasts to validate': 'Mostrar mis pódcast pendientes de validación',
|
|
283
283
|
'Podcast not validated': "Pódcast no validado",
|
|
284
284
|
'Podcast to validate': 'Pódcast pendiente de validación',
|
|
285
|
-
'Change locale': '
|
|
285
|
+
'Change locale': 'Cambiar el idioma',
|
|
286
286
|
'Refresh': 'Volver a cargar',
|
|
287
287
|
'See associated article':"Leer el artículo",
|
|
288
288
|
"Display associated article":"Mostrar el artículo asociado",
|
package/src/locale/fr.ts
CHANGED
|
@@ -282,7 +282,7 @@ export default{
|
|
|
282
282
|
'Display my podcasts to validate': 'Afficher mes épisodes à valider',
|
|
283
283
|
'Podcast not validated': "L'épisode n'est pas validé",
|
|
284
284
|
'Podcast to validate': 'Épisode à valider',
|
|
285
|
-
'Change locale': '
|
|
285
|
+
'Change locale': 'Changer la langue',
|
|
286
286
|
'Refresh': 'Rafraichir',
|
|
287
287
|
'See associated article':"Lire l'article",
|
|
288
288
|
"Display associated article":"Afficher l'article associé",
|
package/src/locale/it.ts
CHANGED
|
@@ -278,7 +278,7 @@ export default{
|
|
|
278
278
|
'Display my podcasts to validate': 'Mostra i miei podcast da validare',
|
|
279
279
|
'Podcast not validated': "Podcast non validato",
|
|
280
280
|
'Podcast to validate': 'Podcast da validare',
|
|
281
|
-
'Change locale': '
|
|
281
|
+
'Change locale': 'Cambia la lingua',
|
|
282
282
|
'Refresh': 'Aggiorna',
|
|
283
283
|
'See associated article':"Leggi l'articolo",
|
|
284
284
|
"Display associated article":"Mostra articolo associato",
|
package/src/locale/sl.ts
CHANGED
|
@@ -282,7 +282,7 @@ export default{
|
|
|
282
282
|
'Display my podcasts to validate': 'Prikaži moje podkaste za potrditev',
|
|
283
283
|
'Podcast not validated': "Podkasti niso potrjeni",
|
|
284
284
|
'Podcast to validate': 'Podkasti, ki jih je treba potrditi',
|
|
285
|
-
'Change locale': '
|
|
285
|
+
'Change locale': 'Spremenite jezik',
|
|
286
286
|
'Refresh': 'Osveži',
|
|
287
287
|
'See associated article':"Read the article",
|
|
288
288
|
"Display associated article": "Prikaži povezan vir",
|
package/src/main.ts
CHANGED
|
@@ -19,12 +19,24 @@ const navigatorLang = navigator.language /* || navigator.userLanguage */;
|
|
|
19
19
|
let language = 'fr';
|
|
20
20
|
if(navigatorLang.includes('en')){
|
|
21
21
|
language = 'en';
|
|
22
|
+
}else if(navigatorLang.includes('it')){
|
|
23
|
+
language = 'it';
|
|
24
|
+
}else if(navigatorLang.includes('sl')){
|
|
25
|
+
language = 'sl';
|
|
26
|
+
}else if(navigatorLang.includes('es')){
|
|
27
|
+
language = 'es';
|
|
28
|
+
}else if(navigatorLang.includes('de')){
|
|
29
|
+
language = 'de';
|
|
22
30
|
}
|
|
23
31
|
let messages: {[key: string]: LocaleMessage<VueMessageType>} = I18nResources;
|
|
24
32
|
if (store.state.general.education) {
|
|
25
33
|
messages = {
|
|
26
34
|
fr: { ...I18nResources.fr, ...I18nResources.educationfr },
|
|
27
35
|
en: { ...I18nResources.en, ...I18nResources.educationen },
|
|
36
|
+
it: I18nResources.it,
|
|
37
|
+
sl: I18nResources.it,
|
|
38
|
+
es: I18nResources.es,
|
|
39
|
+
de: I18nResources.de,
|
|
28
40
|
};
|
|
29
41
|
}
|
|
30
42
|
const i18n = createI18n({
|