@@ -24,7 +24,7 @@ export enum ClosingMainWindowAction {
24
24
* - Merged app and job actions on closing main window
25
25
*/
26
26
export type ApplicationSettings = {
27
- settingsVersion : '1.4 .0'
27
+ settingsVersion : '1.5 .0'
28
28
// Default folder to download the results on the user disk
29
29
downloadFolder ?: string
30
30
// Pipeline instance properties for IPCs
@@ -37,6 +37,7 @@ export type ApplicationSettings = {
37
37
// tts preferred voices
38
38
ttsConfig ?: TtsConfig
39
39
autoCheckUpdate ?: boolean
40
+ sponsorshipMessageLastShown ?: string
40
41
}
41
42
42
43
export function migrateSettings (
@@ -75,9 +76,19 @@ const migrators: Map<string, (prev: any) => any> = new Map<
75
76
> ( [
76
77
// Insert new migrators here as [ 'version', (prev) => ApplicationSettings ]
77
78
// Don't forget to update the settings class of previous migrators
79
+ [
80
+ '1.5.0' ,
81
+ ( prev : _ApplicationSettings_v140 ) : ApplicationSettings => {
82
+ const { settingsVersion, ...toKeep } = prev
83
+ return {
84
+ sponsorshipMessageLastShown : '' ,
85
+ ...toKeep ,
86
+ } as ApplicationSettings
87
+ } ,
88
+ ] ,
78
89
[
79
90
'1.4.0' ,
80
- ( prev : _ApplicationSettings_v130 ) : ApplicationSettings => {
91
+ ( prev : _ApplicationSettings_v130 ) : _ApplicationSettings_v140 => {
81
92
const {
82
93
// Removed, changed or renamed :
83
94
settingsVersion,
@@ -94,7 +105,7 @@ const migrators: Map<string, (prev: any) => any> = new Map<
94
105
defaultVoices : [ ] , // new default voices setting
95
106
} ,
96
107
...toKeep ,
97
- } as ApplicationSettings
108
+ } as _ApplicationSettings_v140
98
109
} ,
99
110
] ,
100
111
[
@@ -145,6 +156,26 @@ const migrators: Map<string, (prev: any) => any> = new Map<
145
156
] ,
146
157
] )
147
158
159
+ export type _ApplicationSettings_v140 = {
160
+ settingsVersion : '1.4.0'
161
+ // Default folder to download the results on the user disk
162
+ downloadFolder ?: string
163
+ // Pipeline instance properties for IPCs
164
+ pipelineInstanceProps ?: PipelineInstanceProperties
165
+ // Dark mode selector
166
+ colorScheme : keyof typeof ColorScheme
167
+ // Actions to perform when closing the main window
168
+ onClosingMainWindow ?: keyof typeof ClosingMainWindowAction
169
+ editJobOnNewTab ?: boolean
170
+ // tts preferred voices
171
+ ttsConfig ?: {
172
+ preferredVoices : Array < TtsVoice >
173
+ ttsEngineProperties : Array < TtsEngineProperty >
174
+ xmlFilepath ?: string
175
+ defaultVoices : Array < TtsVoice >
176
+ }
177
+ autoCheckUpdate ?: boolean
178
+ }
148
179
export type _ApplicationSettings_v130 = {
149
180
settingsVersion : '1.3.0'
150
181
// Default folder to download the results on the user disk
0 commit comments