mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 06:28:42 +01:00
feat: duckdb wasm capibility (#3272)
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup generic="T">
|
||||
import LogEventSource from "@/components/ContainerViewer/LogEventSource.vue";
|
||||
import EventSource from "@/components/LogViewer/EventSource.vue";
|
||||
import { LogStreamSource } from "@/composable/eventStreams";
|
||||
import { ComponentExposed } from "vue-component-type-helpers";
|
||||
|
||||
const { streamSource, visibleKeys, showContainerName, entity } = defineProps<{
|
||||
streamSource: (t: Ref<T>) => LogStreamSource;
|
||||
@@ -15,15 +16,15 @@ const { streamSource, visibleKeys, showContainerName, entity } = defineProps<{
|
||||
entity: T;
|
||||
}>();
|
||||
|
||||
const source = $ref<InstanceType<typeof LogEventSource>>();
|
||||
const source = useTemplateRef<ComponentExposed<typeof EventSource>>("source");
|
||||
|
||||
defineExpose({
|
||||
clear: () => source?.clear(),
|
||||
clear: () => source.value?.clear(),
|
||||
});
|
||||
|
||||
onKeyStroke("k", (e) => {
|
||||
if ((e.ctrlKey || e.metaKey) && e.shiftKey) {
|
||||
source?.clear();
|
||||
source.value?.clear();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user