cleanup custom css colors

This commit is contained in:
zurdi
2023-08-19 12:12:29 +02:00
parent 9e8d5d6548
commit 3375c0cb2a
19 changed files with 139 additions and 118 deletions

View File

@@ -9,7 +9,7 @@ const scanning = storeScanning();
<template>
<v-app-bar elevation="1" density="comfortable">
<v-progress-linear
color="rommAccent1"
color="romm-accent-1"
:active="scanning.value"
:indeterminate="true"
absolute

View File

@@ -24,7 +24,7 @@ emitter.on("showLoadingDialog", (args) => {
<v-progress-circular
:width="3"
:size="70"
color="rommAccent1"
color="romm-accent-1"
indeterminate
/>
</v-card-text>

View File

@@ -83,12 +83,12 @@ async function deleteRom() {
<v-card-text>
<v-row class="justify-center pa-2" no-gutters>
<span class="mr-1">Deleting</span>
<span class="text-rommAccent1">{{ rom.file_name }}</span
<span class="text-romm-accent-1">{{ rom.file_name }}</span
>.<span class="ml-1">Do you confirm?</span>
</v-row>
<v-row class="justify-center pa-2" no-gutters>
<v-btn @click="show = false" class="bg-terciary">Cancel</v-btn>
<v-btn @click="deleteRom()" class="text-rommRed bg-terciary ml-5"
<v-btn @click="deleteRom()" class="text-romm-red bg-terciary ml-5"
>Confirm</v-btn
>
</v-row>

View File

@@ -148,7 +148,7 @@ async function updateRom(updatedData = { ...rom.value }) {
<v-btn @click="show = false" class="bg-terciary">Cancel</v-btn>
<v-btn
@click="updateRom()"
class="text-rommGreen ml-5 bg-terciary"
class="text-romm-green ml-5 bg-terciary"
>Apply</v-btn
>
</v-row>

View File

@@ -98,7 +98,7 @@ onBeforeUnmount(() => {
<v-item v-slot="{ isSelected, toggle }">
<v-chip
class="mx-1"
:color="isSelected ? 'rommAccent1' : 'rommGray'"
:color="isSelected ? 'romm-accent-1' : 'rommGray'"
variant="outlined"
label
@click="toggle"
@@ -107,17 +107,17 @@ onBeforeUnmount(() => {
</v-item>
<!-- TODO: Ready item group to scrap from different sources -->
<!-- <v-item v-slot="{ isSelected, toggle }" disabled>
<v-chip class="mx-1" :color="isSelected ? 'rommAccent1' : 'rommGray'" variant="outlined" label @click="toggle"
<v-chip class="mx-1" :color="isSelected ? 'romm-accent-1' : 'rommGray'" variant="outlined" label @click="toggle"
>ScreenScraper</v-chip
>
</v-item>
<v-item v-slot="{ isSelected, toggle }" disabled>
<v-chip class="mx-1" :color="isSelected ? 'rommAccent1' : 'rommGray'" variant="outlined" label @click="toggle"
<v-chip class="mx-1" :color="isSelected ? 'romm-accent-1' : 'rommGray'" variant="outlined" label @click="toggle"
>MobyGames</v-chip
>
</v-item>
<v-item v-slot="{ isSelected, toggle }" disabled>
<v-chip class="mx-1" :color="isSelected ? 'rommAccent1' : 'rommGray'" variant="outlined" label @click="toggle"
<v-chip class="mx-1" :color="isSelected ? 'romm-accent-1' : 'rommGray'" variant="outlined" label @click="toggle"
>RAWG</v-chip
>
</v-item> -->
@@ -185,7 +185,7 @@ onBeforeUnmount(() => {
<v-progress-circular
:width="2"
:size="40"
color="rommAccent1"
color="romm-accent-1"
indeterminate
/>
</v-row>

View File

@@ -95,7 +95,7 @@ async function createUser() {
<v-btn @click="show = false" class="bg-terciary">Cancel</v-btn>
<v-btn
:disabled="!user.username || !user.password"
class="text-rommGreen bg-terciary ml-5"
class="text-romm-green bg-terciary ml-5"
@click="createUser()"
>
Create

View File

@@ -51,12 +51,12 @@ async function deleteUser() {
<v-card-text>
<v-row class="justify-center pa-2" no-gutters>
<span class="mr-1">Deleting</span
><span class="text-rommAccent1">{{ user.username }}</span
><span class="text-romm-accent-1">{{ user.username }}</span
>.<span class="ml-1">Do you confirm?</span>
</v-row>
<v-row class="justify-center pa-2" no-gutters>
<v-btn @click="show = false" class="bg-terciary">Cancel</v-btn>
<v-btn class="bg-terciary text-rommRed ml-5" @click="deleteUser()"
<v-btn class="bg-terciary text-romm-red ml-5" @click="deleteUser()"
>Confirm</v-btn
>
</v-row>

View File

@@ -91,7 +91,7 @@ function editUser() {
</v-row>
<v-row class="justify-center pa-2" no-gutters>
<v-btn @click="show = false" class="bg-terciary">Cancel</v-btn>
<v-btn class="text-rommGreen bg-terciary ml-5" @click="editUser()"
<v-btn class="text-romm-green bg-terciary ml-5" @click="editUser()"
>Apply</v-btn
>
</v-row>

View File

@@ -8,24 +8,45 @@ const props = defineProps(["rom"]);
<template>
<v-hover v-slot="{ isHovering, props }">
<v-card
v-bind="props"
:class="{ 'on-hover': isHovering }"
:elevation="isHovering ? 20 : 3"
>
<v-hover v-slot="{ isHovering, props }" open-delay="800">
<cover :rom="rom" :isHovering="isHovering" :hoverProps="props" />
<action-bar :rom="rom" />
</v-hover>
</v-card>
<v-item v-slot="{ isSelected, toggle }">
<v-card
v-bind="props"
class="rom-card"
:class="{ 'on-hover': isHovering, 'rom-selected': isSelected }"
:elevation="isHovering ? 20 : 3"
@click="toggle"
>
<v-hover v-slot="{ isHovering, props }" open-delay="800">
<v-icon style="bottom: 3.1rem; right: 0.6rem" class="position-absolute checkbox" :class="{ 'checkbox-selected': isSelected }" >{{ isSelected ? 'mdi-circle-slice-8' : 'mdi-circle-outline' }}</v-icon>
<cover :rom="rom" :isHovering="isHovering" :hoverProps="props" />
<action-bar :rom="rom" />
</v-hover>
</v-card>
</v-item>
</v-hover>
</template>
<style scoped>
<style scoped lang="scss">
.checkbox{
z-index: 1000 !important;
}
.checkbox.checkbox-selected{
bottom: 2.9rem !important;
right: 0.4rem !important;
}
.v-card.on-hover {
opacity: 1;
}
.v-card:not(.on-hover) {
opacity: 0.85;
}
.rom-card.rom-selected {
border: 3px solid rgba(var(--v-theme-romm-accent-2));
padding: 0;
}
.rom-card:not(.rom-selected) {
padding: 3px;
}
</style>

View File

@@ -13,7 +13,7 @@ const props = defineProps(["rom", "isHovering", "hoverProps", "size"]);
:to="`/platform/${$route.params.platform}/${rom.id}`"
>
<v-progress-linear
color="rommAccent1"
color="romm-accent-1"
:active="downloadStore.value.includes(rom.id)"
:indeterminate="true"
absolute
@@ -29,7 +29,7 @@ const props = defineProps(["rom", "isHovering", "hoverProps", "size"]);
>
<template v-slot:placeholder>
<div class="d-flex align-center justify-center fill-height">
<v-progress-circular color="rommAccent1" :width="2" indeterminate />
<v-progress-circular color="romm-accent-1" :width="2" indeterminate />
</div>
</template>
<v-expand-transition>

View File

@@ -76,7 +76,7 @@ function rowClick(_, row) {
<template v-slot:item.path_cover_s="{ item }">
<v-avatar :rounded="0">
<v-progress-linear
color="rommAccent1"
color="romm-accent-1"
:active="downloadStore.value.includes(item.selectable.id)"
:indeterminate="true"
absolute

View File

@@ -1,3 +1,14 @@
const commonColors = {
"romm-accent-1": "#a452fe",
"romm-accent-2": "#c400f7",
"romm-accent-3": "#3808a4",
"romm-red": "#da3633",
"romm-green": "#3FB950",
"romm-white": "#fefdfe",
"romm-black": "#000000",
};
export const rommDark = {
dark: true,
colors: {
@@ -10,15 +21,7 @@ export const rommDark = {
tooltip: "#202832",
chip: "#161b22",
rommAccent1: "#a452fe",
rommAccent2: "#c400f7",
rommAccent3: "#3808a4",
rommRed: "#da3633",
rommGreen: "#3FB950",
rommWhite: "#fefdfe",
rommBlack: "#000000",
rommGray: "#808080"
...commonColors,
},
};
@@ -34,18 +37,11 @@ export const rommLight = {
tooltip: "#fefdfe",
chip: "#fefdfe",
rommAccent1: "#a452fe",
rommAccent2: "#c400f7",
rommAccent3: "#3808a4",
rommRed: "#da3633",
rommGreen: "#3FB950",
rommWhite: "#fefdfe",
rommBlack: "#000000",
rommGray: "#808080"
...commonColors,
},
};
export const themes = {
0: 'rommDark',
1: 'rommLight'

View File

@@ -68,7 +68,7 @@ onBeforeMount(async () => {
elevation="2"
:loading="
downloadStore.value.includes(rom.id)
? 'rommAccent1'
? 'romm-accent-1'
: null
"
>
@@ -80,7 +80,7 @@ onBeforeMount(async () => {
<template v-slot:placeholder>
<div class="d-flex align-center justify-center fill-height">
<v-progress-circular
color="rommAccent1"
color="romm-accent-1"
:width="2"
:size="20"
indeterminate
@@ -188,7 +188,7 @@ onBeforeMount(async () => {
'details-content-mobile': xs,
}"
>
<v-tabs v-model="tab" slider-color="rommAccent1" rounded="0">
<v-tabs v-model="tab" slider-color="romm-accent-1" rounded="0">
<v-tab value="details" rounded="0">Details</v-tab>
<v-tab value="saves" rounded="0" disabled
>Saves<span class="text-caption text-truncate ml-1"
@@ -324,7 +324,7 @@ onBeforeMount(async () => {
<v-carousel
hide-delimiter-background
delimiter-icon="mdi-square"
class="bg-rommBlack"
class="bg-romm-black"
show-arrows="hover"
height="400"
>

View File

@@ -28,6 +28,7 @@ const scanning = storeScanning();
const cursor = ref("");
const searchCursor = ref("");
const scrollOnTop = ref(true);
const selectedRoms = ref([]);
// Event listeners bus
const emitter = inject("emitter");
@@ -61,7 +62,7 @@ async function scan() {
emitter.emit("snackbarShow", {
msg: `Scanning ${route.params.platform}...`,
icon: "mdi-loading mdi-spin",
color: "rommAccent1",
color: "romm-accent-1",
});
if (!socket.connected) socket.connect();
@@ -125,9 +126,8 @@ function onFilterChange() {
}
function onScroll() {
const { scrollTop, scrollHeight, clientHeight } = document.documentElement;
scrollOnTop.value = scrollTop == 0 // Check scroll position to show fab to top
scrollOnTop.value = scrollTop == 0; // Check scroll position to show fab to top
if (cursor.value === null && searchCursor.value === null) return;
@@ -178,26 +178,28 @@ onBeforeRouteUpdate(async (to, _) => {
<template v-if="filteredRoms.length > 0">
<!-- Gallery cards view -->
<v-row no-gutters v-scroll="onScroll">
<v-col
v-show="galleryView.value != 2"
v-for="rom in filteredRoms"
class="pa-1"
:key="rom.id"
:cols="views[galleryView.value]['size-cols']"
:xs="views[galleryView.value]['size-xs']"
:sm="views[galleryView.value]['size-sm']"
:md="views[galleryView.value]['size-md']"
:lg="views[galleryView.value]['size-lg']"
>
<game-card :rom="rom" />
</v-col>
<v-item-group v-model="selectedRoms" multiple>
<v-row no-gutters v-scroll="onScroll">
<v-col
v-show="galleryView.value != 2"
v-for="rom in filteredRoms"
class="pa-1"
:key="rom.id"
:cols="views[galleryView.value]['size-cols']"
:xs="views[galleryView.value]['size-xs']"
:sm="views[galleryView.value]['size-sm']"
:md="views[galleryView.value]['size-md']"
:lg="views[galleryView.value]['size-lg']"
>
<game-card :rom="rom" />
</v-col>
<!-- Gallery list view -->
<v-col v-show="galleryView.value == 2">
<game-data-table :filteredRoms="filteredRoms" />
</v-col>
</v-row>
<!-- Gallery list view -->
<v-col v-show="galleryView.value == 2">
<game-data-table :filteredRoms="filteredRoms" />
</v-col>
</v-row>
</v-item-group>
</template>
<!-- Empty gallery message -->
@@ -242,4 +244,8 @@ onBeforeRouteUpdate(async (to, _) => {
#gallery-app-bar {
z-index: 999 !important;
}
.game-card.game-selected {
border: 2px solid rgba(var(--v-theme-romm-accent-2));
padding: 0;
}
</style>

View File

@@ -42,7 +42,7 @@ onMounted(async () => {
<v-progress-linear
id="scan-progress-bar"
color="rommAccent1"
color="romm-accent-1"
:active="scanning.value"
:indeterminate="true"
absolute

View File

@@ -125,7 +125,7 @@ async function scan() {
>Scan
<template v-slot:loader>
<v-progress-circular
color="rommAccent1"
color="romm-accent-1"
:width="2"
:size="20"
indeterminate
@@ -136,7 +136,7 @@ async function scan() {
<v-divider
class="border-opacity-100 ma-4"
color="rommAccent1"
color="romm-accent-1"
:thickness="1"
/>

View File

@@ -13,7 +13,7 @@ const ROMM_VERSION = version.version;
<template>
<!-- Settings tabs -->
<v-app-bar elevation="0" density="compact">
<v-tabs v-model="tab" slider-color="rommAccent1" class="bg-primary">
<v-tabs v-model="tab" slider-color="romm-accent-1" class="bg-primary">
<v-tab v-if="auth?.user" value="users" rounded="0">Users</v-tab>
<v-tab value="ui" rounded="0">User Interface</v-tab>
</v-tabs>
@@ -41,7 +41,7 @@ const ROMM_VERSION = version.version;
<v-bottom-navigation :elevation="0" height="36" class="text-caption">
<v-row class="align-center justify-center" no-gutters>
<span class="text-rommAccent1">RomM</span>
<span class="text-romm-accent-1">RomM</span>
<span class="ml-1">{{ ROMM_VERSION }}</span>
</v-row>
</v-bottom-navigation>

View File

@@ -30,45 +30,43 @@ function toggleTheme() {
v-model="selectedTheme"
@update:model-value="toggleTheme"
>
<v-radio-group v-model="selectedTheme" hide-details>
<v-row no-gutters>
<v-col key="dark" cols="6" sm="3" md="2" lg="2" class="px-2">
<v-item v-slot="{ isSelected, toggle }">
<v-card
:color="isSelected ? 'rommAccent1' : 'rommGray'"
class="d-flex align-center"
height="50"
variant="outlined"
@click="toggle"
>
<v-scroll-y-transition>
<div class="text-subtitle-2 flex-grow-1 text-center">
<v-icon class="mr-2">mdi-moon-waning-crescent</v-icon>Dark
Theme
</div>
</v-scroll-y-transition>
</v-card>
</v-item>
</v-col>
<v-col key="light" cols="6" sm="3" md="2" lg="2" class="px-2">
<v-item v-slot="{ isSelected, toggle }">
<v-card
:color="isSelected ? 'rommAccent1' : 'rommGray'"
class="d-flex align-center"
height="50"
variant="outlined"
@click="toggle"
>
<v-scroll-y-transition>
<div class="text-subtitle-2 flex-grow-1 text-center">
<v-icon class="mr-2">mdi-weather-sunny</v-icon>Light Theme
</div>
</v-scroll-y-transition>
</v-card>
</v-item>
</v-col>
</v-row>
</v-radio-group>
<v-row no-gutters>
<v-col key="dark" cols="6" sm="3" md="2" lg="2" class="px-2">
<v-item v-slot="{ isSelected, toggle }">
<v-card
:color="isSelected ? 'romm-accent-1' : 'rommGray'"
class="d-flex align-center"
height="50"
variant="outlined"
@click="toggle"
>
<v-scroll-y-transition>
<div class="text-subtitle-2 flex-grow-1 text-center">
<v-icon class="mr-2">mdi-moon-waning-crescent</v-icon>Dark
Theme
</div>
</v-scroll-y-transition>
</v-card>
</v-item>
</v-col>
<v-col key="light" cols="6" sm="3" md="2" lg="2" class="px-2">
<v-item v-slot="{ isSelected, toggle }">
<v-card
:color="isSelected ? 'romm-accent-1' : 'rommGray'"
class="d-flex align-center"
height="50"
variant="outlined"
@click="toggle"
>
<v-scroll-y-transition>
<div class="text-subtitle-2 flex-grow-1 text-center">
<v-icon class="mr-2">mdi-weather-sunny</v-icon>Light Theme
</div>
</v-scroll-y-transition>
</v-card>
</v-item>
</v-col>
</v-row>
</v-item-group>
</v-card-text>
</v-card>

View File

@@ -52,7 +52,7 @@ onMounted(() => {
<v-btn
prepend-icon="mdi-plus"
variant="outlined"
class="text-rommAccent1"
class="text-romm-accent-1"
@click="emitter.emit('showCreateUserDialog')"
>
Add user
@@ -100,7 +100,7 @@ onMounted(() => {
<v-btn
size="small"
rounded="0"
class="bg-terciary text-rommRed"
class="bg-terciary text-romm-red"
@click="emitter.emit('showDeleteUserDialog', item.raw)"
><v-icon>mdi-delete</v-icon></v-btn
>