|
|
@@ -182,7 +182,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
-import { useMainStore } from '@/store'
|
|
|
+import { useMainStore, useSlidesStore } from '@/store'
|
|
|
import useGlobalHotkey from '@/hooks/useGlobalHotkey'
|
|
|
import usePasteEvent from '@/hooks/usePasteEvent'
|
|
|
|
|
|
@@ -203,6 +203,7 @@ import CollapsibleToolbar from '@/components/CollapsibleToolbar/index2.vue'
|
|
|
import CreateCourseDialog from '@/components/CreateCourseDialog.vue'
|
|
|
import api from '@/services/course'
|
|
|
|
|
|
+
|
|
|
interface ParentWindowWithToolList extends Window {
|
|
|
lastSteps?: () => void;
|
|
|
setCouresTitle?: (title: string) => void;
|
|
|
@@ -223,6 +224,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
})
|
|
|
|
|
|
const mainStore = useMainStore()
|
|
|
+const slidesStore = useSlidesStore()
|
|
|
const { dialogForExport, showSelectPanel, showSearchPanel, showNotesPanel, showMarkupPanel, showAIPPTDialog } = storeToRefs(mainStore)
|
|
|
const closeExportDialog = () => mainStore.setDialogForExport('')
|
|
|
const closeAIPPTDialog = () => mainStore.setAIPPTDialogState(false)
|
|
|
@@ -336,7 +338,13 @@ const getCourseDetail = async (courseid: string) => {
|
|
|
handleCourseLoaded(res[0][0])
|
|
|
}
|
|
|
|
|
|
-Object.assign(window, { getCourseDetail })
|
|
|
+const setTitle = (newTitle: string) => {
|
|
|
+ courseTitle.value = newTitle
|
|
|
+ slidesStore.setTitle(newTitle)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+Object.assign(window, { getCourseDetail, setTitle })
|
|
|
|
|
|
onMounted(() => {
|
|
|
if (!props.courseid) {
|