mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
* feat: begin upgrading deps, still very buggy * feat: progress * feat: sort all type issues * fix: sort type issues * fix: import sonner styles * fix: nuxt is the enemy * fix: try sorting issue with workflows * fix: update vitest config for dynamic import of path and defineConfig * fix: add missing import * fix: add time out to try and fix issues * fix: add ui:ci:preview task for frontend build in CI mode * fix: i was silly * feat: add go:ci:with-frontend task for CI mode and remove ui:ci:preview from e2e workflow * fix: update baseURL in Playwright config for local testing to use port 7745 * fix: update E2E_BASE_URL and remove wait for timeout in login test for smoother execution
60 lines
1.7 KiB
Vue
60 lines
1.7 KiB
Vue
<template>
|
|
<Dialog v-if="isDesktop" :dialog-id="dialogId">
|
|
<DialogScrollContent>
|
|
<DialogHeader>
|
|
<div class="mr-4 flex place-items-center justify-between">
|
|
<DialogTitle>{{ title }}</DialogTitle>
|
|
<slot name="header-actions" />
|
|
</div>
|
|
</DialogHeader>
|
|
|
|
<slot />
|
|
|
|
<DialogFooter>
|
|
<i18n-t
|
|
keypath="components.app.create_modal.createAndAddAnother"
|
|
tag="span"
|
|
class="flex items-center gap-1 text-sm"
|
|
>
|
|
<template #shiftKey>
|
|
<Shortcut size="sm" :keys="[$t('components.app.create_modal.shift')]" />
|
|
</template>
|
|
<template #enterKey>
|
|
<Shortcut size="sm" :keys="[$t('components.app.create_modal.enter')]" />
|
|
</template>
|
|
</i18n-t>
|
|
</DialogFooter>
|
|
</DialogScrollContent>
|
|
</Dialog>
|
|
|
|
<Drawer v-else :dialog-id="dialogId">
|
|
<DrawerContent class="max-h-[90%]">
|
|
<DrawerHeader>
|
|
<DrawerTitle>{{ title }}</DrawerTitle>
|
|
</DrawerHeader>
|
|
<div class="flex justify-center">
|
|
<slot name="header-actions" />
|
|
</div>
|
|
|
|
<div class="m-2 overflow-y-auto p-2">
|
|
<slot />
|
|
</div>
|
|
</DrawerContent>
|
|
</Drawer>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useMediaQuery } from "@vueuse/core";
|
|
import type { DialogID } from "@/components/ui/dialog-provider/utils";
|
|
import { Drawer, DrawerContent, DrawerHeader, DrawerTitle } from "@/components/ui/drawer";
|
|
import { Dialog, DialogFooter, DialogHeader, DialogScrollContent, DialogTitle } from "@/components/ui/dialog";
|
|
import { Shortcut } from "@/components/ui/shortcut";
|
|
|
|
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
|
|
defineProps<{
|
|
dialogId: DialogID;
|
|
title: string;
|
|
}>();
|
|
</script>
|