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

View File

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