Give modals the dark app theme and close them on outside click
Build and Test / build (push) Successful in 58s
Release Docker Image / build-and-push (push) Successful in 3m49s

- Restyle the shared modal styles to the dark app palette with orange accents
- Remove light-theme overrides in Search, Sync and Settings modals
- Add outside-click close and fade transition to the Sync modal
- Use @click.self for outside-click close in all modals
- Let tall modals scroll instead of being cut off
- Darken the mobile menu to match
This commit is contained in:
Sansan committed 2026-10-04 21:35:57 +02:00
1 parent 8b5aa3adf0
commit e6d71fc77c
9 files changed
+51 -85

No files matched your search

+21 -6
View File
@@ -87,14 +87,16 @@ body {
top: 0; top: 0;
width: 100%; /* Full width */ width: 100%; /* Full width */
height: 100%; /* Full height */ height: 100%; /* Full height */
overflow: hidden; overflow-y: auto; /* Scroll tall modals instead of cutting them off */
background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */ background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
} }
.modalContainer { .modalContainer {
background-color: #eeeeee; background-color: #333;
color: white;
margin: 10% auto; /* 15% from the top and centered */ margin: 10% auto; /* 15% from the top and centered */
border: 1px solid #888; border: 1px solid #ff9c00;
border-radius: 10px;
width: 50%; /* Could be more or less, depending on screen size */ width: 50%; /* Could be more or less, depending on screen size */
} }
.modalWrapper { .modalWrapper {
@@ -114,16 +116,29 @@ body {
top: 8px; top: 8px;
cursor: pointer; cursor: pointer;
opacity: 70%; opacity: 70%;
font-size: 2rem;
line-height: 1;
color: #ff9c00;
}
/* The close icon is a black svg, recolor it to the app's orange */
img.closeModalImg {
filter: invert(66%) sepia(96%) saturate(2783%) hue-rotate(1deg) brightness(105%) contrast(103%);
}
.closeModalImg:hover {
opacity: 100%;
} }
.modal h1 { .modal h1 {
color: black; color: white;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
padding-top: 10px; padding-top: 10px;
font-size: 1.9rem; font-size: 1.9rem;
} }
.modal p { .modal p {
color: black; color: white;
}
.modal a {
color: #ff9c00;
} }
@media only screen and (max-width: 1000px) { @media only screen and (max-width: 1000px) {
+9 -12
View File
@@ -1,6 +1,6 @@
<template> <template>
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<span class="closeModalImg" @click="closeModal">&times;</span> <span class="closeModalImg" @click="closeModal">&times;</span>
@@ -68,11 +68,6 @@ export default {
this.searchTimeout = null; this.searchTimeout = null;
} }
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
debouncedSearch() { debouncedSearch() {
// Clear existing timeout // Clear existing timeout
if (this.searchTimeout) { if (this.searchTimeout) {
@@ -160,7 +155,9 @@ export default {
width: 100%; width: 100%;
padding: 12px; padding: 12px;
font-size: 1.1rem; font-size: 1.1rem;
border: 1px solid #ccc; border: 1px solid #777;
background-color: rgb(66, 66, 66);
color: white;
border-radius: 5px; border-radius: 5px;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -178,7 +175,7 @@ export default {
} }
.loading { .loading {
color: #666; color: #bbb;
font-style: italic; font-style: italic;
text-align: center; text-align: center;
padding: 20px; padding: 20px;
@@ -191,19 +188,19 @@ export default {
.resultItem { .resultItem {
padding: 12px; padding: 12px;
margin-bottom: 8px; margin-bottom: 8px;
background-color: #f8f8f8; background-color: rgb(66, 66, 66);
border: 1px solid #ddd; border: 1px solid #555;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
transition: background-color 0.2s; transition: background-color 0.2s;
} }
.resultItem:hover { .resultItem:hover {
background-color: #e8e8e8; background-color: #555;
} }
.noResults { .noResults {
color: #666; color: #bbb;
text-align: center; text-align: center;
padding: 20px; padding: 20px;
font-style: italic; font-style: italic;
+12 -32
View File
@@ -1,5 +1,6 @@
<template> <template>
<div class="modal" v-if="isOpen"> <transition name="modalAni">
<div class="modal" v-if="isOpen" @click.self="closeModal">
<div class="modalContainer syncProgressContainer"> <div class="modalContainer syncProgressContainer">
<span class="closeModalImg" @click="closeModal">&times;</span> <span class="closeModalImg" @click="closeModal">&times;</span>
<h1>Sync in Progress</h1> <h1>Sync in Progress</h1>
@@ -62,6 +63,7 @@
</div> </div>
</div> </div>
</div> </div>
</transition>
</template> </template>
<script> <script>
@@ -211,48 +213,26 @@ export default {
<style scoped> <style scoped>
.syncProgressContainer { .syncProgressContainer {
background-color: #eeeeee; position: relative;
margin: 10% auto;
border: 1px solid #888;
width: 70%; width: 70%;
max-width: 800px; max-width: 800px;
padding: 20px; padding: 20px;
border-radius: 10px; box-sizing: border-box;
}
.closeModalImg {
position: absolute;
right: 8px;
top: 8px;
cursor: pointer;
opacity: 70%;
font-size: 2rem;
color: #555;
}
.closeModalImg:hover {
opacity: 100%;
} }
.syncProgressContainer h1 { .syncProgressContainer h1 {
color: black;
margin-left: auto;
margin-right: auto;
padding-top: 10px;
font-size: 1.9rem;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.syncProgressContainer h2 { .syncProgressContainer h2 {
color: black; color: white;
text-align: center; text-align: center;
font-size: 1.5rem; font-size: 1.5rem;
margin-bottom: 15px; margin-bottom: 15px;
} }
.syncProgressContainer p { .syncProgressContainer p {
color: black;
text-align: center; text-align: center;
} }
@@ -266,7 +246,7 @@ export default {
.progressBarContainer { .progressBarContainer {
width: 100%; width: 100%;
height: 30px; height: 30px;
background-color: #ddd; background-color: rgb(66, 66, 66);
border-radius: 15px; border-radius: 15px;
overflow: hidden; overflow: hidden;
margin-bottom: 10px; margin-bottom: 10px;
@@ -290,7 +270,7 @@ export default {
.timeText { .timeText {
font-size: 1rem; font-size: 1rem;
color: #666; color: #bbb;
} }
.resultsSection { .resultsSection {
@@ -301,7 +281,7 @@ export default {
.resultItem { .resultItem {
margin-bottom: 20px; margin-bottom: 20px;
padding: 10px; padding: 10px;
background-color: #f8f8f8; background-color: rgb(66, 66, 66);
border-radius: 8px; border-radius: 8px;
border-left: 4px solid #4CAF50; border-left: 4px solid #4CAF50;
} }
@@ -311,7 +291,7 @@ export default {
} }
.resultItem h3 { .resultItem h3 {
color: #333; color: white;
font-size: 1.1rem; font-size: 1.1rem;
margin-bottom: 8px; margin-bottom: 8px;
} }
@@ -324,12 +304,12 @@ export default {
.soundtrackList li { .soundtrackList li {
padding: 3px 0; padding: 3px 0;
color: #555; color: #ddd;
} }
.noChanges { .noChanges {
text-align: center; text-align: center;
color: #666; color: #bbb;
font-style: italic; font-style: italic;
padding: 20px; padding: 20px;
} }
+1 -6
View File
@@ -1,6 +1,6 @@
<template> <template>
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<img <img
@@ -46,11 +46,6 @@ export default {
openModal() { openModal() {
this.show = true; this.show = true;
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
}, },
}; };
</script> </script>
+2 -7
View File
@@ -1,6 +1,6 @@
<template> <template>
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<img <img
@@ -50,11 +50,6 @@ export default {
this.show = true; this.show = true;
await this.fetchCharacters(); await this.fetchCharacters();
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
async fetchCharacters() { async fetchCharacters() {
this.isLoading = true; this.isLoading = true;
try { try {
@@ -150,7 +145,7 @@ export default {
text-align: center; text-align: center;
padding: 40px; padding: 40px;
font-size: 1.2rem; font-size: 1.2rem;
color: #666; color: #bbb;
} }
@media only screen and (max-width: 1000px) { @media only screen and (max-width: 1000px) {
+2 -1
View File
@@ -109,7 +109,8 @@ export default {
} }
.mobileMenuContainer { .mobileMenuContainer {
background-color: #c4c4c4; background-color: #333;
color: white;
width: 80vw; width: 80vw;
height: 100%; height: 100%;
margin-left: 20%; margin-left: 20%;
+2 -9
View File
@@ -1,7 +1,7 @@
<template> <template>
<!-- Round Settings, Stop after current, Don't hide title --> <!-- Round Settings, Stop after current, Don't hide title -->
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<img <img
@@ -98,11 +98,6 @@ export default {
openModal() { openModal() {
this.show = true; this.show = true;
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
updateOptionHideTitle() { updateOptionHideTitle() {
if (this.checkboxHideTitle) { if (this.checkboxHideTitle) {
this.$store.dispatch("updateHideNextTitle", true); this.$store.dispatch("updateHideNextTitle", true);
@@ -165,6 +160,7 @@ export default {
margin-top: 20px; margin-top: 20px;
} }
.checkboxDiv input { .checkboxDiv input {
accent-color: #ff9c00;
transform: scale(1.3); transform: scale(1.3);
} }
.checkboxDiv label { .checkboxDiv label {
@@ -181,9 +177,6 @@ export default {
display: flex; display: flex;
width: 50px; width: 50px;
height: 33px; height: 33px;
background: rgb(16, 99, 194);
color: rgb(235, 235, 235);
border-color: rgb(161, 161, 161);
justify-content: center; justify-content: center;
align-items: center; align-items: center;
line-height: 0; line-height: 0;
+1 -6
View File
@@ -1,6 +1,6 @@
<template> <template>
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<img <img
@@ -35,11 +35,6 @@ export default {
openModal() { openModal() {
this.show = true; this.show = true;
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
}, },
}; };
</script> </script>
+1 -6
View File
@@ -1,6 +1,6 @@
<template> <template>
<transition name="modalAni"> <transition name="modalAni">
<div v-if="show" class="modal" @click="checkIfClickShouldCloseModal"> <div v-if="show" class="modal" @click.self="closeModal">
<div class="modalContainer"> <div class="modalContainer">
<div class="modalWrapper"> <div class="modalWrapper">
<img <img
@@ -38,11 +38,6 @@ export default {
this.playerName = playerName; this.playerName = playerName;
this.show = true; this.show = true;
}, },
checkIfClickShouldCloseModal(event) {
if (event.target.classList[0] === "modal") {
this.closeModal();
}
},
}, },
}; };
</script> </script>