diff --git a/frontend/auto-imports.d.ts b/frontend/auto-imports.d.ts new file mode 100644 index 00000000..9d240079 --- /dev/null +++ b/frontend/auto-imports.d.ts @@ -0,0 +1,10 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +// biome-ignore lint: disable +export {} +declare global { + +} diff --git a/frontend/components.d.ts b/frontend/components.d.ts index faa1b726..6ea3a31b 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -66,6 +66,8 @@ declare module 'vue' { FrappeCloudIcon: typeof import('./src/components/Icons/FrappeCloudIcon.vue')['default'] IconPicker: typeof import('./src/components/Controls/IconPicker.vue')['default'] IndicatorIcon: typeof import('./src/components/Icons/IndicatorIcon.vue')['default'] + InlineLessonMenu: typeof import('./src/components/Notes/InlineLessonMenu.vue')['default'] + InlineMenu: typeof import('./src/components/InlineMenu.vue')['default'] InviteIcon: typeof import('./src/components/Icons/InviteIcon.vue')['default'] JobApplicationModal: typeof import('./src/components/Modals/JobApplicationModal.vue')['default'] JobCard: typeof import('./src/components/JobCard.vue')['default'] @@ -81,6 +83,7 @@ declare module 'vue' { MultiSelect: typeof import('./src/components/Controls/MultiSelect.vue')['default'] NoPermission: typeof import('./src/components/NoPermission.vue')['default'] NoSidebarLayout: typeof import('./src/components/NoSidebarLayout.vue')['default'] + Notes: typeof import('./src/components/Notes/Notes.vue')['default'] NotPermitted: typeof import('./src/components/NotPermitted.vue')['default'] PageModal: typeof import('./src/components/Modals/PageModal.vue')['default'] PaymentSettings: typeof import('./src/components/Settings/PaymentSettings.vue')['default'] diff --git a/frontend/package.json b/frontend/package.json index 490d7fee..d981075a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -31,7 +31,7 @@ "codemirror": "^6.0.1", "dayjs": "^1.11.6", "feather-icons": "^4.28.0", - "frappe-ui": "^0.1.172", + "frappe-ui": "^0.1.182", "highlight.js": "^11.11.1", "lucide-vue-next": "^0.383.0", "markdown-it": "^14.0.0", diff --git a/frontend/src/components/DiscussionReplies.vue b/frontend/src/components/DiscussionReplies.vue index 88024ec7..aad4d902 100644 --- a/frontend/src/components/DiscussionReplies.vue +++ b/frontend/src/components/DiscussionReplies.vue @@ -32,13 +32,13 @@ " :options="[ { - label: 'Edit', + label: __('Edit'), onClick() { reply.editable = true }, }, { - label: 'Delete', + label: __('Delete'), onClick() { deleteReply(reply) }, diff --git a/frontend/src/components/Discussions.vue b/frontend/src/components/Discussions.vue index e635de33..16a0cbaf 100644 --- a/frontend/src/components/Discussions.vue +++ b/frontend/src/components/Discussions.vue @@ -5,6 +5,9 @@ class="float-right" @click="openTopicModal()" > + {{ __('New {0}').format(singularize(title)) }}
@@ -49,7 +52,7 @@ class="flex flex-col items-center justify-center border-2 border-dashed mt-5 py-8 rounded-md" > -
+
{{ __(emptyStateTitle) }}
@@ -73,7 +76,7 @@ import { singularize, timeAgo } from '@/utils' import { ref, onMounted, inject, onUnmounted } from 'vue' import DiscussionReplies from '@/components/DiscussionReplies.vue' import DiscussionModal from '@/components/Modals/DiscussionModal.vue' -import { MessageSquareText } from 'lucide-vue-next' +import { MessageSquareText, Plus } from 'lucide-vue-next' import { getScrollContainer } from '@/utils/scrollContainer' const showTopics = ref(true) @@ -102,7 +105,7 @@ const props = defineProps({ }, emptyStateText: { type: String, - default: 'Start a discussion', + default: 'Start a Discussion', }, singleThread: { type: Boolean, diff --git a/frontend/src/components/Notes/InlineLessonMenu.vue b/frontend/src/components/Notes/InlineLessonMenu.vue new file mode 100644 index 00000000..ca815238 --- /dev/null +++ b/frontend/src/components/Notes/InlineLessonMenu.vue @@ -0,0 +1,240 @@ + + diff --git a/frontend/src/components/Notes/Notes.vue b/frontend/src/components/Notes/Notes.vue new file mode 100644 index 00000000..99c0b997 --- /dev/null +++ b/frontend/src/components/Notes/Notes.vue @@ -0,0 +1,107 @@ + + diff --git a/frontend/src/components/Notes/types.ts b/frontend/src/components/Notes/types.ts new file mode 100644 index 00000000..6364a506 --- /dev/null +++ b/frontend/src/components/Notes/types.ts @@ -0,0 +1,32 @@ + +export type Note = { + highlighted_text?: string + color?: string + name?: string + note?: string | null + lesson?: string + member?: string +} + +export type Notes = { + data: Note[] + reload: () => void + insert: { + submit: ( + data: Note, + options: { onSuccess: (data: Note) => void; onError: (err: any) => void } + ) => void + } + setValue: { + submit: ( + data: Note, + options: { onSuccess: (data: Note) => void; onError: (err: any) => void } + ) => void + }, + delete: { + submit: ( + data: Note | string, + options?: { onSuccess: () => void; onError: (err: any) => void } + ) => void + } +} \ No newline at end of file diff --git a/frontend/src/pages/Lesson.vue b/frontend/src/pages/Lesson.vue index 4b5f5a72..567f3516 100644 --- a/frontend/src/pages/Lesson.vue +++ b/frontend/src/pages/Lesson.vue @@ -69,155 +69,179 @@ }" >
-
-
-
- {{ lesson.data.title }} -
+
+
+
+
+ {{ lesson.data.title }} +
-
- - {{ lesson.data.chapter_title }} - - {{ lesson.data.course_title }} - -
+ +
+ + + + + + + + + + + + +
-
- - - - + - - - - - - - - -
-
- -
- - + + - - -
+
-
-
- {{ __('Instructor Notes') }} +
+
+ {{ __('Instructor Notes') }} +
+
+ v-else-if="lesson.data.instructor_notes" + class="ProseMirror prose prose-table:table-fixed prose-td:p-2 prose-th:p-2 prose-td:border prose-th:border prose-td:border-outline-gray-2 prose-th:border-outline-gray-2 prose-td:relative prose-th:relative prose-th:bg-surface-gray-2 prose-sm max-w-none !whitespace-normal mt-8" + > + +
+
+
+
+
+ +
- -
-
-
-
-
- + -
-
@@ -247,10 +271,16 @@
+