Skip to content

Commit

Permalink
whattheduck,web: Fix Inducks story link
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Sep 29, 2024
1 parent c507536 commit c001551
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions apps/dumili/src/components/Entry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"{numberOfStories} histoires trouvées avec ces mots-clés",
{
numberOfStories: pages[0].aiOcrPossibleStories.length,
},
}
)
}}
<table-tooltip
Expand Down Expand Up @@ -133,7 +133,7 @@
&nbsp;<a
v-if="urlEncodedStorycode"
target="_blank"
:href="`https://coa.inducks.org/story.php?c=${urlEncodedStorycode}`"
:href="`https://inducks.org/story.php?c=${urlEncodedStorycode}`"
>
{{ $t("Détails de l'histoire") }}
</a>
Expand Down Expand Up @@ -164,10 +164,10 @@ const { indexation, acceptedStories, acceptedStoryKinds, entriesFirstPages } =
const pages = computed(() => {
const { startsAtPage, endsAtPage } = entriesFirstPages.value.find(
({ entryId }) => entry.value.id === entryId,
({ entryId }) => entry.value.id === entryId
)!;
return indexation.value!.pages.filter(
({ pageNumber }) => pageNumber >= startsAtPage && pageNumber <= endsAtPage,
({ pageNumber }) => pageNumber >= startsAtPage && pageNumber <= endsAtPage
);
});
Expand All @@ -177,16 +177,16 @@ const acceptedStory = computed(() => acceptedStories.value[props.entry.id]);
const storyKindAiSuggestion = computed(() =>
entry.value.storyKindSuggestions.find(
({ aiSourcePageId }) => aiSourcePageId !== null,
),
({ aiSourcePageId }) => aiSourcePageId !== null
)
);
const storyAiSuggestions = computed(() =>
entry.value.storySuggestions.filter(({ ocrDetailsId }) => ocrDetailsId),
entry.value.storySuggestions.filter(({ ocrDetailsId }) => ocrDetailsId)
);
const acceptedStoryKind = computed(
() => acceptedStoryKinds.value[props.entry.id],
() => acceptedStoryKinds.value[props.entry.id]
);
const storycode = computed(() => acceptedStory.value?.storyversion.storycode);
Expand All @@ -195,15 +195,15 @@ const title = computed(() => entry.value.title || $t("Sans titre"));
const comment = computed(() => entry.value.entrycomment);
const urlEncodedStorycode = computed(
() => storycode.value && encodeURIComponent(storycode.value),
() => storycode.value && encodeURIComponent(storycode.value)
);
const getStoryKind = (storyKind: storyKind) =>
storyKinds.find(({ code }) => code === storyKind)?.label;
const acceptStoryKindSuggestion = (kind: storyKind) => {
getIndexationSocket(
entry.value.indexationId,
entry.value.indexationId
).services.acceptStoryKindSuggestion({
entryId: entry.value.id,
kind,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/InducksStory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const tagName = computed(() => (showLink.value === "outer" ? "a" : "span"));
const url = computed(
() =>
storycode.value &&
`https://coa.inducks.org/story.php?c=${encodeURIComponent(storycode.value)}`,
`https://inducks.org/story.php?c=${encodeURIComponent(storycode.value)}`
);
const storyTypeText = computed(() => {
Expand Down

0 comments on commit c001551

Please sign in to comment.