File tree Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Expand file tree Collapse file tree 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,7 @@ export default class GameSelectionScreen extends Vue {
326
326
await this .$store .dispatch (' checkMigrations' );
327
327
this .runningMigration = false ;
328
328
329
+ await this .$store .dispatch (' resetProfileModule' );
329
330
this .settings = await ManagerSettings .getSingleton (GameManager .defaultGame );
330
331
const globalSettings = this .settings .getContext ().global ;
331
332
this .favourites = globalSettings .favouriteGames || [];
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ export const store = {
68
68
const settings = await ManagerSettings . getSingleton ( game ) ;
69
69
commit ( 'setSettings' , settings ) ;
70
70
return settings ;
71
+ } ,
72
+
73
+ // TODO: Add reset actions for other modules
74
+ async resetProfileModule ( { dispatch} : Context ) {
75
+ return await dispatch ( 'profile/reset' ) ;
71
76
}
72
77
} ,
73
78
mutations : {
Original file line number Diff line number Diff line change @@ -119,6 +119,16 @@ export default {
119
119
} ,
120
120
121
121
mutations : {
122
+ resetLocalState ( state : State ) {
123
+ state . activeProfile = null ;
124
+ state . modList = [ ] ;
125
+ state . order = undefined ;
126
+ state . direction = undefined ;
127
+ state . disabledPosition = undefined ;
128
+ state . searchQuery = '' ;
129
+ state . dismissedUpdateAll = false ;
130
+ } ,
131
+
122
132
dismissUpdateAll ( state : State ) {
123
133
state . dismissedUpdateAll = true ;
124
134
} ,
@@ -292,6 +302,11 @@ export default {
292
302
commit ( 'setDisabledPosition' , settings . getInstalledDisablePosition ( ) ) ;
293
303
} ,
294
304
305
+ async reset ( { commit, rootGetters} ) {
306
+ await rootGetters [ 'settings' ] . setProfile ( 'Default' ) ;
307
+ commit ( 'resetLocalState' ) ;
308
+ } ,
309
+
295
310
async resolveConflicts (
296
311
{ } ,
297
312
params : {
You can’t perform that action at this time.
0 commit comments