Skip to content

Commit 0d1484a

Browse files
authored
Désactive les ancres de thématiques lorsqu'on est sur l'onglet "Notes" (#483)
* disable anchor links when on notes tab * update changelog
1 parent 62639c6 commit 0d1484a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

confiture-web-app/src/assets/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Tous les changements notables de Ara sont documentés ici avec leur date, leur c
77
### Corrections 🐛
88

99
- Si l’URL du site n’est pas renseignée, utilise l’URL de la première page auditée ([#487](https://github.com/DISIC/Ara/pull/487))
10+
- Corrige le problème de disparition d’onglet lorsqu’on utilise les ancres depuis l’onglet "Notes" lors de la génération ([#483](https://github.com/DISIC/Ara/pull/483))
1011

1112
## 08/09/2023
1213

confiture-web-app/src/components/AuditGenerationFilters.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { computed, watch, nextTick } from "vue";
33
import { ref } from "vue";
4-
import { useFiltersStore, useResultsStore } from "../store";
4+
import { useAuditStore, useFiltersStore, useResultsStore } from "../store";
55
import { pluralize } from "../utils";
66
77
defineProps<{
@@ -14,6 +14,7 @@ const emit = defineEmits<{
1414
1515
const filterStore = useFiltersStore();
1616
const resultStore = useResultsStore();
17+
const auditStore = useAuditStore();
1718
1819
const resultsCount = computed(() =>
1920
filterStore.filteredTopics
@@ -183,8 +184,10 @@ watch(
183184
:style="{ '--topic-filter-value': topic.value + '%' }"
184185
>
185186
<a
186-
:href="`#${topic.number}`"
187+
:href="auditStore.currentPageId ? `#${topic.number}` : undefined"
187188
class="fr-py-1w fr-px-1w fr-mb-2v topic-filter-anchor"
189+
:aria-disabled="auditStore.currentPageId ? undefined : 'true'"
190+
:role="auditStore.currentPageId ? undefined : 'link'"
188191
>
189192
<span>{{ topic.number }}.</span>
190193
<span>{{ topic.title }}</span>

0 commit comments

Comments
 (0)