diff --git a/assets/components/FuzzySearchModal.vue b/assets/components/FuzzySearchModal.vue index c80d5165..a7ab995f 100644 --- a/assets/components/FuzzySearchModal.vue +++ b/assets/components/FuzzySearchModal.vue @@ -43,9 +43,7 @@ const { maxResults: resultLimit = 20 } = defineProps<{ maxResults?: number; }>(); -const emit = defineEmits<{ - (e: "close"): void; -}>(); +const close = defineEmit(); const query = ref(""); const autocomplete = ref(); @@ -91,11 +89,11 @@ watchOnce(autocomplete, () => autocomplete.value?.focus()); function selected({ id }: { id: string }) { router.push({ name: "container-id", params: { id } }); - emit("close"); + close(); } function addColumn(container: Container) { store.appendActiveContainer(container); - emit("close"); + close(); } diff --git a/assets/components/LogViewer/LogContainer.vue b/assets/components/LogViewer/LogContainer.vue index 52eb4c62..b2819575 100644 --- a/assets/components/LogViewer/LogContainer.vue +++ b/assets/components/LogViewer/LogContainer.vue @@ -13,7 +13,7 @@
- +
@@ -38,9 +38,7 @@ const { closable?: boolean; }>(); -const emit = defineEmits<{ - (event: "close"): void; -}>(); +const close = defineEmit(); const store = useContainerStore(); diff --git a/assets/components/LogViewer/LogEventSource.vue b/assets/components/LogViewer/LogEventSource.vue index dd519e78..5a7ea9bd 100644 --- a/assets/components/LogViewer/LogEventSource.vue +++ b/assets/components/LogViewer/LogEventSource.vue @@ -7,16 +7,14 @@ import { Container } from "@/models/Container"; import { type ComputedRef } from "vue"; -const emit = defineEmits<{ - (e: "loading-more", value: boolean): void; -}>(); +const loadingMore = defineEmit<[value: boolean]>(); const container = inject("container") as ComputedRef; const config = inject("stream-config") as { stdout: boolean; stderr: boolean }; const { messages, loadOlderLogs } = useLogStream(container, config); -const beforeLoading = () => emit("loading-more", true); -const afterLoading = () => emit("loading-more", false); +const beforeLoading = () => loadingMore(true); +const afterLoading = () => loadingMore(false); defineExpose({ clear: () => (messages.value = []), diff --git a/assets/components/LogViewer/LogViewerWithSource.vue b/assets/components/LogViewer/LogViewerWithSource.vue index b1b42ef3..68b9fdec 100644 --- a/assets/components/LogViewer/LogViewerWithSource.vue +++ b/assets/components/LogViewer/LogViewerWithSource.vue @@ -1,5 +1,5 @@ @@ -7,10 +7,7 @@