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 @@ -43,3 +43,6 @@ VITE_STATIC_SUPER_ROLE=R_SUPER
43
43
44
44
# Used to differentiate storage across different domains
45
45
VITE_STORAGE_PREFIX = SOY_
46
+
47
+ # used to control whether the program automatically detects updates
48
+ VITE_AUTOMATICALLY_DETECT_UPDATE = Y
Original file line number Diff line number Diff line change 1
1
import { h } from 'vue' ;
2
2
import { Button } from 'ant-design-vue' ;
3
- import { $t } from '.. /locales' ;
3
+ import { $t } from '@ /locales' ;
4
4
5
5
export function setupAppVersionNotification ( ) {
6
+ const canAutoUpdateApp = import . meta. env . VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' ;
7
+
8
+ if ( ! canAutoUpdateApp ) return ;
9
+
6
10
let isShow = false ;
7
11
8
12
document . addEventListener ( 'visibilitychange' , async ( ) => {
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ declare namespace Env {
103
103
readonly VITE_ICONIFY_URL ?: string ;
104
104
/** Used to differentiate storage across different domains */
105
105
readonly VITE_STORAGE_PREFIX ?: string ;
106
+ /** Whether to automatically detect updates after configuring application packaging */
107
+ readonly VITE_AUTOMATICALLY_DETECT_UPDATE ?: CommonType . YesOrNo ;
106
108
}
107
109
}
108
110
You can’t perform that action at this time.
0 commit comments