feat(config): display currently selected endpoint url

This commit is contained in:
kunish 2023-10-02 19:09:17 +08:00
parent 0418ac4635
commit 59e0b076bf
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -31,6 +31,7 @@ import { LANG, MODE_OPTIONS, ROUTES, themes } from '~/constants'
import { locale, setLocale, useI18n } from '~/i18n' import { locale, setLocale, useI18n } from '~/i18n'
import { import {
autoSwitchTheme, autoSwitchTheme,
endpoint,
favDayTheme, favDayTheme,
favNightTheme, favNightTheme,
setAutoSwitchTheme, setAutoSwitchTheme,
@ -462,19 +463,23 @@ const Versions = () => {
}) })
return ( return (
<div class="grid grid-cols-2 gap-4"> <div class="flex flex-col gap-2">
<kbd class="kbd">{import.meta.env.version}</kbd> <div class="grid grid-cols-2 gap-4">
<kbd class="kbd">{import.meta.env.version}</kbd>
<div class="relative"> <div class="relative">
<Show when={isUpdateAvailable()}> <Show when={isUpdateAvailable()}>
<span class="absolute -right-1 -top-1 flex h-3 w-3"> <span class="absolute -right-1 -top-1 flex h-3 w-3">
<span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-info opacity-75" /> <span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-info opacity-75" />
<span class="inline-flex h-3 w-3 rounded-full bg-info" /> <span class="inline-flex h-3 w-3 rounded-full bg-info" />
</span> </span>
</Show> </Show>
<kbd class="kbd w-full">{backendVersion()}</kbd> <kbd class="kbd w-full">{backendVersion()}</kbd>
</div>
</div> </div>
<h1 class="text-center text-lg font-bold">{endpoint()?.url}</h1>
</div> </div>
) )
} }