@saooti/octopus-sdk 1.0.0 → 29.0.2
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 +73 -0
- package/index.d.ts +4 -0
- package/index.ts +12 -0
- package/package.json +61 -39
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +30 -19
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/style.css +48 -5
- package/public/img/ACPM.png +0 -0
- package/public/img/article.png +0 -0
- package/src/App.vue +97 -31
- package/src/api/comments.ts +3 -1
- package/src/api/emissions.ts +5 -2
- package/src/api/initialize.ts +3 -2
- package/src/api/podcasts.ts +5 -2
- package/src/api/profile.ts +4 -2
- package/src/api/studio.ts +12 -1
- package/src/assets/bootstrap-diff.scss +265 -0
- package/src/assets/form.scss +23 -0
- package/src/assets/general.scss +47 -20
- package/src/assets/modal.scss +9 -10
- package/src/assets/multiselect.scss +19 -2
- package/src/assets/octopus-library.scss +16 -4
- package/src/assets/share.scss +343 -0
- package/src/components/display/aggregator/RssSection.vue +4 -4
- package/src/components/display/categories/CategoryChooser.vue +152 -105
- package/src/components/display/categories/CategoryFilter.vue +108 -0
- package/src/components/display/categories/CategoryList.vue +138 -109
- package/src/components/display/comments/AddCommentModal.vue +104 -87
- package/src/components/display/comments/CommentInput.vue +137 -118
- package/src/components/display/comments/CommentItem.vue +155 -137
- package/src/components/display/comments/CommentList.vue +142 -120
- package/src/components/display/comments/CommentParentInfo.vue +39 -35
- package/src/components/display/comments/CommentPlayer.vue +54 -48
- package/src/components/display/comments/CommentSection.vue +57 -58
- package/src/components/display/edit/EditBox.vue +4 -4
- package/src/components/display/edit/EditCommentBox.vue +25 -31
- package/src/components/display/emission/EmissionChooser.vue +82 -80
- package/src/components/display/emission/EmissionInlineList.vue +118 -105
- package/src/components/display/emission/EmissionItem.vue +66 -167
- package/src/components/display/emission/EmissionList.vue +96 -122
- package/src/components/display/emission/EmissionPlayerItem.vue +131 -126
- package/src/components/display/filter/AdvancedSearch.vue +306 -372
- package/src/components/display/filter/CategoryFilter.vue +117 -0
- package/src/components/display/filter/MonetizableFilter.vue +24 -10
- package/src/components/display/filter/ProductorSearch.vue +131 -135
- package/src/components/display/filter/RubriqueChoice.vue +104 -0
- package/src/components/display/filter/RubriqueFilter.vue +235 -0
- package/src/components/display/live/CountDown.vue +30 -29
- package/src/components/display/live/LiveHorizontalList.vue +40 -34
- package/src/components/display/live/LiveItem.vue +146 -158
- package/src/components/display/live/LiveList.vue +167 -154
- package/src/components/display/organisation/OrganisationChooser.vue +125 -124
- package/src/components/display/organisation/OrganisationChooserLight.vue +40 -47
- package/src/components/display/participant/ParticipantItem.vue +92 -108
- package/src/components/display/participant/ParticipantList.vue +76 -69
- package/src/components/display/playlist/PlaylistItem.vue +45 -56
- package/src/components/display/playlist/PlaylistList.vue +57 -48
- package/src/components/display/playlist/PodcastList.vue +94 -70
- package/src/components/display/podcasts/AnimatorsItem.vue +26 -23
- package/src/components/display/podcasts/ParticipantDescription.vue +115 -0
- package/src/components/display/podcasts/PodcastFilterList.vue +84 -85
- package/src/components/display/podcasts/PodcastImage.vue +244 -208
- package/src/components/display/podcasts/PodcastInlineList.vue +145 -207
- package/src/components/display/podcasts/PodcastItem.vue +150 -132
- package/src/components/display/podcasts/PodcastList.vue +89 -110
- package/src/components/display/podcasts/TagList.vue +23 -16
- package/src/components/display/rubriques/RubriqueChooser.vue +137 -123
- package/src/components/display/rubriques/RubriqueList.vue +227 -0
- package/src/components/display/sharing/PlayerParameters.vue +154 -106
- package/src/components/display/sharing/QrCode.vue +58 -0
- package/src/components/display/sharing/ShareButtons.vue +214 -92
- package/src/components/display/sharing/ShareDistribution.vue +110 -121
- package/src/components/display/sharing/SharePlayer.vue +245 -190
- package/src/components/display/sharing/SubscribeButtons.vue +130 -66
- package/src/components/display/studio/RecordingItemButton.vue +4 -4
- package/src/components/misc/ErrorMessage.vue +21 -16
- package/src/components/misc/Footer.vue +131 -66
- package/src/components/misc/HomeDropdown.vue +166 -123
- package/src/components/misc/LeftMenu.vue +151 -134
- package/src/components/misc/Player.vue +332 -328
- package/src/components/misc/Snackbar.vue +27 -29
- package/src/components/misc/TopBar.vue +204 -174
- package/src/components/misc/modal/ClipboardModal.vue +46 -26
- package/src/components/misc/modal/MessageModal.vue +67 -51
- package/src/components/misc/modal/NewsletterModal.vue +179 -136
- package/src/components/misc/modal/QrCodeModal.vue +83 -0
- package/src/components/misc/modal/ShareModalPlayer.vue +133 -74
- package/src/components/mixins/functions.ts +21 -18
- package/src/components/mixins/init.ts +24 -0
- package/src/components/mixins/organisationFilter.ts +24 -0
- package/src/components/pages/Category.vue +26 -26
- package/src/components/pages/Emission.vue +120 -92
- package/src/components/pages/Emissions.vue +109 -86
- package/src/components/pages/Home.vue +70 -16
- package/src/components/pages/Lives.vue +57 -47
- package/src/components/pages/Participant.vue +93 -77
- package/src/components/pages/Participants.vue +44 -31
- package/src/components/pages/Playlist.vue +63 -52
- package/src/components/pages/Playlists.vue +41 -39
- package/src/components/pages/Podcast.vue +265 -251
- package/src/components/pages/Podcasts.vue +135 -104
- package/src/components/pages/Rubrique.vue +25 -19
- package/src/components/pages/Search.vue +71 -67
- package/src/helper/dom.ts +2 -2
- package/src/helper/duration.ts +18 -8
- package/src/locale/educationen.ts +14 -0
- package/src/locale/en.ts +299 -1
- package/src/locale/fr.ts +25 -10
- package/src/locale/messages.ts +3 -2
- package/src/main.ts +54 -32
- package/src/router/router.ts +184 -159
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -6
- package/src/store/AppStore.ts +36 -171
- package/src/store/class/category.ts +8 -0
- package/src/store/class/comment.ts +17 -0
- package/src/store/class/conference.ts +27 -0
- package/src/store/class/customPlayer.ts +8 -0
- package/src/store/class/emission.ts +20 -0
- package/src/store/class/fetchParam.ts +16 -0
- package/src/store/class/media.ts +13 -0
- package/src/store/class/organisation.ts +19 -0
- package/src/store/class/participant.ts +12 -0
- package/src/store/class/person.ts +13 -0
- package/src/store/class/player.ts +12 -0
- package/src/store/class/playlist.ts +15 -0
- package/src/store/class/podcast.ts +37 -0
- package/src/store/class/rubriquage.ts +9 -0
- package/src/store/class/rubriquageFilter.ts +5 -0
- package/src/store/class/rubrique.ts +8 -0
- package/src/store/paramStore.ts +70 -29
- package/src/store/typeAppStore.ts +171 -237
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +4 -0
- package/vue.config.js +14 -0
- package/public/img/ACPM.PNG +0 -0
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -291
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/shims-vuex.d.ts +0 -7
- package/src/views/Home.vue +0 -18
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="isDisplay">
|
|
3
|
+
<nav
|
|
4
|
+
v-if="categoryFilter || rubriqueFilter.length"
|
|
5
|
+
aria-label="breadcrumb"
|
|
6
|
+
>
|
|
7
|
+
<ol class="breadcrumb">
|
|
8
|
+
<li class="breadcrumb-item">
|
|
9
|
+
<a
|
|
10
|
+
href="#"
|
|
11
|
+
@click="removeFilter(-1, $event)"
|
|
12
|
+
>{{ $t('All') }}</a>
|
|
13
|
+
</li>
|
|
14
|
+
<li
|
|
15
|
+
v-if="categoryFilter"
|
|
16
|
+
class="breadcrumb-item active"
|
|
17
|
+
>
|
|
18
|
+
{{ categoryFilter.name }}
|
|
19
|
+
</li>
|
|
20
|
+
<li
|
|
21
|
+
v-for="(filter, index) in rubriqueFilter"
|
|
22
|
+
:key="filter.rubriqueId"
|
|
23
|
+
class="breadcrumb-item"
|
|
24
|
+
:class="rubriqueFilter.length-1 === index ? 'active':''"
|
|
25
|
+
>
|
|
26
|
+
<a
|
|
27
|
+
v-if="rubriqueFilter.length - 1 !== index"
|
|
28
|
+
href="#"
|
|
29
|
+
@click="removeFilter(index,$event)"
|
|
30
|
+
>{{ filter.name }}</a>
|
|
31
|
+
<template v-else>
|
|
32
|
+
{{ filter.name }}
|
|
33
|
+
</template>
|
|
34
|
+
</li>
|
|
35
|
+
</ol>
|
|
36
|
+
</nav>
|
|
37
|
+
<CategoryList
|
|
38
|
+
v-if="!categoryFilter && !rubriquageFilter.length"
|
|
39
|
+
:is-filter="true"
|
|
40
|
+
/>
|
|
41
|
+
<RubriqueList
|
|
42
|
+
v-else-if="rubriquageFilter.length !== rubriqueFilter.length"
|
|
43
|
+
:rubriquages="rubriquageFilter"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts">
|
|
49
|
+
import { Category } from '@/store/class/category';
|
|
50
|
+
import { Rubriquage } from '@/store/class/rubriquage';
|
|
51
|
+
import { RubriquageFilter } from '@/store/class/rubriquageFilter';
|
|
52
|
+
import { defineComponent, defineAsyncComponent } from 'vue';
|
|
53
|
+
const CategoryList = defineAsyncComponent(() => import('./CategoryList.vue'));
|
|
54
|
+
const RubriqueList = defineAsyncComponent(() => import('./../rubriques/RubriqueList.vue'));
|
|
55
|
+
export default defineComponent({
|
|
56
|
+
name: 'CategoryFilter',
|
|
57
|
+
|
|
58
|
+
components:{
|
|
59
|
+
CategoryList,
|
|
60
|
+
RubriqueList,
|
|
61
|
+
},
|
|
62
|
+
computed: {
|
|
63
|
+
categoryFilter(): Category|undefined{
|
|
64
|
+
return this.$store.state.filter.iab;
|
|
65
|
+
},
|
|
66
|
+
rubriqueFilter(): Array<RubriquageFilter>{
|
|
67
|
+
return this.$store.state.filter.rubriqueFilter;
|
|
68
|
+
},
|
|
69
|
+
isDisplay(): boolean {
|
|
70
|
+
return "homePriv" === this.$route.name ||"home" === this.$route.name ||"podcasts" === this.$route.name||"emissions" === this.$route.name;
|
|
71
|
+
},
|
|
72
|
+
rubriquageFilter(): Array<Rubriquage>{
|
|
73
|
+
if(this.$store.state.filter.organisationId){
|
|
74
|
+
return this.$store.state.filter.rubriquageArray;
|
|
75
|
+
}
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
methods:{
|
|
80
|
+
removeFilter(index: number, event?: { preventDefault: () => void }): void{
|
|
81
|
+
const queries = this.$route.query;
|
|
82
|
+
if(this.categoryFilter){
|
|
83
|
+
if (queries.iabId) {
|
|
84
|
+
this.$router.push({ query: {...queries, ...{iabId: undefined} } });
|
|
85
|
+
}
|
|
86
|
+
this.$store.commit('filterIab', undefined);
|
|
87
|
+
}else{
|
|
88
|
+
const newFilter: Array<RubriquageFilter> = Array.from(this.$store.state.filter.rubriqueFilter);
|
|
89
|
+
newFilter.splice(index + 1);
|
|
90
|
+
if (queries.rubriquesId) {
|
|
91
|
+
const queryString = newFilter.map(value => value.rubriquageId+':'+value.rubriqueId).join();
|
|
92
|
+
if("" !== queryString){
|
|
93
|
+
this.$router.push({ query: { ...queries, ...{ rubriquesId: queryString }} });
|
|
94
|
+
}else{
|
|
95
|
+
this.$router.push({ query: { ...queries, ...{ rubriquesId: undefined }} });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
this.$store.commit('filterRubrique', newFilter);
|
|
99
|
+
}
|
|
100
|
+
if(event){
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style lang="scss"></style>
|
|
@@ -1,136 +1,142 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="d-inline-flex w-100 mb-3
|
|
3
|
-
<div
|
|
4
|
-
|
|
2
|
+
<div class="d-inline-flex w-100 mb-3 ps-3 pe-3 hide-phone category-list">
|
|
3
|
+
<div
|
|
4
|
+
id="category-list-container"
|
|
5
|
+
class="category-list-container"
|
|
6
|
+
>
|
|
7
|
+
<button
|
|
8
|
+
v-for="category in categories"
|
|
5
9
|
:id="'category' + category.id"
|
|
6
|
-
:
|
|
7
|
-
name: 'category',
|
|
8
|
-
params: { iabId: category.id },
|
|
9
|
-
query: { productor: filterOrga },
|
|
10
|
-
}"
|
|
10
|
+
:key="category.id"
|
|
11
11
|
class="category-item text-dark secondary-bg"
|
|
12
|
-
|
|
13
|
-
v-bind:key="category.id"
|
|
14
|
-
>{{ category.name }}</router-link
|
|
12
|
+
@click="checkIfFilter(category)"
|
|
15
13
|
>
|
|
14
|
+
{{ category.name }}
|
|
15
|
+
</button>
|
|
16
16
|
</div>
|
|
17
|
-
<
|
|
17
|
+
<div
|
|
18
18
|
v-show="hidenCategories.length"
|
|
19
|
-
|
|
20
|
-
toggle-class="text-decoration-none text-dark category-item category-item-plus"
|
|
21
|
-
no-caret
|
|
22
|
-
:aria-label="$t('See more')"
|
|
19
|
+
class="dropdown btn-group"
|
|
23
20
|
>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
<button
|
|
22
|
+
class="btn dropdown-toggle btn-secondary text-decoration-none text-dark category-item category-item-plus dropdown-toggle-no-caret"
|
|
23
|
+
data-bs-toggle="dropdown"
|
|
24
|
+
aria-expanded="false"
|
|
25
|
+
:aria-label="$t('See more')"
|
|
26
|
+
>
|
|
27
|
+
<i class="saooti-plus" />
|
|
28
|
+
</button>
|
|
29
|
+
<ul class="dropdown-menu dropdown-menu-right px-4">
|
|
30
|
+
<div
|
|
34
31
|
v-for="category in hidenCategories"
|
|
35
|
-
|
|
36
|
-
class="
|
|
37
|
-
|
|
32
|
+
:key="category.id"
|
|
33
|
+
class="me-3 dropdown-item"
|
|
34
|
+
@click="checkIfFilter(category)"
|
|
38
35
|
>
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
{{ category.name }}
|
|
37
|
+
</div>
|
|
38
|
+
</ul>
|
|
39
|
+
</div>
|
|
41
40
|
</div>
|
|
42
41
|
</template>
|
|
43
42
|
|
|
44
|
-
<style lang="scss">
|
|
45
|
-
.category-list-container {
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
justify-content: flex-start;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
flex-grow: 1;
|
|
50
|
-
width: 0;
|
|
51
|
-
padding: 0 4rem;
|
|
52
|
-
}
|
|
53
|
-
.category-item {
|
|
54
|
-
font-size: 0.6rem;
|
|
55
|
-
margin: 0.2rem;
|
|
56
|
-
padding: 0.5rem;
|
|
57
|
-
display: block;
|
|
58
|
-
height: 1.5rem;
|
|
59
|
-
border-radius: 1.5rem;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
white-space: nowrap;
|
|
64
|
-
flex-shrink: 0;
|
|
65
|
-
.router-link-active {
|
|
66
|
-
background: #ddd !important;
|
|
67
|
-
}
|
|
68
|
-
&:hover {
|
|
69
|
-
background: #ddd !important;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.category-list .category-item-plus {
|
|
74
|
-
display: flex;
|
|
75
|
-
height: 1.5rem;
|
|
76
|
-
width: 1.5rem;
|
|
77
|
-
align-items: center;
|
|
78
|
-
justify-content: center;
|
|
79
|
-
font-size: 0.5rem;
|
|
80
|
-
}
|
|
81
|
-
</style>
|
|
82
43
|
<script lang="ts">
|
|
83
44
|
const octopusApi = require('@saooti/octopus-api');
|
|
84
45
|
import { state } from '../../../store/paramStore';
|
|
85
46
|
|
|
86
|
-
import {
|
|
47
|
+
import { Category } from '@/store/class/category';
|
|
48
|
+
import { defineComponent } from 'vue'
|
|
87
49
|
export default defineComponent({
|
|
88
50
|
name: 'CategoryList',
|
|
89
51
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.resizeWindow();
|
|
93
|
-
if (this.filterOrga) {
|
|
94
|
-
this.fetchCategories(this.filterOrga);
|
|
95
|
-
}
|
|
52
|
+
props: {
|
|
53
|
+
isFilter: { default: false, type: Boolean },
|
|
96
54
|
},
|
|
97
55
|
|
|
98
56
|
data() {
|
|
99
57
|
return {
|
|
100
|
-
hidenCategories: [] as
|
|
58
|
+
hidenCategories: [] as Array<Category>,
|
|
101
59
|
};
|
|
102
60
|
},
|
|
103
61
|
|
|
104
62
|
computed: {
|
|
105
|
-
isPodcastmaker() {
|
|
63
|
+
isPodcastmaker(): boolean {
|
|
106
64
|
return state.generalParameters.podcastmaker;
|
|
107
65
|
},
|
|
108
|
-
|
|
66
|
+
categoriesWatch(): Array<Category>{
|
|
67
|
+
return this.$store.state.categories;
|
|
68
|
+
},
|
|
69
|
+
categories(): Array<Category> {
|
|
109
70
|
if (this.filterOrga) {
|
|
110
|
-
return this.$store.state.categoriesOrga.filter((c:
|
|
71
|
+
return this.$store.state.categoriesOrga.filter((c: Category) => {
|
|
111
72
|
return c.podcastOrganisationCount;
|
|
112
73
|
});
|
|
113
74
|
}
|
|
114
|
-
return state.
|
|
75
|
+
return this.$store.state.categories.filter((c: Category) => {
|
|
115
76
|
if (this.isPodcastmaker) return c.podcastOrganisationCount;
|
|
116
77
|
return c.podcastCount;
|
|
117
78
|
});
|
|
118
79
|
},
|
|
119
|
-
filterOrga():
|
|
80
|
+
filterOrga(): string {
|
|
120
81
|
return this.$store.state.filter.organisationId;
|
|
121
82
|
},
|
|
122
83
|
},
|
|
84
|
+
watch: {
|
|
85
|
+
categories(): void {
|
|
86
|
+
this.$nextTick(() => {
|
|
87
|
+
this.resizeWindow();
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
filterOrga(): void {
|
|
91
|
+
if (this.filterOrga) {
|
|
92
|
+
this.fetchCategories(this.filterOrga);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
categoriesWatch(): void{
|
|
96
|
+
if (this.filterOrga) {
|
|
97
|
+
this.fetchCategories(this.filterOrga);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
123
101
|
|
|
102
|
+
mounted() {
|
|
103
|
+
window.addEventListener('resize', this.resizeWindow);
|
|
104
|
+
this.resizeWindow();
|
|
105
|
+
if (this.filterOrga) {
|
|
106
|
+
this.fetchCategories(this.filterOrga);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
beforeUnmount(): void {
|
|
110
|
+
window.removeEventListener('resize', this.resizeWindow);
|
|
111
|
+
},
|
|
124
112
|
methods: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
113
|
+
checkIfFilter(category: Category): void{
|
|
114
|
+
if(!this.isFilter){
|
|
115
|
+
this.$router.push({
|
|
116
|
+
name: 'category',
|
|
117
|
+
params: { iabId: category.id.toString() },
|
|
118
|
+
query: { productor: this.filterOrga },
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const queries = this.$route.query;
|
|
123
|
+
if(!queries.iabId || ('string'===typeof queries.iabId && parseInt(queries.iabId ,10) !== category.id)) {
|
|
124
|
+
this.$router.push({ query: { ...queries, ...{ iabId: category.id.toString() }} });
|
|
125
|
+
}
|
|
126
|
+
this.$store.commit('filterIab',category);
|
|
127
|
+
},
|
|
128
|
+
resizeWindow(): void {
|
|
129
|
+
const categoryList = document.getElementById('category-list-container');
|
|
130
|
+
if(null === categoryList){
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
categoryList.style.justifyContent = 'flex-start';
|
|
128
134
|
this.hidenCategories.length = 0;
|
|
129
|
-
this.categories.forEach((element:
|
|
130
|
-
|
|
135
|
+
this.categories.forEach((element: Category) => {
|
|
136
|
+
const el = document.getElementById('category' + element.id);
|
|
131
137
|
if (!el) return;
|
|
132
|
-
const parent
|
|
133
|
-
if (el.offsetLeft + el.clientWidth <= parent.clientWidth - 20) {
|
|
138
|
+
const parent = el.parentElement;
|
|
139
|
+
if (parent && el.offsetLeft + el.clientWidth <= parent.clientWidth - 20) {
|
|
134
140
|
el.classList.remove('hid');
|
|
135
141
|
return;
|
|
136
142
|
}
|
|
@@ -140,31 +146,54 @@ export default defineComponent({
|
|
|
140
146
|
}
|
|
141
147
|
});
|
|
142
148
|
if (!this.hidenCategories.length) {
|
|
143
|
-
categoryList
|
|
149
|
+
categoryList.style.justifyContent = 'center';
|
|
144
150
|
}
|
|
145
151
|
},
|
|
146
|
-
async fetchCategories(organisationId:string) {
|
|
152
|
+
async fetchCategories(organisationId: string): Promise<void> {
|
|
147
153
|
const data = await octopusApi.fetchCategoriesOrga(organisationId, {
|
|
148
|
-
lang:
|
|
154
|
+
lang: this.$i18n.locale,
|
|
149
155
|
});
|
|
150
156
|
this.$store.commit('categoriesOrgaSet', data);
|
|
151
157
|
},
|
|
152
158
|
},
|
|
153
|
-
|
|
154
|
-
beforeUnmount() {
|
|
155
|
-
window.removeEventListener('resize', this.resizeWindow);
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
watch: {
|
|
159
|
-
async categories() {
|
|
160
|
-
await nextTick();
|
|
161
|
-
this.resizeWindow();
|
|
162
|
-
},
|
|
163
|
-
filterOrga(newVal) {
|
|
164
|
-
if (newVal) {
|
|
165
|
-
this.fetchCategories(newVal);
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
});
|
|
159
|
+
})
|
|
170
160
|
</script>
|
|
161
|
+
<style lang="scss">
|
|
162
|
+
.category-list-container {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
justify-content: flex-start;
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
flex-grow: 1;
|
|
167
|
+
width: 0;
|
|
168
|
+
padding: 0 4rem;
|
|
169
|
+
}
|
|
170
|
+
.category-item {
|
|
171
|
+
font-size: 0.6rem;
|
|
172
|
+
margin: 0.2rem;
|
|
173
|
+
padding: 0.5rem;
|
|
174
|
+
display: block;
|
|
175
|
+
height: 1.5rem;
|
|
176
|
+
border-radius: 1.5rem;
|
|
177
|
+
border: 0;
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
flex-shrink: 0;
|
|
183
|
+
.router-link-active {
|
|
184
|
+
background: #ddd !important;
|
|
185
|
+
}
|
|
186
|
+
&:hover {
|
|
187
|
+
background: #ddd !important;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.category-list .category-item-plus {
|
|
192
|
+
display: flex;
|
|
193
|
+
height: 1.5rem;
|
|
194
|
+
width: 1.5rem;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
font-size: 0.5rem;
|
|
198
|
+
}
|
|
199
|
+
</style>
|
|
@@ -1,80 +1,110 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class="form-input"
|
|
14
|
-
type="text"
|
|
15
|
-
v-model="name"
|
|
16
|
-
:placeholder="$t('Your name')"
|
|
17
|
-
/>
|
|
18
|
-
<div class="mt-1 text-danger" v-if="sendError">
|
|
19
|
-
{{ $t('Recaptcha error') }}
|
|
2
|
+
<div
|
|
3
|
+
id="add-comment-modal"
|
|
4
|
+
class="modal"
|
|
5
|
+
>
|
|
6
|
+
<div class="modal-backdrop" />
|
|
7
|
+
<div class="modal-dialog">
|
|
8
|
+
<div class="modal-content">
|
|
9
|
+
<div class="modal-header">
|
|
10
|
+
<h5 class="modal-title">
|
|
11
|
+
{{ $t('Welcome, thanks for your comment') }}
|
|
12
|
+
</h5>
|
|
20
13
|
</div>
|
|
21
|
-
<div class="
|
|
22
|
-
|
|
14
|
+
<div class="modal-body">
|
|
15
|
+
<template v-if="!sending">
|
|
16
|
+
<div>{{ $t("Let's get acquainted :") }}</div>
|
|
17
|
+
<input
|
|
18
|
+
v-model="name"
|
|
19
|
+
class="form-input"
|
|
20
|
+
type="text"
|
|
21
|
+
:placeholder="$t('Your name')"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
v-if="sendError"
|
|
25
|
+
class="mt-1 text-danger"
|
|
26
|
+
>
|
|
27
|
+
{{ $t('Recaptcha error') }}
|
|
28
|
+
</div>
|
|
29
|
+
<div
|
|
30
|
+
v-if="isCaptchaTest"
|
|
31
|
+
class="mt-1 text-danger"
|
|
32
|
+
>
|
|
33
|
+
{{ $t('Recaptcha not active') }}
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<template v-else>
|
|
37
|
+
<div>{{ $t('Send in progress') }}</div>
|
|
38
|
+
</template>
|
|
23
39
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
<div class="modal-footer">
|
|
41
|
+
<template
|
|
42
|
+
v-if="!sending"
|
|
43
|
+
>
|
|
44
|
+
<button
|
|
45
|
+
class="btn btn-light m-1"
|
|
46
|
+
@click="closePopup"
|
|
47
|
+
>
|
|
48
|
+
{{ $t('Cancel') }}
|
|
49
|
+
</button>
|
|
50
|
+
<button
|
|
51
|
+
class="btn btn-primary m-1"
|
|
52
|
+
:disabled="name.length <= 2"
|
|
53
|
+
@click="recaptcha"
|
|
54
|
+
>
|
|
55
|
+
{{ $t('Validate') }}
|
|
56
|
+
</button>
|
|
57
|
+
</template>
|
|
58
|
+
<template
|
|
59
|
+
v-else
|
|
60
|
+
>
|
|
61
|
+
<button
|
|
62
|
+
class="btn m-1"
|
|
63
|
+
@click="closePopup"
|
|
64
|
+
>
|
|
65
|
+
{{ $t('Close') }}
|
|
66
|
+
</button>
|
|
67
|
+
</template>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
46
71
|
</div>
|
|
47
72
|
</template>
|
|
48
73
|
|
|
49
|
-
<style lang="scss"></style>
|
|
50
74
|
<script lang="ts">
|
|
51
|
-
import { useReCaptcha } from
|
|
75
|
+
import { useReCaptcha } from 'vue-recaptcha-v3';
|
|
52
76
|
import { state } from '../../../store/paramStore';
|
|
53
77
|
import api from '@/api/initialize';
|
|
54
|
-
|
|
55
|
-
import { defineComponent } from 'vue';
|
|
78
|
+
import { defineComponent } from 'vue'
|
|
56
79
|
export default defineComponent({
|
|
57
80
|
name: 'AddCommentModal',
|
|
58
81
|
|
|
59
|
-
props:
|
|
60
|
-
emits: ['close',
|
|
82
|
+
props: {},
|
|
83
|
+
emits: ['close','validate'],
|
|
61
84
|
|
|
62
|
-
|
|
63
|
-
const { executeRecaptcha, recaptchaLoaded }:any = useReCaptcha();
|
|
64
|
-
|
|
65
|
-
const recaptcha = async () => {
|
|
66
|
-
await recaptchaLoaded();
|
|
67
|
-
const token = await executeRecaptcha("login");
|
|
68
|
-
return token;
|
|
69
|
-
}
|
|
85
|
+
data() {
|
|
70
86
|
return {
|
|
71
|
-
|
|
72
|
-
|
|
87
|
+
name: '' as string,
|
|
88
|
+
sending: false as boolean,
|
|
89
|
+
needVerify: true as boolean,
|
|
90
|
+
sendError: false as boolean,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
computed: {
|
|
95
|
+
authenticated(): boolean {
|
|
96
|
+
return state.generalParameters.authenticated;
|
|
97
|
+
},
|
|
98
|
+
isCaptchaTest(): boolean {
|
|
99
|
+
return state.generalParameters.isCaptchaTest;
|
|
100
|
+
},
|
|
73
101
|
},
|
|
74
102
|
|
|
75
103
|
mounted() {
|
|
76
|
-
|
|
77
|
-
captcha
|
|
104
|
+
const captcha: any = document.getElementsByClassName('grecaptcha-badge')[0];
|
|
105
|
+
if (captcha) {
|
|
106
|
+
captcha.style.display = 'block';
|
|
107
|
+
}
|
|
78
108
|
if (this.authenticated) {
|
|
79
109
|
this.name = (
|
|
80
110
|
(this.$store.state.profile.firstname || '') +
|
|
@@ -83,42 +113,27 @@ export default defineComponent({
|
|
|
83
113
|
).trim();
|
|
84
114
|
this.needVerify = false;
|
|
85
115
|
}
|
|
86
|
-
/* this.$bvModal.show('add-comment-modal'); */
|
|
87
116
|
},
|
|
88
117
|
|
|
89
118
|
unmounted() {
|
|
90
|
-
|
|
91
|
-
captcha
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
data() {
|
|
95
|
-
return {
|
|
96
|
-
name: '',
|
|
97
|
-
sending: false,
|
|
98
|
-
needVerify: true,
|
|
99
|
-
sendError: false,
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
computed: {
|
|
104
|
-
authenticated():boolean {
|
|
105
|
-
return state.generalParameters.authenticated;
|
|
106
|
-
},
|
|
107
|
-
isCaptchaTest() {
|
|
108
|
-
return state.generalParameters.isCaptchaTest;
|
|
109
|
-
},
|
|
119
|
+
const captcha: any = document.getElementsByClassName('grecaptcha-badge')[0];
|
|
120
|
+
if (captcha) {
|
|
121
|
+
captcha.style.display = 'none';
|
|
122
|
+
}
|
|
110
123
|
},
|
|
111
124
|
|
|
112
125
|
methods: {
|
|
113
|
-
async
|
|
126
|
+
async recaptcha(): Promise<void> {
|
|
114
127
|
if (!this.needVerify || this.isCaptchaTest) {
|
|
115
128
|
this.sendComment();
|
|
116
129
|
return;
|
|
117
130
|
}
|
|
118
|
-
const
|
|
131
|
+
const { executeRecaptcha, recaptchaLoaded }: any = useReCaptcha()
|
|
132
|
+
await recaptchaLoaded();
|
|
133
|
+
const token = await executeRecaptcha('login');
|
|
119
134
|
try {
|
|
120
135
|
this.sendError = false;
|
|
121
|
-
const ok
|
|
136
|
+
const ok = await api.checkToken(token);
|
|
122
137
|
if (!ok) {
|
|
123
138
|
this.sendError = true;
|
|
124
139
|
return;
|
|
@@ -129,14 +144,16 @@ export default defineComponent({
|
|
|
129
144
|
}
|
|
130
145
|
this.sendComment();
|
|
131
146
|
},
|
|
132
|
-
closePopup(event: { preventDefault: () => void
|
|
147
|
+
closePopup(event: { preventDefault: () => void }): void {
|
|
133
148
|
event.preventDefault();
|
|
134
149
|
this.$emit('close');
|
|
135
150
|
},
|
|
136
|
-
sendComment() {
|
|
151
|
+
sendComment(): void {
|
|
137
152
|
this.sending = true;
|
|
138
153
|
this.$emit('validate', this.name);
|
|
139
154
|
},
|
|
140
155
|
},
|
|
141
|
-
})
|
|
156
|
+
})
|
|
142
157
|
</script>
|
|
158
|
+
|
|
159
|
+
<style lang="scss"></style>
|