File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,15 @@ const HeartIcon = (
2020 </ svg >
2121)
2222
23+ const computeUpdateText = ( version : string ) => {
24+ return IS_FIREFOX
25+ ? t ( msg => msg . header . updateVersionInfo4Firefox , { version } )
26+ : t ( msg => msg . header . updateVersionInfo , { version } )
27+ }
28+
2329const Extra = defineComponent ( ( ) => {
2430 const { data : latestVersion } = useRequest ( getLatestVersion )
25-
2631 const upgradeVisible = computed ( ( ) => latestVersion . value && packageInfo . version !== latestVersion . value && IS_FROM_STORE )
27-
2832 const { data : rateVisible } = useRequest ( ( ) => metaService . recommendRate ( ) )
2933
3034 const handleRateClick = async ( ) => {
@@ -37,16 +41,11 @@ const Extra = defineComponent(() => {
3741 createTab ( UPDATE_PAGE )
3842 }
3943
40- const version = packageInfo . version
41- const popInfo = IS_FIREFOX
42- ? t ( msg => msg . header . updateVersionInfo4Firefox , { version } )
43- : t ( msg => msg . header . updateVersionInfo , { version } )
44-
4544 return ( ) => {
4645 if ( upgradeVisible . value ) {
4746 return (
4847 < ElPopover
49- content = { popInfo }
48+ content = { computeUpdateText ( latestVersion . value ) }
5049 effect = "dark"
5150 width = "auto"
5251 v-slots = { {
You can’t perform that action at this time.
0 commit comments