mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-21 13:59:25 +01:00
chore: add message for latest version check (#703)
* chore: add message for latest version check * docs: update notes
This commit is contained in:
@@ -28,6 +28,7 @@ Information about release notes of Coco Server is provided here.
|
|||||||
- refactor: refactoring search api #679
|
- refactor: refactoring search api #679
|
||||||
- chore: continue to chat page display #690
|
- chore: continue to chat page display #690
|
||||||
- chore: improve server list selection with enter key #692
|
- chore: improve server list selection with enter key #692
|
||||||
|
- chore: add message for latest version check #703
|
||||||
|
|
||||||
## 0.5.0 (2025-06-13)
|
## 0.5.0 (2025-06-13)
|
||||||
|
|
||||||
|
|||||||
@@ -126,86 +126,75 @@ const UpdateApp = ({ isCheckPage }: UpdateAppProps) => {
|
|||||||
onClose={noop}
|
onClose={noop}
|
||||||
>
|
>
|
||||||
<div className="fixed inset-0 z-10 w-screen overflow-y-auto">
|
<div className="fixed inset-0 z-10 w-screen overflow-y-auto">
|
||||||
<div
|
<div className={clsx("flex min-h-full items-center justify-center", !isCheckPage && "p-4")}>
|
||||||
className={clsx(
|
|
||||||
"flex min-h-full items-center justify-center",
|
|
||||||
{
|
|
||||||
"p-4": !isCheckPage,
|
|
||||||
}
|
|
||||||
)}>
|
|
||||||
<DialogPanel
|
<DialogPanel
|
||||||
transition
|
transition
|
||||||
className={clsx(
|
className={`relative w-[340px] py-8 flex flex-col items-center bg-white shadow-md border border-[#EDEDED] dark:bg-[#333] dark:border-black/20 ${isCheckPage ? "" : "rounded-lg"}`}
|
||||||
"relative w-[340px] py-8 flex flex-col items-center bg-white shadow-md border border-[#EDEDED] rounded-lg dark:bg-[#333] dark:border-black/20",
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{isCheckPage ? null : <X
|
{!isCheckPage && isOptional && (
|
||||||
className={clsx(
|
<X
|
||||||
"absolute size-5 text-[#999] top-3 right-3 dark:text-[#D8D8D8]",
|
className={clsx("absolute size-5 top-3 right-3 text-[#999] dark:text-[#D8D8D8]", cursorClassName)}
|
||||||
cursorClassName,
|
|
||||||
{
|
|
||||||
hidden: !isOptional,
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
onClick={handleCancel}
|
onClick={handleCancel}
|
||||||
/>}
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
<img src={isDark ? darkIcon : lightIcon} className="h-6" />
|
<img src={isDark ? darkIcon : lightIcon} className="h-6" />
|
||||||
|
|
||||||
<div className="text-[#333] text-sm leading-5 py-2 dark:text-[#D8D8D8]">
|
<div className="text-[#333] text-sm leading-5 py-2 dark:text-[#D8D8D8] text-center">
|
||||||
{isOptional ? (
|
{updateInfo?.available ? (
|
||||||
t("update.optional_description")
|
isOptional ? t("update.optional_description") : (
|
||||||
) : (
|
<>
|
||||||
<div className="leading-5 text-center">
|
|
||||||
<p>{t("update.force_description1")}</p>
|
<p>{t("update.force_description1")}</p>
|
||||||
<p>{t("update.force_description2")}</p>
|
<p>{t("update.force_description2")}</p>
|
||||||
</div>
|
</>
|
||||||
)}
|
)
|
||||||
|
) : t("update.date")}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{updateInfo?.available ? (
|
||||||
<div
|
<div
|
||||||
className="text-xs text-[#0072FF] cursor-pointer"
|
className="text-xs text-[#0072FF] cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() =>
|
||||||
OpenURLWithBrowser(
|
OpenURLWithBrowser("https://docs.infinilabs.com/coco-app/main/docs/release-notes")
|
||||||
"https://docs.infinilabs.com/coco-app/main/docs/release-notes"
|
}
|
||||||
);
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
v{updateInfo?.version} {t("update.releaseNotes")}
|
v{updateInfo.version} {t("update.releaseNotes")}
|
||||||
</div>
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className={clsx("text-xs text-[#999]", cursorClassName)}>
|
||||||
|
{t("update.latest", { replace: [updateInfo?.version] })}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"mb-3 mt-6 bg-[#0072FF] text-white text-sm px-[14px] py-[8px] rounded-lg",
|
"mb-3 mt-6 bg-[#0072FF] text-white text-sm px-[14px] py-[8px] rounded-lg",
|
||||||
cursorClassName,
|
cursorClassName,
|
||||||
{
|
state.loading && "opacity-50"
|
||||||
"opacity-50": state.loading,
|
|
||||||
}
|
|
||||||
)}
|
)}
|
||||||
onClick={handleDownload}
|
onClick={updateInfo?.available ? handleDownload : handleSkip}
|
||||||
>
|
>
|
||||||
{state.loading ? (
|
{state.loading ? (
|
||||||
<div className="flex justify-center items-center gap-2">
|
<div className="flex justify-center items-center gap-2">
|
||||||
<LoaderCircle className="animate-spin size-5" />
|
<LoaderCircle className="animate-spin size-5" />
|
||||||
{percent}%
|
{percent}%
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : updateInfo?.available ? t("update.button.install") : t("update.button.ok")}
|
||||||
t("update.button.install")
|
|
||||||
)}
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
{updateInfo?.available && isOptional && (
|
||||||
<div
|
<div
|
||||||
className={clsx("text-xs text-[#999]", cursorClassName, {
|
className={clsx("text-xs text-[#999]", cursorClassName)}
|
||||||
hidden: !isOptional,
|
|
||||||
})}
|
|
||||||
onClick={handleSkip}
|
onClick={handleSkip}
|
||||||
>
|
>
|
||||||
{t("update.skip_version")}
|
{t("update.skip_version")}
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</DialogPanel>
|
</DialogPanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -465,9 +465,12 @@
|
|||||||
"force_description2": "Please install the latest version to continue.",
|
"force_description2": "Please install the latest version to continue.",
|
||||||
"releaseNotes": "Release Notes",
|
"releaseNotes": "Release Notes",
|
||||||
"button": {
|
"button": {
|
||||||
"install": "Install"
|
"install": "Install",
|
||||||
|
"ok": "Ok"
|
||||||
},
|
},
|
||||||
"skip_version": "Skip this version"
|
"skip_version": "Skip this version",
|
||||||
|
"date": "You're up to date",
|
||||||
|
"latest": "\"{{0}}\" is the latest version"
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": "Sorry, there is an error in your Coco App. Please contact the administrator."
|
"message": "Sorry, there is an error in your Coco App. Please contact the administrator."
|
||||||
|
|||||||
@@ -464,9 +464,12 @@
|
|||||||
"force_description2": "请安装最新版本后继续使用。",
|
"force_description2": "请安装最新版本后继续使用。",
|
||||||
"releaseNotes": "更新日志",
|
"releaseNotes": "更新日志",
|
||||||
"button": {
|
"button": {
|
||||||
"install": "安装"
|
"install": "安装",
|
||||||
|
"ok": "好"
|
||||||
},
|
},
|
||||||
"skip_version": "跳过此版本"
|
"skip_version": "跳过此版本",
|
||||||
|
"date": "已是最新版本",
|
||||||
|
"latest": "当前版本:\"{{0}}\""
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"message": "抱歉,Coco 应用出现了错误。请联系管理员。"
|
"message": "抱歉,Coco 应用出现了错误。请联系管理员。"
|
||||||
|
|||||||
Reference in New Issue
Block a user