Skip to content

Commit c8ee3a3

Browse files
committed
[Feature request]: current playing chapter in bold font.
1 parent f43cb4e commit c8ee3a3

File tree

3 files changed

+28
-56
lines changed

3 files changed

+28
-56
lines changed

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/theme/variables.css

+5
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,8 @@ ion-searchbar {
161161
.alertbox .alert-wrapper button {
162162
color: #04c8c5;
163163
}
164+
165+
.actionSheetCurrentChapter {
166+
color: #04c8c5 !important;
167+
font-weight: bold;
168+
}

src/views/Player.vue

+17-50
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,38 @@
1414
<ion-grid style="height: 100%">
1515
<ion-row class="remoteButtons">
1616
<ion-col :size="screenOrientation.startsWith('landscape') ? 6 : 12">
17-
<ion-button
18-
:disabled="!connectionState || !playerData.filename"
19-
@click="changeVolume('decrease')"
20-
>
17+
<ion-button :disabled="!connectionState || !playerData.filename" @click="changeVolume('decrease')">
2118
<ion-icon slot="icon-only" :icon="volumeLowOutline"></ion-icon>
2219
</ion-button>
23-
<ion-button
24-
:disabled="!connectionState || !playerData.filename"
25-
@click="changeVolume('mute')"
26-
>
20+
<ion-button :disabled="!connectionState || !playerData.filename" @click="changeVolume('mute')">
2721
<ion-icon slot="icon-only" :icon="volumeMuteOutline"></ion-icon>
2822
</ion-button>
29-
<ion-button
30-
:disabled="!connectionState || !playerData.filename"
31-
@click="changeVolume('increase')"
32-
>
23+
<ion-button :disabled="!connectionState || !playerData.filename" @click="changeVolume('increase')">
3324
<ion-icon slot="icon-only" :icon="volumeHighOutline"></ion-icon>
3425
</ion-button>
3526
</ion-col>
3627
<ion-col :size="screenOrientation.startsWith('landscape') ? 6 : 12">
37-
<ion-button
38-
:disabled="!connectionState || !playerData.filename"
39-
@click="onInfoClicked"
40-
>
28+
<ion-button :disabled="!connectionState || !playerData.filename" @click="onInfoClicked">
4129
<ion-icon slot="icon-only" :icon="informationCircle"></ion-icon>
4230
</ion-button>
43-
<ion-button
44-
:disabled="!connectionState || !playerData.filename"
45-
@click="onFullscreenClicked"
46-
>
31+
<ion-button :disabled="!connectionState || !playerData.filename" @click="onFullscreenClicked">
4732
<ion-icon slot="icon-only" :icon="scanOutline"></ion-icon>
4833
</ion-button>
49-
<ion-button
50-
:disabled="!connectionState || !playerData.filename"
51-
@click="onAudioSettingsClicked"
52-
>
34+
<ion-button :disabled="!connectionState || !playerData.filename" @click="onAudioSettingsClicked">
5335
<ion-icon slot="icon-only" :icon="earOutline"></ion-icon>
5436
</ion-button>
55-
<ion-button
56-
:disabled="!connectionState || !playerData.filename"
57-
@click="onSubtitleSettingsClicked"
58-
>
59-
<ion-icon
60-
class="rotateIcon"
61-
slot="icon-only"
62-
:icon="journalOutline"
63-
></ion-icon>
37+
<ion-button :disabled="!connectionState || !playerData.filename" @click="onSubtitleSettingsClicked">
38+
<ion-icon class="rotateIcon" slot="icon-only" :icon="journalOutline"></ion-icon>
6439
</ion-button>
6540
</ion-col>
6641
<ion-col :size="screenOrientation.startsWith('landscape') ? 6 : 12">
67-
<ion-button
68-
:disabled="!connectionState || !filebrowserEnabled"
69-
@click="onFileBrowserClicked"
70-
>
42+
<ion-button :disabled="!connectionState || !filebrowserEnabled" @click="onFileBrowserClicked">
7143
<ion-icon slot="icon-only" :icon="folder"></ion-icon>
7244
</ion-button>
7345
<ion-button :disabled="!connectionState" @click="onOpenURLClicked">
7446
<ion-icon slot="icon-only" :icon="logoYoutube"></ion-icon>
7547
</ion-button>
76-
<ion-button
77-
:disabled="playerData['chapter-list'].length == 0"
78-
@click="onChaptersClicked"
79-
>
48+
<ion-button :disabled="playerData['chapter-list'].length == 0" @click="onChaptersClicked">
8049
<ion-icon slot="icon-only" :icon="bookOutline"></ion-icon>
8150
</ion-button>
8251
<ion-button :disabled="!connectionState" @click="onShutdownClicked">
@@ -89,21 +58,16 @@
8958
<ion-content v-else>
9059
<ion-grid>
9160
<ion-row>
92-
<ion-col
93-
>Server not configued yet.
61+
<ion-col>Server not configued yet.
9462
<p>
9563
If you need help
96-
<a @click="openURL('https://github.com/husudosu/mpv-remote-app')"
97-
>check tutorial here</a
98-
>
64+
<a @click="openURL('https://github.com/husudosu/mpv-remote-app')">check tutorial here</a>
9965
</p>
10066
</ion-col>
10167
</ion-row>
10268
</ion-grid>
10369
</ion-content>
104-
<playerController
105-
v-if="configured && playerData.filename"
106-
></playerController>
70+
<playerController v-if="configured && playerData.filename"></playerController>
10771
</ion-page>
10872
</template>
10973

@@ -263,10 +227,11 @@ export default {
263227
};
264228
265229
const onChaptersClicked = async () => {
266-
const buttons = playerData.value["chapter-list"].map((chapter) => {
230+
const buttons = playerData.value["chapter-list"].map((chapter, index) => {
267231
return {
268232
role: chapter.time,
269233
text: `${chapter.title} (${formatTime(chapter.time)})`,
234+
cssClass: playerData.value["chapter"] === index ? "actionSheetCurrentChapter" : ""
270235
};
271236
});
272237
@@ -397,6 +362,7 @@ export default {
397362
.remoteButtons {
398363
text-align: left;
399364
}
365+
400366
.remoteButtons ion-button {
401367
margin: 5px;
402368
width: 50px;
@@ -408,6 +374,7 @@ export default {
408374
.remoteButtons {
409375
text-align: center;
410376
}
377+
411378
.remoteButtons ion-button {
412379
margin: 7px;
413380
width: 60px;

0 commit comments

Comments
 (0)