Skip to content

Commit

Permalink
Merge branch 'main' into EW-1070
Browse files Browse the repository at this point in the history
  • Loading branch information
psachmann authored Dec 13, 2024
2 parents 81b8ad5 + 3319a03 commit 805acbc
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ export default {
"components.base.showPassword": "Passwort anzeigen",
"components.board.action.addCard": "Karte hinzufügen",
"components.board.action.delete": "Löschen",
"components.board.action.deleteFromSection": "Aus Abschnitt entfernen",
"components.board.action.detail-view": "Detailansicht",
"components.board.action.download": "Herunterladen",
"components.board.action.moveDown": "Nach unten verschieben",
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export default {
"components.base.showPassword": "Show password",
"components.board.action.addCard": "Add card",
"components.board.action.delete": "Delete",
"components.board.action.deleteFromSection": "Remove from section",
"components.board.action.detail-view": "Detail view",
"components.board.action.download": "Download",
"components.board.action.moveDown": "Move down",
Expand Down
1 change: 1 addition & 0 deletions src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ export default {
"components.base.showPassword": "Mostrar contraseña",
"components.board.action.addCard": "Añadir tarjeta",
"components.board.action.delete": "Eliminar",
"components.board.action.deleteFromSection": "Quitar de la sección",
"components.board.action.detail-view": "Vista detallada",
"components.board.action.download": "Descargar",
"components.board.action.moveDown": "Bajar",
Expand Down
1 change: 1 addition & 0 deletions src/locales/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ export default {
"components.base.showPassword": "Показати пароль",
"components.board.action.addCard": "Додати картка",
"components.board.action.delete": "Видалити",
"components.board.action.deleteFromSection": "Видалити з розділу",
"components.board.action.detail-view": "Детальний вигляд",
"components.board.action.download": "Завантажити",
"components.board.action.moveDown": "Рухатися вниз",
Expand Down
2 changes: 0 additions & 2 deletions src/modules/feature/media-shelf/MediaBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@
v-if="board.lines.length < lineLimit"
@create:line="createLine"
/>
<ConfirmationDialog />
</div>
</div>
</template>

<script setup lang="ts">
import { MediaAvailableLineResponse, MediaBoardResponse } from "@/serverApi/v3";
import { DeviceMediaQuery } from "@/types/enum/device-media-query.enum";
import { ConfirmationDialog } from "@ui-confirmation-dialog";
import { extractDataAttribute, useSharedEditMode } from "@util-board";
import { useMediaQuery } from "@vueuse/core";
import { SortableEvent } from "sortablejs";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { deletedElementResponseFactory } from "@@/tests/test-utils";
import {
createTestingI18n,
createTestingVuetify,
} from "@@/tests/test-utils/setup";
import { deletedElementResponseFactory } from "@@/tests/test-utils";
import { BoardMenuAction } from "@ui-board";
import { mount } from "@vue/test-utils";
import { BoardMenuActionDelete } from "@ui-board";
import { nextTick } from "vue";
import { ComponentProps } from "vue-component-type-helpers";
import { VBtn } from "vuetify/lib/components/index.mjs";
import MediaBoardExternalToolElementMenu from "./MediaBoardExternalToolElementMenu.vue";
import MediaBoardDeletedElement from "./MediaBoardExternalToolDeletedElement.vue";
import MediaBoardExternalToolElementMenu from "./MediaBoardExternalToolElementMenu.vue";

describe("MediaBoardDeletedElement", () => {
const getWrapper = (
Expand Down Expand Up @@ -68,7 +68,7 @@ describe("MediaBoardDeletedElement", () => {
.getComponent(VBtn);
await menuBtn.trigger("click");

const deleteAction = wrapper.findComponent(BoardMenuActionDelete);
const deleteAction = wrapper.findComponent(BoardMenuAction);

expect(deleteAction.exists()).toEqual(true);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createTestingI18n,
createTestingVuetify,
} from "@@/tests/test-utils/setup";
import { BoardMenuActionDelete } from "@ui-board";
import { BoardMenuAction } from "@ui-board";
import { shallowMount } from "@vue/test-utils";
import MediaBoardExternalToolElementMenu from "./MediaBoardExternalToolElementMenu.vue";

Expand All @@ -27,15 +27,15 @@ describe("MediaBoardExternalToolElementMenu", () => {
it("should have a menu option to delete", () => {
const { wrapper } = getWrapper();

const menuItem = wrapper.findComponent(BoardMenuActionDelete);
const menuItem = wrapper.findComponent(BoardMenuAction);

expect(menuItem.exists()).toEqual(true);
});

it("should emit the delete event on click", async () => {
const { wrapper } = getWrapper();

const menuItem = wrapper.findComponent(BoardMenuActionDelete);
const menuItem = wrapper.findComponent(BoardMenuAction);

await menuItem.trigger("click");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
has-background
data-testid="deleted-element-menu-btn"
>
<BoardMenuActionDelete @click="onDelete" />
<BoardMenuAction
:icon="mdiTrashCanOutline"
data-testid="board-menu-action-delete"
@click="$emit('delete:element')"
>
{{ $t("components.board.action.deleteFromSection") }}
</BoardMenuAction>
</BoardMenu>
</template>

<script setup lang="ts">
import { BoardMenu, BoardMenuActionDelete, BoardMenuScope } from "@ui-board";
import { mdiTrashCanOutline } from "@icons/material";
import { BoardMenu, BoardMenuAction, BoardMenuScope } from "@ui-board";
const emit = defineEmits<{
defineEmits<{
(e: "delete:element"): void;
}>();
const onDelete = async (confirmation: Promise<boolean>) => {
const shouldDelete = await confirmation;
if (shouldDelete) {
emit("delete:element");
}
};
</script>

0 comments on commit 805acbc

Please sign in to comment.