@saooti/octopus-sdk 0.28.6 → 0.28.10

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 CHANGED
@@ -429,6 +429,10 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
429
429
  * 0.26.7 Newsletter Icone
430
430
  * 0.26.8 Mettre un tooltip sur le bouton de copie de l'adresse d'une page de podcast
431
431
  * 0.26.9 Commentaires
432
+ * 0.26.10 Animé par
433
+ * 0.26.11 LiveTab
434
+
435
+
432
436
 
433
437
  * 0.27.0 Nouveau sprint
434
438
  * 0.27.1 Export mixins
@@ -442,6 +446,9 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
442
446
  * 0.27.9 Octopus Api
443
447
  * 0.27.10 Player beta
444
448
  * 0.27.11 Player beta
449
+ * 0.27.12 Merge release 26
450
+ * 0.27.13 Podcastmaker
451
+ * 0.27.14 Podcastmaker resource url
445
452
 
446
453
  * 0.28.0 Nouveau sprint
447
454
  * 0.28.1 Version category filtre
@@ -450,5 +457,11 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
450
457
  * 0.28.4 Rubrique filtre
451
458
  * 0.28.5 Expose new mixins
452
459
  * 0.28.6 Rubrique filtre
460
+ * 0.28.7 Rubrique filtre
461
+ * 0.28.8 Rubrique filtre
462
+ * 0.28.9 QrCode
463
+ * 0.28.10 QrCode icone
464
+
465
+
453
466
 
454
467
 
package/index.ts CHANGED
@@ -55,6 +55,7 @@ import {displayMethods} from "./src/components/mixins/functions";
55
55
  import {cookiesAndMethods} from "./src/components/mixins/functions";
56
56
  import {seleniumAndMethods} from "./src/components/mixins/functions";
57
57
  import {orgaFilter} from "./src/components/mixins/organisationFilter";
58
+ import {initSDK} from "./src/components/mixins/init";
58
59
 
59
60
  const components = {
60
61
  Lives,
@@ -97,7 +98,8 @@ const components = {
97
98
  seleniumAndMethods,
98
99
  Rubrique,
99
100
  CategoryFilter,
100
- orgaFilter
101
+ orgaFilter,
102
+ initSDK
101
103
  }
102
104
 
103
105
  export default components;
@@ -143,5 +145,6 @@ export {
143
145
  seleniumAndMethods,
144
146
  Rubrique,
145
147
  CategoryFilter,
146
- orgaFilter
148
+ orgaFilter,
149
+ initSDK
147
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "0.28.6",
3
+ "version": "0.28.10",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -25,6 +25,7 @@
25
25
  "moment": "^2.29.0",
26
26
  "moment-locales-webpack-plugin": "^1.2.0",
27
27
  "portal-vue": "^2.1.7",
28
+ "qrcode.vue": "^1.7.0",
28
29
  "sass": "^1.25.0",
29
30
  "sass-loader": "^8.0.2",
30
31
  "v-calendar": "^2.3.0",
Binary file
@@ -489,7 +489,8 @@
489
489
  <glyph unicode="&#xeadf;" glyph-name="newsletter" d="M160.632 641.257l-110.84-72.535 110.84-72.943zM863.368 641.257v-145.478l110.636 72.739zM512.102 871.902l-110.229-72.332h220.254zM455.256 509.838c0-24.042 12.429-38.509 33.211-38.509 28.728 0 56.642 36.879 62.347 69.886l10.799 57.865c-7.743 2.241-16.096 3.26-24.654 3.26-44.418 0-81.704-42.38-81.704-92.503zM829.138 473.367v292.178h-634.478v-291.974l317.239-208.436 317.239 208.233zM340.137 516.562c0 53.79 18.338 103.709 51.956 140.792 35.045 38.713 84.352 60.107 139.162 60.107 89.854 0 152.405-62.347 152.405-151.386 0-81.908-47.066-124.899-93.725-124.899-11.41 0-21.598 4.075-28.525 11.41-7.743 8.15-11.613 19.968-11.002 34.23h-0.407c-18.338-30.766-42.583-45.844-73.962-45.844-28.525 0-57.254 22.82-57.254 66.626 0 31.785 12.632 63.57 34.841 86.594 23.431 24.45 55.217 37.897 89.65 37.897 20.579 0 40.953-4.075 56.031-11.002l0.815-0.407-0.204-0.815-17.726-94.133c-5.093-25.673-4.279-42.992 2.241-51.345 2.853-3.667 6.927-5.502 12.225-5.705 0.204 0 0.407 0 0.611 0 9.169 0 18.745 4.483 27.098 12.632 17.319 17.115 27.303 46.862 27.303 81.5 0 79.259-47.881 128.567-124.899 128.567-89.854 0-155.054-72.127-155.054-171.762 0-83.334 53.382-139.365 132.641-139.365 29.951 0 57.050 6.316 78.036 18.134l1.019 0.611 9.169-24.45-0.815-0.407c-27.507-14.466-56.235-20.987-93.114-20.987-91.688 0-158.518 68.664-158.518 163.408zM521.27 230.089c-2.853-1.834-6.113-2.853-9.372-2.853s-6.52 1.019-9.372 2.853l-466.588 306.644v-512.636h952.125v512.839l-466.792-306.848z" />
490
490
  <glyph unicode="&#xeae0;" glyph-name="exit2" horiz-adv-x="820" d="M354.864 864.323c88.979 0 88.979-135.212 0-135.212h-190.387v-562.221h190.387c88.979 0 88.979-135.212 0-135.212h-257.994c-37.293 0-67.607 30.314-67.607 67.607v697.433c0 37.293 30.314 67.607 67.607 67.607h257.994zM301.651 524.547h212.414v45.798c0 26.388 29.878 41.218 51.032 26.388 70.005-40.346 139.792-80.691 209.579-121.037 21.809-12.649 21.154-44.053-0.436-56.048-70.659-40.781-141.319-81.564-211.978-122.345-21.59-12.431-48.196 3.49-48.196 27.914v46.016h-212.414c-14.83 0-27.042 12.212-27.042 27.042v99.228c0 15.047 11.995 27.042 27.042 27.042v0z" />
491
491
  <glyph unicode="&#xeae1;" glyph-name="more" horiz-adv-x="820" d="M449.537 408.309h298.913c22.615 0 39.537 16.923 39.537 39.537s-16.923 39.537-39.537 39.537h-298.913v298.913c0 22.615-16.923 39.537-39.537 39.537s-39.537-16.923-39.537-39.537v-298.913h-298.913c-22.615 0-39.537-16.923-39.537-39.537 0-11.231 2.769-19.691 11.231-28.153s16.923-11.231 28.153-11.231h298.913v-298.913c0-11.231 2.769-19.691 11.231-28.153v0c8.461-8.461 16.923-11.231 28.153-11.231 22.615 0 39.537 16.923 39.537 39.537l0.308 298.605z" />
492
- <glyph unicode="" glyph-name="more" horiz-adv-x="820" d="M449.537 408.309h298.913c22.615 0 39.537 16.923 39.537 39.537s-16.923 39.537-39.537 39.537h-298.913v298.913c0 22.615-16.923 39.537-39.537 39.537s-39.537-16.923-39.537-39.537v-298.913h-298.913c-22.615 0-39.537-16.923-39.537-39.537 0-11.231 2.769-19.691 11.231-28.153s16.923-11.231 28.153-11.231h298.913v-298.913c0-11.231 2.769-19.691 11.231-28.153v0c8.461-8.461 16.923-11.231 28.153-11.231 22.615 0 39.537 16.923 39.537 39.537l0.308 298.605z" />
492
+ <glyph unicode="&#xeae2;" glyph-name="qrcode" d="M56 639.505c13.361 0 24 10.639 24 24v216.495h216.495c13.361 0 24 10.639 24 24s-10.639 24-24 24h-240.495c-13.361 0-24-10.639-24-24v-240.495c0-13.361 10.639-24 24-24zM968 256.495c-13.361 0-24-10.639-24-24v-216.495h-216.495c-13.361 0-24-10.639-24-24s10.639-24 24-24h240.495c13.361 0 24 10.639 24 24v240.495c0 13.361-10.639 24-24 24zM968 928h-240.495c-13.361 0-24-10.639-24-24s10.639-24 24-24h216.495v-216.495c0-13.361 10.639-24 24-24s24 10.639 24 24v240.495c0 13.361-10.639 24-24 24zM296.495 16h-216.495v216.495c0 13.361-10.639 24-24 24s-24-10.639-24-24v-240.495c0-13.361 10.639-24 24-24h240.495c13.361 0 24 10.639 24 24s-10.639 24-24 24zM779.712 204.536c0 13.361-10.639 24-24 24h-219.712v219.712c0 13.361-10.639 24-24 24h-243.712c-13.361 0-24-10.639-24-24s10.639-24 24-24h219.712v-219.712c0-13.361 10.639-24 24-24h243.712c13.114 0 24 10.639 24 24zM627.299 308.948c13.361 0 24 10.639 24 24v91.052h80.412v-91.299c0-13.361 10.639-24 24-24s24 10.639 24 24v115.299c0 13.361-10.639 24-24 24h-128.412c-13.361 0-24-10.639-24-24v-115.299c0-13.114 10.639-23.752 24-23.752zM244.288 691.712v-128.412c0-13.361 10.639-24 24-24h128.412c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24h-128.412c-13.114 0-24-10.886-24-24zM627.299 539.299h128.412c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24h-128.412c-13.361 0-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24zM396.701 356.948h-128.412c-13.361 0-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24h128.412c13.361 0 24 10.639 24 24v128.412c0 13.114-10.639 24-24 24zM512 539.299c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24s-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24z" />
493
+ <glyph unicode="" glyph-name="qrcode" d="M56 639.505c13.361 0 24 10.639 24 24v216.495h216.495c13.361 0 24 10.639 24 24s-10.639 24-24 24h-240.495c-13.361 0-24-10.639-24-24v-240.495c0-13.361 10.639-24 24-24zM968 256.495c-13.361 0-24-10.639-24-24v-216.495h-216.495c-13.361 0-24-10.639-24-24s10.639-24 24-24h240.495c13.361 0 24 10.639 24 24v240.495c0 13.361-10.639 24-24 24zM968 928h-240.495c-13.361 0-24-10.639-24-24s10.639-24 24-24h216.495v-216.495c0-13.361 10.639-24 24-24s24 10.639 24 24v240.495c0 13.361-10.639 24-24 24zM296.495 16h-216.495v216.495c0 13.361-10.639 24-24 24s-24-10.639-24-24v-240.495c0-13.361 10.639-24 24-24h240.495c13.361 0 24 10.639 24 24s-10.639 24-24 24zM779.712 204.536c0 13.361-10.639 24-24 24h-219.712v219.712c0 13.361-10.639 24-24 24h-243.712c-13.361 0-24-10.639-24-24s10.639-24 24-24h219.712v-219.712c0-13.361 10.639-24 24-24h243.712c13.114 0 24 10.639 24 24zM627.299 308.948c13.361 0 24 10.639 24 24v91.052h80.412v-91.299c0-13.361 10.639-24 24-24s24 10.639 24 24v115.299c0 13.361-10.639 24-24 24h-128.412c-13.361 0-24-10.639-24-24v-115.299c0-13.114 10.639-23.752 24-23.752zM244.288 691.712v-128.412c0-13.361 10.639-24 24-24h128.412c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24h-128.412c-13.114 0-24-10.886-24-24zM627.299 539.299h128.412c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24h-128.412c-13.361 0-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24zM396.701 356.948h-128.412c-13.361 0-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24h128.412c13.361 0 24 10.639 24 24v128.412c0 13.114-10.639 24-24 24zM512 539.299c13.361 0 24 10.639 24 24v128.412c0 13.361-10.639 24-24 24s-24-10.639-24-24v-128.412c0-13.361 10.639-24 24-24z" />
493
494
  <glyph unicode="wysiwyg18" glyph-name="table" d="M0 768v-704h1024v704h-1024zM384 320v128h256v-128h-256zM640 256v-128h-256v128h256zM640 640v-128h-256v128h256zM320 640v-128h-256v128h256zM64 448h256v-128h-256v128zM704 448h256v-128h-256v128zM704 512v128h256v-128h-256zM64 256h256v-128h-256v128zM704 128v128h256v-128h-256z" />
494
495
  <glyph unicode="write2" glyph-name="pencil2" d="M384 320l128 64 448 448-64 64-448-448-64-128zM289.3 92.902c-31.632 66.728-65.666 100.762-132.396 132.394l99.096 272.792 128 77.912 384 384h-192l-384-384-192-640 640 192 384 384v192l-384-384-77.912-128z" />
495
496
  <glyph unicode="wondering2" glyph-name="wondering2" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM704 704c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64 28.654 64 64 64zM256 640c0 35.346 28.654 64 64 64s64-28.654 64-64-28.654-64-64-64-64 28.654-64 64zM331.244 153.614l-22.488 76.774 437 128 22.488-76.774-437-128z" />
Binary file
Binary file
@@ -1,10 +1,10 @@
1
1
  @font-face {
2
2
  font-family: 'saooti-ui';
3
- src: url('/css/fonts/saooti-ui.eot?sdprm6');
4
- src: url('/css/fonts/saooti-ui.eot?sdprm6#iefix') format('embedded-opentype'),
5
- url('/css/fonts/saooti-ui.ttf?sdprm6') format('truetype'),
6
- url('/css/fonts/saooti-ui.woff?sdprm6') format('woff'),
7
- url('/css/fonts/saooti-ui.svg?sdprm6#saooti-ui') format('svg');
3
+ src: url('/css/fonts/saooti-ui.eot?i2gub6');
4
+ src: url('/css/fonts/saooti-ui.eot?i2gub6#iefix') format('embedded-opentype'),
5
+ url('/css/fonts/saooti-ui.ttf?i2gub6') format('truetype'),
6
+ url('/css/fonts/saooti-ui.woff?i2gub6') format('woff'),
7
+ url('/css/fonts/saooti-ui.svg?i2gub6#saooti-ui') format('svg');
8
8
  font-weight: normal;
9
9
  font-style: normal;
10
10
  font-display: block;
@@ -38,6 +38,9 @@
38
38
  .saooti-language:before {
39
39
  content: "\eadb";
40
40
  }
41
+ .saooti-qrcode:before {
42
+ content: "\eae2";
43
+ }
41
44
  .saooti-newsletter:before {
42
45
  content: "\eadf";
43
46
  }
package/src/App.vue CHANGED
@@ -15,15 +15,12 @@ import TopBar from '@/components/misc/TopBar.vue';
15
15
  import LeftMenu from '@/components/misc/LeftMenu.vue';
16
16
  import Footer from '@/components/misc/Footer.vue';
17
17
  import CategoryFilter from '@/components/display/categories/CategoryFilter.vue';
18
- const octopusApi = require('@saooti/octopus-api');
19
18
  import { state } from './store/paramStore';
20
-
21
- import { Category } from './store/class/category';
22
19
  import { Rubriquage } from './store/class/rubriquage';
23
20
  import { RubriquageFilter } from './store/class/rubriquageFilter';
24
21
  import { Rubrique } from './store/class/rubrique';
25
- import { orgaFilter } from './components/mixins/organisationFilter';
26
- export default orgaFilter.extend({
22
+ import { initSDK } from './components/mixins/init';
23
+ export default initSDK.extend({
27
24
  name: 'app',
28
25
  components: {
29
26
  TopBar,
@@ -39,26 +36,11 @@ export default orgaFilter.extend({
39
36
  },
40
37
  methods:{
41
38
  async initApp(){
42
- await this.handleDisplayCategory();
43
- this.handleCaptcha();
39
+ await this.initSdk();
44
40
  await this.handleOrganisationFilter();
45
41
  this.handleIabIdFilter();
46
42
  this.handleRubriquesFilter();
47
43
  },
48
- handleCaptcha(){
49
- const captcha = (document.getElementsByClassName('grecaptcha-badge')[0] as HTMLElement);
50
- if (captcha) {
51
- captcha.style.display = 'none';
52
- }
53
- },
54
- async handleDisplayCategory(){
55
- if (0 === state.generalParameters.allCategories.length) {
56
- const categories: Array<Category>= await octopusApi.fetchCategories({ lang: this.$i18n.locale });
57
- this.$store.commit('categoriesSet', categories);
58
- }else{
59
- this.$store.commit('categoriesSet', state.generalParameters.allCategories);
60
- }
61
- },
62
44
  async handleOrganisationFilter(){
63
45
  let orgaId = '';
64
46
  if (this.$route.query.productor && 'string'===typeof this.$route.query.productor) {
@@ -43,7 +43,7 @@ export default Vue.extend({
43
43
  return this.$store.state.filter.rubriqueFilter;
44
44
  },
45
45
  isDisplay(): boolean {
46
- return "home" === this.$route.name ||"podcasts" === this.$route.name||"emissions" === this.$route.name;
46
+ return "homePriv" === this.$route.name ||"home" === this.$route.name ||"podcasts" === this.$route.name||"emissions" === this.$route.name;
47
47
  },
48
48
  rubriquageFilter(): Array<Rubriquage>{
49
49
  if(this.$store.state.filter.organisationId){
@@ -29,6 +29,7 @@
29
29
  :reset="reset"
30
30
  :withoutRubrique="true"
31
31
  width="auto"
32
+ v-if="getRubriques(rubriquageId).length"
32
33
  @selected="onRubriqueSelected"
33
34
  />
34
35
  </template>
@@ -80,7 +81,10 @@ export default Vue.extend({
80
81
  const topicIndex = this.rubriquageDisplay.findIndex(
81
82
  ( element: Rubriquage) => element.rubriquageId === rubriquageId
82
83
  );
83
- return this.rubriquageDisplay[topicIndex].rubriques;
84
+ if(-1 !== topicIndex){
85
+ return this.rubriquageDisplay[topicIndex].rubriques;
86
+ }
87
+ return [];
84
88
  },
85
89
  onRubriqueSelected(rubrique: Rubrique): void {
86
90
  if (rubrique.rubriqueId === this.rubriqueId) return;
@@ -66,7 +66,7 @@
66
66
  ></div>
67
67
  </div>
68
68
  <div class="comma" v-if="live.animators">
69
- {{ $t('Animated by') }}
69
+ {{ $t('Animated by')}}<div class="mx-1">:</div>
70
70
  <router-link
71
71
  :aria-label="$t('Participant')"
72
72
  class="link-info"
@@ -7,7 +7,7 @@
7
7
  @change="onRubriquageSelected"
8
8
  >
9
9
  <option
10
- v-for="rubriquage in rubriquages"
10
+ v-for="rubriquage in rubriquageDisplay"
11
11
  :key="rubriquage.rubriquageId"
12
12
  :value="rubriquage"
13
13
  >{{ rubriquage.title }}</option
@@ -129,8 +129,19 @@ export default Vue.extend({
129
129
  rubriqueDisplay(): Array<Rubrique>{
130
130
  return this.$store.state.filter.rubriqueDisplay;
131
131
  },
132
+ rubriquageDisplay(): Array<Rubriquage>{
133
+ const elementToNotShow = Array.from(this.rubriqueFilter);
134
+ if(elementToNotShow.length){
135
+ const rubriquageIdToNotShow = elementToNotShow.map(a => a.rubriquageId);
136
+ return this.rubriquages.filter((element)=>{
137
+ return !rubriquageIdToNotShow.includes(element.rubriquageId!);
138
+ });
139
+ }
140
+ return this.rubriquages;
141
+ },
132
142
  },
133
143
  methods: {
144
+
134
145
  initRubriques(): void{
135
146
  if(!this.rubriquage){ return ;}
136
147
  this.$store.commit('filterRubriqueDisplay', this.rubriquage.rubriques);
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <div class="d-flex flex-column align-items-center">
3
+ <qrcode-vue :value="url" :size="size" level="H" foreground="#40a372" class="myQrCode"/>
4
+ <button class="btn m-3" @click="download">{{ $t('Download') }}</button>
5
+ <Snackbar ref="snackbar" position="bottom-left"></Snackbar>
6
+ </div>
7
+ </template>
8
+
9
+ <style lang="scss">
10
+ </style>
11
+ <script lang="ts">
12
+ import Snackbar from '../../misc/Snackbar.vue';
13
+ import QrcodeVue from 'qrcode.vue'
14
+ import Vue from 'vue';
15
+ export default Vue.extend({
16
+ name: 'QrCode',
17
+ props: {
18
+ url: { default: '' as string},
19
+ },
20
+
21
+ components: {
22
+ Snackbar,
23
+ QrcodeVue
24
+ },
25
+
26
+ data() {
27
+ return {
28
+ size: 200 as number,
29
+ };
30
+ },
31
+ methods:{
32
+ download(): void{
33
+ const link = document.createElement('a');
34
+ link.download = 'qrcode.png';
35
+ const canvas = document.getElementsByClassName('myQrCode');
36
+ if(canvas && canvas.length > 0 && canvas[0] && canvas[0].firstChild){
37
+ link.href = (canvas[0].firstChild as any).toDataURL();
38
+ link.click();
39
+ (this.$refs.snackbar as any).open(this.$t('Download started'));
40
+ }
41
+ }
42
+ }
43
+ });
44
+ </script>
@@ -132,6 +132,21 @@
132
132
  <span class="saooti-newsletter" v-if="!bigRound"></span>
133
133
  <div class="saooti-newsletter" v-else></div>
134
134
  </a>
135
+ <a
136
+ rel="noopener"
137
+ target="_blank"
138
+ v-if="podcast || emission"
139
+ :class="[
140
+ bigRound ? 'btn btn-bigRound' : 'btn btn-rss share-btn mb-2',
141
+ verticalDisplay ? '' : 'mr-2 ml-2',
142
+ ]"
143
+ :aria-label="$t('Share QR Code')"
144
+ @click="qrCode = true"
145
+ :title="$t('Share QR Code')"
146
+ >
147
+ <span class="saooti-qrcode" v-if="!bigRound"></span>
148
+ <div class="saooti-qrcode" v-else></div>
149
+ </a>
135
150
  <a
136
151
  rel="noopener"
137
152
  target="_blank"
@@ -170,6 +185,13 @@
170
185
  :podcast="podcast"
171
186
  @close="newsletter = false"
172
187
  />
188
+ <QrCodeModal
189
+ v-if="qrCode"
190
+ :closable="true"
191
+ :podcast="podcast"
192
+ :emission="emission"
193
+ @close="qrCode = false"
194
+ />
173
195
  <Snackbar ref="snackbar" position="bottom-left"></Snackbar>
174
196
  </div>
175
197
  </template>
@@ -217,6 +239,7 @@ export default displayMethods.extend({
217
239
  components: {
218
240
  ClipboardModal: () => import('../../misc/modal/ClipboardModal.vue'),
219
241
  NewsletterModal: () => import('../../misc/modal/NewsletterModal.vue'),
242
+ QrCodeModal: () => import('../../misc/modal/QrCodeModal.vue'),
220
243
  Snackbar,
221
244
  },
222
245
 
@@ -229,6 +252,7 @@ export default displayMethods.extend({
229
252
  dataRSSSave: false as boolean,
230
253
  newsletter: false as boolean,
231
254
  isMobile: false as boolean,
255
+ qrCode: false as boolean
232
256
  };
233
257
  },
234
258
 
@@ -14,7 +14,7 @@
14
14
  >
15
15
  <router-link
16
16
  @click.native="onMenuClick"
17
- v-if="isLiveTab && !isPodcastmaker && filterOrga && filterOrgaLive"
17
+ v-if="isLiveTab && filterOrga && filterOrgaLive"
18
18
  class="text-dark font-weight-bold mb-3 live-route"
19
19
  :to="{
20
20
  name: 'lives',
@@ -45,7 +45,6 @@
45
45
  <router-link
46
46
  v-if="
47
47
  isLiveTab &&
48
- !isPodcastmaker &&
49
48
  ((filterOrga && filterOrgaLive) || !filterOrga)
50
49
  "
51
50
  :to="{
@@ -108,6 +108,7 @@ const humanizeDuration = require('humanize-duration');
108
108
  import { displayMethods } from '../../mixins/functions';
109
109
  import { Participant } from '@/store/class/participant';
110
110
  import { Podcast } from '@/store/class/podcast';
111
+ import { state } from '../../../store/paramStore';
111
112
  export default displayMethods.extend({
112
113
  name: 'NewsletterModal',
113
114
  props: {
@@ -133,6 +134,9 @@ export default displayMethods.extend({
133
134
  },
134
135
 
135
136
  computed: {
137
+ resourcesUrl(): string{
138
+ return state.podcastPage.resourceUrl? state.podcastPage.resourceUrl : window.location.origin;
139
+ },
136
140
  emissionName(): string {
137
141
  if (this.displayEmissionName)
138
142
  return (
@@ -150,8 +154,7 @@ export default displayMethods.extend({
150
154
  this.$t('See associated article') +
151
155
  `">
152
156
  <img width="44" height="44" style="display: inline-block;vertical-align: middle; margin-right:3px" src="` +
153
- window.location.origin +
154
- `/img/article.png">
157
+ this.resourcesUrl + `/img/article.png">
155
158
  </a>
156
159
  <a style="color: #000;text-decoration: none;" href="` +
157
160
  this.podcast.article +
@@ -247,7 +250,7 @@ export default displayMethods.extend({
247
250
  this.$t('Listen this episode') +
248
251
  `">
249
252
  <img width="44" height="44" style="display: inline-block;vertical-align: middle" src="` +
250
- window.location.origin +
253
+ this.resourcesUrl +
251
254
  `/img/play-podcast.png">
252
255
  </a>
253
256
  <a style="color: #000;text-decoration: none; margin-right:8px" href="` +
@@ -0,0 +1,76 @@
1
+ <template>
2
+ <div>
3
+ <b-modal
4
+ id="qrcode-modal"
5
+ @close="closePopup"
6
+ @hide="closePopup"
7
+ @cancel="closePopup"
8
+ :title="$t('Share QR Code')"
9
+ >
10
+ <template v-slot:default>
11
+ <QrCode :url="urlPage"/>
12
+ </template>
13
+ <template v-slot:modal-footer>
14
+ <button class="btn btn-primary m-1" @click="closePopup">
15
+ {{ $t('Close') }}
16
+ </button>
17
+ </template>
18
+ </b-modal>
19
+ </div>
20
+ </template>
21
+
22
+ <style lang="scss">
23
+ </style>
24
+ <script lang="ts">
25
+ import Vue from 'vue';
26
+ import { Podcast } from '@/store/class/podcast';
27
+ import { Emission } from '@/store/class/emission';
28
+ import QrCode from '../../display/sharing/QrCode.vue';
29
+ export default Vue.extend({
30
+ name: 'QrCodeModal',
31
+ props: {
32
+ podcast: { default: undefined as Podcast|undefined},
33
+ emission: { default: undefined as Emission|undefined},
34
+ },
35
+
36
+ components: {
37
+ QrCode
38
+ },
39
+
40
+ data() {
41
+ return {
42
+ };
43
+ },
44
+
45
+ mounted() {
46
+ this.$bvModal.show('qrcode-modal');
47
+ },
48
+
49
+ computed: {
50
+ urlPage(): string{
51
+ if(window.location.href.includes('?productor')){
52
+ return window.location.href;
53
+ }
54
+ if("" !== window.location.search){
55
+ return window.location.href + "&productor=" + this.productor;
56
+ }
57
+ return window.location.href + "?productor=" + this.productor;
58
+ },
59
+ productor(): string{
60
+ if(this.podcast){
61
+ return this.podcast.organisation.id;
62
+ }
63
+ if(this.emission){
64
+ return this.emission.orga.id;
65
+ }
66
+ return "";
67
+ },
68
+ },
69
+ methods:{
70
+ closePopup(event: { preventDefault: () => void }): void {
71
+ event.preventDefault();
72
+ this.$emit('close');
73
+ },
74
+ }
75
+ });
76
+ </script>
@@ -17,11 +17,16 @@
17
17
  ></div>
18
18
  </b-tab>
19
19
  <b-tab :title="$t('Embedly link')" class="tab-pane">
20
- <p>{{ embedlyLink }}</p>
21
- <div
22
- class="saooti-copy"
23
- @click="onCopyCode(embedlyLink, afterCopy)"
24
- ></div>
20
+ <div class="d-flex flex-column">
21
+ <div class="d-flex">
22
+ <p>{{ embedlyLink }}</p>
23
+ <div
24
+ class="saooti-copy"
25
+ @click="onCopyCode(embedlyLink, afterCopy)"
26
+ ></div>
27
+ </div>
28
+ <QrCode :url="embedlyLink"/>
29
+ </div>
25
30
  </b-tab>
26
31
  <b-tab :title="$t('Direct link')" class="tab-pane" v-if="directLink">
27
32
  <p>{{ directLink.audioUrl }}</p>
@@ -86,6 +91,7 @@
86
91
  <script lang="ts">
87
92
  import Snackbar from '../Snackbar.vue';
88
93
  import { displayMethods } from '../../mixins/functions';
94
+ import QrCode from '../../display/sharing/QrCode.vue';
89
95
  export default displayMethods.extend({
90
96
  name: 'ShareModalPlayer',
91
97
  props: {
@@ -96,6 +102,7 @@ export default displayMethods.extend({
96
102
 
97
103
  components: {
98
104
  Snackbar,
105
+ QrCode
99
106
  },
100
107
 
101
108
  mounted() {
@@ -0,0 +1,22 @@
1
+
2
+ import { Category } from "@/store/class/category";
3
+ import { orgaFilter } from '../mixins/organisationFilter';
4
+ const octopusApi = require('@saooti/octopus-api');
5
+ import { state } from '../../store/paramStore';
6
+ export const initSDK = orgaFilter.extend({
7
+ methods: {
8
+ async initSdk() {
9
+ if (0 === state.generalParameters.allCategories.length) {
10
+ octopusApi.fetchCategories({ lang: this.$i18n.locale }).then((data: Array<Category>) => {
11
+ this.$store.commit('categoriesSet', data);
12
+ });
13
+ }else{
14
+ this.$store.commit('categoriesSet', state.generalParameters.allCategories);
15
+ }
16
+ const captcha = (document.getElementsByClassName('grecaptcha-badge')[0] as HTMLElement);
17
+ if (captcha) {
18
+ captcha.style.display = 'none';
19
+ }
20
+ },
21
+ },
22
+ });
package/src/locale/en.ts CHANGED
@@ -291,5 +291,9 @@ export default {
291
291
  "Custom version":"Custom version",
292
292
  "All":"All",
293
293
  'By category': 'By IAB category',
294
- "Add a sort criterion by topic":"Add a sort criterion by topic"
294
+ "Add a sort criterion by topic":"Add a sort criterion by topic",
295
+ 'Share QR Code': "Share QR Code",
296
+ "Download":"Download",
297
+ "Download started": 'Download started',
298
+ 'From RSS': "From an RSS feed",
295
299
  };
package/src/locale/fr.ts CHANGED
@@ -292,4 +292,8 @@ export default {
292
292
  "All":"Tous",
293
293
  'By category': 'Selon la catégorie IAB',
294
294
  "Add a sort criterion by topic":"Ajouter un critère de tri par rubrique",
295
+ 'Share QR Code': "Partage d'un QR Code",
296
+ "Download":"Télécharger",
297
+ "Download started": 'Téléchargement lancé',
298
+ 'From RSS': "Issu d'un flux RSS",
295
299
  };
@@ -58,7 +58,7 @@ const initialize = function initialize(initObject: any) {
58
58
  state.generalParameters.allCategories =
59
59
  'undefined' !== typeof param.allCategories ? param.allCategories : [];
60
60
  state.generalParameters.isLiveTab =
61
- 'undefined' !== typeof param.isLiveTab ? param.isLiveTab : true;
61
+ 'undefined' !== typeof param.isLiveTab ? param.isLiveTab : false;
62
62
  state.generalParameters.isCaptchaTest =
63
63
  'undefined' !== typeof param.isCaptchaTest ? param.isCaptchaTest : true;
64
64
  }
@@ -100,6 +100,10 @@ const initialize = function initialize(initObject: any) {
100
100
  'undefined' !== typeof param.mainRubrique
101
101
  ? param.mainRubrique
102
102
  : 0;
103
+ state.podcastPage.resourceUrl =
104
+ 'undefined' !== typeof param.resourceUrl
105
+ ? param.resourceUrl
106
+ : undefined;
103
107
  }
104
108
  if (initObject.podcastsPage) {
105
109
  const param = initObject.podcastsPage;