Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion apps/studio/ui/src/app/App.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script setup lang="ts">
import { computed, onUnmounted, watch } from 'vue'
import { computed, defineAsyncComponent, onErrorCaptured, onUnmounted, watch } from 'vue'
import { RouterView, useRoute, useRouter } from 'vue-router'
import { LockKeyhole, RefreshCw, TriangleAlert } from '@lucide/vue'

import { Button, Spinner } from '@/design'
import { useCapturedErrors } from '@/features/debug/captured-errors'
import DialogHost from '@/features/dialogs/DialogHost.vue'
import { useDialog } from '@/features/dialogs/use-dialog'
import ToastHost from '@/features/toasts/ToastHost.vue'
Expand All @@ -27,6 +28,14 @@ const bootStore = useBootStore()
const navigationStore = useNavigationStore()
const dialog = useDialog()
const toast = useToast()
const DebugBar = import.meta.env.DEV
? defineAsyncComponent(() => import('@/features/debug/DebugBar.vue'))
: null

if (import.meta.env.DEV) {
const { capture } = useCapturedErrors()
onErrorCaptured(capture)
}

setAPIDialogHandler((request) => {
void dialog.open(request)
Expand Down Expand Up @@ -180,6 +189,7 @@ function humanizeEntity(value: string): string {
</Shell>
<DialogHost />
<ToastHost />
<DebugBar v-if="DebugBar && usesShell" />
</template>

<style scoped>
Expand Down
Loading