Skip to content

A self-hosted media server and file management system

feat: install new modal but don't use for now

aminnausin73359c557c67
diff --git a/resources/js/components/cedar-ui/modal/BaseModal.vue b/resources/js/components/cedar-ui/modal/BaseModal.vue
index b733788c..049da11f 100644
--- a/resources/js/components/cedar-ui/modal/BaseModal.vue
+++ b/resources/js/components/cedar-ui/modal/BaseModal.vue
@@ -1,103 +1,24 @@
<script setup lang="ts">
-import { ref, useTemplateRef, watch } from 'vue';
-import { ButtonCorner, ButtonForm } from '@/components/cedar-ui/button';
-import { OnClickOutside } from '@vueuse/components';
-import { UseFocusTrap } from '@vueuse/integrations/useFocusTrap/component';
-import { useAppStore } from '@/stores/AppStore';
+import type { useModalCore } from './useModalCore';
-const props = withDefaults(
- defineProps<{
- modalData: any;
- // Should not be part of the modal
- action?: () => Promise<void>;
- useControls?: boolean;
- isProcessing?: boolean;
- }>(),
- {
- useControls: true,
- isProcessing: false,
- },
-);
+import { ButtonCorner } from '../button';
-const { setScrollLock } = useAppStore();
-const title = useTemplateRef('modalTitle');
-// Should not be part of the modal
-const processing = ref(false);
-
-// Should not be part of the modal
-const submitModal = async () => {
- processing.value = true;
- await props.action?.();
- processing.value = false;
- closeModal();
-};
-
-const closeModal = () => props.modalData.toggleModal(false);
-
-watch(
- () => props.modalData.isAnimating,
- (value) => {
- if ((props.modalData.modalOpen && value) || !value) {
- setScrollLock(props.modalData.modalOpen);
- title.value?.scrollIntoView({ behavior: 'smooth', block: 'start' });
- }
- },
-);
+defineProps<{
+ modal: ReturnType<typeof useModalCore>;
+}>();
</script>
+
<template>
- <Teleport to="body">
- <dialog
- v-show="modalData.modalOpen || modalData.isAnimating"
- class="modal fixed top-0 left-0 z-300 flex h-screen w-screen items-center justify-center bg-transparent text-gray-900 dark:text-neutral-200"
- v-cloak
- aria-modal="true"
- aria-labelledby="modalTitle"
- aria-describedby="modalDescription"
- >
- <Transition
- enter-active-class="ease-out duration-300"
- enter-from-class="opacity-0"
- enter-to-class="opacity-100"
- leave-active-class="ease-in duration-300"
- leave-from-class="opacity-100"
- leave-to-class="opacity-0"
- >
- <div v-if="modalData.modalOpen" class="bg-opacity-70 absolute inset-0 h-full w-full backdrop-blur-xs"></div>
- </Transition>
- <Transition
- enter-active-class="ease-out duration-300"
- enter-from-class="opacity-0 sm:scale-95"
- enter-to-class="opacity-100 sm:scale-100"
- leave-active-class="ease-in duration-(--duration-input)"
- leave-from-class="opacity-100 sm:scale-100"
- leave-to-class="opacity-0 sm:scale-95"
- >
- <UseFocusTrap v-if="modalData.modalOpen" class="scrollbar-hide relative flex h-full max-h-screen w-full items-center overflow-y-scroll px-6 py-10 sm:py-6">
- <OnClickOutside
- @trigger="closeModal"
- @keydown.esc="closeModal"
- class="3xl:max-w-2xl m-auto flex w-full flex-col gap-4 rounded-md border border-neutral-200 bg-white p-6 shadow-lg drop-shadow-md backdrop-blur-lg sm:max-w-lg sm:rounded-lg xl:max-w-xl dark:border-neutral-700 dark:bg-neutral-800/90"
- tabindex="-1"
- >
- <section class="flex flex-wrap items-center gap-2">
- <h3 ref="modalTitle" id="modalTitle" class="flex-1 scroll-mt-16 text-xl font-semibold sm:scroll-mt-12">{{ modalData?.title ?? 'Modal Title' }}</h3>
- <ButtonCorner @click="closeModal" class="hover:bg-overlay-accent static p-1.5" :use-default-style="false" />
- <p class="text-foreground-2 w-full text-sm" v-if="$slots.description" id="modalDescription">
- <slot name="description"> </slot>
- </p>
- </section>
- <slot name="content"> </slot>
- <slot v-if="useControls" name="controls">
- <section class="relative flex flex-col-reverse gap-2 sm:flex-row sm:justify-end">
- <ButtonForm type="button" variant="reset" @click="closeModal" :disabled="processing || isProcessing"> Cancel </ButtonForm>
- <ButtonForm type="button" variant="submit" @click="submitModal()" :disabled="processing || isProcessing">
- {{ modalData.submitText }}
- </ButtonForm>
- </section>
- </slot>
- </OnClickOutside>
- </UseFocusTrap>
- </Transition>
- </dialog>
- </Teleport>
+ <section v-if="!modal.props?.hideHeader" class="flex flex-wrap items-center gap-2">
+ <h3 ref="modalTitle" id="modalTitle" class="flex-1 scroll-mt-16 text-xl font-semibold sm:scroll-mt-12">
+ <slot name="title">
+ {{ modal.props?.title ?? 'Modal Title' }}
+ </slot>
+ </h3>
+ <ButtonCorner @click="modal.close" class="static! m-0!" />
+ <p class="w-full text-sm text-foreground-2" v-if="$slots.description" id="modalDescription">
+ <slot name="description"> </slot>
+ </p>
+ </section>
+ <slot> </slot>
</template>
diff --git a/resources/js/components/cedar-ui/modal/GlobalModal.vue b/resources/js/components/cedar-ui/modal/GlobalModal.vue
new file mode 100644
index 00000000..c1251b36
--- /dev/null
+++ b/resources/js/components/cedar-ui/modal/GlobalModal.vue
@@ -0,0 +1,57 @@
+<script setup lang="ts">
+import { useModalCore, cn } from '@aminnausin/cedar-ui';
+import { OnClickOutside } from '@vueuse/components';
+import { UseFocusTrap } from '@vueuse/integrations/useFocusTrap/component';
+
+const modalStore = useModalCore();
+</script>
+<template>
+ <Teleport to="body">
+ <dialog
+ v-show="modalStore.isOpen.value || modalStore.isAnimating.value"
+ class="modal fixed top-0 left-0 z-300 flex h-screen w-screen items-center justify-center bg-transparent text-gray-900 dark:text-neutral-200"
+ v-cloak
+ aria-modal="true"
+ aria-labelledby="modalTitle"
+ aria-describedby="modalDescription"
+ >
+ <Transition
+ enter-active-class="ease-out duration-300"
+ enter-from-class="opacity-0"
+ enter-to-class="opacity-100"
+ leave-active-class="ease-in duration-300"
+ leave-from-class="opacity-100"
+ leave-to-class="opacity-0"
+ >
+ <div v-if="modalStore.isOpen.value" class="absolute inset-0 h-full w-full backdrop-blur-xs"></div>
+ </Transition>
+ <Transition
+ enter-active-class="ease-out duration-300"
+ enter-from-class="opacity-0 sm:scale-95"
+ enter-to-class="opacity-100 sm:scale-100"
+ leave-active-class="ease-in duration-200"
+ leave-from-class="opacity-100 sm:scale-100"
+ leave-to-class="opacity-0 sm:scale-95"
+ >
+ <UseFocusTrap
+ v-if="modalStore.isOpen.value"
+ class="scrollbar-hide relative flex h-full max-h-screen w-full items-center overflow-y-scroll px-6 py-10 sm:py-6"
+ >
+ <OnClickOutside
+ @trigger="modalStore.close"
+ @keydown.esc="modalStore.close"
+ :class="
+ cn(
+ '3xl:max-w-2xl m-auto flex w-full flex-col gap-4 rounded-md border border-neutral-200 bg-white p-6 shadow-lg drop-shadow-md backdrop-blur-lg sm:max-w-lg sm:rounded-lg xl:max-w-xl dark:border-neutral-700 dark:bg-neutral-800/90',
+ modalStore.props.rootClass,
+ )
+ "
+ tabindex="-1"
+ >
+ <component :is="modalStore.component.value" v-bind="modalStore.props.value" />
+ </OnClickOutside>
+ </UseFocusTrap>
+ </Transition>
+ </dialog>
+ </Teleport>
+</template>
diff --git a/resources/js/components/cedar-ui/modal/ModalBase.vue b/resources/js/components/cedar-ui/modal/ModalBase.vue
new file mode 100644
index 00000000..b733788c
--- /dev/null
+++ b/resources/js/components/cedar-ui/modal/ModalBase.vue
@@ -0,0 +1,103 @@
+<script setup lang="ts">
+import { ref, useTemplateRef, watch } from 'vue';
+import { ButtonCorner, ButtonForm } from '@/components/cedar-ui/button';
+import { OnClickOutside } from '@vueuse/components';
+import { UseFocusTrap } from '@vueuse/integrations/useFocusTrap/component';
+import { useAppStore } from '@/stores/AppStore';
+
+const props = withDefaults(
+ defineProps<{
+ modalData: any;
+ // Should not be part of the modal
+ action?: () => Promise<void>;
+ useControls?: boolean;
+ isProcessing?: boolean;
+ }>(),
+ {
+ useControls: true,
+ isProcessing: false,
+ },
+);
+
+const { setScrollLock } = useAppStore();
+const title = useTemplateRef('modalTitle');
+// Should not be part of the modal
+const processing = ref(false);
+
+// Should not be part of the modal
+const submitModal = async () => {
+ processing.value = true;
+ await props.action?.();
+ processing.value = false;
+ closeModal();
+};
+
+const closeModal = () => props.modalData.toggleModal(false);
+
+watch(
+ () => props.modalData.isAnimating,
+ (value) => {
+ if ((props.modalData.modalOpen && value) || !value) {
+ setScrollLock(props.modalData.modalOpen);
+ title.value?.scrollIntoView({ behavior: 'smooth', block: 'start' });
+ }
+ },
+);
+</script>
+<template>
+ <Teleport to="body">
+ <dialog
+ v-show="modalData.modalOpen || modalData.isAnimating"
+ class="modal fixed top-0 left-0 z-300 flex h-screen w-screen items-center justify-center bg-transparent text-gray-900 dark:text-neutral-200"
+ v-cloak
+ aria-modal="true"
+ aria-labelledby="modalTitle"
+ aria-describedby="modalDescription"
+ >
+ <Transition
+ enter-active-class="ease-out duration-300"
+ enter-from-class="opacity-0"
+ enter-to-class="opacity-100"
+ leave-active-class="ease-in duration-300"
+ leave-from-class="opacity-100"
+ leave-to-class="opacity-0"
+ >
+ <div v-if="modalData.modalOpen" class="bg-opacity-70 absolute inset-0 h-full w-full backdrop-blur-xs"></div>
+ </Transition>
+ <Transition
+ enter-active-class="ease-out duration-300"
+ enter-from-class="opacity-0 sm:scale-95"
+ enter-to-class="opacity-100 sm:scale-100"
+ leave-active-class="ease-in duration-(--duration-input)"
+ leave-from-class="opacity-100 sm:scale-100"
+ leave-to-class="opacity-0 sm:scale-95"
+ >
+ <UseFocusTrap v-if="modalData.modalOpen" class="scrollbar-hide relative flex h-full max-h-screen w-full items-center overflow-y-scroll px-6 py-10 sm:py-6">
+ <OnClickOutside
+ @trigger="closeModal"
+ @keydown.esc="closeModal"
+ class="3xl:max-w-2xl m-auto flex w-full flex-col gap-4 rounded-md border border-neutral-200 bg-white p-6 shadow-lg drop-shadow-md backdrop-blur-lg sm:max-w-lg sm:rounded-lg xl:max-w-xl dark:border-neutral-700 dark:bg-neutral-800/90"
+ tabindex="-1"
+ >
+ <section class="flex flex-wrap items-center gap-2">
+ <h3 ref="modalTitle" id="modalTitle" class="flex-1 scroll-mt-16 text-xl font-semibold sm:scroll-mt-12">{{ modalData?.title ?? 'Modal Title' }}</h3>
+ <ButtonCorner @click="closeModal" class="hover:bg-overlay-accent static p-1.5" :use-default-style="false" />
+ <p class="text-foreground-2 w-full text-sm" v-if="$slots.description" id="modalDescription">
+ <slot name="description"> </slot>
+ </p>
+ </section>
+ <slot name="content"> </slot>
+ <slot v-if="useControls" name="controls">
+ <section class="relative flex flex-col-reverse gap-2 sm:flex-row sm:justify-end">
+ <ButtonForm type="button" variant="reset" @click="closeModal" :disabled="processing || isProcessing"> Cancel </ButtonForm>
+ <ButtonForm type="button" variant="submit" @click="submitModal()" :disabled="processing || isProcessing">
+ {{ modalData.submitText }}
+ </ButtonForm>
+ </section>
+ </slot>
+ </OnClickOutside>
+ </UseFocusTrap>
+ </Transition>
+ </dialog>
+ </Teleport>
+</template>
diff --git a/resources/js/components/cedar-ui/modal/index.ts b/resources/js/components/cedar-ui/modal/index.ts
index 5126256d..65fbbf10 100644
--- a/resources/js/components/cedar-ui/modal/index.ts
+++ b/resources/js/components/cedar-ui/modal/index.ts
@@ -1,5 +1,4 @@
+export { default as ModalBase } from './ModalBase.vue'; // Compatibility
export { default as BaseModal } from './BaseModal.vue';
-// export { default as GlobalModal } from './GlobalModal.vue';
-// export { default as DeleteAccountModal } from './DeleteAccountModal.vue';
-// export { default as LogoutSessionsModal } from './LogoutSessionsModal.vue';
-// export * from './useModalCore';
+export { default as GlobalModal } from './GlobalModal.vue';
+export * from './useModalCore';
diff --git a/resources/js/components/cedar-ui/modal/useModalCore.ts b/resources/js/components/cedar-ui/modal/useModalCore.ts
new file mode 100644
index 00000000..042cd374
--- /dev/null
+++ b/resources/js/components/cedar-ui/modal/useModalCore.ts
@@ -0,0 +1,37 @@
+import type { Component } from 'vue';
+
+import { shallowRef, ref, reactive } from 'vue';
+
+const isAnimating = ref(false);
+const isOpen = ref(false);
+const animationTime = ref(300);
+const timeoutId = ref<number | null>(null);
+
+const props = reactive<Record<string, any>>({});
+const component = shallowRef<Component | null>(null);
+
+function open(comp: Component, newProps: Record<string, any> = {}) {
+ if (timeoutId.value) clearTimeout(timeoutId.value);
+ component.value = comp;
+ Object.assign(props, newProps);
+
+ isOpen.value = true;
+ isAnimating.value = true;
+
+ timeoutId.value = window.setTimeout(() => {
+ isAnimating.value = false;
+ }, animationTime.value);
+}
+
+function close() {
+ if (timeoutId.value) clearTimeout(timeoutId.value);
+ isOpen.value = false;
+ isAnimating.value = true;
+ timeoutId.value = window.setTimeout(() => {
+ isAnimating.value = false;
+ }, animationTime.value);
+}
+
+export function useModalCore() {
+ return { isOpen, isAnimating, animationTime, props, component, open, close };
+}
diff --git a/resources/js/components/dashboard/DashboardLibraries.vue b/resources/js/components/dashboard/DashboardLibraries.vue
index 9f205757..182da811 100644
--- a/resources/js/components/dashboard/DashboardLibraries.vue
+++ b/resources/js/components/dashboard/DashboardLibraries.vue
@@ -14,7 +14,7 @@ import { storeToRefs } from 'pinia';
import { sortObject } from '@/service/sort/baseSort';
import { ButtonText } from '@/components/cedar-ui/button';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { toast } from '@aminnausin/cedar-ui';
import LibraryFolderCard from '@/components/cards/data/LibraryFolderCard.vue';
@@ -258,10 +258,10 @@ watchEffect(() => {
:sorting-options="sortingOptions"
v-model="searchQuery"
/>
- <BaseModal :modalData="confirmModal" :action="submitDelete">
+ <ModalBase :modalData="confirmModal" :action="submitDelete">
<template #description> Are you sure you want to delete this Library? </template>
- </BaseModal>
- <BaseModal :modalData="editFolderModal" :useControls="false">
+ </ModalBase>
+ <ModalBase :modalData="editFolderModal" :useControls="false">
<template #description v-if="cachedFolder && cachedFolder.series?.editor_id && cachedFolder.series.date_updated">
Last edited by
<a title="Editor profile" target="_blank" :href="`/profile/${cachedFolder.series.editor_id}`" class="hover:text-primary dark:hover:text-primary-muted"
@@ -273,5 +273,5 @@ watchEffect(() => {
<template #content>
<EditFolder v-if="cachedFolder" :folder="cachedFolder" @handleFinish="handleSeriesUpdate" />
</template>
- </BaseModal>
+ </ModalBase>
</template>
diff --git a/resources/js/components/dashboard/DashboardTasks.vue b/resources/js/components/dashboard/DashboardTasks.vue
index da280202..2bb6845d 100644
--- a/resources/js/components/dashboard/DashboardTasks.vue
+++ b/resources/js/components/dashboard/DashboardTasks.vue
@@ -15,7 +15,7 @@ import { storeToRefs } from 'pinia';
import { sortObject } from '@/service/sort/baseSort';
import { ButtonText } from '@/components/cedar-ui/button';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { toast } from '@aminnausin/cedar-ui';
import DashboardTaskMenu from '@/components/menus/DashboardTaskMenu.vue';
@@ -249,10 +249,10 @@ onUnmounted(async () => {
:table-styles="'gap-4 xs:gap-2'"
v-model="searchQuery"
/>
- <BaseModal :modalData="cancelModal" :action="submitCancel">
+ <ModalBase :modalData="cancelModal" :action="submitCancel">
<template #description> Are you sure you want to cancel this task and all of its sub tasks? </template>
- </BaseModal>
- <BaseModal :modalData="deleteModal" :action="submitDelete">
+ </ModalBase>
+ <ModalBase :modalData="deleteModal" :action="submitDelete">
<template #description>Are you sure you want to delete this task and all of its sub tasks? </template>
- </BaseModal>
+ </ModalBase>
</template>
diff --git a/resources/js/components/dashboard/DashboardUsers.vue b/resources/js/components/dashboard/DashboardUsers.vue
index 8d7c0c67..0fde5d4b 100644
--- a/resources/js/components/dashboard/DashboardUsers.vue
+++ b/resources/js/components/dashboard/DashboardUsers.vue
@@ -11,7 +11,7 @@ import { deleteUser } from '@/service/siteAPI';
import { sortObject } from '@/service/sort/baseSort';
import { ButtonText } from '@/components/cedar-ui/button';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { toast } from '@aminnausin/cedar-ui';
import UserCard from '@/components/cards/data/UserCard.vue';
@@ -149,7 +149,7 @@ const loadData = async (refresh: boolean = false) => {
:table-styles="'gap-4 xs:gap-2'"
v-model="searchQuery"
/>
- <BaseModal :modalData="confirmModal" :action="submitDelete">
+ <ModalBase :modalData="confirmModal" :action="submitDelete">
<template #description> Are you sure you want to remove this user? </template>
- </BaseModal>
+ </ModalBase>
</template>
diff --git a/resources/js/components/panels/FolderSidebar.vue b/resources/js/components/panels/FolderSidebar.vue
index ceeab155..a1728e60 100644
--- a/resources/js/components/panels/FolderSidebar.vue
+++ b/resources/js/components/panels/FolderSidebar.vue
@@ -10,7 +10,7 @@ import { storeToRefs } from 'pinia';
import { ButtonIcon } from '@/components/cedar-ui/button';
import { sortObject } from '@/service/sort/baseSort';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import SidebarHeader from '@/components/headers/SidebarHeader.vue';
import FolderCard from '@/components/cards/data/FolderCard.vue';
@@ -115,13 +115,13 @@ const handleSeriesUpdate = async (res: any) => {
:sorting-options="folderSortingOptions"
/>
- <BaseModal :modalData="shareModal">
+ <ModalBase :modalData="shareModal">
<template #description> Copy link to clipboard to share it.</template>
<template #controls>
<CopyToClipboard :text="shareLink" />
</template>
- </BaseModal>
- <BaseModal :modalData="editFolderModal" :useControls="false">
+ </ModalBase>
+ <ModalBase :modalData="editFolderModal" :useControls="false">
<template #description v-if="cachedFolder && cachedFolder.series?.editor_id && cachedFolder.series.date_updated">
Last edited by
<a title="Editor profile" target="_blank" :href="`/profile/${cachedFolder.series.editor_id}`" class="hover:text-primary dark:hover:text-primary-muted"
@@ -133,5 +133,5 @@ const handleSeriesUpdate = async (res: any) => {
<template #content>
<EditFolder v-if="cachedFolder" :folder="cachedFolder" @handleFinish="handleSeriesUpdate" />
</template>
- </BaseModal>
+ </ModalBase>
</template>
diff --git a/resources/js/components/panels/HistorySidebar.vue b/resources/js/components/panels/HistorySidebar.vue
index cf22d2f5..889e9a92 100644
--- a/resources/js/components/panels/HistorySidebar.vue
+++ b/resources/js/components/panels/HistorySidebar.vue
@@ -3,7 +3,7 @@ import { TableLoadingSpinner } from '@/components/cedar-ui/table';
import { useRecordsLimited } from '@/service/records/useRecords';
import { CopyToClipboard } from '@/components/cedar-ui/clipboard';
import { ButtonText } from '@/components/cedar-ui/button';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { ref } from 'vue';
import SidebarHeader from '@/components/headers/SidebarHeader.vue';
@@ -46,10 +46,10 @@ const handleShare = (link: string) => {
</template>
</section>
- <BaseModal :modalData="shareModal">
+ <ModalBase :modalData="shareModal">
<template #description> Copy link to clipboard to share it.</template>
<template #controls>
<CopyToClipboard :text="shareLink" />
</template>
- </BaseModal>
+ </ModalBase>
</template>
diff --git a/resources/js/components/video/VideoInfoPanel.vue b/resources/js/components/video/VideoInfoPanel.vue
index 3dc1d5df..1e701093 100755
--- a/resources/js/components/video/VideoInfoPanel.vue
+++ b/resources/js/components/video/VideoInfoPanel.vue
@@ -10,7 +10,7 @@ import { useAuthStore } from '@/stores/AuthStore';
import { BasePopover } from '@/components/cedar-ui/popover';
import { storeToRefs } from 'pinia';
import { HoverCard } from '@/components/cedar-ui/hover-card';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { BadgeTag } from '@/components/cedar-ui/badge';
import { emitSeek } from '@/service/player/seekBus';
import { useRoute } from 'vue-router';
@@ -318,7 +318,7 @@ onMounted(() => {
</article>
</div>
</section>
- <BaseModal :modalData="editFolderModal" :useControls="false">
+ <ModalBase :modalData="editFolderModal" :useControls="false">
<template #description v-if="stateFolder.series?.editor_id && stateFolder.series.date_updated">
Last edited by
<a title="Editor profile" target="_blank" :href="`/profile/${stateFolder.series.editor_id}`" class="hover:text-primary dark:hover:text-primary-muted"
@@ -330,8 +330,8 @@ onMounted(() => {
<template #content>
<EditFolder :folder="stateFolder" @handleFinish="handleSeriesUpdate" />
</template>
- </BaseModal>
- <BaseModal :modalData="editVideoModal" :useControls="false">
+ </ModalBase>
+ <ModalBase :modalData="editVideoModal" :useControls="false">
<template #description v-if="stateVideo.metadata?.editor_id && stateVideo.metadata.updated_at">
Last edited by
<a title="Editor profile" target="_blank" :href="`/profile/${stateVideo.metadata.editor_id}`" class="hover:text-primary dark:hover:text-primary-muted">
@@ -343,14 +343,14 @@ onMounted(() => {
<template #content>
<EditVideo :video="stateVideo" @handleFinish="handleVideoDetailsUpdate" />
</template>
- </BaseModal>
- <BaseModal :modalData="shareVideoModal">
+ </ModalBase>
+ <ModalBase :modalData="shareVideoModal">
<template #description> Copy link to clipboard to share it.</template>
<template #controls>
<CopyToClipboard :text="videoURL" />
</template>
- </BaseModal>
+ </ModalBase>
</template>
<style lang="css">
diff --git a/resources/js/components/video/VideoLyrics.vue b/resources/js/components/video/VideoLyrics.vue
index 87019c23..2be8c779 100644
--- a/resources/js/components/video/VideoLyrics.vue
+++ b/resources/js/components/video/VideoLyrics.vue
@@ -8,7 +8,7 @@ import { useContentStore } from '@/stores/ContentStore';
import { useLyricStore } from '@/stores/LyricStore';
import { storeToRefs } from 'pinia';
import { ButtonIcon } from '@/components/cedar-ui/button';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { onSeek } from '@/service/player/seekBus';
import VideoLyricItem from '@/components/video/VideoLyricItem.vue';
@@ -274,11 +274,11 @@ defineExpose({ scrollToCurrent });
</template>
</ButtonIcon>
</div>
- <BaseModal :modalData="editLyricsModal" :useControls="false">
+ <ModalBase :modalData="editLyricsModal" :useControls="false">
<template #content>
<EditLyrics :video="stateVideo" @handleFinish="handleLyricsUpdated" />
</template>
- </BaseModal>
+ </ModalBase>
</template>
<style lang="css" scoped>
diff --git a/resources/js/views/HistoryView.vue b/resources/js/views/HistoryView.vue
index f690ff06..36081689 100755
--- a/resources/js/views/HistoryView.vue
+++ b/resources/js/views/HistoryView.vue
@@ -9,7 +9,7 @@ import { useAppStore } from '@/stores/AppStore';
import { storeToRefs } from 'pinia';
import { sortObject } from '@/service/sort/baseSort';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { toast } from '@aminnausin/cedar-ui';
import RecordCardDetails from '@/components/cards/data/RecordCardDetails.vue';
@@ -105,9 +105,9 @@ onMounted(() => {
v-model="searchQuery"
/>
</section>
- <BaseModal :modalData="confirmModal" :action="submitDelete">
+ <ModalBase :modalData="confirmModal" :action="submitDelete">
<template #description> Are you sure you want to delete this record? </template>
- </BaseModal>
+ </ModalBase>
</template>
<template v-slot:sidebar> </template>
</LayoutBase>
diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vue
index 458dbc85..707f0852 100755
--- a/resources/js/views/VideoView.vue
+++ b/resources/js/views/VideoView.vue
@@ -11,7 +11,7 @@ import { queryClient } from '@/service/vue-query';
import { useAppStore } from '@/stores/AppStore';
import { storeToRefs } from 'pinia';
import { TableBase } from '@/components/cedar-ui/table';
-import { BaseModal } from '@/components/cedar-ui/modal';
+import { ModalBase } from '@/components/cedar-ui/modal';
import { useRoute } from 'vue-router';
import VideoAmbientPlayer from '@/components/video/VideoAmbientPlayer.vue';
@@ -223,7 +223,7 @@ watch(() => stateVideo.value, setVideoAsDocumentTitle, { immediate: true });
v-model="searchQuery"
/>
- <BaseModal :modalData="editVideoModal" :useControls="false">
+ <ModalBase :modalData="editVideoModal" :useControls="false">
<template #description>
<template v-if="cachedVideo && cachedVideo.metadata?.editor_id && cachedVideo.metadata.updated_at">
<span>
@@ -245,13 +245,13 @@ watch(() => stateVideo.value, setVideoAsDocumentTitle, { immediate: true });
<template #content>
<EditVideo v-if="cachedVideo" :video="cachedVideo" @handleFinish="handleVideoDetailsUpdate" />
</template>
- </BaseModal>
- <BaseModal :modalData="shareVideoModal">
+ </ModalBase>
+ <ModalBase :modalData="shareVideoModal">
<template #description> Copy link to clipboard to share it.</template>
<template #controls>
<CopyToClipboard :text="cachedVideoUrl" />
</template>
- </BaseModal>
+ </ModalBase>
</section>
</template>
<template v-slot:sidebar>