mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
fix: dev version no update
This commit is contained in:
@@ -36,6 +36,11 @@ public class VersionController {
|
|||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public VersionInfo version() {
|
public VersionInfo version() {
|
||||||
|
if ("dev".equals(version)) {
|
||||||
|
return VersionInfo.builder()
|
||||||
|
.currentVersion(version)
|
||||||
|
.latestVersion(version).build();
|
||||||
|
}
|
||||||
String latestVersion = getLatestGithubRelease();
|
String latestVersion = getLatestGithubRelease();
|
||||||
return VersionInfo.builder()
|
return VersionInfo.builder()
|
||||||
.currentVersion(version)
|
.currentVersion(version)
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import { CircleX, LoaderCircle, RefreshCcw } from "lucide-react";
|
|||||||
import type React from "react";
|
import type React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Button } from "./ui/button";
|
import { Button } from "./ui/button";
|
||||||
import { TooltipContent, TooltipTrigger } from "./ui/tooltip";
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
|
||||||
import { Tooltip } from "./ui/tooltip";
|
|
||||||
import { TooltipProvider } from "./ui/tooltip";
|
|
||||||
type VersionInfo = {
|
type VersionInfo = {
|
||||||
currentVersion: string;
|
currentVersion: string;
|
||||||
latestVersion: string;
|
latestVersion: string;
|
||||||
@@ -26,6 +25,7 @@ const VersionBadge: React.FC = () => {
|
|||||||
});
|
});
|
||||||
const inProduction = env.MODE === "production";
|
const inProduction = env.MODE === "production";
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const version = data?.currentVersion === "dev" ? data?.currentVersion : `v${data?.currentVersion}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
@@ -81,7 +81,7 @@ const VersionBadge: React.FC = () => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
>
|
>
|
||||||
<span>v{data.currentVersion}</span>
|
<span>{version}</span>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user