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
125 lines
2.8 KiB
Vue
125 lines
2.8 KiB
Vue
<template>
|
|
<aside>
|
|
<div class="columns is-marginless">
|
|
<div class="column is-paddingless">
|
|
<router-link :to="{ name: 'default' }">
|
|
<svg class="logo">
|
|
<use href="#logo"></use>
|
|
</svg>
|
|
</router-link>
|
|
</div>
|
|
<div class="column is-narrow has-text-right px-1">
|
|
<button
|
|
class="button is-rounded is-settings-control"
|
|
@click="$emit('search')"
|
|
title="Search containers (⌘ + k, ⌃k)"
|
|
>
|
|
<span class="icon">
|
|
<mdi-light-magnify />
|
|
</span>
|
|
</button>
|
|
</div>
|
|
<div class="column is-narrow has-text-right px-0">
|
|
<router-link :to="{ name: 'settings' }" active-class="is-active" class="button is-rounded is-settings-control">
|
|
<span class="icon">
|
|
<mdi-light-cog />
|
|
</span>
|
|
</router-link>
|
|
</div>
|
|
</div>
|
|
<p class="menu-label is-hidden-mobile">Containers</p>
|
|
<ul class="menu-list is-hidden-mobile">
|
|
<li v-for="item in visibleContainers" :key="item.id" :class="item.state">
|
|
<router-link
|
|
:to="{ name: 'container', params: { id: item.id, name: item.name } }"
|
|
active-class="is-active"
|
|
:title="item.name"
|
|
>
|
|
<div class="container is-flex is-align-items-center">
|
|
<div class="is-flex-grow-1 is-ellipsis">
|
|
{{ item.name }}
|
|
</div>
|
|
<div class="is-flex-shrink-1 column-icon">
|
|
<span
|
|
class="icon is-small"
|
|
@click.stop.prevent="appendActiveContainer(item)"
|
|
v-show="!activeContainersById[item.id]"
|
|
title="Pin as column"
|
|
>
|
|
<cil-columns />
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</router-link>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
|
export default {
|
|
props: [],
|
|
name: "SideMenu",
|
|
|
|
data() {
|
|
return {};
|
|
},
|
|
computed: {
|
|
...mapGetters(["visibleContainers", "activeContainers"]),
|
|
activeContainersById() {
|
|
return this.activeContainers.reduce((map, obj) => {
|
|
map[obj.id] = obj;
|
|
return map;
|
|
}, {});
|
|
},
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
appendActiveContainer: "APPEND_ACTIVE_CONTAINER",
|
|
}),
|
|
},
|
|
};
|
|
</script>
|
|
<style scoped lang="scss">
|
|
aside {
|
|
padding: 1em;
|
|
height: 100vh;
|
|
overflow: auto;
|
|
position: fixed;
|
|
width: inherit;
|
|
|
|
.is-hidden-mobile.is-active {
|
|
display: block !important;
|
|
}
|
|
}
|
|
|
|
li.exited a {
|
|
color: #777;
|
|
}
|
|
|
|
.logo {
|
|
width: 122px;
|
|
height: 54px;
|
|
fill: var(--logo-color);
|
|
}
|
|
|
|
.menu-list li {
|
|
.column-icon {
|
|
visibility: hidden;
|
|
|
|
& > span {
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
&:hover .column-icon {
|
|
visibility: visible;
|
|
&:hover {
|
|
color: var(--secondary-color);
|
|
}
|
|
}
|
|
}
|
|
</style>
|