Skip to content

Commit 9064ea3

Browse files
committed
feat: adjust settings
1 parent e072cdc commit 9064ea3

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

packages/core/src/client/webcomponents/.generated/css.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/core/src/client/webcomponents/components/ViewBuiltinSettings.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DEFAULT_STATE_USER_SETTINGS } from '@vitejs/devtools-kit/constants'
55
import { computed } from 'vue'
66
import { docksGroupByCategories } from '../state/dock-settings'
77
import { sharedStateToRef } from '../state/docks'
8-
import { isDockPopupSupported, requestDockPopupOpen } from '../state/popup'
8+
import { isDockPopupSupported, requestDockPopupOpen, useIsDockPopupOpen } from '../state/popup'
99
import DockIcon from './DockIcon.vue'
1010
1111
const props = defineProps<{
@@ -17,6 +17,7 @@ const settingsStore = props.context.docks.settings
1717
const settings = sharedStateToRef(settingsStore)
1818
const panelStore = props.context.panel.store
1919
const isEmbedded = props.context.clientType === 'embedded'
20+
const isDockPopupOpen = useIsDockPopupOpen()
2021
2122
const dockModeOptions = computed(() => {
2223
const options = [
@@ -173,7 +174,7 @@ function resetSettings() {
173174

174175
<div class="flex flex-col gap-4">
175176
<!-- Dock mode -->
176-
<div v-if="isEmbedded" class="flex flex-col gap-2">
177+
<div v-if="isEmbedded && !isDockPopupOpen" class="flex flex-col gap-2">
177178
<div class="flex flex-col">
178179
<span class="text-sm">Dock mode</span>
179180
<span class="text-xs op50">How the DevTools panel is displayed</span>

packages/core/src/client/webcomponents/components/ViewIframe.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const props = defineProps<{
1616
const settings = sharedStateToRef(props.context.docks.settings)
1717
const showAddressBar = computed(() => settings.value.showIframeAddressBar ?? true)
1818
const isEdgeMode = computed(() => props.context.panel.store.mode === 'edge')
19-
const ADDRESS_BAR_HEIGHT = 50
19+
const ADDRESS_BAR_HEIGHT = 40
2020
2121
const isLoading = ref(true)
2222
const isIframeLoading = ref(false)
@@ -226,7 +226,7 @@ onUnmounted(() => {
226226
<div class="w-full h-full flex flex-col">
227227
<div
228228
v-if="showAddressBar"
229-
class="flex-none px-2 w-full flex items-center gap-1 bg-gray/5"
229+
class="flex-none px-2 w-full flex items-center gap-1"
230230
:class="isEdgeMode ? 'border-b border-base' : 'border rounded-t-md border-base border-b-0'"
231231
:style="{ height: `${ADDRESS_BAR_HEIGHT}px` }"
232232
>
@@ -238,7 +238,7 @@ onUnmounted(() => {
238238
title="Back"
239239
@click="goBack"
240240
>
241-
<div class="i-ph-caret-left text-base op60" />
241+
<div class="i-ph-caret-left op60 w-4.5 h-4.5" />
242242
</button>
243243

244244
<!-- Refresh button -->
@@ -247,22 +247,22 @@ onUnmounted(() => {
247247
title="Refresh"
248248
@click="refresh"
249249
>
250-
<div class="i-ph-arrow-clockwise text-base op60" />
250+
<div class="i-ph-arrow-clockwise op60 w-4.5 h-4.5" />
251251
</button>
252252
</template>
253253

254254
<!-- Cross-origin badge -->
255255
<div
256256
v-else
257-
class="flex items-center gap-1 px-2 py-1 rounded text-xs bg-amber/10 text-amber border border-amber/20 shrink-0"
257+
class="flex items-center gap-1 px2 py1 rounded text-xs bg-amber/10 text-amber border border-amber/20 shrink-0"
258258
title="Cross-origin iframe - navigation controls unavailable"
259259
>
260260
<div class="i-ph-globe text-sm" />
261261
<span>Cross-Origin</span>
262262
</div>
263263

264264
<!-- URL input -->
265-
<div class="flex-1 flex items-center h-8 px-2.5 rounded bg-gray/10 border border-transparent hover:border-gray/20 focus-within:border-gray/30 transition-colors">
265+
<div class="flex-1 flex items-center h-7 px-2.5 rounded bg-gray/5 border border-transparent hover:border-gray/10 focus-within:border-gray/15 transition-colors">
266266
<input
267267
ref="urlInput"
268268
:value="isEditing ? editingUrl : displayUrl"

0 commit comments

Comments
 (0)