From 38fe0ee84d06d22b9e85f22db21cd7696d6966c0 Mon Sep 17 00:00:00 2001 From: previ Date: Sun, 20 Feb 2022 21:19:45 +0100 Subject: [PATCH 1/3] fix media --- src/components/Activity.vue | 2 +- src/i18n/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Activity.vue b/src/components/Activity.vue index 7e8ae13..c857000 100644 --- a/src/components/Activity.vue +++ b/src/components/Activity.vue @@ -504,7 +504,7 @@ export default { // Options { toolbox: serializedToolbox, - // path: 'static/js/blockly/', + media: 'media', // TODO: Use values from fetched configuration! scrollbars: true, // MaxBlocks : -1, // -1 as infinite not working FIXME diff --git a/src/i18n/index.js b/src/i18n/index.js index 574a7c5..695bb29 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -19,7 +19,7 @@ const locales = { Vue.use(VueI18n); -const language = window.navigator.userLanguage || window.navigator.language; +const language = (window.navigator.userLanguage || window.navigator.language).substring(0, 2); export default new VueI18n({ locale: language, From f33c5a6175965ad5d46d216a4d00839567713486 Mon Sep 17 00:00:00 2001 From: previ Date: Mon, 21 Feb 2022 22:05:49 +0100 Subject: [PATCH 2/3] fix media, messages --- src/components/Activity.vue | 4 ++-- src/components/ActivityList.vue | 9 ++++----- src/i18n/index.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/Activity.vue b/src/components/Activity.vue index 7e8ae13..83d11fa 100644 --- a/src/components/Activity.vue +++ b/src/components/Activity.vue @@ -270,7 +270,7 @@ const coderbot_locales = { en: bot_en, fr: bot_fr }; -Blockly.Msg = { ...Blockly.Msg, ...coderbot_locales[locale] }; +Blockly.Msg = { ...Blockly.Msg, ...coderbot_locales[locale].default }; const blockly_locales = { it: blockly_it, @@ -504,7 +504,7 @@ export default { // Options { toolbox: serializedToolbox, - // path: 'static/js/blockly/', + media: 'media/', // TODO: Use values from fetched configuration! scrollbars: true, // MaxBlocks : -1, // -1 as infinite not working FIXME diff --git a/src/components/ActivityList.vue b/src/components/ActivityList.vue index d51b969..a1410ba 100644 --- a/src/components/ActivityList.vue +++ b/src/components/ActivityList.vue @@ -81,11 +81,10 @@ export default { } = this.$data; // let programList = this.$data.programList axios.post(`${CB}/deleteActivity`, { - name, - }) - .then(() => { - this.getActivities(); - }); + name, + }).then(() => { + this.getActivities(); + }); }, toggleSidebar() { const currentStatus = this.$store.getters.drawerStatus; diff --git a/src/i18n/index.js b/src/i18n/index.js index 4c099b7..647e7e9 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -19,7 +19,7 @@ const locales = { Vue.use(VueI18n); -const language = window.navigator.userLanguage || window.navigator.language; +const language = (window.navigator.userLanguage || window.navigator.language).substring(0, 2); export default new VueI18n({ locale: language, From 7b1588ea809267739f3ad2a66fd0c547226cb5fb Mon Sep 17 00:00:00 2001 From: previ Date: Tue, 22 Feb 2022 00:07:11 +0100 Subject: [PATCH 3/3] merge --- src/assets/toolbox_adv.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/toolbox_adv.xml b/src/assets/toolbox_adv.xml index 060ffd4..c353c33 100644 --- a/src/assets/toolbox_adv.xml +++ b/src/assets/toolbox_adv.xml @@ -324,6 +324,7 @@ +