diff --git a/cypress/e2e/course_creation.cy.js b/cypress/e2e/course_creation.cy.js
index 7d20fdcb..69c0f1ca 100644
--- a/cypress/e2e/course_creation.cy.js
+++ b/cypress/e2e/course_creation.cy.js
@@ -19,12 +19,23 @@ describe("Course Creation", () => {
);
cy.fixture("profile.png", "base64").then((fileContent) => {
- cy.get('input[type="file"]').attachFile({
+ /* cy.get('input[type="file"]').should("be.hidden").attachFile({
fileContent,
fileName: "profile.png",
mimeType: "image/png",
encoding: "base64",
- });
+ }); */
+
+ cy.get("div")
+ .contains("Course Image")
+ .siblings("div")
+ .children('input[type="file"]')
+ .attachFile({
+ fileContent,
+ fileName: "profile.png",
+ mimeType: "image/png",
+ encoding: "base64",
+ });
});
cy.get("label")
diff --git a/frontend/src/components/BatchOverlay.vue b/frontend/src/components/BatchOverlay.vue
index cf684993..ef2723f9 100644
--- a/frontend/src/components/BatchOverlay.vue
+++ b/frontend/src/components/BatchOverlay.vue
@@ -24,7 +24,10 @@
>
{{ formatNumberIntoCurrency(batch.data.amount, batch.data.currency) }}
-
+
{{ batch.data.courses.length }} {{ __('Courses') }}
diff --git a/frontend/src/components/Modals/Settings.vue b/frontend/src/components/Modals/Settings.vue
index 46c9d1e3..ab89d535 100644
--- a/frontend/src/components/Modals/Settings.vue
+++ b/frontend/src/components/Modals/Settings.vue
@@ -352,10 +352,23 @@ const tabsStructure = computed(() => {
label: 'Meta Description',
name: 'meta_description',
type: 'textarea',
- rows: 5,
+ rows: 4,
description:
"This description will be shown on lists and pages that don't have meta description",
},
+ {
+ label: 'Meta Keywords',
+ name: 'meta_keywords',
+ type: 'textarea',
+ rows: 4,
+ description:
+ 'Keywords for search engines to find your website. Separated by commas.',
+ },
+ {
+ label: 'Meta Image',
+ name: 'meta_image',
+ type: 'Upload',
+ },
],
},
],
diff --git a/frontend/src/components/SettingDetails.vue b/frontend/src/components/SettingDetails.vue
index 8f7a49e2..e4916e7b 100644
--- a/frontend/src/components/SettingDetails.vue
+++ b/frontend/src/components/SettingDetails.vue
@@ -51,7 +51,9 @@ const props = defineProps({
const update = () => {
props.fields.forEach((f) => {
- if (f.type != 'Column Break') {
+ if (f.type == 'Upload') {
+ props.data.doc[f.name] = f.value ? f.value.file_url : null
+ } else if (f.type != 'Column Break') {
props.data.doc[f.name] = f.value
}
})
diff --git a/frontend/src/components/SettingFields.vue b/frontend/src/components/SettingFields.vue
index b01ff093..df9bebbd 100644
--- a/frontend/src/components/SettingFields.vue
+++ b/frontend/src/components/SettingFields.vue
@@ -54,15 +54,24 @@
-
![]()
+
- {{ data[field.name]?.file_name }}
+ {{
+ data[field.name]?.file_name ||
+ data[field.name].split('/').pop()
+ }}
-
+
{{ getFileSize(data[field.name]?.file_size) }}
diff --git a/frontend/src/pages/BatchDetail.vue b/frontend/src/pages/BatchDetail.vue
index 4ccd4c33..8e68f1f9 100644
--- a/frontend/src/pages/BatchDetail.vue
+++ b/frontend/src/pages/BatchDetail.vue
@@ -14,13 +14,16 @@
{{ batch.data.description }}
-
+
{{ batch.data?.courses?.length }} {{ __('Courses') }}
-
·
0:
for row in route_meta:
@@ -54,10 +57,9 @@ def get_meta(app_path, title, favicon, description):
meta["description"] = description
if not meta.get("image"):
- meta["image"] = favicon
+ meta["image"] = image or favicon
- if not meta.get("keywords"):
- meta["keywords"] = ""
+ meta["keywords"] = f"{meta.get('keywords')}, {keywords}"
if not meta:
meta = {