mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
* feat: moves to tailwindcss and better component library * update styles * creates toggle component * adds drop down component * cleans up components * removes unused components * uses tailwind for scroll view * removes table component * improves animation * cleans up more styles * uses more tailwind * cleans up more styles with flex * more styles * removes bulma * adds colors * updates modules * fixes bugs * stops importing styles.scss * more clean up * cleans up headers * cleans up title * fixes title * fixes mobile-hidden * fixes shadow * fixes colors * add tailwindcss/nesting * adds more colors * fixes more colors * updates colors * fixes colors * colors * fixes menu on left * menu and modal * menu and modal * fuzzy search * fixes menu on left * remove logs * cleans up search * adds host to search * remove outline from inputs * cleans up left search icon * removes unused styles * fixes docker * removes sass! * cleans up styles * Fixe smobile menu * fixes mobile menu * fixes typecheck * fixes seconday color * adds drop down for container * cleans header css * updates css * fixes other layouts * updates some tests * fixes border * fixes home screen font * fixes top header * fixes tests * fixes fieldlist * fixes complex * cleans up more * removes index * fixes tests * fixes tests * resolves conflicts
94 lines
2.8 KiB
Vue
94 lines
2.8 KiB
Vue
<template>
|
|
<div class="dropdown dropdown-end dropdown-hover">
|
|
<label tabindex="0" class="btn btn-ghost btn-sm gap-0.5 px-2">
|
|
<carbon:circle-solid class="w-2.5 text-red" v-if="streamConfig.stderr" />
|
|
<carbon:circle-solid class="w-2.5 text-blue" v-if="streamConfig.stdout" />
|
|
</label>
|
|
<ul tabindex="0" class="menu dropdown-content rounded-box z-50 w-52 bg-base p-1 shadow">
|
|
<li>
|
|
<a @click.prevent="clear()">
|
|
<octicon:trash-24 /> {{ $t("toolbar.clear") }}
|
|
<key-shortcut char="k" :modifiers="['shift', 'meta']"></key-shortcut>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a :href="`${base}/api/logs/download/${container.host}/${container.id}`" download>
|
|
<octicon:download-24 /> {{ $t("toolbar.download") }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a @click.prevent="showSearch = true">
|
|
<mdi:light-magnify /> {{ $t("toolbar.search") }}
|
|
<key-shortcut char="f"></key-shortcut>
|
|
</a>
|
|
</li>
|
|
<li class="line"></li>
|
|
<li>
|
|
<a
|
|
@click="
|
|
streamConfig.stdout = true;
|
|
streamConfig.stderr = true;
|
|
"
|
|
>
|
|
<div class="flex h-4 w-4 gap-0.5">
|
|
<template v-if="streamConfig.stderr && streamConfig.stdout">
|
|
<carbon:circle-solid class="w-2 text-red" />
|
|
<carbon:circle-solid class="w-2 text-blue" />
|
|
</template>
|
|
</div>
|
|
{{ $t("toolbar.show-all") }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
@click="
|
|
streamConfig.stdout = true;
|
|
streamConfig.stderr = false;
|
|
"
|
|
>
|
|
<div class="flex h-4 w-4 flex-col gap-1">
|
|
<carbon:circle-solid class="w-2 text-blue" v-if="!streamConfig.stderr && streamConfig.stdout" />
|
|
</div>
|
|
{{ $t("toolbar.show", { std: "STDOUT" }) }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
@click="
|
|
streamConfig.stdout = false;
|
|
streamConfig.stderr = true;
|
|
"
|
|
>
|
|
<div class="flex h-4 w-4 flex-col gap-1">
|
|
<carbon:circle-solid class="w-2 text-red" v-if="streamConfig.stderr && !streamConfig.stdout" />
|
|
</div>
|
|
{{ $t("toolbar.show", { std: "STDERR" }) }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { type ComputedRef } from "vue";
|
|
import { Container } from "@/models/Container";
|
|
|
|
const { showSearch } = useSearchFilter();
|
|
const { base } = config;
|
|
|
|
const clear = defineEmit();
|
|
|
|
const container = inject("container") as ComputedRef<Container>;
|
|
const streamConfig = inject("stream-config") as { stdout: boolean; stderr: boolean };
|
|
</script>
|
|
|
|
<style scoped lang="postcss">
|
|
li.line {
|
|
@apply h-px bg-base-content/20;
|
|
}
|
|
|
|
a {
|
|
@apply whitespace-nowrap;
|
|
}
|
|
</style>
|