@@ -3,7 +3,7 @@ import { Button } from "@follow/components/ui/button/index.js"
3
3
import { styledButtonVariant } from "@follow/components/ui/button/variants.js"
4
4
import { Divider } from "@follow/components/ui/divider/index.js"
5
5
import { getCurrentEnvironment } from "@follow/utils/environment"
6
- import { license , repository } from "@pkg"
6
+ import PKG , { license , repository } from "@pkg"
7
7
import { useQuery } from "@tanstack/react-query"
8
8
import { Trans , useTranslation } from "react-i18next"
9
9
@@ -15,11 +15,13 @@ import { getNewIssueUrl } from "~/lib/issues"
15
15
export const SettingAbout = ( ) => {
16
16
const { t } = useTranslation ( "settings" )
17
17
const currentEnvironment = getCurrentEnvironment ( ) . join ( "\n" )
18
- const { data : renderVersion } = useQuery ( {
19
- queryKey : [ "renderVersion " ] ,
20
- queryFn : ( ) => tipcClient ?. getRenderVersion ( ) || "" ,
18
+ const { data : appVersion } = useQuery ( {
19
+ queryKey : [ "appVersion " ] ,
20
+ queryFn : ( ) => tipcClient ?. getAppVersion ( ) || "" ,
21
21
} )
22
22
23
+ const rendererVersion = PKG . version
24
+
23
25
return (
24
26
< div >
25
27
< section className = "mt-4" >
@@ -31,16 +33,16 @@ export const SettingAbout = () => {
31
33
{ APP_NAME } { ! import . meta. env . PROD ? `(${ import . meta. env . MODE } )` : "" }
32
34
</ div >
33
35
< div className = "flex flex-wrap items-center gap-2" >
34
- < span className = "rounded bg-muted px-2 py-1 text-xs" > app: { APP_VERSION } </ span >
35
- { renderVersion && (
36
+ < span className = "rounded bg-muted px-2 py-1 text-xs" > app: { appVersion } </ span >
37
+ { rendererVersion && (
36
38
< span className = "rounded bg-muted px-2 py-1 text-xs" >
37
- renderer: { renderVersion }
39
+ renderer: { rendererVersion }
38
40
</ span >
39
41
) }
40
42
< CopyButton
41
43
value = {
42
- renderVersion
43
- ? `${ currentEnvironment } \n**Renderer**: ${ renderVersion } `
44
+ rendererVersion
45
+ ? `${ currentEnvironment } \n**Renderer**: ${ rendererVersion } `
44
46
: currentEnvironment
45
47
}
46
48
className = "border-0 bg-transparent p-1 text-foreground/80 hover:bg-theme-item-hover hover:text-foreground active:bg-theme-item-active [&_i]:size-3"
0 commit comments