@@ -49,7 +49,7 @@ import Locale, {
4949 changeLang ,
5050 getLang ,
5151} from "../locales" ;
52- import { copyToClipboard } from "../utils" ;
52+ import { copyToClipboard , clientUpdate , semverCompare } from "../utils" ;
5353import Link from "next/link" ;
5454import {
5555 Anthropic ,
@@ -585,7 +585,7 @@ export function Settings() {
585585 const [ checkingUpdate , setCheckingUpdate ] = useState ( false ) ;
586586 const currentVersion = updateStore . formatVersion ( updateStore . version ) ;
587587 const remoteId = updateStore . formatVersion ( updateStore . remoteVersion ) ;
588- const hasNewVersion = currentVersion !== remoteId ;
588+ const hasNewVersion = semverCompare ( currentVersion , remoteId ) === - 1 ;
589589 const updateUrl = getClientConfig ( ) ?. isApp ? RELEASE_URL : UPDATE_URL ;
590590
591591 function checkUpdate ( force = false ) {
@@ -1357,9 +1357,17 @@ export function Settings() {
13571357 { checkingUpdate ? (
13581358 < LoadingIcon />
13591359 ) : hasNewVersion ? (
1360- < Link href = { updateUrl } target = "_blank" className = "link" >
1361- { Locale . Settings . Update . GoToUpdate }
1362- </ Link >
1360+ clientConfig ?. isApp ? (
1361+ < IconButton
1362+ icon = { < ResetIcon > </ ResetIcon > }
1363+ text = { Locale . Settings . Update . GoToUpdate }
1364+ onClick = { ( ) => clientUpdate ( ) }
1365+ />
1366+ ) : (
1367+ < Link href = { updateUrl } target = "_blank" className = "link" >
1368+ { Locale . Settings . Update . GoToUpdate }
1369+ </ Link >
1370+ )
13631371 ) : (
13641372 < IconButton
13651373 icon = { < ResetIcon > </ ResetIcon > }
0 commit comments