-
Notifications
You must be signed in to change notification settings - Fork 425
Feat: Rename and Delete for imported Models ☁️ #6969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0dfe36f
style: Align card styles with Designs
DrJKL 0b7d0f1
style: non-functional buttons and menu
DrJKL 04ab767
WIP: Renaming Assets, UI, not hooked up to backend.
DrJKL d4b993b
style: Fix card padding
DrJKL df82698
type: Add component prop typesafety to dialogs
DrJKL ba43494
WIP: Deleting assets, UI only, also not wired up
DrJKL bb9475f
Cleanup: Remove dark-theme variants in buttonTypes. Really need to mi…
DrJKL ed68b08
style: Make sure extra properties hug the bottom of the card.
DrJKL f9e8dfd
style: Hide details button for now
DrJKL 3a18d27
WIP: Real API calls
DrJKL 57ed0af
nits: Typo and unused ref
DrJKL aa13e4c
i18n: internationalize deletion confirmation
DrJKL 585e47f
We should remove that reexport and standardize the import
DrJKL ca539a6
Update src/platform/assets/components/AssetBadgeGroup.vue
DrJKL a5bd37e
Properly resolve MaybeRef
DrJKL 64a7955
UX: Add progress and confirmation to deletion
DrJKL 23d01f0
UX: Handle failed update
DrJKL 23d8ccd
UX: Gate the buttons behind a feature flag
DrJKL 38cc93b
Grammar is hard
DrJKL ff988cd
cleanup: More consistent asset name
DrJKL 4417b0d
Update flag name
DrJKL c9b5bb5
Missed disabling
DrJKL 71d49dc
Add toast on failed rename.
DrJKL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,15 @@ | ||
| <template> | ||
| <div :class="iconGroupClasses"> | ||
| <div | ||
| :class=" | ||
| cn( | ||
| 'flex justify-center items-center shrink-0 outline-hidden border-none p-0 rounded-lg bg-secondary-background shadow-sm transition-all duration-200 cursor-pointer' | ||
| ) | ||
| " | ||
| > | ||
| <slot></slot> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { cn } from '@/utils/tailwindUtil' | ||
|
|
||
| const iconGroupClasses = cn( | ||
| 'flex justify-center items-center shrink-0', | ||
| 'outline-hidden border-none p-0 rounded-lg', | ||
| 'bg-secondary-background shadow-sm', | ||
| 'transition-all duration-200', | ||
| 'cursor-pointer' | ||
| ) | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <template> | ||
| <div | ||
| class="flex flex-col px-4 py-2 text-sm text-muted-foreground border-t border-border-default" | ||
| > | ||
| <p v-if="promptTextReal"> | ||
| {{ promptTextReal }} | ||
| </p> | ||
| </div> | ||
| </template> | ||
| <script setup lang="ts"> | ||
| import { computed, toValue } from 'vue' | ||
| import type { MaybeRefOrGetter } from 'vue' | ||
|
|
||
| const { promptText } = defineProps<{ | ||
| promptText?: MaybeRefOrGetter<string> | ||
| }>() | ||
|
|
||
| const promptTextReal = computed(() => toValue(promptText)) | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <template> | ||
| <section class="w-full flex gap-2 justify-end px-2 pb-2"> | ||
| <TextButton | ||
| :label="cancelTextX" | ||
| :disabled | ||
| type="transparent" | ||
| autofocus | ||
| @click="$emit('cancel')" | ||
| /> | ||
| <TextButton | ||
| :label="confirmTextX" | ||
| :disabled | ||
| type="transparent" | ||
| :class="confirmClass" | ||
| @click="$emit('confirm')" | ||
| /> | ||
| </section> | ||
| </template> | ||
| <script setup lang="ts"> | ||
| import { computed, toValue } from 'vue' | ||
| import type { MaybeRefOrGetter } from 'vue' | ||
| import { useI18n } from 'vue-i18n' | ||
|
|
||
| import TextButton from '@/components/button/TextButton.vue' | ||
|
|
||
| const { t } = useI18n() | ||
|
|
||
| const { cancelText, confirmText, confirmClass, optionsDisabled } = defineProps<{ | ||
| cancelText?: string | ||
| confirmText?: string | ||
| confirmClass?: string | ||
| optionsDisabled?: MaybeRefOrGetter<boolean> | ||
| }>() | ||
|
|
||
| defineEmits<{ | ||
| cancel: [] | ||
| confirm: [] | ||
| }>() | ||
|
|
||
| const confirmTextX = computed(() => confirmText || t('g.confirm')) | ||
| const cancelTextX = computed(() => cancelText || t('g.cancel')) | ||
| const disabled = computed(() => toValue(optionsDisabled)) | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <template> | ||
| <div | ||
| class="flex items-center gap-2 p-4 font-bold text-sm text-base-foreground font-inter" | ||
| > | ||
| <span v-if="title" class="flex-auto">{{ title }}</span> | ||
| </div> | ||
| </template> | ||
| <script setup lang="ts"> | ||
| defineProps<{ | ||
| title?: string | ||
| }>() | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import ConfirmBody from '@/components/dialog/confirm/ConfirmBody.vue' | ||
| import ConfirmFooter from '@/components/dialog/confirm/ConfirmFooter.vue' | ||
| import ConfirmHeader from '@/components/dialog/confirm/ConfirmHeader.vue' | ||
| import { useDialogStore } from '@/stores/dialogStore' | ||
| import type { ComponentAttrs } from 'vue-component-type-helpers' | ||
|
|
||
| interface ConfirmDialogOptions { | ||
| headerProps?: ComponentAttrs<typeof ConfirmHeader> | ||
| props?: ComponentAttrs<typeof ConfirmBody> | ||
| footerProps?: ComponentAttrs<typeof ConfirmFooter> | ||
| } | ||
|
|
||
| export function showConfirmDialog(options: ConfirmDialogOptions = {}) { | ||
| const dialogStore = useDialogStore() | ||
| const { headerProps, props, footerProps } = options | ||
| return dialogStore.showDialog({ | ||
| headerComponent: ConfirmHeader, | ||
| component: ConfirmBody, | ||
| footerComponent: ConfirmFooter, | ||
| headerProps, | ||
| props, | ||
| footerProps, | ||
| dialogComponentProps: { | ||
| pt: { | ||
| header: 'py-0! px-0!', | ||
| content: 'p-0!', | ||
| footer: 'p-0!' | ||
| } | ||
| } | ||
| }) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.