add version tag to settings page
This commit is contained in:
parent
8fb8bf8945
commit
110165b0ed
@ -1,6 +1,7 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
# Build commands:
|
# Build commands:
|
||||||
# - $VERSION="0.2.1"
|
# - $VERSION="0.2.1"
|
||||||
|
# - yarn update-browserslist-db@latest
|
||||||
# - rm build -r -Force ; rm ./node_modules/.cache/babel-loader -r -Force ; yarn build
|
# - rm build -r -Force ; rm ./node_modules/.cache/babel-loader -r -Force ; yarn build
|
||||||
# - docker build --pull --rm -t oncharterliz/multi-frigate:latest -t oncharterliz/multi-frigate:$VERSION "."
|
# - docker build --pull --rm -t oncharterliz/multi-frigate:latest -t oncharterliz/multi-frigate:$VERSION "."
|
||||||
# - docker save -o ./release/multi-frigate.$VERSION.tar oncharterliz/multi-frigate:$VERSION
|
# - docker save -o ./release/multi-frigate.$VERSION.tar oncharterliz/multi-frigate:$VERSION
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import Player from '../widgets/Player';
|
|||||||
import CameraPageHeader from '../widgets/header/CameraPageHeader';
|
import CameraPageHeader from '../widgets/header/CameraPageHeader';
|
||||||
import RetryErrorPage from './RetryErrorPage';
|
import RetryErrorPage from './RetryErrorPage';
|
||||||
import { LegacyRef, useRef } from 'react';
|
import { LegacyRef, useRef } from 'react';
|
||||||
|
import CenteredCogwheelLoader from '../shared/components/loaders/CenteredCogwheelLoader';
|
||||||
|
|
||||||
const LiveCameraPage = () => {
|
const LiveCameraPage = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@ -21,7 +22,7 @@ const LiveCameraPage = () => {
|
|||||||
queryFn: () => frigateApi.getCameraWHost(cameraId!)
|
queryFn: () => frigateApi.getCameraWHost(cameraId!)
|
||||||
})
|
})
|
||||||
|
|
||||||
if (isPending) return <OverlayCogwheelLoader />
|
if (isPending) return <CenteredCogwheelLoader />
|
||||||
|
|
||||||
if (isError) return <RetryErrorPage onRetry={refetch} />
|
if (isError) return <RetryErrorPage onRetry={refetch} />
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import { dimensions } from '../shared/dimensions/dimensions';
|
|||||||
import OIDPSettingsForm from '../widgets/OIDPSettingsForm';
|
import OIDPSettingsForm from '../widgets/OIDPSettingsForm';
|
||||||
import RolesSettingsForm from '../widgets/RolesSettingsForm';
|
import RolesSettingsForm from '../widgets/RolesSettingsForm';
|
||||||
import Forbidden from './403';
|
import Forbidden from './403';
|
||||||
|
import VersionTag from '../shared/components/VersionTag';
|
||||||
|
|
||||||
const SettingsPage = () => {
|
const SettingsPage = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@ -41,6 +42,7 @@ const SettingsPage = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex h='100%'>
|
<Flex h='100%'>
|
||||||
|
<VersionTag />
|
||||||
{!isMobile ?
|
{!isMobile ?
|
||||||
< Space w='20%' />
|
< Space w='20%' />
|
||||||
: null
|
: null
|
||||||
|
|||||||
24
src/shared/components/VersionTag.tsx
Normal file
24
src/shared/components/VersionTag.tsx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { Badge, Flex } from '@mantine/core';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import packageJson from '../../../package.json';
|
||||||
|
|
||||||
|
const VersionTag = () => {
|
||||||
|
return (
|
||||||
|
<Flex
|
||||||
|
direction='column'
|
||||||
|
align='end'
|
||||||
|
>
|
||||||
|
<Badge
|
||||||
|
mt='0.2rem'
|
||||||
|
mr='0.3rem'
|
||||||
|
variant="outline"
|
||||||
|
pr={3}
|
||||||
|
>
|
||||||
|
v.{packageJson.version}
|
||||||
|
</Badge>
|
||||||
|
</Flex>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default VersionTag;
|
||||||
@ -18,7 +18,7 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx"
|
"jsx": "react-jsx",
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src",
|
"src",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user