This repository was archived by the owner on Dec 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ const APP_DIR =
1212 ? 'YadroTimeTracker_test'
1313 : 'YadroTimeTracker' ;
1414
15+ let _appDataPath : string = '' ;
16+
1517export default abstract class AbstractFileRepository < T = any > {
1618 dirWithProfileData : string = 'profile1' ;
1719 fileName : string = 'defaultFileName.json' ;
@@ -25,7 +27,11 @@ export default abstract class AbstractFileRepository<T = any> {
2527 }
2628
2729 static get appDataFolder ( ) {
28- return ipcRenderer . sendSync ( EChannels . GetPathUserData ) ;
30+ if ( _appDataPath ) {
31+ return _appDataPath ;
32+ }
33+ _appDataPath = ipcRenderer . sendSync ( EChannels . GetPathUserData ) ;
34+ return _appDataPath ;
2935 }
3036
3137 private get destFolder ( ) {
Original file line number Diff line number Diff line change @@ -131,9 +131,14 @@ const SettingsModal: React.VFC<ISettingsModalProps> = observer(
131131 Test Sentry
132132 </ Button >
133133 ) }
134- < p > { `APPDATA: ${ AbstractFileRepository . appDataFolder } ` } </ p >
135- < p > { `SENTRY_DSN: ${ process . env . SENTRY_DSN } ` } </ p >
136- < p > { `GA_UACODE: ${ process . env . GA_UACODE } ` } </ p >
134+ { ( process . env . NODE_ENV === 'development' ||
135+ process . env . DEBUG_PROD === 'true' ) && (
136+ < >
137+ < p > { `APPDATA: ${ AbstractFileRepository . appDataFolder } ` } </ p >
138+ < p > { `SENTRY_DSN: ${ process . env . SENTRY_DSN } ` } </ p >
139+ < p > { `GA_UACODE: ${ process . env . GA_UACODE } ` } </ p >
140+ </ >
141+ ) }
137142 </ Modal >
138143 ) ;
139144 }
You can’t perform that action at this time.
0 commit comments