1
0
mirror of https://github.com/amir20/dozzle.git synced 2026-01-02 02:57:27 +01:00

feat: adds host drop down to mobile view. see #2157 (#2160)

* feat: adds host drop down to mobile view. see #2157

* fix: removes unused imports
This commit is contained in:
Amir Raminfar
2023-04-27 16:32:48 -07:00
committed by GitHub
parent 9aed4ba19f
commit 088d96cb0d

View File

@@ -8,8 +8,20 @@
</svg>
</router-link>
</div>
<div class="column ml-4 is-family-monospace is-ellipsis" v-if="$route.name == 'container-id'">
{{ allContainersById[route.params.id as string]?.name }}
<div class="column ml-4" v-if="config.hosts.length > 1">
<div class="mb-3">
<o-dropdown v-model="sessionHost" aria-role="list">
<template #trigger>
<o-button variant="primary" type="button" size="small">
<span>{{ sessionHost }}</span>
</o-button>
</template>
<o-dropdown-item :value="value" aria-role="listitem" v-for="value in config.hosts" :key="value">
<span>{{ value }}</span>
</o-dropdown-item>
</o-dropdown>
</div>
</div>
<div class="column is-narrow push-right">
@@ -72,10 +84,11 @@
</template>
<script lang="ts" setup>
import { sessionHost } from "@/composables/storage";
const { base, secured } = config;
const store = useContainerStore();
const route = useRoute();
const { visibleContainers, allContainersById } = storeToRefs(store);
const { visibleContainers } = storeToRefs(store);
let showNav = $ref(false);