File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -46,3 +46,6 @@ VITE_SOURCE_MAP=N
4646
4747# Used to differentiate storage across different domains
4848VITE_STORAGE_PREFIX = SOY_
49+
50+ # used to control whether the program automatically detects updates
51+ VITE_AUTOMATICALLY_DETECT_UPDATE = Y
Original file line number Diff line number Diff line change 11import { h } from 'vue' ;
22import { NButton } from 'naive-ui' ;
3- import { $t } from '.. /locales' ;
3+ import { $t } from '@ /locales' ;
44
55export function setupAppVersionNotification ( ) {
6+ const canAutoUpdateApp = import . meta. env . VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' ;
7+
8+ if ( ! canAutoUpdateApp ) return ;
9+
610 let isShow = false ;
711
812 document . addEventListener ( 'visibilitychange' , async ( ) => {
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ declare namespace Env {
103103 readonly VITE_ICONIFY_URL ?: string ;
104104 /** Used to differentiate storage across different domains */
105105 readonly VITE_STORAGE_PREFIX ?: string ;
106+ /** Whether to automatically detect updates after configuring application packaging */
107+ readonly VITE_AUTOMATICALLY_DETECT_UPDATE ?: CommonType . YesOrNo ;
106108 }
107109}
108110
You can’t perform that action at this time.
0 commit comments