@saooti/octopus-sdk 40.1.13 → 40.1.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.
- package/package.json +1 -1
- package/src/components/display/emission/EmissionPlayerItem.vue +2 -3
- package/src/components/display/podcasts/PodcastItem.vue +1 -7
- package/src/components/display/podcasts/PodcastItemInfo.vue +19 -26
- package/src/components/display/podcasts/PodcastModuleBox.vue +1 -2
- package/src/components/display/podcasts/PodcastPlayBar.vue +54 -19
- package/src/components/misc/ClassicPopover.vue +2 -1
- package/src/components/misc/player/elements/PlayerPlayButton.vue +1 -13
- package/src/style/playButton.scss +14 -0
package/package.json
CHANGED
|
@@ -59,8 +59,7 @@
|
|
|
59
59
|
</router-link>
|
|
60
60
|
<PodcastPlayBar
|
|
61
61
|
v-else
|
|
62
|
-
:podcast
|
|
63
|
-
:duration="p.duration"
|
|
62
|
+
:podcast="p"
|
|
64
63
|
/>
|
|
65
64
|
</div>
|
|
66
65
|
<button
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
>
|
|
74
73
|
<PlayIcon class="text-light" :title="$t('Play')" />
|
|
75
74
|
</button>
|
|
76
|
-
<button v-else class="play-button-box bg-secondary-light" @click="pause(
|
|
75
|
+
<button v-else class="play-button-box bg-secondary-light" @click="pause()">
|
|
77
76
|
<PauseIcon class="text-light" :title="$t('Pause')" />
|
|
78
77
|
</button>
|
|
79
78
|
</div>
|
|
@@ -31,13 +31,7 @@
|
|
|
31
31
|
@mouseleave="debounceHideDescriptionEvent"
|
|
32
32
|
>
|
|
33
33
|
<PodcastItemInfo
|
|
34
|
-
:podcast
|
|
35
|
-
:title="podcast.title"
|
|
36
|
-
:pub-date="podcast.pubDate"
|
|
37
|
-
:podcast-organisation-id="podcast.organisation.id"
|
|
38
|
-
:podcast-organisation-name="podcast.organisation.name"
|
|
39
|
-
:duration="podcast.duration"
|
|
40
|
-
:animators="podcast.animators"
|
|
34
|
+
:podcast="podcast"
|
|
41
35
|
/>
|
|
42
36
|
</div>
|
|
43
37
|
</article>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<time
|
|
4
|
-
:datetime="pubDate"
|
|
4
|
+
:datetime="podcast.pubDate"
|
|
5
5
|
class="text-secondary h6 ms-2">
|
|
6
6
|
{{ date }}
|
|
7
7
|
</time>
|
|
8
8
|
<router-link
|
|
9
9
|
:to="{
|
|
10
10
|
name: 'podcast',
|
|
11
|
-
params: { podcastId: podcastId },
|
|
11
|
+
params: { podcastId: podcast.podcastId },
|
|
12
12
|
}"
|
|
13
|
-
class="text-dark flex-grow-1 title-podcast-item basic-line-clamp three-line"
|
|
14
|
-
:title="$t('Episode name page', { name: title })"
|
|
13
|
+
class="text-dark flex-grow-1 podcast.title-podcast-item basic-line-clamp three-line"
|
|
14
|
+
:podcast.title="$t('Episode name page', { name: podcast.title })"
|
|
15
15
|
>
|
|
16
|
-
{{ title }}
|
|
16
|
+
{{ podcast.title }}
|
|
17
17
|
</router-link>
|
|
18
18
|
<PodcastPlayBar
|
|
19
19
|
v-if="isProgressBar"
|
|
20
|
-
:
|
|
21
|
-
:
|
|
22
|
-
class="
|
|
20
|
+
:display-btn="true"
|
|
21
|
+
:podcast="podcast"
|
|
22
|
+
class="me-2"
|
|
23
23
|
/>
|
|
24
24
|
|
|
25
25
|
<div class="mx-2 d-flex align-items-center justify-content-between mt-2">
|
|
26
26
|
<div v-if="isPodcastmaker" class="useless-div-for-podcastmaker" />
|
|
27
27
|
<AnimatorsItem
|
|
28
|
-
v-if="animators && 0 !== animators.length"
|
|
28
|
+
v-if="podcast.animators && 0 !== podcast.animators.length"
|
|
29
29
|
class="w-0 flex-grow-1"
|
|
30
|
-
:animator="animators[0]"
|
|
30
|
+
:animator="podcast.animators[0]"
|
|
31
31
|
/>
|
|
32
32
|
<router-link
|
|
33
33
|
v-if="!isPodcastmaker"
|
|
34
34
|
:to="{
|
|
35
35
|
name: 'productor',
|
|
36
|
-
params: { productorId:
|
|
36
|
+
params: { productorId: podcast.organisation.id },
|
|
37
37
|
}"
|
|
38
38
|
class="text-dark producer-podcast-item"
|
|
39
39
|
>
|
|
@@ -45,11 +45,10 @@
|
|
|
45
45
|
|
|
46
46
|
<script lang="ts">
|
|
47
47
|
import AnimatorsItem from "./AnimatorsItem.vue";
|
|
48
|
-
import { state } from "../../../stores/ParamSdkStore";
|
|
49
48
|
import {useOrgaComputed} from "../../composable/useOrgaComputed";
|
|
50
49
|
import dayjs from "dayjs";
|
|
51
50
|
import { defineAsyncComponent, defineComponent } from "vue";
|
|
52
|
-
import {
|
|
51
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
53
52
|
const PodcastPlayBar = defineAsyncComponent(
|
|
54
53
|
() => import("./PodcastPlayBar.vue"),
|
|
55
54
|
);
|
|
@@ -62,13 +61,7 @@ export default defineComponent({
|
|
|
62
61
|
},
|
|
63
62
|
|
|
64
63
|
props: {
|
|
65
|
-
|
|
66
|
-
title: { default: "", type: String },
|
|
67
|
-
pubDate: { default: "", type: String },
|
|
68
|
-
podcastOrganisationId: { default: "", type: String },
|
|
69
|
-
podcastOrganisationName: { default: "", type: String },
|
|
70
|
-
duration: { default: 0, type: Number },
|
|
71
|
-
animators: { default: undefined, type: Object as () => Array<Participant> },
|
|
64
|
+
podcast: { default: () => ({}), type: Object as () => Podcast },
|
|
72
65
|
},
|
|
73
66
|
|
|
74
67
|
setup(){
|
|
@@ -81,16 +74,16 @@ export default defineComponent({
|
|
|
81
74
|
return state.emissionsPage.progressBar as boolean;
|
|
82
75
|
},
|
|
83
76
|
date(): string {
|
|
84
|
-
return dayjs(this.pubDate).format("D MMMM YYYY");
|
|
77
|
+
return dayjs(this.podcast.pubDate).format("D MMMM YYYY");
|
|
85
78
|
},
|
|
86
79
|
editRight(): boolean {
|
|
87
|
-
return this.isEditRights(this.
|
|
80
|
+
return this.isEditRights(this.podcast.organisation.id);
|
|
88
81
|
},
|
|
89
82
|
orgaNameDisplay(): string {
|
|
90
|
-
if (this.
|
|
91
|
-
return this.
|
|
83
|
+
if (this.podcast.organisation.name.length > 30) {
|
|
84
|
+
return this.podcast.organisation.name.substring(0, 30) + "...";
|
|
92
85
|
}
|
|
93
|
-
return this.
|
|
86
|
+
return this.podcast.organisation.name;
|
|
94
87
|
},
|
|
95
88
|
},
|
|
96
89
|
});
|
|
@@ -98,7 +91,7 @@ export default defineComponent({
|
|
|
98
91
|
|
|
99
92
|
<style lang="scss">
|
|
100
93
|
.octopus-app {
|
|
101
|
-
.title-podcast-item {
|
|
94
|
+
.podcast.title-podcast-item {
|
|
102
95
|
font-weight: 700;
|
|
103
96
|
margin: 0.25rem 0.5rem 0.5rem;
|
|
104
97
|
flex-grow: 1;
|
|
@@ -1,50 +1,71 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="d-flex align-items-center
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/>
|
|
12
|
-
</
|
|
13
|
-
<
|
|
14
|
-
|
|
2
|
+
<div class="d-flex align-items-center">
|
|
3
|
+
<button
|
|
4
|
+
v-if="
|
|
5
|
+
playerPodcast !== podcast ||
|
|
6
|
+
(playerPodcast === podcast && 'PAUSED' === playerStatus)
|
|
7
|
+
"
|
|
8
|
+
class="btn play-button-box bg-primary"
|
|
9
|
+
@click="play(podcast)"
|
|
10
|
+
>
|
|
11
|
+
<PlayIcon class="text-light" :title="$t('Play')" />
|
|
12
|
+
</button>
|
|
13
|
+
<button v-else class="btn play-button-box bg-primary" @click="pause()">
|
|
14
|
+
<PauseIcon class="text-light" :title="$t('Pause')" />
|
|
15
|
+
</button>
|
|
16
|
+
<div class="d-flex align-items-center podcast-play-bar flex-grow-1">
|
|
17
|
+
<div class="me-2">
|
|
18
|
+
{{ playedTime }}
|
|
19
|
+
</div>
|
|
20
|
+
<div class="position-relative flex-grow-1">
|
|
21
|
+
<ProgressBar
|
|
22
|
+
:main-progress="percentProgress"
|
|
23
|
+
class="medium"
|
|
24
|
+
@mouseup="seekTo"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="ms-2">
|
|
28
|
+
{{ totalTime }}
|
|
29
|
+
</div>
|
|
15
30
|
</div>
|
|
16
31
|
</div>
|
|
17
32
|
</template>
|
|
18
33
|
|
|
19
34
|
<script lang="ts">
|
|
35
|
+
import PlayIcon from "vue-material-design-icons/Play.vue";
|
|
36
|
+
import PauseIcon from "vue-material-design-icons/Pause.vue";
|
|
20
37
|
import ProgressBar from "../../misc/ProgressBar.vue";
|
|
21
38
|
import DurationHelper from "../../../helper/durationHelper";
|
|
22
39
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
23
40
|
import { mapState, mapActions } from "pinia";
|
|
24
41
|
import { defineComponent } from "vue";
|
|
42
|
+
import { Podcast } from "@/stores/class/general/podcast";
|
|
25
43
|
export default defineComponent({
|
|
26
44
|
name: "PodcastPlayBar",
|
|
27
45
|
components: {
|
|
28
46
|
ProgressBar,
|
|
47
|
+
PlayIcon,
|
|
48
|
+
PauseIcon
|
|
29
49
|
},
|
|
30
50
|
props: {
|
|
31
|
-
|
|
32
|
-
|
|
51
|
+
podcast: { default: () => ({}), type: Object as () => Podcast },
|
|
52
|
+
displayButonPlay:{ default: false, type: Boolean },
|
|
33
53
|
},
|
|
34
54
|
computed: {
|
|
35
55
|
...mapState(usePlayerStore, [
|
|
36
56
|
"playerPodcast",
|
|
37
57
|
"playerElapsed",
|
|
38
58
|
"playerTotal",
|
|
59
|
+
"playerStatus"
|
|
39
60
|
]),
|
|
40
61
|
percentProgress(): number {
|
|
41
|
-
if (this.podcastId !== this.playerPodcast?.podcastId) {
|
|
62
|
+
if (this.podcast?.podcastId !== this.playerPodcast?.podcastId) {
|
|
42
63
|
return 0;
|
|
43
64
|
}
|
|
44
65
|
return !this.playerElapsed ? 0 : this.playerElapsed * 100;
|
|
45
66
|
},
|
|
46
67
|
playedTime(): string {
|
|
47
|
-
if (this.podcastId === this.playerPodcast?.podcastId) {
|
|
68
|
+
if (this.podcast?.podcastId === this.playerPodcast?.podcastId) {
|
|
48
69
|
if (
|
|
49
70
|
this.playerElapsed &&
|
|
50
71
|
this.playerElapsed > 0 &&
|
|
@@ -59,15 +80,26 @@ export default defineComponent({
|
|
|
59
80
|
return "00:00";
|
|
60
81
|
},
|
|
61
82
|
totalTime(): string {
|
|
62
|
-
return DurationHelper.formatDuration(Math.round(this.duration / 1000));
|
|
83
|
+
return DurationHelper.formatDuration(Math.round(this.podcast.duration / 1000));
|
|
63
84
|
},
|
|
64
85
|
},
|
|
65
86
|
methods: {
|
|
87
|
+
...mapActions(usePlayerStore, ["playerPlay", "playerChangeStatus"]),
|
|
66
88
|
...mapActions(usePlayerStore, ["playerUpdateSeekTime"]),
|
|
89
|
+
play(podcast: Podcast): void {
|
|
90
|
+
if (podcast === this.playerPodcast) {
|
|
91
|
+
this.playerChangeStatus(false);
|
|
92
|
+
} else {
|
|
93
|
+
this.playerPlay(podcast);
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
pause(): void {
|
|
97
|
+
this.playerChangeStatus(true);
|
|
98
|
+
},
|
|
67
99
|
seekTo(event: MouseEvent): void {
|
|
68
100
|
if (
|
|
69
101
|
!this.playerPodcast ||
|
|
70
|
-
this.podcastId !== this.playerPodcast.podcastId
|
|
102
|
+
this.podcast?.podcastId !== this.playerPodcast.podcastId
|
|
71
103
|
) {
|
|
72
104
|
return;
|
|
73
105
|
}
|
|
@@ -81,3 +113,6 @@ export default defineComponent({
|
|
|
81
113
|
},
|
|
82
114
|
});
|
|
83
115
|
</script>
|
|
116
|
+
<style lang="scss">
|
|
117
|
+
@use "../../../style/playButton";
|
|
118
|
+
</style>
|
|
@@ -245,7 +245,8 @@ export default defineComponent({
|
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
247
|
//Exception timepicker in popover
|
|
248
|
-
|
|
248
|
+
var result = Array.from(e?.target?.classList ?? []).findIndex((val) => { return val.startsWith("dp__");});
|
|
249
|
+
if (-1!==result) {
|
|
249
250
|
return;
|
|
250
251
|
}
|
|
251
252
|
if (!e.relatedTarget) {
|
|
@@ -119,23 +119,11 @@ export default defineComponent({
|
|
|
119
119
|
</script>
|
|
120
120
|
|
|
121
121
|
<style lang="scss">
|
|
122
|
+
@use "../../../../style/playButton";
|
|
122
123
|
.octopus-app {
|
|
123
|
-
.play-button-box {
|
|
124
|
-
height: 2.2rem;
|
|
125
|
-
width: 2.2rem;
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
margin: 0 0.5rem;
|
|
130
|
-
border-radius: 50% !important;
|
|
131
|
-
flex-shrink: 0;
|
|
132
|
-
cursor: pointer;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
124
|
.play-button-box:not(.small-font) {
|
|
136
125
|
font-size: 1rem !important;
|
|
137
126
|
}
|
|
138
|
-
|
|
139
127
|
.play-big-button-box {
|
|
140
128
|
height: 5rem;
|
|
141
129
|
width: 5rem;
|