File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/pinia/src/devtools Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,11 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
276
276
componentStateTypes,
277
277
app,
278
278
settings : {
279
+ logStoreChanges : {
280
+ label : 'Notify about new/deleted stores' ,
281
+ type : 'boolean' ,
282
+ defaultValue : true ,
283
+ } ,
279
284
// useEmojis: {
280
285
// label: 'Use emojis in messages ⚡️',
281
286
// type: 'boolean',
@@ -443,14 +448,16 @@ function addStoreToDevtools(app: DevtoolsApp, store: StoreGeneric) {
443
448
api . notifyComponentUpdate ( )
444
449
api . sendInspectorTree ( INSPECTOR_ID )
445
450
api . sendInspectorState ( INSPECTOR_ID )
446
- toastMessage ( `Disposed "${ store . $id } " store 🗑` )
451
+ api . getSettings ( ) . logStoreChanges &&
452
+ toastMessage ( `Disposed "${ store . $id } " store 🗑` )
447
453
}
448
454
449
455
// trigger an update so it can display new registered stores
450
456
api . notifyComponentUpdate ( )
451
457
api . sendInspectorTree ( INSPECTOR_ID )
452
458
api . sendInspectorState ( INSPECTOR_ID )
453
- toastMessage ( `"${ store . $id } " store installed 🆕` )
459
+ api . getSettings ( ) . logStoreChanges &&
460
+ toastMessage ( `"${ store . $id } " store installed 🆕` )
454
461
}
455
462
)
456
463
}
You can’t perform that action at this time.
0 commit comments