chore: server version check
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vocechat-web",
|
"name": "vocechat-web",
|
||||||
"version": "0.3.35",
|
"version": "0.3.36",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://voce.chat",
|
"homepage": "https://voce.chat",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const ServerVersionChecker = ({ empty = false, version, children }: Props) => {
|
|||||||
const { data: currentVersion, isSuccess } = useGetServerVersionQuery();
|
const { data: currentVersion, isSuccess } = useGetServerVersionQuery();
|
||||||
if (!isSuccess) return null;
|
if (!isSuccess) return null;
|
||||||
const res = compareVersion(currentVersion, version);
|
const res = compareVersion(currentVersion, version);
|
||||||
if (res < 0) return empty ? null : <div className='flex flex-col gap-2 items-start border border-solid border-orange-500 p-3 rounded-lg'>
|
if (res < 0) return empty ? null : <div className='flex flex-col gap-2 items-start border border-solid border-orange-500 p-3 rounded-lg w-fit'>
|
||||||
<span className='text-gray-400 text-sm'>
|
<span className='text-gray-400 text-sm'>
|
||||||
<Trans i18nKey={"server_update.version_needed"}>
|
<Trans i18nKey={"server_update.version_needed"}>
|
||||||
<strong className='font-bold'>{{ version }}</strong>
|
<strong className='font-bold'>{{ version }}</strong>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const navs = [
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
name: "bot",
|
name: "bot",
|
||||||
component: <ServerVersionChecker version="0.3.4"><BotConfig /></ServerVersionChecker>,
|
component: <ServerVersionChecker version="0.3.2"><BotConfig /></ServerVersionChecker>,
|
||||||
admin: true
|
admin: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user