]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
feat(devtools): add sotre id information
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 28 Jul 2021 10:13:14 +0000 (12:13 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 28 Jul 2021 10:13:14 +0000 (12:13 +0200)
src/devtools/plugin.ts

index eda839a11906d19a576cd7e9e0fd61358d52fd62..1c0ba34a4b4a31fc64465f7f84389bc6a676bc29 100644 (file)
@@ -264,6 +264,7 @@ function addStoreToDevtools(app: App, store: StoreGeneric) {
             title: '🛫 ' + name,
             subtitle: 'start',
             data: {
+              store: formatDisplay(store.$id),
               action: formatDisplay(name),
               args,
             },
@@ -280,6 +281,7 @@ function addStoreToDevtools(app: App, store: StoreGeneric) {
               title: '🛬 ' + name,
               subtitle: 'end',
               data: {
+                store: formatDisplay(store.$id),
                 action: formatDisplay(name),
                 args,
                 result,
@@ -299,6 +301,7 @@ function addStoreToDevtools(app: App, store: StoreGeneric) {
               title: '💥 ' + name,
               subtitle: 'end',
               data: {
+                store: formatDisplay(store.$id),
                 action: formatDisplay(name),
                 args,
                 error,
@@ -319,7 +322,10 @@ function addStoreToDevtools(app: App, store: StoreGeneric) {
         const eventData: TimelineEvent = {
           time: Date.now(),
           title: formatMutationType(type),
-          data: formatEventData(events),
+          data: {
+            store: formatDisplay(store.$id),
+            ...formatEventData(events),
+          },
           groupId: activeAction,
         }
 
@@ -361,7 +367,7 @@ function addStoreToDevtools(app: App, store: StoreGeneric) {
             title: '🔥 ' + store.$id,
             subtitle: 'HMR update',
             data: {
-              id: formatDisplay(store.$id),
+              store: formatDisplay(store.$id),
               info: formatDisplay(`HMR update`),
             },
           },