Skip to content

Commit be37d5d

Browse files
committed
chore: update .gitignore, bump version to 0.2.8, and enhance Inspect iframe functionality
- Removed redundant entry from .gitignore. - Updated package version to 0.2.8 in package.json. - Refactored Inspect component to correctly load iframe source based on app root. - Improved iframe theme styles for better visibility and user experience.
2 parents 1ed112d + 1ceb277 commit be37d5d

5 files changed

Lines changed: 25 additions & 7 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,3 @@ qwik/*
6969
.cursor/skills/*
7070
related-folder/**
7171
**/.qwik-devtools/
72-
**/.qwik-devtools/

packages/devtools/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @qwik.dev/devtools
22

3+
## 0.2.8
4+
5+
### Patch Changes
6+
7+
- a337ab5: refactor: Update iframe theme styles and improve Inspect iframe source handling
8+
39
## 0.2.7
410

511
### Patch Changes

packages/devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qwik.dev/devtools",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"license": "MIT",
55
"main": "./dist/plugin/index.mjs",
66
"description": "Qwik devtools package",

packages/ui/src/features/Inspect/Inspect.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
import { component$ } from '@qwik.dev/core';
1+
import { component$, isBrowser } from '@qwik.dev/core';
22
import { inspectorLink } from './constant';
33
import { setupIframeThemeSync } from './iframe-theme';
44

5+
/**
6+
* Inspect iframe must load under app root (Vite `BASE_URL` + origin), not `location.pathname`,
7+
* so deep routes do not produce `.../nested/route__inspect/`.
8+
* SSR: no `location` — return empty until the client runs.
9+
*/
10+
function getInspectIframeSrc(): string {
11+
if (!isBrowser) {
12+
return '';
13+
}
14+
const base = new URL(import.meta.env.BASE_URL ?? '/', location.origin);
15+
return new URL(inspectorLink, base).href;
16+
}
17+
518
export const Inspect = component$(() => {
619
return (
720
<div class="h-full w-full flex-1 overflow-hidden rounded-2xl border border-glass-border bg-card-item-bg">
821
<iframe
9-
src={`${location.href}${inspectorLink}`}
22+
src={getInspectIframeSrc()}
1023
width={'100%'}
1124
height={'100%'}
1225
id="inspect_qwik"

packages/ui/src/features/Inspect/iframe-theme.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const GLASSMORPHISM_CSS = `
1313
--c-bg-base: transparent !important;
1414
--c-bg-nav: transparent !important;
1515
--c-bg-active: transparent !important;
16-
--iframe-border: rgba(255, 255, 255, 0.08) !important;
17-
--iframe-hover: rgba(255, 255, 255, 0.06) !important;
18-
color-scheme: dark;
16+
--iframe-border: rgba(0, 0, 0, 0.1) !important;
17+
--iframe-hover: rgba(0, 0, 0, 0.04) !important;
18+
color-scheme: light;
1919
}
2020
/* 仅针对主视图容器做透明处理,不再暴力让所有 div/section 变透明 */
2121
html, body, #app, main, header, nav, footer { background-color: transparent !important; }

0 commit comments

Comments
 (0)