From 78a57527535ca1cb3efef74bbbdce8289a50ac07 Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Tue, 15 Oct 2024 16:25:59 +0200 Subject: [PATCH 01/11] chore: fix TokenDialog --- components/custom-ui/dialog/TokenDialog.vue | 9 ++++ components/ui/select/Select.vue | 15 ++++++ components/ui/select/SelectContent.vue | 53 +++++++++++++++++++ components/ui/select/SelectGroup.vue | 19 +++++++ components/ui/select/SelectItem.vue | 44 +++++++++++++++ components/ui/select/SelectItemText.vue | 11 ++++ components/ui/select/SelectLabel.vue | 13 +++++ .../ui/select/SelectScrollDownButton.vue | 24 +++++++++ components/ui/select/SelectScrollUpButton.vue | 24 +++++++++ components/ui/select/SelectSeparator.vue | 17 ++++++ components/ui/select/SelectTrigger.vue | 31 +++++++++++ components/ui/select/SelectValue.vue | 11 ++++ components/ui/select/index.ts | 11 ++++ 13 files changed, 282 insertions(+) create mode 100644 components/ui/select/Select.vue create mode 100644 components/ui/select/SelectContent.vue create mode 100644 components/ui/select/SelectGroup.vue create mode 100644 components/ui/select/SelectItem.vue create mode 100644 components/ui/select/SelectItemText.vue create mode 100644 components/ui/select/SelectLabel.vue create mode 100644 components/ui/select/SelectScrollDownButton.vue create mode 100644 components/ui/select/SelectScrollUpButton.vue create mode 100644 components/ui/select/SelectSeparator.vue create mode 100644 components/ui/select/SelectTrigger.vue create mode 100644 components/ui/select/SelectValue.vue create mode 100644 components/ui/select/index.ts diff --git a/components/custom-ui/dialog/TokenDialog.vue b/components/custom-ui/dialog/TokenDialog.vue index e6341a6..5940426 100644 --- a/components/custom-ui/dialog/TokenDialog.vue +++ b/components/custom-ui/dialog/TokenDialog.vue @@ -19,6 +19,15 @@ import { } from '@/components/ui/form' import {Input} from '@/components/ui/input' import {Popover, PopoverTrigger, PopoverContent} from '@/components/ui/popover' +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" import {type v2Permission, v2PermissionLevel,} from "~/composables/aruna_api_json"; import {useForm} from "vee-validate"; import {toTypedSchema} from '@vee-validate/zod' diff --git a/components/ui/select/Select.vue b/components/ui/select/Select.vue new file mode 100644 index 0000000..adc42fd --- /dev/null +++ b/components/ui/select/Select.vue @@ -0,0 +1,15 @@ + + + diff --git a/components/ui/select/SelectContent.vue b/components/ui/select/SelectContent.vue new file mode 100644 index 0000000..5e23f3e --- /dev/null +++ b/components/ui/select/SelectContent.vue @@ -0,0 +1,53 @@ + + + diff --git a/components/ui/select/SelectGroup.vue b/components/ui/select/SelectGroup.vue new file mode 100644 index 0000000..364f403 --- /dev/null +++ b/components/ui/select/SelectGroup.vue @@ -0,0 +1,19 @@ + + + diff --git a/components/ui/select/SelectItem.vue b/components/ui/select/SelectItem.vue new file mode 100644 index 0000000..544f1ab --- /dev/null +++ b/components/ui/select/SelectItem.vue @@ -0,0 +1,44 @@ + + + diff --git a/components/ui/select/SelectItemText.vue b/components/ui/select/SelectItemText.vue new file mode 100644 index 0000000..a0bb5c2 --- /dev/null +++ b/components/ui/select/SelectItemText.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/ui/select/SelectLabel.vue b/components/ui/select/SelectLabel.vue new file mode 100644 index 0000000..9ead9a6 --- /dev/null +++ b/components/ui/select/SelectLabel.vue @@ -0,0 +1,13 @@ + + + diff --git a/components/ui/select/SelectScrollDownButton.vue b/components/ui/select/SelectScrollDownButton.vue new file mode 100644 index 0000000..a2ea19a --- /dev/null +++ b/components/ui/select/SelectScrollDownButton.vue @@ -0,0 +1,24 @@ + + + diff --git a/components/ui/select/SelectScrollUpButton.vue b/components/ui/select/SelectScrollUpButton.vue new file mode 100644 index 0000000..d9723d6 --- /dev/null +++ b/components/ui/select/SelectScrollUpButton.vue @@ -0,0 +1,24 @@ + + + diff --git a/components/ui/select/SelectSeparator.vue b/components/ui/select/SelectSeparator.vue new file mode 100644 index 0000000..9dbc63a --- /dev/null +++ b/components/ui/select/SelectSeparator.vue @@ -0,0 +1,17 @@ + + + diff --git a/components/ui/select/SelectTrigger.vue b/components/ui/select/SelectTrigger.vue new file mode 100644 index 0000000..327ce5e --- /dev/null +++ b/components/ui/select/SelectTrigger.vue @@ -0,0 +1,31 @@ + + + diff --git a/components/ui/select/SelectValue.vue b/components/ui/select/SelectValue.vue new file mode 100644 index 0000000..4bc37dd --- /dev/null +++ b/components/ui/select/SelectValue.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/ui/select/index.ts b/components/ui/select/index.ts new file mode 100644 index 0000000..31b9294 --- /dev/null +++ b/components/ui/select/index.ts @@ -0,0 +1,11 @@ +export { default as Select } from './Select.vue' +export { default as SelectContent } from './SelectContent.vue' +export { default as SelectGroup } from './SelectGroup.vue' +export { default as SelectItem } from './SelectItem.vue' +export { default as SelectItemText } from './SelectItemText.vue' +export { default as SelectLabel } from './SelectLabel.vue' +export { default as SelectScrollDownButton } from './SelectScrollDownButton.vue' +export { default as SelectScrollUpButton } from './SelectScrollUpButton.vue' +export { default as SelectSeparator } from './SelectSeparator.vue' +export { default as SelectTrigger } from './SelectTrigger.vue' +export { default as SelectValue } from './SelectValue.vue' From ff631fbfb891bccefa1a96884a5c8af378577544 Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Tue, 15 Oct 2024 16:26:33 +0200 Subject: [PATCH 02/11] chore: add TokenDialog to create page --- pages/objects/create.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pages/objects/create.vue b/pages/objects/create.vue index 1ae9434..41c4086 100644 --- a/pages/objects/create.vue +++ b/pages/objects/create.vue @@ -26,6 +26,7 @@ import {OBJECT_REGEX, PROJECT_REGEX, S3_KEY_REGEX, ULID_REGEX} from "~/composabl import type {ObjectInfo} from "~/composables/proto_conversions" import {deleteObject, getObjectBucketAndKey} from "~/composables/api_wrapper" import EventBus from "~/composables/EventBus"; +import TokenDialog from "~/components/custom-ui/dialog/TokenDialog.vue"; import {HeadObjectCommand, S3Client, type S3ClientConfig} from "@aws-sdk/client-s3"; import {Upload} from "@aws-sdk/lib-storage"; @@ -273,6 +274,7 @@ function removeAuthor(key: string) { /* ----- End Resource Authors ----- */ /* ----- Resource key-values ----- */ const keyValues = ref(new Map()) +const tokenDialogOpen = ref(false) function addKeyValue(key: string, val: string, type: v2KeyValueVariant) { keyValues.value.set(key, {key: key, value: val, variant: type} as v2KeyValue) @@ -769,6 +771,10 @@ const sleep = (delay: number) => new Promise((resolve) => setTimeout(resolve, de
+
- + + Date: Tue, 15 Oct 2024 16:35:21 +0200 Subject: [PATCH 03/11] chore: fix tokendialog --- components/custom-ui/dialog/TokenDialog.vue | 1 + components/ui/calendar/Calendar.vue | 60 +++++++++++++++++++ components/ui/calendar/CalendarCell.vue | 24 ++++++++ .../ui/calendar/CalendarCellTrigger.vue | 38 ++++++++++++ components/ui/calendar/CalendarGrid.vue | 24 ++++++++ components/ui/calendar/CalendarGridBody.vue | 11 ++++ components/ui/calendar/CalendarGridHead.vue | 12 ++++ components/ui/calendar/CalendarGridRow.vue | 21 +++++++ components/ui/calendar/CalendarHeadCell.vue | 21 +++++++ components/ui/calendar/CalendarHeader.vue | 21 +++++++ components/ui/calendar/CalendarHeading.vue | 27 +++++++++ components/ui/calendar/CalendarNextButton.vue | 32 ++++++++++ components/ui/calendar/CalendarPrevButton.vue | 32 ++++++++++ components/ui/calendar/index.ts | 12 ++++ 14 files changed, 336 insertions(+) create mode 100644 components/ui/calendar/Calendar.vue create mode 100644 components/ui/calendar/CalendarCell.vue create mode 100644 components/ui/calendar/CalendarCellTrigger.vue create mode 100644 components/ui/calendar/CalendarGrid.vue create mode 100644 components/ui/calendar/CalendarGridBody.vue create mode 100644 components/ui/calendar/CalendarGridHead.vue create mode 100644 components/ui/calendar/CalendarGridRow.vue create mode 100644 components/ui/calendar/CalendarHeadCell.vue create mode 100644 components/ui/calendar/CalendarHeader.vue create mode 100644 components/ui/calendar/CalendarHeading.vue create mode 100644 components/ui/calendar/CalendarNextButton.vue create mode 100644 components/ui/calendar/CalendarPrevButton.vue create mode 100644 components/ui/calendar/index.ts diff --git a/components/custom-ui/dialog/TokenDialog.vue b/components/custom-ui/dialog/TokenDialog.vue index 5940426..5bf6afe 100644 --- a/components/custom-ui/dialog/TokenDialog.vue +++ b/components/custom-ui/dialog/TokenDialog.vue @@ -28,6 +28,7 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select" +import { Calendar } from "@/components/ui/calendar" import {type v2Permission, v2PermissionLevel,} from "~/composables/aruna_api_json"; import {useForm} from "vee-validate"; import {toTypedSchema} from '@vee-validate/zod' diff --git a/components/ui/calendar/Calendar.vue b/components/ui/calendar/Calendar.vue new file mode 100644 index 0000000..e95300c --- /dev/null +++ b/components/ui/calendar/Calendar.vue @@ -0,0 +1,60 @@ + + + diff --git a/components/ui/calendar/CalendarCell.vue b/components/ui/calendar/CalendarCell.vue new file mode 100644 index 0000000..34a4b41 --- /dev/null +++ b/components/ui/calendar/CalendarCell.vue @@ -0,0 +1,24 @@ + + + diff --git a/components/ui/calendar/CalendarCellTrigger.vue b/components/ui/calendar/CalendarCellTrigger.vue new file mode 100644 index 0000000..61f0e01 --- /dev/null +++ b/components/ui/calendar/CalendarCellTrigger.vue @@ -0,0 +1,38 @@ + + + diff --git a/components/ui/calendar/CalendarGrid.vue b/components/ui/calendar/CalendarGrid.vue new file mode 100644 index 0000000..7dafdaf --- /dev/null +++ b/components/ui/calendar/CalendarGrid.vue @@ -0,0 +1,24 @@ + + + diff --git a/components/ui/calendar/CalendarGridBody.vue b/components/ui/calendar/CalendarGridBody.vue new file mode 100644 index 0000000..23d71ce --- /dev/null +++ b/components/ui/calendar/CalendarGridBody.vue @@ -0,0 +1,11 @@ + + + diff --git a/components/ui/calendar/CalendarGridHead.vue b/components/ui/calendar/CalendarGridHead.vue new file mode 100644 index 0000000..b1356fb --- /dev/null +++ b/components/ui/calendar/CalendarGridHead.vue @@ -0,0 +1,12 @@ + + + diff --git a/components/ui/calendar/CalendarGridRow.vue b/components/ui/calendar/CalendarGridRow.vue new file mode 100644 index 0000000..4280559 --- /dev/null +++ b/components/ui/calendar/CalendarGridRow.vue @@ -0,0 +1,21 @@ + + + diff --git a/components/ui/calendar/CalendarHeadCell.vue b/components/ui/calendar/CalendarHeadCell.vue new file mode 100644 index 0000000..4eb6401 --- /dev/null +++ b/components/ui/calendar/CalendarHeadCell.vue @@ -0,0 +1,21 @@ + + + diff --git a/components/ui/calendar/CalendarHeader.vue b/components/ui/calendar/CalendarHeader.vue new file mode 100644 index 0000000..e599c2b --- /dev/null +++ b/components/ui/calendar/CalendarHeader.vue @@ -0,0 +1,21 @@ + + + diff --git a/components/ui/calendar/CalendarHeading.vue b/components/ui/calendar/CalendarHeading.vue new file mode 100644 index 0000000..93aacec --- /dev/null +++ b/components/ui/calendar/CalendarHeading.vue @@ -0,0 +1,27 @@ + + + diff --git a/components/ui/calendar/CalendarNextButton.vue b/components/ui/calendar/CalendarNextButton.vue new file mode 100644 index 0000000..7daa6db --- /dev/null +++ b/components/ui/calendar/CalendarNextButton.vue @@ -0,0 +1,32 @@ + + + diff --git a/components/ui/calendar/CalendarPrevButton.vue b/components/ui/calendar/CalendarPrevButton.vue new file mode 100644 index 0000000..03026a3 --- /dev/null +++ b/components/ui/calendar/CalendarPrevButton.vue @@ -0,0 +1,32 @@ + + + diff --git a/components/ui/calendar/index.ts b/components/ui/calendar/index.ts new file mode 100644 index 0000000..5239a1b --- /dev/null +++ b/components/ui/calendar/index.ts @@ -0,0 +1,12 @@ +export { default as Calendar } from './Calendar.vue' +export { default as CalendarCell } from './CalendarCell.vue' +export { default as CalendarCellTrigger } from './CalendarCellTrigger.vue' +export { default as CalendarGrid } from './CalendarGrid.vue' +export { default as CalendarGridBody } from './CalendarGridBody.vue' +export { default as CalendarGridHead } from './CalendarGridHead.vue' +export { default as CalendarGridRow } from './CalendarGridRow.vue' +export { default as CalendarHeadCell } from './CalendarHeadCell.vue' +export { default as CalendarHeader } from './CalendarHeader.vue' +export { default as CalendarHeading } from './CalendarHeading.vue' +export { default as CalendarNextButton } from './CalendarNextButton.vue' +export { default as CalendarPrevButton } from './CalendarPrevButton.vue' From 5c17e37776c4bf2902e8186dd643b24008f0b1c0 Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Tue, 15 Oct 2024 17:16:25 +0200 Subject: [PATCH 04/11] chore: remove unneeded imports --- components/custom-ui/dialog/TokenDialog.vue | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/custom-ui/dialog/TokenDialog.vue b/components/custom-ui/dialog/TokenDialog.vue index 5bf6afe..e6341a6 100644 --- a/components/custom-ui/dialog/TokenDialog.vue +++ b/components/custom-ui/dialog/TokenDialog.vue @@ -19,16 +19,6 @@ import { } from '@/components/ui/form' import {Input} from '@/components/ui/input' import {Popover, PopoverTrigger, PopoverContent} from '@/components/ui/popover' -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" -import { Calendar } from "@/components/ui/calendar" import {type v2Permission, v2PermissionLevel,} from "~/composables/aruna_api_json"; import {useForm} from "vee-validate"; import {toTypedSchema} from '@vee-validate/zod' From 3d3a9e6156a73aec99c8ef596488ca1c05a21a15 Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Tue, 22 Oct 2024 14:51:55 +0200 Subject: [PATCH 05/11] chore: add missing component --- components/ui/separator/Separator.vue | 38 +++++++++++++++++++++++++++ components/ui/separator/index.ts | 1 + 2 files changed, 39 insertions(+) create mode 100644 components/ui/separator/Separator.vue create mode 100644 components/ui/separator/index.ts diff --git a/components/ui/separator/Separator.vue b/components/ui/separator/Separator.vue new file mode 100644 index 0000000..a1df517 --- /dev/null +++ b/components/ui/separator/Separator.vue @@ -0,0 +1,38 @@ + + + diff --git a/components/ui/separator/index.ts b/components/ui/separator/index.ts new file mode 100644 index 0000000..2287bcb --- /dev/null +++ b/components/ui/separator/index.ts @@ -0,0 +1 @@ +export { default as Separator } from './Separator.vue' From e1e37271528c103628b5e7b9b3f3c02d84f93c66 Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Tue, 22 Oct 2024 15:11:13 +0200 Subject: [PATCH 06/11] chore: change keyvalue dialog to use shadcn components --- .../custom-ui/dialog/KeyValueDialog.vue | 130 ++++++++++++++++++ components/ui/textarea/Textarea.vue | 24 ++++ components/ui/textarea/index.ts | 1 + pages/objects/create.vue | 22 ++- 4 files changed, 164 insertions(+), 13 deletions(-) create mode 100644 components/custom-ui/dialog/KeyValueDialog.vue create mode 100644 components/ui/textarea/Textarea.vue create mode 100644 components/ui/textarea/index.ts diff --git a/components/custom-ui/dialog/KeyValueDialog.vue b/components/custom-ui/dialog/KeyValueDialog.vue new file mode 100644 index 0000000..4791a50 --- /dev/null +++ b/components/custom-ui/dialog/KeyValueDialog.vue @@ -0,0 +1,130 @@ + + +