@saooti/octopus-sdk 38.0.21 → 38.0.22
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
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
<button
|
|
10
10
|
v-for="(chapter, index) in playerChapteringPercent"
|
|
11
11
|
:key="chapter"
|
|
12
|
-
class="btn d-flex flex-nowrap align-items-center p-2 mt-1 c-hand text-truncate mb-1
|
|
12
|
+
class="btn d-flex flex-nowrap align-items-center p-2 mt-1 c-hand text-truncate mb-1"
|
|
13
|
+
:class="actualChapter === index ? 'chapter-selected':'border'"
|
|
13
14
|
@click="goToChapter(index)"
|
|
14
15
|
>
|
|
15
|
-
<div class="
|
|
16
|
+
<div class="d-flex align-items-center me-auto">
|
|
17
|
+
<svg v-if="actualChapter === index" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-soundwave" viewBox="0 0 16 16">
|
|
18
|
+
<path fill-rule="evenodd" d="M8.5 2a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-1 0v-11a.5.5 0 0 1 .5-.5m-2 2a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5m4 0a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 .5-.5m-6 1.5A.5.5 0 0 1 5 6v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m8 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m-10 1A.5.5 0 0 1 3 7v2a.5.5 0 0 1-1 0V7a.5.5 0 0 1 .5-.5m12 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0V7a.5.5 0 0 1 .5-.5"/>
|
|
19
|
+
</svg>
|
|
20
|
+
<div v-else>{{ index + 1 }}</div>
|
|
21
|
+
<div class="ms-2">{{ "- " + chapter.title }}</div>
|
|
22
|
+
</div>
|
|
16
23
|
<div>{{ chapter.startDisplay }}</div>
|
|
17
24
|
</button>
|
|
18
25
|
</div>
|
|
@@ -35,7 +42,7 @@ export default defineComponent({
|
|
|
35
42
|
components: {
|
|
36
43
|
ClassicModal,
|
|
37
44
|
},
|
|
38
|
-
props: {},
|
|
45
|
+
props: {actualChapter: {default: -1, type: Number}},
|
|
39
46
|
emits: ["close"],
|
|
40
47
|
data() {
|
|
41
48
|
return {
|
|
@@ -78,3 +85,11 @@ export default defineComponent({
|
|
|
78
85
|
},
|
|
79
86
|
});
|
|
80
87
|
</script>
|
|
88
|
+
<style lang="scss">
|
|
89
|
+
@import "@scss/_variables.scss";
|
|
90
|
+
.octopus-app {
|
|
91
|
+
.chapter-selected{
|
|
92
|
+
border: $octopus-primary-color 3px solid;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<span class="saooti-right small-text" />
|
|
11
11
|
</button>
|
|
12
|
-
<ChapteringModal v-if="showChaptering" @close="showChaptering = false" />
|
|
12
|
+
<ChapteringModal v-if="showChaptering" @close="showChaptering = false" :actual-chapter="actualIndex" />
|
|
13
13
|
</div>
|
|
14
|
-
<div v-else class="margin-chaptering"></div>
|
|
14
|
+
<div v-else-if="playerChapteringPercent" class="margin-chaptering"></div>
|
|
15
15
|
</template>
|
|
16
16
|
<script lang="ts">
|
|
17
17
|
import { ChapterPercent } from "@/stores/class/chaptering/chaptering";
|
|
@@ -30,7 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
data() {
|
|
31
31
|
return {
|
|
32
32
|
actualChapter: undefined as ChapterPercent | undefined,
|
|
33
|
-
actualIndex:
|
|
33
|
+
actualIndex: -1 as number,
|
|
34
34
|
showChaptering: false as boolean,
|
|
35
35
|
};
|
|
36
36
|
},
|
|
@@ -66,13 +66,13 @@ export default defineComponent({
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
this.actualChapter = undefined;
|
|
69
|
-
this.actualIndex =
|
|
69
|
+
this.actualIndex = -1;
|
|
70
70
|
},
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
methods: {
|
|
74
74
|
isInChapter(val: number, chapter: ChapterPercent) {
|
|
75
|
-
return chapter.startPercent <= val && val < chapter.endPercent;
|
|
75
|
+
return Math.floor(chapter.startPercent) <= val && val < Math.floor(chapter.endPercent);
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
});
|