@saooti/octopus-sdk 41.0.14-SNAPSHOT → 41.0.15

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.
Files changed (70) hide show
  1. package/eslint.config.mjs +5 -3
  2. package/index.ts +8 -1
  3. package/package.json +4 -2
  4. package/plateform.conf +1 -1
  5. package/src/App.vue +3 -7
  6. package/src/api/classicApi.ts +1 -1
  7. package/src/components/composable/player/usePlayerLive.ts +2 -2
  8. package/src/components/composable/player/usePlayerLogic.ts +2 -1
  9. package/src/components/composable/radio/usefetchRadioData.ts +29 -12
  10. package/src/components/composable/route/useSimplePageParam.ts +6 -1
  11. package/src/components/display/categories/CategoryChooser.vue +4 -0
  12. package/src/components/display/comments/CommentList.vue +1 -1
  13. package/src/components/display/emission/EmissionList.vue +2 -1
  14. package/src/components/display/emission/EmissionPresentationItem.vue +14 -6
  15. package/src/components/display/filter/AdvancedSearch.vue +2 -2
  16. package/src/components/display/filter/DateFilter.vue +15 -2
  17. package/src/components/display/live/RadioCurrently.vue +2 -5
  18. package/src/components/display/organisation/OrganisationChooserLight.vue +34 -36
  19. package/src/components/display/podcasts/PodcastPlayButton.vue +6 -1
  20. package/src/components/display/rubriques/RubriqueChooser.vue +24 -2
  21. package/src/components/display/rubriques/RubriqueList.vue +18 -0
  22. package/src/components/display/sharing/PlayerParameters.vue +0 -8
  23. package/src/components/display/sharing/SharePlayer.vue +0 -5
  24. package/src/components/display/sharing/SubscribeButtons.vue +4 -2
  25. package/src/components/form/ClassicCheckbox.vue +30 -5
  26. package/src/components/form/ClassicInputText.vue +32 -12
  27. package/src/components/form/ClassicMultiselect.vue +35 -7
  28. package/src/components/misc/ClassicAccordion.vue +4 -4
  29. package/src/components/misc/ClassicHelpButton.vue +44 -0
  30. package/src/components/misc/ClassicLazy.vue +25 -14
  31. package/src/components/misc/ClassicNav.vue +3 -0
  32. package/src/components/misc/ClassicSpinner.vue +1 -1
  33. package/src/components/misc/FooterSection.vue +17 -20
  34. package/src/components/misc/HomeDropdown.vue +3 -110
  35. package/src/components/misc/MobileMenu.vue +59 -64
  36. package/src/components/misc/TopBar.vue +2 -10
  37. package/src/components/misc/TopBarMainContent.vue +8 -12
  38. package/src/components/misc/UserButtonContent.vue +159 -0
  39. package/src/components/misc/modal/ClassicModal.vue +4 -0
  40. package/src/components/misc/player/PlayerCompact.vue +1 -0
  41. package/src/components/misc/player/PlayerComponent.vue +1 -0
  42. package/src/components/misc/player/elements/PlayerImage.vue +0 -1
  43. package/src/components/misc/player/elements/PlayerTitle.vue +3 -3
  44. package/src/components/misc/player/radio/RadioHistory.vue +3 -2
  45. package/src/components/misc/player/video/PlayerVideo.vue +2 -2
  46. package/src/components/pages/HomePage.vue +5 -4
  47. package/src/components/pages/PageLogout.vue +1 -6
  48. package/src/components/pages/PodcastPage.vue +0 -1
  49. package/src/components/pages/PodcastsPage.vue +1 -1
  50. package/src/components/pages/VideoPage.vue +5 -2
  51. package/src/helper/equals.ts +26 -0
  52. package/src/locale/de.ts +6 -5
  53. package/src/locale/en.ts +6 -5
  54. package/src/locale/es.ts +6 -5
  55. package/src/locale/fr.ts +6 -5
  56. package/src/locale/it.ts +6 -5
  57. package/src/locale/sl.ts +6 -5
  58. package/src/router/router.ts +10 -74
  59. package/src/router/utils.ts +112 -0
  60. package/src/stores/AuthStore.ts +7 -2
  61. package/src/stores/FilterStore.ts +126 -71
  62. package/src/stores/PlayerStore.ts +11 -1
  63. package/src/stores/class/conference/conference.ts +2 -0
  64. package/src/stores/class/general/organisation.ts +2 -2
  65. package/src/stores/class/general/player.ts +2 -2
  66. package/src/style/_variables.scss +6 -0
  67. package/src/style/general.scss +18 -1
  68. package/tsconfig.json +6 -2
  69. package/typings/index.d.ts +1 -0
  70. package/src/helper/radio/radioHelper.ts +0 -15
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="d-inline-flex w-100 mb-3 px-3 hide-phone">
3
3
  <div ref="rubriqueListContainer" class="rubrique-list-container">
4
+
5
+ <!-- Liste déroulante pour sélectionner le rubriquage -->
4
6
  <select
5
7
  v-model="rubriquage"
6
8
  :title="t('By topic')"
@@ -15,6 +17,8 @@
15
17
  {{ myRubriquage.title }}
16
18
  </option>
17
19
  </select>
20
+
21
+ <!-- Boutons de sélection de la rubrique -->
18
22
  <button
19
23
  v-for="rubrique in rubriqueDisplay"
20
24
  :id="'rubrique' + rubrique.rubriqueId"
@@ -25,6 +29,8 @@
25
29
  {{ rubrique.name }}
26
30
  </button>
27
31
  </div>
32
+
33
+ <!-- Bouton pour afficher les rubriques cachées -->
28
34
  <button
29
35
  v-show="hidenRubriques.length"
30
36
  id="rubriques-dropdown"
@@ -33,6 +39,8 @@
33
39
  >
34
40
  <PlusIcon />
35
41
  </button>
42
+
43
+ <!-- Popup de sélection des rubriques cachées -->
36
44
  <ClassicPopover
37
45
  ref="popoverRubrique"
38
46
  target="rubriques-dropdown"
@@ -43,6 +51,7 @@
43
51
  v-if="hidenRubriques.length"
44
52
  class="rubrique-chooser-minwidth"
45
53
  :all-rubriques="hidenRubriques"
54
+ :placeholder="rubriqueChooserText"
46
55
  @selected="addFilterFromPopover($event)"
47
56
  />
48
57
  </ClassicPopover>
@@ -107,6 +116,15 @@ const rubriquageDisplay = computed(() => {
107
116
  });
108
117
  });
109
118
 
119
+ // Retourne le texte à afficher dans le RubriqueChooser
120
+ const rubriqueChooserText = computed(() => {
121
+ if (!rubriquage.value) {
122
+ return '';
123
+ }
124
+ let topic = rubriquage.value.title;
125
+ return t('Enter name of topic', { topic });
126
+ });
127
+
110
128
 
111
129
  //Watch
112
130
  watch(()=>filterStore.filterRubrique, () => {
@@ -36,12 +36,6 @@
36
36
  </div>
37
37
  </div>
38
38
  <ChooseEpisodesNumber v-else :episodes-number="episodesNumber" @update-number="emit('update:episodesNumber', $event)"/>
39
- <ClassicCheckbox
40
- :text-init="proceedReading"
41
- id-checkbox="proceed-reading-checkbox"
42
- :label="t('Proceed reading')"
43
- @update:text-init="emit('update:proceedReading', $event)"
44
- />
45
39
  </template>
46
40
  <ClassicCheckbox
47
41
  v-if="displayIsVisible"
@@ -104,7 +98,6 @@ const props = defineProps({
104
98
  displayArticleParam: { default: false, type: Boolean },
105
99
  displayIsVisible: { default: false, type: Boolean },
106
100
  displayInsertCode: { default: false, type: Boolean },
107
- proceedReading: { default: true, type: Boolean },
108
101
  displayArticle: { default: true, type: Boolean },
109
102
  displayTranscript: { default: true, type: Boolean },
110
103
  displayWave: { default: true, type: Boolean },
@@ -118,7 +111,6 @@ const props = defineProps({
118
111
  //Emits
119
112
  const emit = defineEmits([
120
113
  "episodeChoiceDisplay",
121
- "update:proceedReading",
122
114
  "update:isVisible",
123
115
  "update:episodesNumber",
124
116
  "update:displayArticle",
@@ -44,7 +44,6 @@
44
44
  v-model:display-article="displayArticle"
45
45
  v-model:display-transcript="displayTranscript"
46
46
  v-model:display-wave="displayWave"
47
- v-model:proceed-reading="proceedReading"
48
47
  v-model:is-visible="isVisible"
49
48
  v-model:player-auto-play="playerAutoPlay"
50
49
  v-model:episodes-number="episodesNumber"
@@ -125,7 +124,6 @@ const iFrameModel = ref("default");
125
124
  const isShareModal = ref(false);
126
125
  const color = ref("#40a372");
127
126
  const theme = ref("#000000");
128
- const proceedReading = ref(true);
129
127
  const episodeChoiceDisplay = ref("number");
130
128
  const episodesNumber = ref(3);
131
129
  const isVisible = ref(false);
@@ -341,9 +339,6 @@ function addUrlParameters(url: Array<string>) {
341
339
  url.push(
342
340
  `&color=${color.value.substring(1)}&theme=${theme.value.substring(1)}`,
343
341
  );
344
- if (!proceedReading.value) {
345
- url.push("&proceed=false");
346
- }
347
342
  if (!displayArticle.value && displayArticleParam.value) {
348
343
  url.push("&article=false");
349
344
  }
@@ -78,7 +78,7 @@ import RssIcon from "vue-material-design-icons/Rss.vue";
78
78
  import { useApiStore } from "../../../stores/ApiStore";
79
79
  import ClassicPopover from "../../misc/ClassicPopover.vue";
80
80
  import { Emission } from "@/stores/class/general/emission";
81
- import { computed, Ref, ref, useTemplateRef, watch } from "vue";
81
+ import { computed, onMounted, Ref, ref, useTemplateRef, watch } from "vue";
82
82
  import { useI18n } from "vue-i18n";
83
83
  type Link = {
84
84
  name: string;
@@ -204,7 +204,9 @@ const rssUrl = computed(() => {
204
204
 
205
205
 
206
206
  //Watch
207
- watch(()=>props.windowWidth, () =>resizeWindow(), {immediate: true});
207
+ watch(()=>props.windowWidth, () =>resizeWindow());
208
+
209
+ onMounted(()=>resizeWindow());
208
210
 
209
211
 
210
212
  //Methods
@@ -2,7 +2,7 @@
2
2
  <div class="d-flex flex-nowrap align-items-center octopus-form-item">
3
3
  <div :class="isSwitch ? 'octopus-form-switch me-2' : ''">
4
4
  <input
5
- :id="idCheckbox"
5
+ :id="computedIdCheckbox"
6
6
  :checked="textInit"
7
7
  type="checkbox"
8
8
  :disabled="isDisabled"
@@ -11,31 +11,40 @@
11
11
  :tabindex="isSwitch ? '-1' : '0'"
12
12
  @input="emit('update:textInit', !textInit)"
13
13
  @click="emitClickAction"
14
- />
14
+ >
15
15
  <button
16
16
  v-if="isSwitch"
17
17
  class="slider btn-transparent"
18
18
  :title="label"
19
+ :disabled="isDisabled"
19
20
  @click="clickSlider"
20
21
  @keydown.space.prevent="clickSlider"
21
22
  />
22
23
  </div>
23
24
  <label
24
25
  class="c-hand"
25
- :class="[classLabel, displayLabel ? '' : 'd-none']"
26
- :for="idCheckbox"
27
- >{{ label }}</label
26
+ :class="[classLabel, displayLabel ? '' : 'd-none', isDisabled ? 'disabled' : '']"
27
+ @click="clickSlider"
28
28
  >
29
+ {{ label }}
30
+ </label>
29
31
  </div>
30
32
  </template>
31
33
 
32
34
  <script setup lang="ts">
35
+ import { computed, getCurrentInstance } from 'vue';
36
+
33
37
  //Props
34
38
  const props = defineProps({
39
+ /** The ID for the checkbox input */
35
40
  idCheckbox: { default: "", type: String },
41
+ /** The label to display with the checkbox */
36
42
  label: { default: "", type: String },
43
+ /** Disables input */
37
44
  isDisabled: { default: false, type: Boolean },
45
+ /** The value of the checkbox */
38
46
  textInit: { default: false, type: Boolean },
47
+ /** If true, displays a switch instead of a checkbox */
39
48
  isSwitch: { default: false, type: Boolean },
40
49
  displayLabel: { default: true, type: Boolean },
41
50
  classLabel: { default: "", type: String },
@@ -45,6 +54,11 @@ const props = defineProps({
45
54
  //Emits
46
55
  const emit = defineEmits(["update:textInit", "clickAction"]);
47
56
 
57
+ // Computed
58
+ const computedIdCheckbox = computed(() => {
59
+ return props.idCheckbox || 'checkbox-' + getCurrentInstance()?.uid;
60
+ });
61
+
48
62
  //Methods
49
63
  function emitClickAction(): void {
50
64
  emit("clickAction");
@@ -59,6 +73,12 @@ function clickSlider() {
59
73
 
60
74
  <style lang="scss">
61
75
  .octopus-app {
76
+
77
+ label.disabled {
78
+ color: var(--octopus-text-disabled);
79
+ cursor: default;
80
+ }
81
+
62
82
  .octopus-form-switch {
63
83
  position: relative;
64
84
  display: inline-block;
@@ -92,6 +112,11 @@ function clickSlider() {
92
112
  border-radius: 50%;
93
113
  }
94
114
 
115
+ .slider:disabled::before {
116
+ background-color: var(--octopus-text-disabled);
117
+ opacity: 0.6;
118
+ }
119
+
95
120
  input:checked + .slider {
96
121
  background-color: var(--octopus-primary);
97
122
  }
@@ -4,17 +4,24 @@
4
4
  :class="{ 'form-margin': displayLabel }"
5
5
  >
6
6
  <div class="d-flex align-items-center">
7
- <slot name="complementLabel"/>
7
+ <slot name="complementLabel" />
8
8
  <component
9
9
  :is="isWysiwyg? 'div': 'label'"
10
10
  :class="[classLabel, displayLabel ? '' : 'd-none']"
11
- :for="isWysiwyg ? '': inputId"
12
- >{{ label }}
13
- <AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="t('Mandatory input')"/>
11
+ :for="isWysiwyg ? '': computedInputId"
12
+ >
13
+ {{ label }}
14
+ <AsteriskIcon
15
+ v-if="displayRequired"
16
+ :size="10"
17
+ class="ms-1 mb-2"
18
+ :title="t('Mandatory input')"
19
+ />
14
20
  </component>
21
+ <slot name="afterTitle" />
15
22
  <template v-if="popover">
16
23
  <button
17
- :id="'popover' + inputId"
24
+ :id="'popover' + computedInputId"
18
25
  :title="t('Help')"
19
26
  class="btn-transparent"
20
27
  >
@@ -22,7 +29,7 @@
22
29
  </button>
23
30
 
24
31
  <ClassicPopover
25
- :target="'popover' + inputId"
32
+ :target="'popover' + computedInputId"
26
33
  popover-class="popover-z-index"
27
34
  :relative-class="popoverRelativeClass"
28
35
  >
@@ -31,11 +38,13 @@
31
38
  <!-- eslint-enable -->
32
39
  </ClassicPopover>
33
40
  </template>
41
+ <slot name="afterHelp" />
34
42
  </div>
43
+ <slot name="betweenTitleInput" />
35
44
  <input
36
45
  v-if="!isWysiwyg && !isTextarea"
37
46
  v-show="showField"
38
- :id="inputId"
47
+ :id="computedInputId"
39
48
  ref="focusElement"
40
49
  v-model="textValue"
41
50
  :type="typeInput"
@@ -52,11 +61,11 @@
52
61
  :disabled="isDisable"
53
62
  :required="!canBeNull"
54
63
  :autocomplete="autocompleteType"
55
- />
64
+ >
56
65
  <textarea
57
66
  v-else-if="isTextarea"
58
67
  v-show="showField"
59
- :id="inputId"
68
+ :id="computedInputId"
60
69
  ref="focusElement"
61
70
  v-model="textValue"
62
71
  :data-selenium="dataSelenium"
@@ -86,10 +95,16 @@
86
95
  :is-top-position="true"
87
96
  @emoji-selected="addEmojiSelected"
88
97
  />
89
- <div v-if="isWysiwyg" class="h6">
98
+ <div
99
+ v-if="isWysiwyg"
100
+ class="h6"
101
+ >
90
102
  {{ t("Characters number calculated over HTML code") }}
91
103
  </div>
92
- <div v-else-if="'' !== indicText" class="text-indic">
104
+ <div
105
+ v-else-if="'' !== indicText"
106
+ class="text-indic"
107
+ >
93
108
  {{ indicText }}
94
109
  </div>
95
110
  <div
@@ -110,10 +125,11 @@
110
125
  </div>
111
126
  </div>
112
127
  </template>
128
+
113
129
  <script setup lang="ts">
114
130
  import AsteriskIcon from "vue-material-design-icons/Asterisk.vue";
115
131
  import HelpCircleIcon from "vue-material-design-icons/HelpCircle.vue";
116
- import { computed, defineAsyncComponent, onMounted, Ref, ref, useTemplateRef, watch } from "vue";
132
+ import { computed, defineAsyncComponent, onMounted, Ref, ref, useTemplateRef, watch, getCurrentInstance } from "vue";
117
133
  import { useI18n } from "vue-i18n";
118
134
  const ClassicPopover = defineAsyncComponent(
119
135
  () => import("../misc/ClassicPopover.vue"),
@@ -129,6 +145,7 @@ const ClassicEmojiPicker = defineAsyncComponent(
129
145
  const props = defineProps({
130
146
  inputId: { default: "", type: String },
131
147
  label: { default: "", type: String },
148
+ /** The input's value */
132
149
  textInit: { default: undefined, type: String },
133
150
  maxLength: { default: 0, type: Number },
134
151
  errorText: { default: "", type: String },
@@ -138,6 +155,7 @@ const props = defineProps({
138
155
  canBeNull: { default: false, type: Boolean },
139
156
  inputMaxLengthField: { default: undefined, type: Number },
140
157
  errorVariable: { default: true, type: Boolean },
158
+ /** Disable the text input */
141
159
  isDisable: { default: false, type: Boolean },
142
160
  indicText: { default: "", type: String },
143
161
  dataSelenium: { default: "", type: String },
@@ -168,6 +186,7 @@ const focusElementRef = useTemplateRef('focusElement');
168
186
  const { t } = useI18n();
169
187
 
170
188
  //Computed
189
+ const computedInputId = computed(() => props.inputId || 'input-' + getCurrentInstance()?.uid);
171
190
  const isError = computed(() => !valueTrimValid.value || !valueLengthValid.value || !valueRegexValid.value);
172
191
  const countValue = computed(() => {
173
192
  if (textValue.value) {
@@ -236,6 +255,7 @@ function addEmojiSelected(emoji: string) {
236
255
  textValue.value = (textValue.value ?? "") + emoji;
237
256
  }
238
257
  </script>
258
+
239
259
  <style lang="scss">
240
260
  .octopus-app .classic-input-text {
241
261
  .text-indic {
@@ -7,11 +7,31 @@
7
7
  }"
8
8
  :style="{ width: width, height: height }"
9
9
  >
10
- <label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
11
- label
12
- }}
13
- <AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="t('Mandatory input')"/>
14
- </label>
10
+ <div class="d-flex align-items-center">
11
+ <label :class="displayLabel ? '' : 'd-none'" :for="id" class="form-label">{{
12
+ label
13
+ }}
14
+ <AsteriskIcon v-if="displayRequired" :size="10" class="ms-1 mb-2" :title="t('Mandatory input')"/>
15
+ </label>
16
+ <template v-if="popover">
17
+ <button
18
+ :id="'popover' + id"
19
+ :title="t('Help')"
20
+ class="btn-transparent"
21
+ >
22
+ <HelpCircleIcon :size="30" />
23
+ </button>
24
+ <ClassicPopover
25
+ :target="'popover' + id"
26
+ popover-class="popover-z-index"
27
+ :relative-class="popoverRelativeClass"
28
+ >
29
+ <!-- eslint-disable vue/no-v-html -->
30
+ <div v-html="popover" />
31
+ <!-- eslint-enable -->
32
+ </ClassicPopover>
33
+ </template>
34
+ </div>
15
35
  <vSelect
16
36
  v-model="optionSelected"
17
37
  :input-id="id"
@@ -77,12 +97,15 @@
77
97
  </template>
78
98
 
79
99
  <script setup lang="ts">
80
- import { computed, ref, Ref, watch } from "vue";
100
+ import { computed, defineAsyncComponent, ref, Ref, watch } from "vue";
81
101
  import { useI18n } from "vue-i18n";
82
102
  import AsteriskIcon from "vue-material-design-icons/Asterisk.vue";
83
103
  import ChevronDownIcon from "vue-material-design-icons/ChevronDown.vue";
84
104
  import vSelect from "vue-select";
85
-
105
+ import HelpCircleIcon from "vue-material-design-icons/HelpCircle.vue";
106
+ const ClassicPopover = defineAsyncComponent(
107
+ () => import("../misc/ClassicPopover.vue"),
108
+ );
86
109
 
87
110
  //Props
88
111
  const props = defineProps({
@@ -106,6 +129,8 @@ const props = defineProps({
106
129
  allowEmpty: { default: true, type: Boolean },
107
130
  textDanger :{ default: undefined, type: String },
108
131
  displayRequired: { default: false, type: Boolean },
132
+ popover: { default: undefined, type: String },
133
+ popoverRelativeClass: { default: undefined, type: String },
109
134
  })
110
135
 
111
136
  //Emits
@@ -214,6 +239,9 @@ defineExpose({
214
239
  height: 100%;
215
240
  }
216
241
 
242
+ .vs__search, .vs__search:focus{
243
+ border: var(--vs-selected-border-width) solid transparent;
244
+ }
217
245
  .vs__search:focus {
218
246
  min-width: 150px;
219
247
  }
@@ -20,11 +20,11 @@
20
20
  class="img-accordion"
21
21
  :src="imageUrl"
22
22
  aria-hidden="true"
23
- alt=""
24
-
23
+ alt=""
25
24
  />
26
- <span class="flex-grow-1">{{ title }}</span>
27
- <ChevronDownIcon :class="{ 'arrow-transform': isOpen }" />
25
+ <span>{{ title }}</span>
26
+ <slot name="afterTitle"/>
27
+ <ChevronDownIcon class="ms-auto" :class="{ 'arrow-transform': isOpen }" />
28
28
  </button>
29
29
  <div v-show="isOpen" class="body p-2">
30
30
  <slot />
@@ -0,0 +1,44 @@
1
+ <!--
2
+ A simple component to display a help button that shows its message when
3
+ hovered.
4
+
5
+ Usage:
6
+ <ClassicHelpButton>This is my help message</ClassicHelpButton>
7
+ -->
8
+ <template>
9
+ <button
10
+ :id="computedId"
11
+ class="btn-transparent"
12
+ >
13
+ <!-- Button icon -->
14
+ <HelpCircleIcon :size="30" />
15
+
16
+ <!-- Tooltip -->
17
+ <ClassicPopover
18
+ :target="computedId"
19
+ popover-class="popover-z-index"
20
+ >
21
+ <div class="reset">
22
+ <slot />
23
+ </div>
24
+ </ClassicPopover>
25
+ </button>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import { computed, getCurrentInstance } from 'vue';
30
+
31
+ import HelpCircleIcon from "vue-material-design-icons/HelpCircle.vue";
32
+ import ClassicPopover from './ClassicPopover.vue';
33
+
34
+ /** The internal ID for the elements */
35
+ const computedId = computed(() => {
36
+ return 'popover-' + getCurrentInstance()?.uid;
37
+ });
38
+ </script>
39
+
40
+ <style lang="scss" scoped>
41
+ .reset {
42
+ font: revert;
43
+ }
44
+ </style>
@@ -4,9 +4,10 @@
4
4
  <slot v-else name="preview" />
5
5
  </div>
6
6
  </template>
7
+
7
8
  <script setup lang="ts">
8
9
  import { useIntersectionObserver } from "@vueuse/core";
9
- import { ref, nextTick, watch } from "vue";
10
+ import { ref, nextTick, watch, onMounted } from "vue";
10
11
 
11
12
  //Props
12
13
  const props = defineProps({
@@ -37,8 +38,8 @@ const { pause, resume } = useIntersectionObserver(
37
38
  if (isIntersecting) {
38
39
  // perhaps the user re-scrolled to a component that was set to unrender. In that case stop the unrendering timer
39
40
  clearTimeout(unrenderTimer);
40
- // if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
41
41
 
42
+ // if we're dealing underndering lets add a waiting period of 200ms before rendering. If a component enters the viewport and also leaves it within 200ms it will not render at all. This saves work and improves performance when user scrolls very fast
42
43
  renderTimer = setTimeout(
43
44
  () => {
44
45
  shouldRender.value = true;
@@ -46,6 +47,7 @@ const { pause, resume } = useIntersectionObserver(
46
47
  },
47
48
  props.unrender ? 200 : 0,
48
49
  );
50
+
49
51
  if (!props.unrender) {
50
52
  pause();
51
53
  }
@@ -64,18 +66,27 @@ const { pause, resume } = useIntersectionObserver(
64
66
  );
65
67
 
66
68
  //Logic
67
- setTimeout(() => {
68
- waitBeforeInit.value = false;
69
- }, props.initRenderDelay);
70
- if (props.renderOnIdle) {
71
- onIdle(() => {
72
- shouldRender.value = true;
73
- emit("isRender", true);
74
- if (!props.unrender) {
75
- pause();
76
- }
77
- });
78
- }
69
+ onMounted(() => {
70
+ if (props.initRenderDelay <= 0) {
71
+ // If there's no render delay, do not delay initialization
72
+ waitBeforeInit.value = false;
73
+ } else {
74
+ // Otherwise delay initialization
75
+ setTimeout(() => {
76
+ waitBeforeInit.value = false;
77
+ }, props.initRenderDelay);
78
+ }
79
+
80
+ if (props.renderOnIdle) {
81
+ onIdle(() => {
82
+ shouldRender.value = true;
83
+ emit("isRender", true);
84
+ if (!props.unrender) {
85
+ pause();
86
+ }
87
+ });
88
+ }
89
+ });
79
90
 
80
91
  //Watch
81
92
  watch(
@@ -1,3 +1,6 @@
1
+ <!--
2
+ Component to make a tab-based navigation
3
+ -->
1
4
  <template>
2
5
  <ul class="octopus-nav" :class="light ? 'light' : ''">
3
6
  <li
@@ -16,7 +16,7 @@ defineProps({
16
16
  --size-spinner: 3rem;
17
17
  --size-spinner-section: calc(var(--size-spinner) / 20);
18
18
  --half-size-spinner: calc(var(--size-spinner) / 2);
19
-
19
+
20
20
  color: #000000;
21
21
  display: inline-block;
22
22
  position: relative;
@@ -5,11 +5,17 @@
5
5
  role="contentinfo"
6
6
  class="d-flex align-items-center justify-content-between border-top mt-auto"
7
7
  >
8
- <div v-if="!state.generalParameters.podcastmaker" class="d-flex flex-column px-1">
8
+ <div
9
+ v-if="!state.generalParameters.podcastmaker"
10
+ class="d-flex flex-column px-1"
11
+ >
9
12
  <div class="text-dark my-1 special-select-align-magic-trick">
10
13
  &copy; Saooti 2025
11
14
  </div>
12
- <FooterGarSection v-if="authStore.isGarRole" :auth-orga-id="authStore.authOrgaId" />
15
+ <FooterGarSection
16
+ v-if="authStore.isGarRole"
17
+ :auth-orga-id="authStore.authOrgaId"
18
+ />
13
19
  <nav :aria-label="t('Site menu')">
14
20
  <ul class="p-0 m-0">
15
21
  <li
@@ -43,13 +49,11 @@
43
49
  class="my-1"
44
50
  />
45
51
  <OrganisationChooserLight
46
- v-if="!state.generalParameters.podcastmaker && organisationId && authenticated"
52
+ v-if="!state.generalParameters.podcastmaker && authenticated"
47
53
  page="footer"
48
54
  width="auto"
49
55
  class="my-1"
50
56
  :defaultanswer="t('No organisation filter')"
51
- :value="organisationId"
52
- :reset="reset"
53
57
  @selected="onOrganisationSelected"
54
58
  />
55
59
  </div>
@@ -83,7 +87,7 @@ import { useFilterStore } from "../../stores/FilterStore";
83
87
  import { useGeneralStore } from "../../stores/GeneralStore";
84
88
  import { useAuthStore } from "../../stores/AuthStore";
85
89
  import { Category } from "@/stores/class/general/category";
86
- import { computed, defineAsyncComponent, Ref, ref, watch } from "vue";
90
+ import { computed, defineAsyncComponent, ref, watch } from "vue";
87
91
  import { Organisation } from "@/stores/class/general/organisation";
88
92
  import { useI18n } from "vue-i18n";
89
93
  import { useRoute, useRouter } from "vue-router";
@@ -98,8 +102,6 @@ const { t, locale } = useI18n();
98
102
 
99
103
  //Data
100
104
  const language = ref(locale);
101
- const reset = ref(false);
102
- const organisationId: Ref<string | undefined> = ref(undefined);
103
105
 
104
106
  //Composables
105
107
  const generalStore = useGeneralStore();
@@ -127,15 +129,6 @@ const routerLinkSecondArray = computed(() => {
127
129
 
128
130
  //Watch
129
131
  watch(language, () => changeLanguage());
130
- watch(()=>filterStore.filterOrgaId, () => {
131
- if (filterStore.filterOrgaId) {
132
- organisationId.value = filterStore.filterOrgaId;
133
- } else {
134
- reset.value = !reset.value;
135
- }
136
- }, {immediate: true});
137
-
138
-
139
132
 
140
133
  //Methods
141
134
  function changeLanguage(): void {
@@ -164,15 +157,19 @@ function changeLanguage(): void {
164
157
  }
165
158
  });
166
159
  }
160
+
161
+ /**
162
+ * Select another organisation
163
+ * @param organisation The new organisation to focus on, or undefined to remove focus
164
+ */
167
165
  async function onOrganisationSelected( organisation: Organisation | undefined): Promise<void> {
168
166
  if (organisation?.id) {
169
167
  router.push({
170
- query: { ...route.query, ...{ productor: organisation.id, o:undefined } },
168
+ query: { ...route.query, ...{ productor: organisation.id, o:undefined, viewall: "false" } },
171
169
  });
172
170
  }else{
173
- organisationId.value = undefined;
174
171
  router.push({
175
- query: { ...route.query, ...{ productor: undefined } },
172
+ query: { ...route.query, ...{ productor: undefined, viewall: "true" } },
176
173
  });
177
174
  }
178
175
  }