Book form: can now click "start read" even when the book is marked as read

It will do the same behavior as clicking on the "read" button again to
cancel it.
This commit is contained in:
2026-03-08 19:00:40 +01:00
parent 0d591c0fa9
commit aee6fbaf73
4 changed files with 9 additions and 17 deletions

View File

@@ -5,16 +5,13 @@ const props = defineProps({
icon: String,
legend: String,
isSet: Boolean,
isReadonly: Boolean,
})
const hovered = ref(false)
const isOnMobile = ref(computeIsOnMobile())
const computedIcon = computed(
() =>
props.icon +
(!props.isReadonly && ((hovered.value && !isOnMobile.value) || props.isSet) ? 'Fill' : ''),
() => props.icon + ((hovered.value && !isOnMobile.value) || props.isSet ? 'Fill' : ''),
)
function computeIsOnMobile() {
@@ -34,8 +31,7 @@ onUnmounted(() => {
<template>
<div
class="bigiconandlegend"
:class="props.isReadonly ? 'widget-readonly' : 'showcanclick'"
class="bigiconandlegend showcanclick"
@mouseover="hovered = true"
@mouseout="hovered = false"
>
@@ -79,10 +75,6 @@ onUnmounted(() => {
padding-bottom: 30px;
}
.widget-readonly {
opacity: 50%;
}
@media (max-width: 1024px) {
.bigicon {
flex: 1;