fix: replace button not working on landing page editor (#141)
* CLASSROOMIO-ISSUE-46: Replace Button Bug Fix * update posthog and fix issue found on gitpod --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
9539e1e842
commit
71f910f6c8
@@ -47,7 +47,7 @@
|
|||||||
"nodemailer": "^6.9.5",
|
"nodemailer": "^6.9.5",
|
||||||
"openai-edge": "^1.2.2",
|
"openai-edge": "^1.2.2",
|
||||||
"pluralize": "^8.0.0",
|
"pluralize": "^8.0.0",
|
||||||
"posthog-js": "^1.96.0",
|
"posthog-js": "^1.103.0",
|
||||||
"sirv": "^2.0.3",
|
"sirv": "^2.0.3",
|
||||||
"svelte-email": "^0.0.4",
|
"svelte-email": "^0.0.4",
|
||||||
"svelte-ui": "workspace:*",
|
"svelte-ui": "workspace:*",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
import UploadWidget from '$lib/components/UploadWidget/index.svelte';
|
import UploadWidget from '$lib/components/UploadWidget/index.svelte';
|
||||||
import { handleOpenWidget } from '$lib/components/CourseLandingPage/store';
|
import { handleOpenWidget } from '$lib/components/CourseLandingPage/store';
|
||||||
|
|
||||||
import { Restart } from 'carbon-icons-svelte';
|
import { Restart } from 'carbon-icons-svelte';
|
||||||
import IconButton from '$lib/components/IconButton/index.svelte';
|
import IconButton from '$lib/components/IconButton/index.svelte';
|
||||||
import generateSlug from '$lib/utils/functions/generateSlug';
|
import generateSlug from '$lib/utils/functions/generateSlug';
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
let avatar: string | undefined;
|
let avatar: string | undefined;
|
||||||
|
|
||||||
function widgetControl() {
|
function widgetControl() {
|
||||||
$handleOpenWidget.open = true;
|
$handleOpenWidget.open = !$handleOpenWidget.open;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLessonOrder(id: string) {
|
function getLessonOrder(id: string) {
|
||||||
@@ -174,14 +174,14 @@
|
|||||||
grading: !!course.metadata.grading,
|
grading: !!course.metadata.grading,
|
||||||
lesson_download: !!course.metadata.lessonDownload,
|
lesson_download: !!course.metadata.lessonDownload,
|
||||||
is_published: !!course.is_published,
|
is_published: !!course.is_published,
|
||||||
allow_new_students: course.metadata.allowNewStudent,
|
allow_new_students: course.metadata.allowNewStudent
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const generateNewCourseLink = () => {
|
const generateNewCourseLink = () => {
|
||||||
$course.slug = generateSlug($course.title);
|
$course.slug = generateSlug($course.title);
|
||||||
}
|
};
|
||||||
|
|
||||||
$: $settings.course_description = $course.description;
|
$: $settings.course_description = $course.description;
|
||||||
$: $settings.course_title = $course.title;
|
$: $settings.course_title = $course.title;
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
export let course = {};
|
export let course = {};
|
||||||
|
|
||||||
function widgetControl() {
|
function widgetControl() {
|
||||||
$handleOpenWidget.open = true;
|
$handleOpenWidget.open = !$handleOpenWidget.open;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import ChevronRightIcon from 'carbon-icons-svelte/lib/ChevronRight.svelte';
|
import ChevronRightIcon from 'carbon-icons-svelte/lib/ChevronRight.svelte';
|
||||||
import ArrowLeftIcon from 'carbon-icons-svelte/lib/ArrowLeft.svelte';
|
import ArrowLeftIcon from 'carbon-icons-svelte/lib/ArrowLeft.svelte';
|
||||||
import ArrowUpRightIcon from 'carbon-icons-svelte/lib/ArrowUpRight.svelte';
|
import ArrowUpRightIcon from 'carbon-icons-svelte/lib/ArrowUpRight.svelte';
|
||||||
|
import ChevronLeftIcon from 'carbon-icons-svelte/lib/ChevronLeft.svelte';
|
||||||
import { currentOrgDomain } from '$lib/utils/store/org';
|
import { currentOrgDomain } from '$lib/utils/store/org';
|
||||||
|
|
||||||
import IconButton from '$lib/components/IconButton/index.svelte';
|
import IconButton from '$lib/components/IconButton/index.svelte';
|
||||||
@@ -20,7 +21,6 @@
|
|||||||
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
|
import { VARIANTS } from '$lib/components/PrimaryButton/constants';
|
||||||
import { updateCourse } from '$lib/utils/services/courses';
|
import { updateCourse } from '$lib/utils/services/courses';
|
||||||
import generateSlug from '$lib/utils/functions/generateSlug';
|
import generateSlug from '$lib/utils/functions/generateSlug';
|
||||||
import ChevronLeftIcon from 'carbon-icons-svelte/lib/ChevronLeft.svelte';
|
|
||||||
|
|
||||||
import { isMobile } from '$lib/utils/store/useMobile';
|
import { isMobile } from '$lib/utils/store/useMobile';
|
||||||
import CustomPromptBtn from '$lib/components/AI/AIButton/CustomPromptBtn.svelte';
|
import CustomPromptBtn from '$lib/components/AI/AIButton/CustomPromptBtn.svelte';
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import { getLectureNo } from '../Course/function';
|
import { getLectureNo } from '../Course/function';
|
||||||
import { NAV_ITEMS } from './constants';
|
import { NAV_ITEMS } from './constants';
|
||||||
import Modal from '../Modal/index.svelte';
|
import Modal from '../Modal/index.svelte';
|
||||||
import { reviewsModalStore } from './store';
|
import { handleOpenWidget, reviewsModalStore } from './store';
|
||||||
import Chip from '../Chip/index.svelte';
|
import Chip from '../Chip/index.svelte';
|
||||||
import Avatar from '$lib/components/Avatar/index.svelte';
|
import Avatar from '$lib/components/Avatar/index.svelte';
|
||||||
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
import PrimaryButton from '$lib/components/PrimaryButton/index.svelte';
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
import HtmlRender from '$lib/components/HTMLRender/HTMLRender.svelte';
|
||||||
import { calDateDiff } from '$lib/utils/functions/date';
|
import { calDateDiff } from '$lib/utils/functions/date';
|
||||||
import { currentOrg } from '$lib/utils/store/org';
|
import { currentOrg } from '$lib/utils/store/org';
|
||||||
|
import UploadWidget from '$lib/components/UploadWidget/index.svelte';
|
||||||
|
import { course } from '$lib/components/Course/store';
|
||||||
|
|
||||||
export let editMode = false;
|
export let editMode = false;
|
||||||
export let courseData: Course;
|
export let courseData: Course;
|
||||||
@@ -120,6 +122,9 @@
|
|||||||
}}
|
}}
|
||||||
isDisabled={!courseData.metadata.allowNewStudent}
|
isDisabled={!courseData.metadata.allowNewStudent}
|
||||||
/>
|
/>
|
||||||
|
{#if $handleOpenWidget.open}
|
||||||
|
<UploadWidget bind:imageURL={$course.logo} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Banner Image getEmbedId(videoUrl) -->
|
<!-- Banner Image getEmbedId(videoUrl) -->
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function showAppsSideBar(path) {
|
function showAppsSideBar(path) {
|
||||||
return path.includes('/lessons/') && !path.includes('landingpage');
|
return path?.includes('/lessons/') && !path?.includes('landingpage');
|
||||||
}
|
}
|
||||||
|
|
||||||
export default showAppsSideBar;
|
export default showAppsSideBar;
|
||||||
|
|||||||
Generated
+9
-4
@@ -169,8 +169,8 @@ importers:
|
|||||||
specifier: ^8.0.0
|
specifier: ^8.0.0
|
||||||
version: 8.0.0
|
version: 8.0.0
|
||||||
posthog-js:
|
posthog-js:
|
||||||
specifier: ^1.96.0
|
specifier: ^1.103.0
|
||||||
version: 1.96.0
|
version: 1.103.0
|
||||||
sirv:
|
sirv:
|
||||||
specifier: ^2.0.3
|
specifier: ^2.0.3
|
||||||
version: 2.0.3
|
version: 2.0.3
|
||||||
@@ -10768,10 +10768,11 @@ packages:
|
|||||||
picocolors: 1.0.0
|
picocolors: 1.0.0
|
||||||
source-map-js: 1.0.2
|
source-map-js: 1.0.2
|
||||||
|
|
||||||
/posthog-js@1.96.0:
|
/posthog-js@1.103.0:
|
||||||
resolution: {integrity: sha512-nutEP3UbwjPt1a78KwBbdNBMhAY30lLjYXbBOPZ/juB9NDklmSqLF+lWImPcf6+rlXEhIboSr5sdTAF/R+Dasg==}
|
resolution: {integrity: sha512-NldabkbCB9a/2JLszoB7vk5XZr93iBoGEgEEKn201oDD3QkRn1nC+c+e1HQ3S9oMs5oZIhKmPNBCje1J9prYRg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
fflate: 0.4.8
|
fflate: 0.4.8
|
||||||
|
preact: 10.19.3
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/[email protected]:
|
/[email protected]:
|
||||||
@@ -10784,6 +10785,10 @@ packages:
|
|||||||
- debug
|
- debug
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/[email protected]:
|
||||||
|
resolution: {integrity: sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/[email protected]:
|
/[email protected]:
|
||||||
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
|||||||
Reference in New Issue
Block a user