Skip to content

A self-hosted media server and file management system

fix: new toast controller did not implement disabled teleport option

aminnausin77d53e2aff81
diff --git a/resources/js/components/cedar-ui/toast/ToastController.vue b/resources/js/components/cedar-ui/toast/ToastController.vue
index 1c006d01..4049c227 100644
--- a/resources/js/components/cedar-ui/toast/ToastController.vue
+++ b/resources/js/components/cedar-ui/toast/ToastController.vue
@@ -1,24 +1,12 @@
<script setup lang="ts">
-// This is so bad lol pls fix
import type { Message, ToastControllerProps, ToastLayout, ToastPostion, ToastToDismiss } from '@aminnausin/cedar-ui';
+import { ToastState, DEFAULT_GAP, MOBILE_VIEWPORT_OFFSET, SCALE_STEP, TOAST_WIDTH, VIEWPORT_OFFSET, VISIBLE_TOASTS_AMOUNT, Y_OFFSET_STEP, Z_STEP } from '@aminnausin/cedar-ui';
import { nextTick, onMounted, ref, watch, watchEffect } from 'vue';
-import {
- ToastState,
- DEFAULT_GAP,
- MOBILE_VIEWPORT_OFFSET,
- SCALE_STEP,
- TOAST_WIDTH,
- VIEWPORT_OFFSET,
- VISIBLE_TOASTS_AMOUNT,
- Y_OFFSET_STEP,
- Z_STEP,
-} from '@aminnausin/cedar-ui';
-
import ToastNotification from './ToastNotification.vue';
-const props = withDefaults(defineProps<ToastControllerProps>(), {
+const props = withDefaults(defineProps<ToastControllerProps & { teleportDisabled?: boolean }>(), {
layout: 'default',
position: 'bottom-right',
defaultLife: 3000,
@@ -232,7 +220,7 @@ watchEffect((onInvalidate) => {
</script>
<template>
- <teleport to="body">
+ <teleport to="body" :disabled="teleportDisabled">
<ol
v-cloak
ref="container"