diff --git a/apps/dumili/src/components/Entry.vue b/apps/dumili/src/components/Entry.vue
index f20421bee..983e03a10 100644
--- a/apps/dumili/src/components/Entry.vue
+++ b/apps/dumili/src/components/Entry.vue
@@ -232,6 +232,11 @@ const getStoryKind = (storyKind: storyKind) => storyKinds[storyKind];
:deep(.btn-group .btn),
:deep(.dropdown-item) {
color: black;
+
+ &:hover {
+ background: #ddd;
+ }
+
&.kind-c {
@include storyKindBackground(#ffcc33);
}
diff --git a/apps/dumili/src/components/Gallery.vue b/apps/dumili/src/components/Gallery.vue
index c6c524cd4..2dc89f122 100644
--- a/apps/dumili/src/components/Gallery.vue
+++ b/apps/dumili/src/components/Gallery.vue
@@ -10,7 +10,8 @@
class="overflow-y-auto"
>
{
emit("selected", id);
}
});
+
+watch(
+ () => ui().currentPage,
+ (currentPage) => {
+ document.getElementById(`page-image-${currentPage}`)?.scrollIntoView();
+ },
+);
diff --git a/apps/dumili/src/components/TableOfContents.vue b/apps/dumili/src/components/TableOfContents.vue
index 9f705b3f9..8741603bf 100644
--- a/apps/dumili/src/components/TableOfContents.vue
+++ b/apps/dumili/src/components/TableOfContents.vue
@@ -11,7 +11,7 @@
{{ $t("Méta-données") }}
;
-const currentPage = defineModel();
+const { currentPage } = storeToRefs(ui());
const { runKumikoOnPage, runKumiko } = useAi();
@@ -289,14 +289,9 @@ watch(
}
:deep(.entry) {
- outline: 1px solid black;
margin-top: 1px;
cursor: pointer;
- &.current {
- outline-width: 2px;
- }
-
&:first-child {
margin-top: 0;
}
diff --git a/apps/dumili/src/pages/indexation/[id].vue b/apps/dumili/src/pages/indexation/[id].vue
index d49c6ae5d..dfb9c651c 100644
--- a/apps/dumili/src/pages/indexation/[id].vue
+++ b/apps/dumili/src/pages/indexation/[id].vue
@@ -23,7 +23,7 @@
v-else-if="activeTab === 'book' && coverRatio"
ref="bookComponent"
v-model:book="book"
- v-model:current-page="bookCurrentPage"
+ v-model:current-page="currentPage"
v-model:opened="isBookOpened"
:cover-ratio="coverRatio"
:pages="indexation.pages.filter(({ url }) => url)"
@@ -79,11 +79,7 @@
-
+
@@ -93,14 +89,13 @@ import { components as webComponents, type PageFlip } from "~web";
import { suggestions } from "~/stores/suggestions";
import { tabs } from "~/stores/tabs";
import { ui } from "~/stores/ui";
-import { FullIndexation } from "~dumili-services/indexation/types";
-import { aiKumikoResultPanel, aiOcrResult } from "~prisma/client_dumili";
+import type { FullIndexation } from "~dumili-services/indexation/types";
+import type { aiKumikoResultPanel, aiOcrResult } from "~prisma/client_dumili";
import { getEntryPages } from "~dumili-utils/entryPages";
const { Book } = webComponents;
const book = ref(undefined);
-const bookCurrentPage = ref(0);
const isBookOpened = ref(true);
const reRenderNumber = ref();
@@ -109,8 +104,12 @@ const route = useRoute();
const { t: $t } = useI18n();
-const { hoveredEntry, hoveredEntryPageNumbers, showAiDetectionsOn } =
- storeToRefs(ui());
+const {
+ hoveredEntry,
+ hoveredEntryPageNumbers,
+ currentPage,
+ showAiDetectionsOn,
+} = storeToRefs(ui());
const { activeTab } = storeToRefs(tabs());
const activeTabIndex = computed({
get() {
@@ -161,7 +160,7 @@ const shownPages = computed(() =>
book.value?.getPageCollection()
? [
...new Set([
- bookCurrentPage.value,
+ currentPage.value,
book.value!.getPageCollection().getCurrentSpreadIndex() * 2,
]),
]
diff --git a/apps/dumili/src/stores/ui.ts b/apps/dumili/src/stores/ui.ts
index a9f9aaf21..8d0f3c8c7 100644
--- a/apps/dumili/src/stores/ui.ts
+++ b/apps/dumili/src/stores/ui.ts
@@ -7,6 +7,7 @@ export const ui = defineStore("ui", () => {
const { indexation } = storeToRefs(suggestions());
const hoveredEntry = ref(null);
const currentEntry = ref();
+ const currentPage = ref(0);
watch(
indexation,
@@ -20,6 +21,7 @@ export const ui = defineStore("ui", () => {
showAiDetectionsOn: ref<{ type: "page" | "entry"; id: number } | undefined>(
undefined,
),
+ currentPage,
currentEntry,
hoveredEntry,
hoveredEntryPageNumbers: computed(