diff --git a/packages/client/src/components/WaitForConnection.vue b/packages/client/src/components/WaitForConnection.vue
index 27ce74eb..75ea2a19 100644
--- a/packages/client/src/components/WaitForConnection.vue
+++ b/packages/client/src/components/WaitForConnection.vue
@@ -1,5 +1,21 @@
`
+}
+
+const _local = scriptWrapper(props.local!)
+const _network = scriptWrapper(props.network!)
+
+const local = ref(_local)
+const network = ref(_network)
@@ -8,6 +24,17 @@ import AppConnecting from '~/components/AppConnecting.vue'
Waiting for connection...
+
+
+ Add one of the following to the top of your page 👇:
+
+
+
+
+
+
+
+
diff --git a/packages/client/src/composables/state-tab.ts b/packages/client/src/composables/state-tab.ts
index 4e88c2f4..44248f5b 100644
--- a/packages/client/src/composables/state-tab.ts
+++ b/packages/client/src/composables/state-tab.ts
@@ -1,6 +1,8 @@
import { useDevToolsBridgeRpc, useDevToolsState } from '@vue-devtools-next/core'
import type { MaybeRef } from 'vue'
import type { CustomTab } from '@vue-devtools-next/kit'
+import { isInElectron } from '@vue-devtools-next/shared'
+
import type { ModuleBuiltinTab } from '~/types/tab'
export interface TabSettings {
@@ -31,7 +33,9 @@ export function useAllTabs() {
if (currentTab) {
if (currentTab[1].some(t => t.name === tab.name))
return
- if (!vitePluginDetected && viteOnlyTabs.includes(tab.name))
+
+ // @TODO: electron app support vite only tabs
+ if ((!vitePluginDetected || isInElectron) && viteOnlyTabs.includes(tab.name))
return
currentTab[1].push({
diff --git a/packages/client/src/constants/tab.ts b/packages/client/src/constants/tab.ts
index 06c56732..ca7ab387 100644
--- a/packages/client/src/constants/tab.ts
+++ b/packages/client/src/constants/tab.ts
@@ -1,5 +1,5 @@
import type { DevtoolsBridgeAppRecord } from '@vue-devtools-next/core'
-import { deepClone } from '@vue-devtools-next/shared'
+import { deepClone, isInElectron } from '@vue-devtools-next/shared'
import type { ModuleBuiltinTab } from '~/types'
// @unocss-include
@@ -93,7 +93,9 @@ export function getBuiltinTab(viteDetected: boolean, moduleDetectives?: Devtools
if (item[0] === 'modules')
item[1] = item[1].filter(t => moduleDetectives ? isDetected(moduleDetectives, t) : true)
})
- return viteDetected
+
+ // @TODO: electron app support vite only tabs
+ return (viteDetected && !isInElectron)
? tab
: tab.map(([_, tabs]) => [_, tabs.filter(t => !viteOnlyTabs.includes(t.name))])
}
diff --git a/packages/client/src/main.ts b/packages/client/src/main.ts
index c6b4a7cb..e809a4a5 100644
--- a/packages/client/src/main.ts
+++ b/packages/client/src/main.ts
@@ -105,8 +105,10 @@ export async function initDevTools(shell, options: { viewMode?: 'overlay' | 'pan
})
}
-export function createConnectionApp(container: string = '#app') {
- const app = createApp(WaitForConnection)
+export function createConnectionApp(container: string = '#app', props?: Record) {
+ const app = createApp(WaitForConnection, {
+ ...props,
+ })
app.mount(container)
return app
}
diff --git a/packages/electron/app.html b/packages/electron/app.html
index 9f71a9e5..9cffc795 100644
--- a/packages/electron/app.html
+++ b/packages/electron/app.html
@@ -11,6 +11,14 @@
display: flex;
height: 100%;
}
+ .loading {
+ width: 100vw;
+ height: 100vh;
+ font-weight: bold;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
diff --git a/packages/playground/src/main.ts b/packages/playground/src/main.ts
index 86dbd8a0..2e4c79f1 100644
--- a/packages/playground/src/main.ts
+++ b/packages/playground/src/main.ts
@@ -12,7 +12,7 @@ import Hey from './pages/Hey.vue'
import './style.css'
// connect to remote devtools
-// devtools.connect('http://localhost', 8098)
+// devtools.connect('http://localhost', 8080)
const pinia = createPinia()
const pinia2 = createPinia()
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 73bdb2f7..d9e07b72 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -336,6 +336,9 @@ importers:
h3:
specifier: ^1.9.0
version: 1.9.0
+ ip:
+ specifier: ^1.1.8
+ version: 1.1.8
socket.io:
specifier: ^4.7.2
version: 4.7.2
@@ -7230,6 +7233,10 @@ packages:
side-channel: 1.0.4
dev: true
+ /ip@1.1.8:
+ resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==}
+ dev: false
+
/ip@2.0.0:
resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==}
dev: true