Skip to content

Commit cba5133

Browse files
author
Ferenc Nánási
committed
Ion footer removed on most views for more consistent look
1 parent b06337a commit cba5133

11 files changed

+396
-101
lines changed

CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ Important Android stuff:
3535
- Some code tidy-up, optimizations,
3636
- The app gonna check if the mpv-remote-node version is compatible with the app,
3737
- [CSS] Improved contrast,
38-
- Youtube quality settings on Open URL modal

android/app/src/main/AndroidManifest.xml.orig

+317
Large diffs are not rendered by default.

android/app/src/main/assets/capacitor.config.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
"appId": "com.husudosu.mpvremote",
33
"appName": "MPV Remote",
44
"webDir": "dist",
5-
"bundledWebRuntime": false
5+
"bundledWebRuntime": false,
6+
"server": {
7+
"url": "http://192.168.88.164:8100"
8+
}
69
}

src/components/addCollectionModal.vue

+2-14
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,13 @@ import { FileBrowserActions } from "../enums";
8787
export default {
8888
props: ["modalController", "collection"],
8989
setup(props) {
90-
let dialog = ref({
90+
const dialog = ref({
9191
name: "",
9292
type: 1,
9393
paths: [],
9494
});
9595
if (props.collection) {
96-
apiInstance.get(`collections/${props.collection}`).then((response) => {
97-
dialog.value = response.data;
98-
});
96+
dialog.value = structuredClone(props.collection);
9997
}
10098
10199
const modalTitle = computed(() =>
@@ -179,13 +177,3 @@ export default {
179177
},
180178
};
181179
</script>
182-
<style scoped>
183-
ion-footer {
184-
padding: 10px;
185-
text-align: right;
186-
}
187-
188-
ion-footer ion-button {
189-
width: 120px;
190-
}
191-
</style>

src/components/addServerModal.vue

+20-20
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
<ion-page>
33
<ion-header>
44
<ion-toolbar>
5+
<ion-buttons slot="start">
6+
<ion-button @click="onCancelClicked">
7+
<ion-icon slot="icon-only" :icon="arrowBack"></ion-icon>
8+
</ion-button>
9+
</ion-buttons>
10+
511
<ion-title>{{ modalTitle }}</ion-title>
612
<ion-buttons slot="end" v-if="allowDelete">
713
<ion-button color="error" @click="onDeleteClicked">
8-
<ion-icon :icon="trash"></ion-icon>
14+
<ion-icon slot="icon-only" :icon="trash"></ion-icon>
915
</ion-button>
1016
</ion-buttons>
1117
</ion-toolbar>
@@ -36,11 +42,15 @@
3642
></ion-input>
3743
</ion-item>
3844
</ion-list>
45+
46+
<ion-button
47+
style="margin-top: 10px"
48+
color="success"
49+
expand="block"
50+
@click="onSubmitClicked"
51+
>Save</ion-button
52+
>
3953
</ion-content>
40-
<ion-footer>
41-
<ion-button @click="onCancelClicked">Cancel</ion-button>
42-
<ion-button color="success" @click="onSubmitClicked">Save</ion-button>
43-
</ion-footer>
4454
</ion-page>
4555
</template>
4656

@@ -54,14 +64,13 @@ import {
5464
IonContent,
5565
IonInput,
5666
IonItem,
57-
IonFooter,
5867
IonButton,
5968
IonList,
6069
IonListHeader,
6170
IonButtons,
6271
IonIcon,
6372
} from "@ionic/vue";
64-
import { trash } from "ionicons/icons";
73+
import { trash, arrowBack } from "ionicons/icons";
6574
export default {
6675
props: ["modalController", "server"],
6776
components: {
@@ -72,7 +81,6 @@ export default {
7281
IonContent,
7382
IonInput,
7483
IonItem,
75-
IonFooter,
7684
IonButton,
7785
IonList,
7886
IonListHeader,
@@ -119,7 +127,9 @@ export default {
119127
};
120128
121129
const onDeleteClicked = () => {
122-
props.modalController.dismiss({ delete: true });
130+
if (confirm("Delete server?")) {
131+
props.modalController.dismiss({ delete: true });
132+
}
123133
};
124134
125135
return {
@@ -130,18 +140,8 @@ export default {
130140
onSubmitClicked,
131141
onDeleteClicked,
132142
trash,
143+
arrowBack,
133144
};
134145
},
135146
};
136147
</script>
137-
138-
<style scoped>
139-
ion-footer {
140-
padding: 10px;
141-
text-align: right;
142-
}
143-
144-
ion-footer ion-button {
145-
width: 120px;
146-
}
147-
</style>

src/components/audioSettingsModal.vue

+9-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<ion-page>
33
<ion-header>
44
<ion-toolbar>
5+
<ion-buttons slot="start">
6+
<ion-button @click="onCancelClicked">
7+
<ion-icon slot="icon-only" :icon="arrowBack"></ion-icon>
8+
</ion-button>
9+
</ion-buttons>
510
<ion-title>Audio settings</ion-title>
611
</ion-toolbar>
712
</ion-header>
@@ -32,9 +37,6 @@
3237
<ion-content class="ion-padding" v-else>
3338
<p>No playback.</p>
3439
</ion-content>
35-
<ion-footer>
36-
<ion-button @click="onCancelClicked">Close</ion-button>
37-
</ion-footer>
3840
</ion-page>
3941
</template>
4042
<script>
@@ -48,14 +50,14 @@ import {
4850
IonTitle,
4951
IonContent,
5052
IonItem,
51-
IonFooter,
5253
IonButton,
5354
IonSelect,
5455
IonSelectOption,
5556
IonLabel,
57+
IonButtons,
5658
} from "@ionic/vue";
5759
import { apiInstance } from "../api";
58-
60+
import { arrowBack } from "ionicons/icons";
5961
export default {
6062
props: ["modalController"],
6163
setup(props) {
@@ -117,6 +119,7 @@ export default {
117119
onSwitchAudioClicked,
118120
playerData,
119121
onAudioDelayChanged,
122+
arrowBack,
120123
};
121124
},
122125
components: {
@@ -126,25 +129,16 @@ export default {
126129
IonTitle,
127130
IonContent,
128131
IonItem,
129-
IonFooter,
130132
IonButton,
131133
IonSelect,
132134
IonSelectOption,
133135
IonLabel,
136+
IonButtons,
134137
},
135138
};
136139
</script>
137140

138141
<style scoped>
139-
ion-footer {
140-
padding: 10px;
141-
text-align: right;
142-
}
143-
144-
ion-footer ion-button {
145-
width: 120px;
146-
}
147-
148142
.audioDelay ion-button {
149143
width: 26px;
150144
height: 26px;

src/components/infoModal.vue

+10-15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
<ion-page>
33
<ion-header>
44
<ion-toolbar>
5+
<ion-buttons slot="start">
6+
<ion-button @click="onCancelClicked">
7+
<ion-icon slot="icon-only" :icon="arrowBack"></ion-icon>
8+
</ion-button>
9+
</ion-buttons>
10+
511
<ion-title>File info</ion-title>
612
</ion-toolbar>
713
</ion-header>
@@ -126,9 +132,6 @@
126132
<ion-content class="ion-padding" v-else>
127133
<p>No playback.</p>
128134
</ion-content>
129-
<ion-footer>
130-
<ion-button @click="onCancelClicked">Close</ion-button>
131-
</ion-footer>
132135
</ion-page>
133136
</template>
134137

@@ -142,14 +145,14 @@ import {
142145
IonToolbar,
143146
IonTitle,
144147
IonContent,
145-
IonFooter,
148+
IonButtons,
146149
IonButton,
147150
IonListHeader,
148151
IonLabel,
149152
IonItem,
150153
IonList,
151154
} from "@ionic/vue";
152-
155+
import { arrowBack } from "ionicons/icons";
153156
export default {
154157
props: ["modalController"],
155158
setup(props) {
@@ -175,6 +178,7 @@ export default {
175178
subtitleTracks,
176179
onCancelClicked,
177180
formatTime,
181+
arrowBack,
178182
};
179183
},
180184
components: {
@@ -183,26 +187,17 @@ export default {
183187
IonToolbar,
184188
IonTitle,
185189
IonContent,
186-
IonFooter,
187190
IonButton,
188191
IonListHeader,
189192
IonLabel,
190193
IonItem,
191194
IonList,
195+
IonButtons,
192196
},
193197
};
194198
</script>
195199

196200
<style scoped>
197-
ion-footer {
198-
padding: 10px;
199-
text-align: right;
200-
}
201-
202-
ion-footer ion-button {
203-
width: 120px;
204-
}
205-
206201
.prop {
207202
overflow: scroll;
208203
}

src/components/openURLModal.vue

+17-20
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<ion-page>
33
<ion-header>
44
<ion-toolbar>
5+
<ion-buttons slot="start">
6+
<ion-button @click="onCancelClicked">
7+
<ion-icon slot="icon-only" :icon="arrowBack"></ion-icon>
8+
</ion-button>
9+
</ion-buttons>
510
<ion-title>Open URL</ion-title>
611
</ion-toolbar>
712
</ion-header>
@@ -20,16 +25,15 @@
2025
v-model="dialog.appendToPlaylist"
2126
></ion-checkbox>
2227
</ion-item>
23-
</ion-content>
24-
<ion-footer>
25-
<ion-button @click="onCancelClicked">Cancel</ion-button>
2628
<ion-button
29+
expand="block"
30+
style="margin-top: 10px"
2731
:disabled="dialog.filename.length == 0"
2832
color="success"
2933
@click="onAppendClicked"
30-
>Ok</ion-button
31-
>
32-
</ion-footer>
34+
>Open
35+
</ion-button>
36+
</ion-content>
3337
</ion-page>
3438
</template>
3539
<script>
@@ -44,16 +48,19 @@ import {
4448
IonCheckbox,
4549
IonItem,
4650
IonLabel,
47-
IonFooter,
4851
IonButton,
52+
IonButtons,
4953
} from "@ionic/vue";
50-
54+
import { arrowBack } from "ionicons/icons";
5155
export default {
5256
props: ["modalController"],
5357
setup(props) {
5458
const dialog = ref({
5559
filename: "",
5660
appendToPlaylist: true,
61+
"file-local-options": {
62+
"ytdl-format": "bestvideo[height<=?720]+bestaudio/best",
63+
},
5764
});
5865
const onAppendClicked = () => {
5966
props.modalController.dismiss(dialog);
@@ -63,6 +70,7 @@ export default {
6370
props.modalController.dismiss();
6471
};
6572
return {
73+
arrowBack,
6674
dialog,
6775
onAppendClicked,
6876
onCancelClicked,
@@ -78,19 +86,8 @@ export default {
7886
IonCheckbox,
7987
IonLabel,
8088
IonItem,
81-
IonFooter,
8289
IonButton,
90+
IonButtons,
8391
},
8492
};
8593
</script>
86-
87-
<style scoped>
88-
ion-footer {
89-
padding: 10px;
90-
text-align: right;
91-
}
92-
93-
ion-footer ion-button {
94-
width: 120px;
95-
}
96-
</style>

0 commit comments

Comments
 (0)