[editor] Add bot version to frontend

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-01-20 01:16:05 +01:00
parent a501dcd81d
commit 71ea4a0c34
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
2 changed files with 17 additions and 0 deletions

View file

@ -59,11 +59,13 @@ func registerEditorFrontend() {
KnownEvents []*string KnownEvents []*string
TemplateFunctions []string TemplateFunctions []string
TwitchClientID string TwitchClientID string
Version string
}{ }{
IRCBadges: twitch.KnownBadges, IRCBadges: twitch.KnownBadges,
KnownEvents: knownEvents, KnownEvents: knownEvents,
TemplateFunctions: tplFuncs.GetFuncNames(), TemplateFunctions: tplFuncs.GetFuncNames(),
TwitchClientID: cfg.TwitchClient, TwitchClientID: cfg.TwitchClient,
Version: version,
}); err != nil { }); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError)
} }

View file

@ -112,6 +112,21 @@
<span v-else>Disconnected from Bot</span> <span v-else>Disconnected from Bot</span>
</b-tooltip> </b-tooltip>
</b-nav-text> </b-nav-text>
<b-nav-text class="ml-2">
<font-awesome-icon
id="botInfo"
fixed-width
class="mr-1"
:icon="['fas', 'info-circle']"
/>
<b-tooltip
target="botInfo"
triggers="hover"
>
Version: <code>{{ $root.vars.Version }}</code>
</b-tooltip>
</b-nav-text>
</b-navbar-nav> </b-navbar-nav>
</b-collapse> </b-collapse>
</b-navbar> </b-navbar>