Add bot selector view

This commit is contained in:
Matthias 2021-08-30 07:12:46 +02:00
parent 030459023c
commit 55cc721525
2 changed files with 8 additions and 6 deletions

View File

@ -1,11 +1,8 @@
<template>
<div
class="flex-align-center justify-content-between w-100"
:class="noButtons ? 'd-inline' : 'd-flex'"
>
<div class="d-flex align-items-center justify-content-between w-100">
<span class="mr-2">{{ bot.botName || bot.botId }}</span>
<div class="flex-align-center" :class="noButtons ? 'd-inline' : 'd-flex'">
<div class="align-items-center" :class="noButtons ? 'd-inline' : 'd-flex'">
<span class="ml-2 align-middle">{{
allIsBotOnline[bot.botId] ? '&#128994;' : '&#128308;'
}}</span>

View File

@ -31,15 +31,18 @@
<!-- Right aligned nav items -->
<b-navbar-nav class="ml-auto" menu-class="w-100">
<!-- TODO This should show outside of the dropdown in XS mode -->
<b-dropdown
v-if="botCount > 1"
size="sm"
class="m-1"
no-caret
variant="info"
toggle-class="d-flex align-items-center "
menu-class="my-0 py-0"
>
<template #button-content>
<BotEntry class="d-inline" :bot="selectedBotObj" :no-buttons="true" />
<BotEntry :bot="selectedBotObj" :no-buttons="true" />
</template>
<BotList :small="true" />
</b-dropdown>
@ -120,6 +123,8 @@ const uiSettingsNs = namespace('uiSettings');
export default class NavBar extends Vue {
pingInterval: number | null = null;
botSelectOpen = false;
@Action setLoggedIn;
@Action loadUIVersion;