@saooti/octopus-sdk 37.0.10 → 37.0.12
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
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
:multi-calendars="columnNumber>1 ? columnNumber : false"
|
|
17
17
|
:inline="columnNumber > 1"
|
|
18
18
|
:enable-time-picker="!isTimePicker ?displayTimePicker : undefined"
|
|
19
|
-
:
|
|
19
|
+
:aria-labels="ariaLabels"
|
|
20
20
|
@update:model-value="$emit('updateDate', $event)"
|
|
21
|
-
|
|
21
|
+
>
|
|
22
|
+
</VueDatePicker>
|
|
22
23
|
</template>
|
|
23
24
|
|
|
24
25
|
<script lang="ts">
|
|
@@ -50,6 +51,12 @@ export default defineComponent({
|
|
|
50
51
|
};
|
|
51
52
|
},
|
|
52
53
|
computed: {
|
|
54
|
+
ariaLabels(){
|
|
55
|
+
return {
|
|
56
|
+
input: this.date ? this.formatDate(this.date) : undefined,
|
|
57
|
+
day : (value: {value: Date}) => {return this.formatDate(value.value);}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
53
60
|
modelVal(){
|
|
54
61
|
return this.time ?? this.range ?? this.date;
|
|
55
62
|
},
|
|
@@ -71,7 +78,13 @@ export default defineComponent({
|
|
|
71
78
|
return dayjs().toDate();
|
|
72
79
|
},
|
|
73
80
|
},
|
|
74
|
-
|
|
81
|
+
methods:{
|
|
82
|
+
formatDate(value: Date): string{
|
|
83
|
+
const realMonth = value.getMonth() + 1;
|
|
84
|
+
return value.getDate()+'/'+(realMonth < 10 ? "0" : "") + realMonth+'/'+value.getFullYear();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
})
|
|
75
88
|
</script>
|
|
76
89
|
<style lang="scss">
|
|
77
90
|
@import '@vuepic/vue-datepicker/dist/main.css';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
7
7
|
class="octopus-progress-bar"
|
|
8
|
+
:class="isBack ? 'no-transition': ''"
|
|
8
9
|
role="progressbar"
|
|
9
10
|
aria-valuenow="0"
|
|
10
11
|
aria-valuemin="0"
|
|
@@ -27,6 +28,7 @@ export default defineComponent({
|
|
|
27
28
|
data() {
|
|
28
29
|
return {
|
|
29
30
|
percentInterval: undefined as ReturnType<typeof setTimeout> | undefined,
|
|
31
|
+
isBack: false as boolean,
|
|
30
32
|
};
|
|
31
33
|
},
|
|
32
34
|
|
|
@@ -45,6 +47,9 @@ export default defineComponent({
|
|
|
45
47
|
mounted() {
|
|
46
48
|
this.handlePercentInterval();
|
|
47
49
|
},
|
|
50
|
+
unmounted() {
|
|
51
|
+
clearInterval(this.percentInterval as unknown as number);
|
|
52
|
+
},
|
|
48
53
|
methods: {
|
|
49
54
|
...mapActions(usePlayerStore, ["playerUpdateElapsed"]),
|
|
50
55
|
handlePercentInterval(/* clear: boolean */): void {
|
|
@@ -66,10 +71,11 @@ export default defineComponent({
|
|
|
66
71
|
.diff(dayjs(this.playerRadio.metadata.startDate));
|
|
67
72
|
const percentPlayed =
|
|
68
73
|
actualMilliSecondsPlayed /
|
|
69
|
-
(this.playerRadio?.metadata.
|
|
74
|
+
(this.playerRadio?.metadata.playDuration * 1000);
|
|
75
|
+
this.isBack = percentPlayed < this.playerElapsed;
|
|
70
76
|
this.playerUpdateElapsed(
|
|
71
77
|
percentPlayed,
|
|
72
|
-
this.playerRadio?.metadata.
|
|
78
|
+
this.playerRadio?.metadata.playDuration,
|
|
73
79
|
);
|
|
74
80
|
},
|
|
75
81
|
},
|
|
@@ -83,6 +89,9 @@ export default defineComponent({
|
|
|
83
89
|
.octopus-progress-bar {
|
|
84
90
|
background-color: #747474;
|
|
85
91
|
}
|
|
92
|
+
.no-transition{
|
|
93
|
+
transition: none !important;
|
|
94
|
+
}
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
</style>
|
|
@@ -83,8 +83,8 @@ export const usePlayerStore = defineStore("PlayerStore", {
|
|
|
83
83
|
transcriptText(): string {
|
|
84
84
|
return this.playerTranscript?.actualText ?? "";
|
|
85
85
|
},
|
|
86
|
-
radioUrl(): string {
|
|
87
|
-
return this.playerRadio?.url ??
|
|
86
|
+
radioUrl(): string|undefined {
|
|
87
|
+
return this.playerRadio?.url ?? undefined;
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
actions: {
|