@edgedev/create-edge-app 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.dev +1 -0
- package/.vscode/settings.json +1 -1
- package/app.vue +72 -21
- package/assets/css/tailwind.css +78 -0
- package/bin/cli.js +1 -1
- package/components/subToolbar.vue +4 -13
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +24 -0
- package/components/ui/accordion/AccordionItem.vue +24 -0
- package/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/components/ui/accordion/index.js +4 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/alert/Alert.vue +16 -0
- package/components/ui/alert/AlertDescription.vue +14 -0
- package/components/ui/alert/AlertTitle.vue +14 -0
- package/components/ui/alert/index.js +21 -0
- package/components/ui/alert/index.ts +23 -0
- package/components/ui/alert-dialog/AlertDialog.vue +14 -0
- package/components/ui/alert-dialog/AlertDialogAction.vue +20 -0
- package/components/ui/alert-dialog/AlertDialogCancel.vue +20 -0
- package/components/ui/alert-dialog/AlertDialogContent.vue +42 -0
- package/components/ui/alert-dialog/AlertDialogDescription.vue +25 -0
- package/components/ui/alert-dialog/AlertDialogFooter.vue +21 -0
- package/components/ui/alert-dialog/AlertDialogHeader.vue +16 -0
- package/components/ui/alert-dialog/AlertDialogTitle.vue +22 -0
- package/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
- package/components/ui/alert-dialog/index.ts +9 -0
- package/components/ui/aspect-ratio/AspectRatio.vue +11 -0
- package/components/ui/aspect-ratio/index.ts +1 -0
- package/components/ui/auto-form/AutoForm.vue +105 -0
- package/components/ui/auto-form/AutoFormField.vue +45 -0
- package/components/ui/auto-form/AutoFormFieldArray.vue +110 -0
- package/components/ui/auto-form/AutoFormFieldBoolean.vue +41 -0
- package/components/ui/auto-form/AutoFormFieldDate.vue +57 -0
- package/components/ui/auto-form/AutoFormFieldEnum.vue +49 -0
- package/components/ui/auto-form/AutoFormFieldFile.vue +74 -0
- package/components/ui/auto-form/AutoFormFieldInput.vue +36 -0
- package/components/ui/auto-form/AutoFormFieldNumber.vue +32 -0
- package/components/ui/auto-form/AutoFormFieldObject.vue +78 -0
- package/components/ui/auto-form/AutoFormLabel.vue +14 -0
- package/components/ui/auto-form/constant.ts +39 -0
- package/components/ui/auto-form/dependencies.ts +92 -0
- package/components/ui/auto-form/index.ts +15 -0
- package/components/ui/auto-form/interface.ts +81 -0
- package/components/ui/auto-form/utils.ts +171 -0
- package/components/ui/avatar/Avatar.vue +21 -0
- package/components/ui/avatar/AvatarFallback.vue +11 -0
- package/components/ui/avatar/AvatarImage.vue +9 -0
- package/components/ui/avatar/index.ts +24 -0
- package/components/ui/badge/Badge.vue +16 -0
- package/components/ui/badge/index.ts +25 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +13 -0
- package/components/ui/breadcrumb/BreadcrumbEllipsis.vue +22 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +21 -0
- package/components/ui/breadcrumb/index.ts +7 -0
- package/components/ui/button/Button.vue +26 -0
- package/components/ui/button/index.js +33 -0
- package/components/ui/button/index.ts +35 -0
- package/components/ui/calendar/Calendar.vue +60 -0
- package/components/ui/calendar/CalendarCell.vue +24 -0
- package/components/ui/calendar/CalendarCellTrigger.vue +38 -0
- package/components/ui/calendar/CalendarGrid.vue +24 -0
- package/components/ui/calendar/CalendarGridBody.vue +11 -0
- package/components/ui/calendar/CalendarGridHead.vue +11 -0
- package/components/ui/calendar/CalendarGridRow.vue +21 -0
- package/components/ui/calendar/CalendarHeadCell.vue +21 -0
- package/components/ui/calendar/CalendarHeader.vue +21 -0
- package/components/ui/calendar/CalendarHeading.vue +27 -0
- package/components/ui/calendar/CalendarNextButton.vue +32 -0
- package/components/ui/calendar/CalendarPrevButton.vue +32 -0
- package/components/ui/calendar/index.ts +12 -0
- package/components/ui/card/Card.vue +21 -0
- package/components/ui/card/CardContent.vue +14 -0
- package/components/ui/card/CardDescription.vue +14 -0
- package/components/ui/card/CardFooter.vue +14 -0
- package/components/ui/card/CardHeader.vue +14 -0
- package/components/ui/card/CardTitle.vue +18 -0
- package/components/ui/card/index.js +6 -0
- package/components/ui/card/index.ts +6 -0
- package/components/ui/carousel/Carousel.vue +44 -0
- package/components/ui/carousel/CarouselContent.vue +29 -0
- package/components/ui/carousel/CarouselItem.vue +23 -0
- package/components/ui/carousel/CarouselNext.vue +30 -0
- package/components/ui/carousel/CarouselPrevious.vue +30 -0
- package/components/ui/carousel/index.ts +10 -0
- package/components/ui/carousel/interface.ts +20 -0
- package/components/ui/carousel/useCarousel.ts +59 -0
- package/components/ui/chart/ChartCrosshair.vue +44 -0
- package/components/ui/chart/ChartLegend.vue +50 -0
- package/components/ui/chart/ChartSingleTooltip.vue +63 -0
- package/components/ui/chart/ChartTooltip.vue +40 -0
- package/components/ui/chart/index.ts +18 -0
- package/components/ui/chart/interface.ts +64 -0
- package/components/ui/chart-area/AreaChart.vue +136 -0
- package/components/ui/chart-area/index.ts +66 -0
- package/components/ui/chart-bar/BarChart.vue +115 -0
- package/components/ui/chart-bar/index.ts +66 -0
- package/components/ui/chart-donut/DonutChart.vue +100 -0
- package/components/ui/chart-donut/index.ts +39 -0
- package/components/ui/chart-line/LineChart.vue +105 -0
- package/components/ui/chart-line/index.ts +66 -0
- package/components/ui/checkbox/Checkbox.vue +33 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/collapsible/Collapsible.vue +15 -0
- package/components/ui/collapsible/CollapsibleContent.vue +11 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/command/Command.vue +30 -0
- package/components/ui/command/CommandDialog.vue +21 -0
- package/components/ui/command/CommandEmpty.vue +20 -0
- package/components/ui/command/CommandGroup.vue +29 -0
- package/components/ui/command/CommandInput.vue +33 -0
- package/components/ui/command/CommandItem.vue +26 -0
- package/components/ui/command/CommandList.vue +27 -0
- package/components/ui/command/CommandSeparator.vue +23 -0
- package/components/ui/command/CommandShortcut.vue +14 -0
- package/components/ui/command/index.js +9 -0
- package/components/ui/command/index.ts +9 -0
- package/components/ui/context-menu/ContextMenu.vue +15 -0
- package/components/ui/context-menu/ContextMenuCheckboxItem.vue +40 -0
- package/components/ui/context-menu/ContextMenuContent.vue +36 -0
- package/components/ui/context-menu/ContextMenuGroup.vue +11 -0
- package/components/ui/context-menu/ContextMenuItem.vue +34 -0
- package/components/ui/context-menu/ContextMenuLabel.vue +25 -0
- package/components/ui/context-menu/ContextMenuPortal.vue +11 -0
- package/components/ui/context-menu/ContextMenuRadioGroup.vue +19 -0
- package/components/ui/context-menu/ContextMenuRadioItem.vue +40 -0
- package/components/ui/context-menu/ContextMenuSeparator.vue +20 -0
- package/components/ui/context-menu/ContextMenuShortcut.vue +14 -0
- package/components/ui/context-menu/ContextMenuSub.vue +19 -0
- package/components/ui/context-menu/ContextMenuSubContent.vue +35 -0
- package/components/ui/context-menu/ContextMenuSubTrigger.vue +34 -0
- package/components/ui/context-menu/ContextMenuTrigger.vue +13 -0
- package/components/ui/context-menu/index.ts +14 -0
- package/components/ui/dialog/Dialog.vue +14 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +50 -0
- package/components/ui/dialog/DialogDescription.vue +24 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +59 -0
- package/components/ui/dialog/DialogTitle.vue +29 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.js +9 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/drawer/Drawer.vue +19 -0
- package/components/ui/drawer/DrawerContent.vue +28 -0
- package/components/ui/drawer/DrawerDescription.vue +20 -0
- package/components/ui/drawer/DrawerFooter.vue +14 -0
- package/components/ui/drawer/DrawerHeader.vue +14 -0
- package/components/ui/drawer/DrawerOverlay.vue +18 -0
- package/components/ui/drawer/DrawerTitle.vue +20 -0
- package/components/ui/drawer/index.ts +8 -0
- package/components/ui/dropdown-menu/DropdownMenu.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +40 -0
- package/components/ui/dropdown-menu/DropdownMenuContent.vue +38 -0
- package/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
- package/components/ui/dropdown-menu/DropdownMenuItem.vue +28 -0
- package/components/ui/dropdown-menu/DropdownMenuLabel.vue +24 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +41 -0
- package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +30 -0
- package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -0
- package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +13 -0
- package/components/ui/dropdown-menu/index.ts +16 -0
- package/components/ui/form/FormControl.vue +16 -0
- package/components/ui/form/FormDescription.vue +20 -0
- package/components/ui/form/FormItem.vue +19 -0
- package/components/ui/form/FormLabel.vue +23 -0
- package/components/ui/form/FormMessage.vue +16 -0
- package/components/ui/form/index.js +7 -0
- package/components/ui/form/index.ts +7 -0
- package/components/ui/form/injectionKeys.js +1 -0
- package/components/ui/form/injectionKeys.ts +4 -0
- package/components/ui/form/useFormField.js +36 -0
- package/components/ui/form/useFormField.ts +30 -0
- package/components/ui/hover-card/HoverCard.vue +14 -0
- package/components/ui/hover-card/HoverCardContent.vue +41 -0
- package/components/ui/hover-card/HoverCardTrigger.vue +11 -0
- package/components/ui/hover-card/index.ts +3 -0
- package/components/ui/input/Input.vue +24 -0
- package/components/ui/input/index.js +1 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +27 -0
- package/components/ui/label/index.js +1 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/menubar/Menubar.vue +35 -0
- package/components/ui/menubar/MenubarCheckboxItem.vue +40 -0
- package/components/ui/menubar/MenubarContent.vue +43 -0
- package/components/ui/menubar/MenubarGroup.vue +11 -0
- package/components/ui/menubar/MenubarItem.vue +35 -0
- package/components/ui/menubar/MenubarLabel.vue +13 -0
- package/components/ui/menubar/MenubarMenu.vue +11 -0
- package/components/ui/menubar/MenubarRadioGroup.vue +20 -0
- package/components/ui/menubar/MenubarRadioItem.vue +40 -0
- package/components/ui/menubar/MenubarSeparator.vue +19 -0
- package/components/ui/menubar/MenubarShortcut.vue +14 -0
- package/components/ui/menubar/MenubarSub.vue +19 -0
- package/components/ui/menubar/MenubarSubContent.vue +39 -0
- package/components/ui/menubar/MenubarSubTrigger.vue +30 -0
- package/components/ui/menubar/MenubarTrigger.vue +29 -0
- package/components/ui/menubar/index.ts +15 -0
- package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
- package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/components/ui/navigation-menu/NavigationMenuList.vue +29 -0
- package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
- package/components/ui/navigation-menu/index.ts +12 -0
- package/components/ui/number-field/NumberField.vue +23 -0
- package/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/components/ui/number-field/NumberFieldDecrement.vue +25 -0
- package/components/ui/number-field/NumberFieldIncrement.vue +25 -0
- package/components/ui/number-field/NumberFieldInput.vue +8 -0
- package/components/ui/number-field/index.ts +5 -0
- package/components/ui/pagination/PaginationEllipsis.vue +22 -0
- package/components/ui/pagination/PaginationFirst.vue +29 -0
- package/components/ui/pagination/PaginationLast.vue +29 -0
- package/components/ui/pagination/PaginationNext.vue +29 -0
- package/components/ui/pagination/PaginationPrev.vue +29 -0
- package/components/ui/pagination/index.ts +10 -0
- package/components/ui/pin-input/PinInput.vue +23 -0
- package/components/ui/pin-input/PinInputGroup.vue +18 -0
- package/components/ui/pin-input/PinInputInput.vue +18 -0
- package/components/ui/pin-input/PinInputSeparator.vue +15 -0
- package/components/ui/pin-input/index.ts +4 -0
- package/components/ui/popover/Popover.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +48 -0
- package/components/ui/popover/PopoverTrigger.vue +11 -0
- package/components/ui/popover/index.js +3 -0
- package/components/ui/popover/index.ts +3 -0
- package/components/ui/progress/Progress.vue +39 -0
- package/components/ui/progress/index.js +1 -0
- package/components/ui/progress/index.ts +1 -0
- package/components/ui/radio-group/RadioGroup.vue +25 -0
- package/components/ui/radio-group/RadioGroupItem.vue +39 -0
- package/components/ui/radio-group/index.ts +2 -0
- package/components/ui/range-calendar/RangeCalendar.vue +60 -0
- package/components/ui/range-calendar/RangeCalendarCell.vue +24 -0
- package/components/ui/range-calendar/RangeCalendarCellTrigger.vue +40 -0
- package/components/ui/range-calendar/RangeCalendarGrid.vue +24 -0
- package/components/ui/range-calendar/RangeCalendarGridBody.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridHead.vue +11 -0
- package/components/ui/range-calendar/RangeCalendarGridRow.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarHeadCell.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarHeader.vue +21 -0
- package/components/ui/range-calendar/RangeCalendarHeading.vue +27 -0
- package/components/ui/range-calendar/RangeCalendarNextButton.vue +32 -0
- package/components/ui/range-calendar/RangeCalendarPrevButton.vue +32 -0
- package/components/ui/range-calendar/index.ts +12 -0
- package/components/ui/resizable/ResizableHandle.vue +26 -0
- package/components/ui/resizable/ResizablePanelGroup.vue +21 -0
- package/components/ui/resizable/index.ts +3 -0
- package/components/ui/scroll-area/ScrollArea.vue +29 -0
- package/components/ui/scroll-area/ScrollBar.vue +30 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/select/Select.vue +15 -0
- package/components/ui/select/SelectContent.vue +53 -0
- package/components/ui/select/SelectGroup.vue +19 -0
- package/components/ui/select/SelectItem.vue +44 -0
- package/components/ui/select/SelectItemText.vue +11 -0
- package/components/ui/select/SelectLabel.vue +13 -0
- package/components/ui/select/SelectScrollDownButton.vue +24 -0
- package/components/ui/select/SelectScrollUpButton.vue +24 -0
- package/components/ui/select/SelectSeparator.vue +17 -0
- package/components/ui/select/SelectTrigger.vue +31 -0
- package/components/ui/select/SelectValue.vue +11 -0
- package/components/ui/select/index.ts +11 -0
- package/components/ui/separator/Separator.vue +20 -0
- package/components/ui/separator/index.js +1 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +14 -0
- package/components/ui/sheet/SheetClose.vue +11 -0
- package/components/ui/sheet/SheetContent.vue +56 -0
- package/components/ui/sheet/SheetDescription.vue +22 -0
- package/components/ui/sheet/SheetFooter.vue +19 -0
- package/components/ui/sheet/SheetHeader.vue +16 -0
- package/components/ui/sheet/SheetTitle.vue +22 -0
- package/components/ui/sheet/SheetTrigger.vue +11 -0
- package/components/ui/sheet/index.ts +31 -0
- package/components/ui/skeleton/Skeleton.vue +14 -0
- package/components/ui/skeleton/index.ts +1 -0
- package/components/ui/slider/Slider.vue +36 -0
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/sonner/Sonner.vue +22 -0
- package/components/ui/sonner/index.ts +1 -0
- package/components/ui/switch/Switch.vue +37 -0
- package/components/ui/switch/index.ts +1 -0
- package/components/ui/table/Table.vue +16 -0
- package/components/ui/table/TableBody.vue +14 -0
- package/components/ui/table/TableCaption.vue +14 -0
- package/components/ui/table/TableCell.vue +21 -0
- package/components/ui/table/TableEmpty.vue +37 -0
- package/components/ui/table/TableFooter.vue +14 -0
- package/components/ui/table/TableHead.vue +14 -0
- package/components/ui/table/TableHeader.vue +14 -0
- package/components/ui/table/TableRow.vue +14 -0
- package/components/ui/table/index.ts +8 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +27 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/tags-input/TagsInput.vue +22 -0
- package/components/ui/tags-input/TagsInputInput.vue +19 -0
- package/components/ui/tags-input/TagsInputItem.vue +22 -0
- package/components/ui/tags-input/TagsInputItemDelete.vue +24 -0
- package/components/ui/tags-input/TagsInputItemText.vue +19 -0
- package/components/ui/tags-input/index.ts +5 -0
- package/components/ui/textarea/Textarea.vue +24 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toast/Toast.vue +28 -0
- package/components/ui/toast/ToastAction.vue +19 -0
- package/components/ui/toast/ToastClose.vue +22 -0
- package/components/ui/toast/ToastDescription.vue +19 -0
- package/components/ui/toast/ToastProvider.vue +11 -0
- package/components/ui/toast/ToastTitle.vue +19 -0
- package/components/ui/toast/ToastViewport.vue +17 -0
- package/components/ui/toast/Toaster.vue +30 -0
- package/components/ui/toast/index.ts +38 -0
- package/components/ui/toast/use-toast.ts +165 -0
- package/components/ui/toggle/Toggle.vue +35 -0
- package/components/ui/toggle/index.ts +27 -0
- package/components/ui/toggle-group/ToggleGroup.vue +34 -0
- package/components/ui/toggle-group/ToggleGroupItem.vue +35 -0
- package/components/ui/toggle-group/index.ts +2 -0
- package/components/ui/tooltip/Tooltip.vue +14 -0
- package/components/ui/tooltip/TooltipContent.vue +31 -0
- package/components/ui/tooltip/TooltipProvider.vue +11 -0
- package/components/ui/tooltip/TooltipTrigger.vue +11 -0
- package/components/ui/tooltip/index.ts +4 -0
- package/components/ui/v-calendar/Calendar.vue +331 -0
- package/components/ui/v-calendar/index.ts +22 -0
- package/components.json +17 -0
- package/edge-components-install.sh +1 -0
- package/jsconfig.json +9 -0
- package/lib/utils.ts +6 -0
- package/nuxt.config.ts +28 -11
- package/package.json +33 -14
- package/pages/app/account/[page].vue +71 -0
- package/pages/app/dashboard/[[collection]]/[[docId]].vue +181 -0
- package/pages/app/login.vue +9 -7
- package/pages/app/signup.vue +9 -7
- package/plugins/icons.ts +72 -0
- package/tailwind.config.js +85 -0
- package/components/.gitkeep +0 -0
- package/components/account.vue +0 -107
- package/components/billing.vue +0 -8
- package/components/bottomMenu.vue +0 -35
- package/components/dashboard.vue +0 -186
- package/components/editor.vue +0 -247
- package/components/topMenu.vue +0 -17
- package/components/userMenu.vue +0 -64
- package/composables/vuetify.ts +0 -10
- package/pages/app/[[page]]/[[collection]]/[[docId]].vue +0 -48
- package/plugins/edgeFirebaseFramework.ts +0 -5
- package/plugins/vuetify.ts +0 -14
package/components/dashboard.vue
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
collection: {
|
|
4
|
-
type: String,
|
|
5
|
-
required: true,
|
|
6
|
-
},
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
const edgeFirebase = inject('edgeFirebase')
|
|
10
|
-
const edgeGlobal = inject('edgeGlobal')
|
|
11
|
-
const router = useRouter()
|
|
12
|
-
|
|
13
|
-
const state = reactive({
|
|
14
|
-
form: false,
|
|
15
|
-
menu: false,
|
|
16
|
-
dialog: false,
|
|
17
|
-
apiKeys: [],
|
|
18
|
-
filter: '',
|
|
19
|
-
empty: false,
|
|
20
|
-
afterMount: false,
|
|
21
|
-
deleteDialog: false,
|
|
22
|
-
deleteItemName: '',
|
|
23
|
-
deleteItemDocId: '',
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const gotoSite = (docId) => {
|
|
27
|
-
router.push(`/app/dashboard/${props.collection}/${docId}`)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const capitalizeFirstLetter = (str) => {
|
|
31
|
-
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const singularize = (word) => {
|
|
35
|
-
if (word.endsWith('ies')) {
|
|
36
|
-
return `${word.slice(0, -3)}y`
|
|
37
|
-
}
|
|
38
|
-
else if (word.endsWith('es')) {
|
|
39
|
-
return word.slice(0, -2)
|
|
40
|
-
}
|
|
41
|
-
else if (word.endsWith('s')) {
|
|
42
|
-
return word.slice(0, -1)
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
return word
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const filtered = computed(() => {
|
|
50
|
-
if (edgeGlobal.objHas(edgeFirebase.data, `${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`) === false) {
|
|
51
|
-
return []
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const allData = Object.values(edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`])
|
|
55
|
-
|
|
56
|
-
const filtered = allData.filter((entry) => {
|
|
57
|
-
if (state.filter.trim() === '') {
|
|
58
|
-
return true
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Modify the condition as needed, e.g., using "startsWith" or "includes"
|
|
62
|
-
return entry.name.toLowerCase().includes(state.filter.toLowerCase())
|
|
63
|
-
})
|
|
64
|
-
return filtered.sort((a, b) => {
|
|
65
|
-
if (a.name < b.name) {
|
|
66
|
-
return -1
|
|
67
|
-
}
|
|
68
|
-
if (a.name > b.name) {
|
|
69
|
-
return 1
|
|
70
|
-
}
|
|
71
|
-
return 0
|
|
72
|
-
})
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
onBeforeMount (async () => {
|
|
76
|
-
await edgeFirebase.startSnapshot(`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`)
|
|
77
|
-
state.afterMount = true
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
const deleteItem = (docId) => {
|
|
81
|
-
state.deleteDialog = true
|
|
82
|
-
state.deleteItemName = edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`][docId].name
|
|
83
|
-
state.deleteItemDocId = docId
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const deleteAction = () => {
|
|
87
|
-
edgeFirebase.removeDoc(`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`, state.deleteItemDocId)
|
|
88
|
-
state.deleteDialog = false
|
|
89
|
-
}
|
|
90
|
-
</script>
|
|
91
|
-
|
|
92
|
-
<template>
|
|
93
|
-
<v-card v-if="state.afterMount" class="mx-auto" max-width="1200">
|
|
94
|
-
<v-toolbar flat>
|
|
95
|
-
<v-toolbar-title>{{ capitalizeFirstLetter(props.collection) }}</v-toolbar-title>
|
|
96
|
-
<v-text-field
|
|
97
|
-
v-model="state.filter"
|
|
98
|
-
label="Filter"
|
|
99
|
-
prepend-icon="mdi-filter"
|
|
100
|
-
variant="underlined"
|
|
101
|
-
hide-details
|
|
102
|
-
clearable
|
|
103
|
-
@click:clear="state.filter = ''"
|
|
104
|
-
/>
|
|
105
|
-
<v-spacer />
|
|
106
|
-
<v-btn variant="outlined" :to="`/app/dashboard/${props.collection}/new`">
|
|
107
|
-
Add {{ singularize(props.collection) }}
|
|
108
|
-
</v-btn>
|
|
109
|
-
</v-toolbar>
|
|
110
|
-
<v-card-text>
|
|
111
|
-
<v-list lines="two">
|
|
112
|
-
<template v-for="item in filtered" :key="item.docId">
|
|
113
|
-
<v-list-item @click="gotoSite(item.docId)">
|
|
114
|
-
<template #prepend>
|
|
115
|
-
<v-avatar color="grey-darken-1">
|
|
116
|
-
<v-icon>mdi-file-edit</v-icon>
|
|
117
|
-
</v-avatar>
|
|
118
|
-
</template>
|
|
119
|
-
|
|
120
|
-
<v-list-item-title>{{ item.name }}</v-list-item-title>
|
|
121
|
-
<template #append>
|
|
122
|
-
<v-btn
|
|
123
|
-
color="grey-lighten-1"
|
|
124
|
-
icon="mdi-delete"
|
|
125
|
-
variant="text"
|
|
126
|
-
@click.stop="deleteItem(item.docId)"
|
|
127
|
-
/>
|
|
128
|
-
</template>
|
|
129
|
-
</v-list-item>
|
|
130
|
-
<v-divider
|
|
131
|
-
inset
|
|
132
|
-
/>
|
|
133
|
-
</template>
|
|
134
|
-
</v-list>
|
|
135
|
-
</v-card-text>
|
|
136
|
-
<v-dialog
|
|
137
|
-
v-model="state.deleteDialog"
|
|
138
|
-
persistent
|
|
139
|
-
max-width="600"
|
|
140
|
-
transition="fade-transition"
|
|
141
|
-
>
|
|
142
|
-
<v-card>
|
|
143
|
-
<v-toolbar flat>
|
|
144
|
-
<v-icon class="mx-4">
|
|
145
|
-
mdi-list-box
|
|
146
|
-
</v-icon>
|
|
147
|
-
Delete
|
|
148
|
-
<v-spacer />
|
|
149
|
-
|
|
150
|
-
<v-btn
|
|
151
|
-
type="submit"
|
|
152
|
-
color="primary"
|
|
153
|
-
icon
|
|
154
|
-
@click="state.deleteDialog = false"
|
|
155
|
-
>
|
|
156
|
-
<v-icon> mdi-close</v-icon>
|
|
157
|
-
</v-btn>
|
|
158
|
-
</v-toolbar>
|
|
159
|
-
<v-card-title>Are you sure you want to delete "{{ state.deleteItemName }}"?</v-card-title>
|
|
160
|
-
<v-card-text>Hey there, you're about to banish "{{ state.deleteItemName }}" into the endless abyss of deletion, never to be seen again. Remember, this is not just another trashy reality TV show - there are no sudden comebacks or surprise twists. Once it's gone, it's gone, just like the dignity of anyone who wears socks with sandals. Are you 100% sure you're ready to make ""{{ state.deleteItemName }}"" disappear like a magician's assistant? Tick-tock, the choice is yours!</v-card-text>
|
|
161
|
-
<v-card-actions>
|
|
162
|
-
<v-spacer />
|
|
163
|
-
<v-btn
|
|
164
|
-
color="blue-darken-1"
|
|
165
|
-
variant="text"
|
|
166
|
-
@click="state.deleteDialog = false"
|
|
167
|
-
>
|
|
168
|
-
Cancel
|
|
169
|
-
</v-btn>
|
|
170
|
-
<v-btn
|
|
171
|
-
type="submit"
|
|
172
|
-
color="error"
|
|
173
|
-
variant="text"
|
|
174
|
-
@click="deleteAction()"
|
|
175
|
-
>
|
|
176
|
-
Delete
|
|
177
|
-
</v-btn>
|
|
178
|
-
</v-card-actions>
|
|
179
|
-
</v-card>
|
|
180
|
-
</v-dialog>
|
|
181
|
-
</v-card>
|
|
182
|
-
</template>
|
|
183
|
-
|
|
184
|
-
<style lang="scss" scoped>
|
|
185
|
-
|
|
186
|
-
</style>
|
package/components/editor.vue
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
docId: {
|
|
4
|
-
type: String,
|
|
5
|
-
default: '',
|
|
6
|
-
},
|
|
7
|
-
collection: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
newDocSchema: {
|
|
12
|
-
type: Object,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const newDoc = computed(() => {
|
|
18
|
-
return Object.entries(props.newDocSchema).reduce((newObj, [key, val]) => {
|
|
19
|
-
newObj[key] = val.value
|
|
20
|
-
return newObj
|
|
21
|
-
}, {})
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
const router = useRouter()
|
|
25
|
-
|
|
26
|
-
const state = reactive({
|
|
27
|
-
workingDoc: {},
|
|
28
|
-
form: false,
|
|
29
|
-
tab: 'forms',
|
|
30
|
-
bypassUnsavedChanges: false,
|
|
31
|
-
afterMount: false,
|
|
32
|
-
})
|
|
33
|
-
const edgeFirebase = inject('edgeFirebase')
|
|
34
|
-
const edgeGlobal = inject('edgeGlobal')
|
|
35
|
-
|
|
36
|
-
const unsavedChanges = computed(() => {
|
|
37
|
-
if (props.docId === 'new') {
|
|
38
|
-
return false
|
|
39
|
-
}
|
|
40
|
-
return JSON.stringify(state.workingDoc) !== JSON.stringify(edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`][props.docId])
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const subCollection = (collection) => {
|
|
44
|
-
if (edgeGlobal.objHas(edgeFirebase.data, `${edgeGlobal.edgeState.organizationDocPath}/${collection}`) === false) {
|
|
45
|
-
return []
|
|
46
|
-
}
|
|
47
|
-
// need to return an array of objects title is name and value is docId
|
|
48
|
-
return Object.entries(edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${collection}`]).map(([key, val]) => {
|
|
49
|
-
return {
|
|
50
|
-
title: val.name,
|
|
51
|
-
value: key,
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
onBeforeRouteUpdate((to, from, next) => {
|
|
57
|
-
if (unsavedChanges.value && !state.bypassUnsavedChanges) {
|
|
58
|
-
state.dialog = true
|
|
59
|
-
next(false)
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
edgeGlobal.edgeState.changeTracker = {}
|
|
63
|
-
next()
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
const discardChanges = async () => {
|
|
67
|
-
if (props.docId === 'new') {
|
|
68
|
-
state.bypassUnsavedChanges = true
|
|
69
|
-
edgeGlobal.edgeState.changeTracker = {}
|
|
70
|
-
router.push('/app/dashboard')
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
state.workingDoc = await edgeGlobal.dupObject(edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`][props.docId])
|
|
74
|
-
state.bypassUnsavedChanges = true
|
|
75
|
-
edgeGlobal.edgeState.changeTracker = {}
|
|
76
|
-
router.push('/app/dashboard')
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const capitalizeFirstLetter = (str) => {
|
|
80
|
-
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const singularize = (word) => {
|
|
84
|
-
if (word.endsWith('ies')) {
|
|
85
|
-
return `${word.slice(0, -3)}y`
|
|
86
|
-
}
|
|
87
|
-
else if (word.endsWith('es')) {
|
|
88
|
-
return word.slice(0, -2)
|
|
89
|
-
}
|
|
90
|
-
else if (word.endsWith('s')) {
|
|
91
|
-
return word.slice(0, -1)
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
return word
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const title = computed(() => {
|
|
99
|
-
if (props.docId !== 'new') {
|
|
100
|
-
if (!edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`]) {
|
|
101
|
-
return ''
|
|
102
|
-
}
|
|
103
|
-
return capitalizeFirstLetter(`${edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`][props.docId].name}`)
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
return `New ${capitalizeFirstLetter(singularize(props.collection))}`
|
|
107
|
-
}
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
const onSubmit = async (event) => {
|
|
111
|
-
const results = await event
|
|
112
|
-
if (results.valid) {
|
|
113
|
-
state.bypassUnsavedChanges = true
|
|
114
|
-
edgeFirebase.storeDoc(`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`, state.workingDoc)
|
|
115
|
-
edgeGlobal.edgeState.changeTracker = {}
|
|
116
|
-
router.push(`/app/dashboard/${props.collection}`)
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
onBeforeMount(async () => {
|
|
121
|
-
edgeGlobal.edgeState.changeTracker = {}
|
|
122
|
-
for (const field of Object.keys(props.newDocSchema)) {
|
|
123
|
-
if (props.newDocSchema[field].type === 'collection') {
|
|
124
|
-
await edgeFirebase.startSnapshot(`${edgeGlobal.edgeState.organizationDocPath}/${field}`)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
await edgeFirebase.startSnapshot(`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`)
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
watch(() => edgeFirebase.data[`${edgeGlobal.edgeState.organizationDocPath}/${props.collection}`], (newVal) => {
|
|
131
|
-
if (props.docId !== 'new') {
|
|
132
|
-
if (edgeGlobal.objHas(newVal, props.docId) === false) {
|
|
133
|
-
return
|
|
134
|
-
}
|
|
135
|
-
state.workingDoc = edgeGlobal.dupObject(newVal[props.docId])
|
|
136
|
-
Object.keys(newDoc.value).forEach((field) => {
|
|
137
|
-
if (!edgeGlobal.objHas(state.workingDoc, field)) {
|
|
138
|
-
state.workingDoc[field] = newDoc.value[field]
|
|
139
|
-
}
|
|
140
|
-
})
|
|
141
|
-
state.afterMount = true
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
state.workingDoc = edgeGlobal.dupObject(newDoc.value)
|
|
145
|
-
state.afterMount = true
|
|
146
|
-
}
|
|
147
|
-
})
|
|
148
|
-
</script>
|
|
149
|
-
|
|
150
|
-
<template>
|
|
151
|
-
<v-card v-if="state.afterMount" class="mx-auto" max-width="1200">
|
|
152
|
-
<v-form
|
|
153
|
-
v-model="state.form"
|
|
154
|
-
validate-on="submit"
|
|
155
|
-
@submit.prevent="onSubmit"
|
|
156
|
-
>
|
|
157
|
-
<v-toolbar flat>
|
|
158
|
-
<v-icon class="mx-4">
|
|
159
|
-
mdi-atom-variant
|
|
160
|
-
</v-icon>
|
|
161
|
-
|
|
162
|
-
{{ title }}
|
|
163
|
-
<v-spacer />
|
|
164
|
-
<v-btn
|
|
165
|
-
type="submit"
|
|
166
|
-
color="primary"
|
|
167
|
-
variant="text"
|
|
168
|
-
>
|
|
169
|
-
Save
|
|
170
|
-
</v-btn>
|
|
171
|
-
</v-toolbar>
|
|
172
|
-
<v-card-text>
|
|
173
|
-
<v-row>
|
|
174
|
-
<v-col v-for="(field, name, index) in props.newDocSchema" :key="index" :cols="field.cols">
|
|
175
|
-
<g-input
|
|
176
|
-
v-if="field.bindings['field-type'] !== 'collection'"
|
|
177
|
-
v-model="state.workingDoc[name]"
|
|
178
|
-
:disable-tracking="props.docId === 'new'"
|
|
179
|
-
:parent-tracker-id="`${props.collection}-${props.docId}`"
|
|
180
|
-
v-bind="field.bindings"
|
|
181
|
-
/>
|
|
182
|
-
<g-input
|
|
183
|
-
v-else
|
|
184
|
-
v-model="state.workingDoc[name]"
|
|
185
|
-
:disable-tracking="props.docId === 'new'"
|
|
186
|
-
field-type="select"
|
|
187
|
-
:label="field.bindings.label"
|
|
188
|
-
:items="subCollection(name)"
|
|
189
|
-
:parent-tracker-id="`${props.collection}-${props.docId}`"
|
|
190
|
-
/>
|
|
191
|
-
</v-col>
|
|
192
|
-
</v-row>
|
|
193
|
-
</v-card-text>
|
|
194
|
-
<v-card-actions>
|
|
195
|
-
<v-spacer />
|
|
196
|
-
<v-btn
|
|
197
|
-
v-if="!unsavedChanges"
|
|
198
|
-
color="secondary"
|
|
199
|
-
variant="text"
|
|
200
|
-
to="/app/dashboard"
|
|
201
|
-
>
|
|
202
|
-
Close
|
|
203
|
-
</v-btn>
|
|
204
|
-
<v-btn
|
|
205
|
-
v-else
|
|
206
|
-
color="secondary"
|
|
207
|
-
variant="text"
|
|
208
|
-
to="/app/dashboard"
|
|
209
|
-
>
|
|
210
|
-
Cancel
|
|
211
|
-
</v-btn>
|
|
212
|
-
|
|
213
|
-
<v-btn
|
|
214
|
-
type="submit"
|
|
215
|
-
color="primary"
|
|
216
|
-
variant="text"
|
|
217
|
-
>
|
|
218
|
-
Save
|
|
219
|
-
</v-btn>
|
|
220
|
-
</v-card-actions>
|
|
221
|
-
</v-form>
|
|
222
|
-
</v-card>
|
|
223
|
-
<v-dialog v-model="state.dialog" max-width="500px">
|
|
224
|
-
<v-card>
|
|
225
|
-
<v-card-title class="headline">
|
|
226
|
-
Unsaved Changes!
|
|
227
|
-
</v-card-title>
|
|
228
|
-
<v-card-text>
|
|
229
|
-
<h4>"{{ title }}" has unsaved changes.</h4>
|
|
230
|
-
<p>Are you sure you want to discard them?</p>
|
|
231
|
-
</v-card-text>
|
|
232
|
-
<v-card-actions>
|
|
233
|
-
<v-spacer />
|
|
234
|
-
<v-btn color="blue darken-1" text @click="state.dialog = false">
|
|
235
|
-
Cancel
|
|
236
|
-
</v-btn>
|
|
237
|
-
<v-btn color="error" text @click="discardChanges()">
|
|
238
|
-
Discard
|
|
239
|
-
</v-btn>
|
|
240
|
-
</v-card-actions>
|
|
241
|
-
</v-card>
|
|
242
|
-
</v-dialog>
|
|
243
|
-
</template>
|
|
244
|
-
|
|
245
|
-
<style lang="scss" scoped>
|
|
246
|
-
|
|
247
|
-
</style>
|
package/components/topMenu.vue
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const edgeFirebase = inject('edgeFirebase')
|
|
3
|
-
const edgeGlobal = inject('edgeGlobal')
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<v-app-bar v-if="edgeFirebase.user.loggedIn">
|
|
8
|
-
<v-spacer />
|
|
9
|
-
<user-menu />
|
|
10
|
-
</v-app-bar>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<style lang="scss" scoped>
|
|
14
|
-
.inverted-logo {
|
|
15
|
-
filter: invert(1);
|
|
16
|
-
}
|
|
17
|
-
</style>
|
package/components/userMenu.vue
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const edgeFirebase = inject('edgeFirebase')
|
|
3
|
-
const edgeGlobal = inject('edgeGlobal')
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<v-menu>
|
|
8
|
-
<template #activator="{ props }">
|
|
9
|
-
<v-btn
|
|
10
|
-
prepend-icon="mdi-account-group-outline"
|
|
11
|
-
color="primary"
|
|
12
|
-
dark
|
|
13
|
-
v-bind="props"
|
|
14
|
-
variant="plain"
|
|
15
|
-
>
|
|
16
|
-
<template #prepend>
|
|
17
|
-
<v-icon color="secondary" />
|
|
18
|
-
</template>
|
|
19
|
-
{{ edgeGlobal.currentOrganizationObject.name }}
|
|
20
|
-
</v-btn>
|
|
21
|
-
</template>
|
|
22
|
-
<v-card>
|
|
23
|
-
<v-list>
|
|
24
|
-
<v-list-item
|
|
25
|
-
:title="edgeFirebase.user.meta.name"
|
|
26
|
-
:subtitle="edgeFirebase.user.firebaseUser.providerData[0].email"
|
|
27
|
-
>
|
|
28
|
-
<template #prepend>
|
|
29
|
-
<v-avatar>
|
|
30
|
-
<v-icon>
|
|
31
|
-
mdi-account
|
|
32
|
-
</v-icon>
|
|
33
|
-
</v-avatar>
|
|
34
|
-
</template>
|
|
35
|
-
<template #append>
|
|
36
|
-
<v-btn size="small" variant="text" icon="mdi-menu-down" />
|
|
37
|
-
</template>
|
|
38
|
-
</v-list-item>
|
|
39
|
-
</v-list>
|
|
40
|
-
<v-divider />
|
|
41
|
-
<edge-org-switcher />
|
|
42
|
-
|
|
43
|
-
<v-divider />
|
|
44
|
-
|
|
45
|
-
<v-list :lines="false" density="compact" nav>
|
|
46
|
-
<v-list-item link to="/app/account/organization-settings">
|
|
47
|
-
<v-list-item-title>Manage Account</v-list-item-title>
|
|
48
|
-
</v-list-item>
|
|
49
|
-
|
|
50
|
-
<v-list-item link to="/app/account/my-profile">
|
|
51
|
-
<v-list-item-title>My Profile</v-list-item-title>
|
|
52
|
-
</v-list-item>
|
|
53
|
-
</v-list>
|
|
54
|
-
|
|
55
|
-
<v-divider />
|
|
56
|
-
|
|
57
|
-
<v-list :lines="false" density="compact" nav>
|
|
58
|
-
<v-list-item @click="logOut(edgeFirebase, edgeGlobal)">
|
|
59
|
-
<v-list-item-title>Log out</v-list-item-title>
|
|
60
|
-
</v-list-item>
|
|
61
|
-
</v-list>
|
|
62
|
-
</v-card>
|
|
63
|
-
</v-menu>
|
|
64
|
-
</template>
|
package/composables/vuetify.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// DO NOT CHANGE THIS FILE
|
|
2
|
-
import { getCurrentInstance } from 'vue'
|
|
3
|
-
|
|
4
|
-
export function useVuetify() {
|
|
5
|
-
const instance: any = getCurrentInstance()
|
|
6
|
-
if (!instance) {
|
|
7
|
-
throw new Error('useVuetify should be called in setup().')
|
|
8
|
-
}
|
|
9
|
-
return instance.proxy.$vuetify
|
|
10
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
const route = useRoute()
|
|
3
|
-
const edgeGlobal = inject('edgeGlobal')
|
|
4
|
-
|
|
5
|
-
const state = reactive({
|
|
6
|
-
newDocs: {
|
|
7
|
-
things: {
|
|
8
|
-
name: { bindings: { 'field-type': 'text', 'label': 'Name', 'rules': [edgeGlobal.edgeRules.required], 'helper': 'Name' }, cols: '12', value: '' },
|
|
9
|
-
description: { bindings: { 'field-type': 'text', 'rules': [], 'helper': 'Description' }, cols: '12', value: '' },
|
|
10
|
-
subthings: { bindings: { 'field-type': 'collection', 'rules': [], 'helper': 'Subthings' }, cols: '12', value: '' },
|
|
11
|
-
},
|
|
12
|
-
subthings: {
|
|
13
|
-
name: { bindings: { 'field-type': 'text', 'rules': [edgeGlobal.edgeRules.required], 'helper': 'Name' }, cols: '12', value: '' },
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const page = computed(() => {
|
|
19
|
-
return route.params.page
|
|
20
|
-
})
|
|
21
|
-
const collection = computed(() => {
|
|
22
|
-
if (route.params.collection) {
|
|
23
|
-
return route.params.collection
|
|
24
|
-
}
|
|
25
|
-
return 'things'
|
|
26
|
-
})
|
|
27
|
-
const docId = computed(() => {
|
|
28
|
-
if (route.params.docId) {
|
|
29
|
-
return route.params.docId
|
|
30
|
-
}
|
|
31
|
-
return ''
|
|
32
|
-
})
|
|
33
|
-
definePageMeta({
|
|
34
|
-
middleware: 'auth',
|
|
35
|
-
})
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<template>
|
|
39
|
-
<v-container
|
|
40
|
-
v-if="edgeGlobal.edgeState.organizationDocPath"
|
|
41
|
-
class="py-8 px-6"
|
|
42
|
-
fluid
|
|
43
|
-
>
|
|
44
|
-
<dashboard v-if="page === 'dashboard' && docId === ''" :collection="collection" />
|
|
45
|
-
<editor v-else-if="page === 'dashboard' && docId !== ''" :collection="collection" :doc-id="docId" :new-doc-schema="state.newDocs[collection]" />
|
|
46
|
-
<account v-else-if="page === 'account'" />
|
|
47
|
-
</v-container>
|
|
48
|
-
</template>
|
package/plugins/vuetify.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default defineNuxtPlugin (async (nuxtApp) => {
|
|
2
|
-
const { createVuetify } = await import('vuetify')
|
|
3
|
-
const components = await import('vuetify/components')
|
|
4
|
-
const directives = await import('vuetify/directives')
|
|
5
|
-
const vuetify = createVuetify({
|
|
6
|
-
theme: {
|
|
7
|
-
defaultTheme: 'light',
|
|
8
|
-
},
|
|
9
|
-
components,
|
|
10
|
-
directives,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
nuxtApp.vueApp.use(vuetify)
|
|
14
|
-
})
|