From 5912cbc55266458a84d1dfd7a5082b16006902da Mon Sep 17 00:00:00 2001 From: davwas Date: Fri, 8 Dec 2023 12:00:34 +0100 Subject: [PATCH 1/6] add new env FEATURE_NEXBOARD_COPY_ENABLED --- src/store/types/env-config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/types/env-config.ts b/src/store/types/env-config.ts index b0c295d0ae..d23b82b7c6 100644 --- a/src/store/types/env-config.ts +++ b/src/store/types/env-config.ts @@ -9,6 +9,7 @@ export type Envs = { FEATURE_COLUMN_BOARD_LINK_ELEMENT_ENABLED?: boolean; FEATURE_CONSENT_NECESSARY: boolean; FEATURE_COPY_SERVICE_ENABLED?: boolean; + FEATURE_NEXBOARD_COPY_ENABLED?: boolean; FEATURE_COURSE_SHARE_NEW?: boolean; FEATURE_COURSE_SHARE?: boolean; FEATURE_ES_COLLECTIONS_ENABLED?: boolean; From 146949e1018b020f9e3d035c5c8e617497472d27 Mon Sep 17 00:00:00 2001 From: davwas Date: Fri, 8 Dec 2023 12:01:25 +0100 Subject: [PATCH 2/6] add nexboard copy text pointing that nexboard is replaced by tldraw --- src/components/copy-result-modal/CopyResultModal.vue | 8 +++++++- src/locales/de.json | 1 + src/locales/en.json | 1 + src/locales/es.json | 1 + src/locales/uk.json | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/copy-result-modal/CopyResultModal.vue b/src/components/copy-result-modal/CopyResultModal.vue index 4509ea9e06..f788170018 100644 --- a/src/components/copy-result-modal/CopyResultModal.vue +++ b/src/components/copy-result-modal/CopyResultModal.vue @@ -54,6 +54,7 @@ import { mdiCloseCircle, mdiInformation, } from "@mdi/js"; +import { envConfigModule } from "@/store"; export default { name: "CopyResultModal", @@ -97,7 +98,7 @@ export default { }, { isShow: this.hasNexboardElement, - text: this.$t("components.molecules.copyResult.nexboardCopy.info"), + text: this.nexboardInfoText, title: this.$t("components.molecules.copyResult.label.nexboard"), }, { @@ -154,6 +155,11 @@ export default { : ""; return `${courseFilesText} ${fileErrorText}`.trim(); }, + nexboardInfoText() { + return envConfigModule.getEnv.FEATURE_NEXBOARD_COPY_ENABLED + ? this.$t("components.molecules.copyResult.nexboardCopy.info") + : this.$t("components.molecules.copyResult.nexboardCopy.infoTldraw"); + }, }, methods: { hasElementOfType(items, types) { diff --git a/src/locales/de.json b/src/locales/de.json index 2dba807052..64b399cf69 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -524,6 +524,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Inhalte werden aus Datenschutzgründen nicht kopiert und müssen neu hinzugefügt werden.", "components.molecules.copyResult.geogebraCopy.info": "Material-IDs werden aus technischen Gründen nicht kopiert und müssen neu hinzugefügt werden.", "components.molecules.copyResult.nexboardCopy.info": "Inhalte werden aus Datenschutzgründen nicht kopiert und müssen neu hinzugefügt werden.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Der Inhalt wird nicht kopiert, da NeXboard durch Tldraw ersetzt wird. Sie können Tldraw im Spalten-Board hinzufügen, indem Sie ein neues Whiteboard-Element hinzufügen.", "components.molecules.share.options.title": "Teilen-Einstellungen", "components.molecules.share.options.schoolInternally": "Link nur schulintern gültig", "components.molecules.share.options.expiresInDays": "Link läuft nach 21 Tagen ab", diff --git a/src/locales/en.json b/src/locales/en.json index 29227c5a76..c50f427dad 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -522,6 +522,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Content is not copied for data protection reasons and must be added again.", "components.molecules.copyResult.geogebraCopy.info": "Material IDs are not copied for technical reasons and must be added again.", "components.molecules.copyResult.nexboardCopy.info": "Content is not copied for data protection reasons and must be added again.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Content is not copied as NeXboard is being replaced by Tldraw. You can add Tldraw in the Column Board by adding new Whiteboard element.", "components.molecules.share.options.title": "Share settings", "components.molecules.share.options.schoolInternally": "Link only valid within the school", "components.molecules.share.options.expiresInDays": "Link expires after 21 days", diff --git a/src/locales/es.json b/src/locales/es.json index 0bc30c9f16..79bae360be 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -511,6 +511,7 @@ "components.molecules.copyResult.etherpadCopy.info": "El contenido no se copia por razones de protección de datos y debe agregarse nuevamente.", "components.molecules.copyResult.geogebraCopy.info": "Los ID de material no se copian por razones técnicas y deben agregarse nuevamente.", "components.molecules.copyResult.nexboardCopy.info": "El contenido no se copia por razones de protección de datos y debe agregarse nuevamente.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "El contenido no se copia ya que NeXboard está siendo reemplazado por Tldraw. Puede añadir Tldraw en el Tablero de columna añadiendo un nuevo elemento Whiteboard.", "components.molecules.share.options.title": "Compartir la configuración", "components.molecules.share.options.schoolInternally": "El enlace sólo es válido dentro de la escuela", "components.molecules.share.options.expiresInDays": "El enlace caduca a los 21 días", diff --git a/src/locales/uk.json b/src/locales/uk.json index c4ed8ce679..0c6ddb30b0 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -267,6 +267,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Вміст не копіюється з міркувань захисту даних і повинен бути доданий повторно.", "components.molecules.copyResult.geogebraCopy.info": "Ідентифікатори матеріалів не копіюються з технічних причин і повинні бути додані знову.", "components.molecules.copyResult.nexboardCopy.info": "Вміст не копіюється з міркувань захисту даних і повинен бути доданий повторно.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Вміст не копіюється, оскільки NeXboard замінюється на Tldraw. Ви можете додати Tldraw до Колонна дошка для стовпчиків, додавши новий елемент Whiteboard.", "components.molecules.share.options.title": "Налаштування спільного доступу", "components.molecules.share.options.schoolInternally": "Посилання дійсне тільки в межах школи", "components.molecules.share.options.expiresInDays": "Термін дії посилання закінчується через 21 днів", From d435f109ab31fd31f75fcd492cad8c05cf1a44df Mon Sep 17 00:00:00 2001 From: davwas Date: Fri, 8 Dec 2023 12:26:11 +0100 Subject: [PATCH 3/6] fix tests --- src/components/copy-result-modal/CopyResultModal.unit.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/copy-result-modal/CopyResultModal.unit.ts b/src/components/copy-result-modal/CopyResultModal.unit.ts index 8a19a0f7f0..f46aaa60df 100644 --- a/src/components/copy-result-modal/CopyResultModal.unit.ts +++ b/src/components/copy-result-modal/CopyResultModal.unit.ts @@ -4,6 +4,8 @@ import vCustomDialog from "@/components/organisms/vCustomDialog.vue"; import { mount, MountOptions } from "@vue/test-utils"; import CopyResultModal from "./CopyResultModal.vue"; import Vue from "vue"; +import EnvConfigModule from "@/store/env-config"; +import setupStores from "@@/tests/test-utils/setupStores"; const geoGebraItem = { title: "GeoGebra Element Title", @@ -63,6 +65,9 @@ describe("@/components/copy-result-modal/CopyResultModal", () => { beforeEach(() => { // Avoids console warnings "[Vuetify] Unable to locate target [data-app]" document.body.setAttribute("data-app", "true"); + setupStores({ + envConfigModule: EnvConfigModule, + }); }); describe("basic functions", () => { From 72e9e815bca357e738ca2b7acdfbac1c4545cd6b Mon Sep 17 00:00:00 2001 From: davwas Date: Fri, 8 Dec 2023 12:51:28 +0100 Subject: [PATCH 4/6] fix other tests --- src/components/share/ImportFlow.unit.ts | 6 +++++- src/components/templates/TasksDashboardMain.unit.ts | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/share/ImportFlow.unit.ts b/src/components/share/ImportFlow.unit.ts index ef450c1dd4..8ef4d57a43 100644 --- a/src/components/share/ImportFlow.unit.ts +++ b/src/components/share/ImportFlow.unit.ts @@ -21,6 +21,7 @@ import { mount, MountOptions } from "@vue/test-utils"; import Vue from "vue"; import { CopyResultItem } from "../copy-result-modal/types/CopyResultItem"; import { I18N_KEY, NOTIFIER_MODULE_KEY } from "@/utils/inject"; +import EnvConfigModule from "@/store/env-config"; describe("@components/share/ImportFlow", () => { let copyModuleMock: CopyModule; @@ -65,7 +66,10 @@ describe("@components/share/ImportFlow", () => { getCopyResult: copyResultResponse, }); loadingStateModuleMock = createModuleMocks(LoadingStateModule); - setupStores({ rooms: RoomsModule }); + setupStores({ + rooms: RoomsModule, + envConfigModule: EnvConfigModule, + }); jest.spyOn(roomsModule, "fetchAllElements").mockImplementation(); }); diff --git a/src/components/templates/TasksDashboardMain.unit.ts b/src/components/templates/TasksDashboardMain.unit.ts index 9d03f6b6ab..8fc69e0a96 100644 --- a/src/components/templates/TasksDashboardMain.unit.ts +++ b/src/components/templates/TasksDashboardMain.unit.ts @@ -18,6 +18,7 @@ import Vue from "vue"; import TasksDashboardMain from "./TasksDashboardMain.vue"; import TasksDashboardStudent from "./TasksDashboardStudent.vue"; import TasksDashboardTeacher from "./TasksDashboardTeacher.vue"; +import EnvConfigModule from "@/store/env-config"; const $route = { query: { @@ -224,6 +225,7 @@ describe("@/components/templates/TasksDashboardMain", () => { setupStores({ copyModule: CopyModule, authModule: AuthModule, + envConfigModule: EnvConfigModule, }); authModule.setUser(mockAuthStoreDataTeacher as User); From 15c69890975fce6745d7ecfd8a8da8566f9711c8 Mon Sep 17 00:00:00 2001 From: davwas Date: Mon, 11 Dec 2023 16:16:49 +0100 Subject: [PATCH 5/6] fix en translation --- src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index c50f427dad..1a88255263 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -522,7 +522,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Content is not copied for data protection reasons and must be added again.", "components.molecules.copyResult.geogebraCopy.info": "Material IDs are not copied for technical reasons and must be added again.", "components.molecules.copyResult.nexboardCopy.info": "Content is not copied for data protection reasons and must be added again.", - "components.molecules.copyResult.nexboardCopy.infoTldraw": "Content is not copied as NeXboard is being replaced by Tldraw. You can add Tldraw in the Column Board by adding new Whiteboard element.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Content is not copied as NeXboard is being replaced by Tldraw. You can add Tldraw in the Column Board by adding a new Whiteboard element.", "components.molecules.share.options.title": "Share settings", "components.molecules.share.options.schoolInternally": "Link only valid within the school", "components.molecules.share.options.expiresInDays": "Link expires after 21 days", From a2cc14198cb26f15ffa38f7c197753892a43bc07 Mon Sep 17 00:00:00 2001 From: davwas Date: Tue, 12 Dec 2023 11:56:09 +0100 Subject: [PATCH 6/6] fix translations --- src/locales/en.json | 1 + src/locales/es.json | 1 + src/locales/uk.json | 1 + 3 files changed, 3 insertions(+) diff --git a/src/locales/en.json b/src/locales/en.json index 0b939a2fa8..0d86f8b7a3 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -522,6 +522,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Content is not copied for data protection reasons and must be added again.", "components.molecules.copyResult.geogebraCopy.info": "Material IDs are not copied for technical reasons and must be added again.", "components.molecules.copyResult.nexboardCopy.info": "Content is not copied for data protection reasons and must be added again.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Content is not copied as NeXboard is being replaced by Tldraw. You can add Tldraw in the Column Board by adding a new Whiteboard element.", "components.molecules.share.options.title": "Share settings", "components.molecules.share.options.schoolInternally": "Link only valid within the school", "components.molecules.share.options.expiresInDays": "Link expires after 21 days", diff --git a/src/locales/es.json b/src/locales/es.json index 5ee4a23698..fc7e0f1f85 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -511,6 +511,7 @@ "components.molecules.copyResult.etherpadCopy.info": "El contenido no se copia por razones de protección de datos y debe agregarse nuevamente.", "components.molecules.copyResult.geogebraCopy.info": "Los ID de material no se copian por razones técnicas y deben agregarse nuevamente.", "components.molecules.copyResult.nexboardCopy.info": "El contenido no se copia por razones de protección de datos y debe agregarse nuevamente.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "El contenido no se copia ya que NeXboard está siendo reemplazado por Tldraw. Puede añadir Tldraw en el Tablero de columna añadiendo un nuevo elemento Whiteboard.", "components.molecules.share.options.title": "Compartir la configuración", "components.molecules.share.options.schoolInternally": "El enlace sólo es válido dentro de la escuela", "components.molecules.share.options.expiresInDays": "El enlace caduca a los 21 días", diff --git a/src/locales/uk.json b/src/locales/uk.json index 25b8d383c0..8f06dac3f0 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -267,6 +267,7 @@ "components.molecules.copyResult.etherpadCopy.info": "Вміст не копіюється з міркувань захисту даних і повинен бути доданий повторно.", "components.molecules.copyResult.geogebraCopy.info": "Ідентифікатори матеріалів не копіюються з технічних причин і повинні бути додані знову.", "components.molecules.copyResult.nexboardCopy.info": "Вміст не копіюється з міркувань захисту даних і повинен бути доданий повторно.", + "components.molecules.copyResult.nexboardCopy.infoTldraw": "Вміст не копіюється, оскільки NeXboard замінюється на Tldraw. Ви можете додати Tldraw до Колонна дошка для стовпчиків, додавши новий елемент Whiteboard.", "components.molecules.share.options.title": "Налаштування спільного доступу", "components.molecules.share.options.schoolInternally": "Посилання дійсне тільки в межах школи", "components.molecules.share.options.expiresInDays": "Термін дії посилання закінчується через 21 днів",