1
1
<script setup lang="ts">
2
2
import { VueButton , VueCard , VueCheckbox , VueConfirm , VueDarkToggle , VueSelect , VueSwitch } from ' @vue/devtools-ui'
3
- // import { isInChromePanel } from '@vue/devtools-shared'
4
3
5
4
// #region view mode
6
5
// const viewMode = inject<Ref<'overlay' | 'panel'>>('viewMode', ref('overlay'))
@@ -10,6 +9,13 @@ import { VueButton, VueCard, VueCheckbox, VueConfirm, VueDarkToggle, VueSelect,
10
9
11
10
const { categorizedTabs : categories } = useAllTabs ()
12
11
12
+ const hostEnv = useHostEnv ()
13
+
14
+ /**
15
+ * Enable feature settings in separate window because someone is using it, related #458
16
+ */
17
+ const enableFeatureSettings = hostEnv === ' iframe' || hostEnv === ' separate-window'
18
+
13
19
const { scale, interactionCloseOnOutsideClick, showPanel, minimizePanelInteractive, expandSidebar, scrollableSidebar } = toRefs (toReactive (devtoolsClientState ))
14
20
15
21
// #region settings
@@ -184,26 +190,28 @@ const minimizePanelInteractiveLabel = computed(() => {
184
190
</div >
185
191
</VueCard >
186
192
187
- <h3 mt2 text-lg >
188
- Features
189
- </h3 >
190
- <VueCard p4 flex =" ~ col gap-2" >
191
- <div class =" flex items-center gap2 text-sm" >
192
- <VueCheckbox v-model =" interactionCloseOnOutsideClick" />
193
- <span op75 >Close DevTools when clicking outside</span >
194
- </div >
195
- <div class =" flex items-center gap2 text-sm" >
196
- <VueCheckbox v-model =" showPanel" />
197
- <span op75 >Always show the floating panel</span >
198
- </div >
199
-
200
- <div mx--2 my1 h-1px border =" b base" op75 />
201
-
202
- <p >Minimize floating panel on inactive</p >
203
- <div >
204
- <VueSelect v-model =" minimizePanelInteractive" :button-props =" { outlined: true }" :options =" minimizePanelInteractiveOptions" :placeholder =" minimizePanelInteractiveLabel" />
205
- </div >
206
- </VueCard >
193
+ <template v-if =" enableFeatureSettings " >
194
+ <h3 mt2 text-lg >
195
+ Features
196
+ </h3 >
197
+ <VueCard p4 flex =" ~ col gap-2" >
198
+ <div class =" flex items-center gap2 text-sm" >
199
+ <VueCheckbox v-model =" interactionCloseOnOutsideClick" />
200
+ <span op75 >Close DevTools when clicking outside</span >
201
+ </div >
202
+ <div class =" flex items-center gap2 text-sm" >
203
+ <VueCheckbox v-model =" showPanel" />
204
+ <span op75 >Always show the floating panel</span >
205
+ </div >
206
+
207
+ <div mx--2 my1 h-1px border =" b base" op75 />
208
+
209
+ <p >Minimize floating panel on inactive</p >
210
+ <div >
211
+ <VueSelect v-model =" minimizePanelInteractive" :button-props =" { outlined: true }" :options =" minimizePanelInteractiveOptions" :placeholder =" minimizePanelInteractiveLabel" />
212
+ </div >
213
+ </VueCard >
214
+ </template >
207
215
208
216
<h3 mt2 text-lg >
209
217
Debug
0 commit comments