mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
* WIP vue3 * WIP vue3 * WIP vue3 * Migrates to vitejs * Fixes js tests and removes not needed modules * Fixes unmount * Updates to use css instead for space * Fixes tests and rebases one more time * Uses orgua * Fixes migrations bugs with oruga and fixes scroll * Fixes v-deep * Fixes icons to prod * Fixes icons to prod * Adds favicon back * Transitions some to composition api * Updates another component to comp api * Cleans defineProps * Updates log messages * Moves more to compose api * Cleans up styles and rewrites event source * Tries to fix DOMPurify * Removes postcss * WIP typescript * Improves importing * Converts all to ts * Converts main to ts * Makes changes for tsconfig * Moves more to ts * Adds typing to store * More typing * Updates to ts * Updates the rest to ts * Fixes computes * Fixes unmount * Adds cypress with custom base fixed * Fixes jest tests * Fixes golang tests * Adds gitignore for cypress * Removes int in favor of e2e with cypress * Tries to fix int tests again * Adds title * Updates e2e tests * Uses vue for isMobile * Removes app spec * Cleans up docker * Adds drop down for settings * Fixes bug with restart * Fixes scroll up bug * Adds tests for light mode
82 lines
2.3 KiB
Vue
82 lines
2.3 KiB
Vue
<template>
|
|
<scrollable-view :scrollable="scrollable" v-if="container">
|
|
<template v-slot:header v-if="showTitle">
|
|
<div class="mr-0 columns is-vcentered is-marginless is-hidden-mobile">
|
|
<div class="column is-clipped is-paddingless">
|
|
<container-title :container="container" @close="$emit('close')"></container-title>
|
|
</div>
|
|
<div class="column is-narrow is-paddingless">
|
|
<container-stat :stat="container.stat" :state="container.state"></container-stat>
|
|
</div>
|
|
<div class="mr-2 column is-narrow is-paddingless" v-if="closable">
|
|
<button class="delete is-medium" @click="$emit('close')"></button>
|
|
</div>
|
|
<!-- <div class="mr-2 column is-narrow is-paddingless">
|
|
<o-dropdown aria-role="list" position="bottom-left">
|
|
<template v-slot:trigger>
|
|
<span class="btn">
|
|
<span class="icon">
|
|
<carbon-verflow-menu-vertical />
|
|
</span>
|
|
</span>
|
|
</template>
|
|
|
|
<o-dropdown-item aria-role="listitem"> Clear </o-dropdown-item>
|
|
<o-dropdown-item aria-role="listitem">Download</o-dropdown-item>
|
|
</o-dropdown>
|
|
</div> -->
|
|
</div>
|
|
<log-actions-toolbar :container="container" :onClearClicked="onClearClicked"></log-actions-toolbar>
|
|
</template>
|
|
<template v-slot="{ setLoading }">
|
|
<log-viewer-with-source ref="viewer" :id="id" @loading-more="setLoading($event)"></log-viewer-with-source>
|
|
</template>
|
|
</scrollable-view>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref, toRefs } from "vue";
|
|
import useContainer from "../composables/container";
|
|
|
|
const props = defineProps({
|
|
id: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
showTitle: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
scrollable: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
closable: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
});
|
|
const { id } = toRefs(props);
|
|
const { container } = useContainer(id);
|
|
|
|
const viewer = ref<HTMLElement>();
|
|
|
|
function onClearClicked() {
|
|
viewer.value?.clear();
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
button.delete {
|
|
background-color: var(--scheme-main-ter);
|
|
opacity: 0.6;
|
|
&:after,
|
|
&:before {
|
|
background-color: var(--text-color);
|
|
}
|
|
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|