@saooti/octopus-sdk 39.4.0 → 39.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "39.4.0",
3
+ "version": "39.4.2",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -8,7 +8,7 @@
8
8
  :title="$t('Series name page', { name: emission.name })"
9
9
  class="d-flex flex-column text-dark"
10
10
  >
11
- <div v-if="rubriqueName" class="emissionPlayerItem-info">
11
+ <div v-if="rubriqueName" class="emission-player-item-info">
12
12
  {{ rubriqueName }}
13
13
  </div>
14
14
  <div class="img-box rounded-0">
@@ -84,6 +84,7 @@ export default defineComponent({
84
84
  href: { default: undefined, type: String },
85
85
  buttonText: { default: undefined, type: String },
86
86
  isDescription: { default: false, type: Boolean },
87
+ rubriquesId: { default: [], type: Array<number> },
87
88
  },
88
89
  data() {
89
90
  return {
@@ -110,6 +111,7 @@ export default defineComponent({
110
111
  size: 5,
111
112
  organisationId: this.organisationId,
112
113
  sort: "LAST_PODCAST_DESC",
114
+ rubriqueId: this.rubriquesId
113
115
  },
114
116
  specialTreatement: true,
115
117
  });
@@ -157,7 +157,8 @@ export default defineComponent({
157
157
  text-align: center;
158
158
  background: linear-gradient(
159
159
  to bottom,
160
- var(--octopus-background), var(--octopus-background-transparent)
160
+ var(--octopus-background-transparent),
161
+ var(--octopus-background),
161
162
  );
162
163
  }
163
164
  }
@@ -57,8 +57,8 @@ export default defineComponent({
57
57
  inset: 0;
58
58
  z-index: 2;
59
59
  display: flex;
60
- flex-direction: column;
61
60
  justify-content: center;
61
+ align-items: center;
62
62
 
63
63
  h1 {
64
64
  color: white !important;
@@ -160,7 +160,8 @@ export default defineComponent({
160
160
  text-align: center;
161
161
  background: linear-gradient(
162
162
  to bottom,
163
- var(--octopus-background), var(--octopus-background-transparent)
163
+ var(--octopus-background-transparent),
164
+ var(--octopus-background)
164
165
  );
165
166
  }
166
167
 
@@ -76,7 +76,7 @@ export default defineComponent({
76
76
  return state.emissionsPage.progressBar as boolean;
77
77
  },
78
78
  date(): string {
79
- return dayjs(this.pubDate).format("D MMMM YYYY, HH[h]mm");
79
+ return dayjs(this.pubDate).format("D MMMM YYYY");
80
80
  },
81
81
  editRight(): boolean {
82
82
  return this.isEditRights(this.podcastOrganisationId);
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="rubriqueIds.length && init"
4
- class="rubrique-list-component d-flex align-items-center flex-wrap mb-3"
4
+ class="rubrique-list-component d-flex align-items-center flex-wrap mb-3 small-text"
5
5
  >
6
- <div class="me-3">
7
- {{ $t("Rubrics") + ": " }}
6
+ <div class="fw-bold me-3">
7
+ {{ $t("Rubrics") + " : " }}
8
8
  </div>
9
9
  <router-link
10
10
  v-for="rubriqueId in rubriqueIds"
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="undefined !== tagList && 0 !== tagList.length"
4
- class="tag-list-component d-flex align-items-center flex-wrap comma mb-3"
4
+ class="tag-list-component d-flex align-items-center flex-wrap comma mb-3 small-text"
5
5
  >
6
- <div class="me-3">
7
- {{ $t("Podcast tags") + ": " }}
6
+ <div class="fw-bold me-3">
7
+ {{ $t("Podcast tags") + " : " }}
8
8
  </div>
9
9
  <div
10
10
  v-for="(tag, index) in tagList"
@@ -54,30 +54,9 @@ export default defineComponent({
54
54
  data() {
55
55
  return {
56
56
  emojiIndex: emojiIndex,
57
- /* hasPlaceAboveButton: false as boolean, */
58
57
  isPhone: false as boolean,
59
58
  };
60
59
  },
61
- /* computed: {
62
- isReallyTopPosition(): boolean {
63
- return this.isTopPosition && this.hasPlaceAboveButton;
64
- },
65
- }, */
66
- /* watch:{
67
- isPhone: {
68
- immediate: true,
69
- async handler() {
70
- debugger;
71
- if (!this.isPhone && this.isTopPosition && this.$refs.emojiButton) {
72
- this.hasPlaceAboveButton =
73
- (this.$refs.emojiButton as HTMLButtonElement).getBoundingClientRect()
74
- .top +
75
- window.scrollY >
76
- 450;
77
- }
78
- },
79
- },
80
- }, */
81
60
  });
82
61
  </script>
83
62
 
@@ -177,6 +177,7 @@ export default defineComponent({
177
177
  let parentTop = 0;
178
178
  let parentScrollTop = 0;
179
179
  let parentBottom = 0;
180
+ let parentWidth=0;
180
181
  if (!this.isTopLayerPopover && this.relativeClass) {
181
182
  const modalBody = document.getElementsByClassName(
182
183
  this.relativeClass,
@@ -193,16 +194,31 @@ export default defineComponent({
193
194
  parentTop = modalBodyRect.top;
194
195
  parentScrollTop = modalBody.scrollTop;
195
196
  parentBottom=modalBodyRect.bottom;
197
+ parentWidth = modalBodyRect.width;
196
198
  }
197
199
  const rectElement = (e.target as HTMLElement).getBoundingClientRect();
198
200
  (this.$refs.popover as HTMLElement).style.display = "block";
201
+ const sizePopover = (this.$refs.popover as HTMLElement).clientWidth;
202
+ const sizeAvailable = window.innerWidth -parentWidth;
199
203
  if (this.leftPos) {
200
- this.posX =
204
+ const elementRightRelative = rectElement.right - parentLeft;
205
+ const hasPlaceRightButton = (sizeAvailable - (sizeAvailable - elementRightRelative)) > sizePopover;
206
+ if(hasPlaceRightButton){
207
+ this.posX =
201
208
  rectElement.right -
202
- parentRight -
203
- (this.$refs.popover as HTMLElement).clientWidth;
209
+ parentLeft -
210
+ sizePopover;
211
+ }else{
212
+ this.posX =parentLeft;
213
+ }
204
214
  } else {
205
- this.posX = rectElement.left - parentLeft;
215
+ const elementLeftRelative = rectElement.left - parentLeft;
216
+ const hasPlaceRightButton = (sizeAvailable - elementLeftRelative) > sizePopover;
217
+ if(hasPlaceRightButton){
218
+ this.posX = elementLeftRelative;
219
+ }else{
220
+ this.posX = sizeAvailable - sizePopover + parentLeft;
221
+ }
206
222
  }
207
223
  this.posX = Math.max(0, this.posX);
208
224
  const yPosParent = this.topPos ? rectElement.top : rectElement.bottom;
@@ -76,6 +76,7 @@ export const advancedParamInit = defineComponent({
76
76
  if (!this.isInit) {
77
77
  return;
78
78
  }
79
+ // TODO si oldValue !=null
79
80
  this.rubriqueFilter = [];
80
81
  },
81
82
  routeQuery(){
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  formatDuration(
14
14
  totalSeconds: number | null,
15
- separator = "'",
15
+ separator = ":",
16
16
  isLast = true,
17
17
  ): string {
18
18
  if (null === totalSeconds) {
package/src/locale/de.ts CHANGED
@@ -284,7 +284,7 @@ export default {
284
284
  "Download started": "Lädt herunter",
285
285
  "From RSS": "Aus RSS-Feed",
286
286
  "User menu": "Benutzermenü",
287
- "Podcast tags": "Podcast-Tags",
287
+ "Podcast tags": "Schlüsselwörter",
288
288
  Enlarge: "Vergrößern",
289
289
  Reduce: "Reduzieren",
290
290
  "Use organization color": "Verwenden Sie die Organisationsfarbe",
package/src/locale/en.ts CHANGED
@@ -277,7 +277,7 @@ export default {
277
277
  "Download started": "Download started",
278
278
  "From RSS": "From an RSS feed",
279
279
  "User menu": "User menu",
280
- "Podcast tags": "Podcast tags",
280
+ "Podcast tags": "Keywords",
281
281
  "You do not have the right to access this page":
282
282
  "You do not have the right to access this page",
283
283
  Enlarge: "Enlarge",
package/src/locale/es.ts CHANGED
@@ -285,7 +285,7 @@ export default {
285
285
  "Download started": "Descarga iniciada",
286
286
  "From RSS": "Desde un canal RSS",
287
287
  "User menu": "Menú de usuario",
288
- "Podcast tags": "Etiquetas de pódcast",
288
+ "Podcast tags": "Palabras clave",
289
289
  Enlarge: "Agrandar",
290
290
  Reduce: "Reducir",
291
291
  "Use organization color": "Usar el color de la organización",
package/src/locale/fr.ts CHANGED
@@ -284,7 +284,7 @@ export default {
284
284
  "Download started": "Téléchargement lancé",
285
285
  "From RSS": "Issu d'un flux RSS",
286
286
  "User menu": "Menu utilisateur",
287
- "Podcast tags": "Mots-clés de l'épisode",
287
+ "Podcast tags": "Mots-clés",
288
288
  "You do not have the right to access this page":
289
289
  "Vous n’avez pas le droit d’accéder à cette page",
290
290
  Enlarge: "Agrandir",
package/src/locale/it.ts CHANGED
@@ -279,7 +279,7 @@ export default{
279
279
  "Download started": 'Il download è iniziato',
280
280
  'From RSS': "Da un RSS Feed ",
281
281
  "User menu":"Menu utente",
282
- 'Podcast tags': 'Tag podcast',
282
+ 'Podcast tags': 'Parole chiave',
283
283
  "Term of use":"Termini d'uso",
284
284
  'More episodes of this category : ': "Altri episodi su questo tema : {name}",
285
285
  "Enlarge":"Ingrandire",
package/src/locale/sl.ts CHANGED
@@ -275,7 +275,7 @@ export default {
275
275
  "Download started": "Prenos se je začel",
276
276
  "From RSS": "Z vira RSS",
277
277
  "User menu": "Uporabniški meni",
278
- "Podcast tags": "Oznake podkastov",
278
+ "Podcast tags": "Ključne besede",
279
279
  Enlarge: "Povečaj",
280
280
  Reduce: "Zmanjšaj",
281
281
  "Use organization color": "Uporabite barvo organizacije",
@@ -354,7 +354,7 @@ router.beforeEach(async (to, from) => {
354
354
  if("/logout" === to.path && "/logout" !== from.path){
355
355
  setTimeout(() => {
356
356
  window.location.reload(true);
357
- }, 10);
357
+ }, 200);
358
358
  }
359
359
  });
360
360
  export default router;
@@ -15,6 +15,31 @@ import { CommentMessage, CommentsConfig } from "./class/config/commentsConfig";
15
15
  import classicApi from "../api/classicApi";
16
16
  import { Podcast } from "./class/general/podcast";
17
17
  import { ListClassicReturn } from "./class/general/listReturn";
18
+ function errorCommentsConfig(): CommentsConfig {
19
+ return {
20
+ inherited: false,
21
+ abuse: {
22
+ authRequired: true,
23
+ },
24
+ commentLikes: {
25
+ authRequired: true,
26
+ dislikeEnabled: false,
27
+ likeEnabled: false,
28
+ },
29
+ comments: {
30
+ authRequired: true,
31
+ commentAllowed: "NONE",
32
+ defaultState: "PENDING",
33
+ depth: 2,
34
+ },
35
+ podcastLikes: {
36
+ authRequired: true,
37
+ dislikeEnabled: false,
38
+ likeEnabled: false,
39
+ },
40
+ };
41
+ }
42
+
18
43
 
19
44
  export interface CommentUser {
20
45
  name: string | null;
@@ -128,10 +153,14 @@ export const useCommentStore = defineStore("CommentStore", {
128
153
  path:"config/podcast/" + podcast.podcastId,
129
154
  });
130
155
  } catch {
131
- this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
132
- api: 2,
133
- path: "config/emission/" + podcast.emission.emissionId,
134
- });
156
+ try {
157
+ this.podcastsCommentsConfig[podcast.podcastId] = await classicApi.fetchData<CommentsConfig>({
158
+ api: 2,
159
+ path: "config/emission/" + podcast.emission.emissionId,
160
+ });
161
+ } catch (error) {
162
+ this.podcastsCommentsConfig[podcast.podcastId] = errorCommentsConfig();
163
+ }
135
164
  }
136
165
  return this.podcastsCommentsConfig[podcast.podcastId];
137
166
  },
@@ -49,4 +49,4 @@ export function defaultCommentsConfig(inherited: boolean): CommentsConfig {
49
49
  likeEnabled: true,
50
50
  },
51
51
  };
52
- }
52
+ }
@@ -33,7 +33,7 @@
33
33
 
34
34
  select,.form-input, .v3-input-emoji-picker .v3-input-picker-root .v3-emoji-picker-textarea{
35
35
  background: var(--octopus-background) !important;
36
- border: 0.1rem solid var(--octopus-secondary);
36
+ border: 0.1rem solid var(--octopus-border-default);
37
37
  border-radius: var(--octopus-border-radius);
38
38
  height: 2rem;
39
39
  padding: 0.25rem 0.4rem;
@@ -147,6 +147,10 @@ main, #app{
147
147
  padding: 0.8rem;
148
148
  }
149
149
  }
150
+ .small-text{
151
+ font-size: 0.7rem;
152
+ }
153
+
150
154
 
151
155
  .description-text{
152
156
  word-wrap: break-word;
@@ -211,7 +211,8 @@
211
211
  font-size: 1rem;
212
212
  font-weight: bolder;
213
213
  text-align: center;
214
- background: linear-gradient(to bottom, var(--octopus-background), var(--octopus-background-transparent));
214
+ background: linear-gradient(to bottom,var(--octopus-background-transparent),
215
+ var(--octopus-background));
215
216
  }
216
217
  }
217
218
  }