Skip to content

Commit

Permalink
fix board menu
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Aug 22, 2024
1 parent cbb6fb4 commit 762ad38
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export default {
"components.board.menu.fileElement": "Datei-Einstellungen",
"components.board.menu.linkElement": "Link-Einstellungen",
"components.board.menu.submissionElement": "Abgabe-Einstellungen",
"components.board.menu.deletedElement": "Gelöschter-Inhalt-Einstellungen",
"components.board.notifications.errors.fileNameExists":
"Es existiert bereits eine Datei mit diesem Namen.",
"components.board.notifications.errors.fileServiceNotAvailable":
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ export default {
"components.board.menu.fileElement": "File settings",
"components.board.menu.linkElement": "Link settings",
"components.board.menu.submissionElement": "Submission settings",
"components.board.menu.deletedElement": "Deleted content settings",
"components.board.notifications.errors.fileNameExists":
"A file with this name already exists.",
"components.board.notifications.errors.fileServiceNotAvailable":
Expand Down
2 changes: 2 additions & 0 deletions src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ export default {
"components.board.menu.fileElement": "Configuración del archivo",
"components.board.menu.linkElement": "Configuración del enlace",
"components.board.menu.submissionElement": "Configuración del envío",
"components.board.menu.deletedElement":
"Configuración de contenido eliminado",
"components.board.notifications.errors.fileNameExists":
"Ya existe un archivo con este nombre.",
"components.board.notifications.errors.fileServiceNotAvailable":
Expand Down
1 change: 1 addition & 0 deletions src/locales/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ export default {
"components.board.menu.fileElement": "Налаштування файлу",
"components.board.menu.linkElement": "Налаштування посилання",
"components.board.menu.submissionElement": "Налаштування Подання",
"components.board.menu.deletedElement": "Видалені налаштування вмісту",
"components.board.notifications.errors.fileNameExists":
"Файл з такою назвою вже існує.",
"components.board.notifications.errors.fileServiceNotAvailable":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<BoardMenu scope="element" data-testid="deleted-element-menu-btn">
<BoardMenu scope="deletedElement" data-testid="deleted-element-menu-btn">
<BoardMenuActionDelete @click="onDelete" />
</BoardMenu>
</template>
Expand Down
7 changes: 3 additions & 4 deletions src/modules/ui/board/BoardMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
<VIcon data-testid="board-menu-icon">{{ mdiDotsVertical }}</VIcon>
<span data-testid="board-menu-screen-reader-only" class="d-sr-only">
{{ t(boardMenuAriaLabel) }}
{{ $t(boardMenuAriaLabel) }}
</span>
</VBtn>
</template>
Expand All @@ -32,7 +32,6 @@ import { mdiDotsVertical } from "@mdi/js";
import { computed, PropType, provide, toRef } from "vue";
import { BoardMenuScope } from "./board-menu-scope";
import { MENU_SCOPE } from "./injection-tokens";
import { useI18n } from "vue-i18n";
const props = defineProps({
scope: {
Expand All @@ -48,8 +47,6 @@ const props = defineProps({
const scope = toRef(props, "scope");
provide(MENU_SCOPE, scope.value);
const { t } = useI18n();
const ariaLabelForScope: Record<BoardMenuScope, string> = {
board: "components.board.menu.board",
column: "components.board.menu.column",
Expand All @@ -61,6 +58,7 @@ const ariaLabelForScope: Record<BoardMenuScope, string> = {
fileElement: "components.board.menu.fileElement",
linkElement: "components.board.menu.linkElement",
submissionElement: "components.board.menu.submissionElement",
deletedElement: "components.board.menu.deletedElement",
};
const boardMenuAriaLabel = computed(() => {
Expand All @@ -75,6 +73,7 @@ const boardScopesWithBackground: Array<BoardMenuScope> = [
"fileElement",
"linkElement",
"submissionElement",
"deletedElement",
];
const hasBackground = computed<boolean>(() =>
Expand Down
3 changes: 2 additions & 1 deletion src/modules/ui/board/board-menu-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export type BoardMenuScope =
| "externalToolElement"
| "fileElement"
| "linkElement"
| "submissionElement";
| "submissionElement"
| "deletedElement";

0 comments on commit 762ad38

Please sign in to comment.