-
Notifications
You must be signed in to change notification settings - Fork 638
[refactor] Unify small modal dialog styles with showSmallLayoutDialog #8834
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
Changes from 3 commits
29847d7
6521321
c0c8e43
6d1c748
263075b
de3e1c1
c274058
51f2d04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import type { ComponentAttrs } from 'vue-component-type-helpers' | ||
|
|
||
| import MissingModelsWarning from '@/components/dialog/content/MissingModelsWarning.vue' | ||
| import { useDialogService } from '@/services/dialogService' | ||
| import { useDialogStore } from '@/stores/dialogStore' | ||
|
|
||
| const DIALOG_KEY = 'global-missing-models-warning' | ||
|
|
||
| export function useMissingModelsDialog() { | ||
| const { showSmallLayoutDialog } = useDialogService() | ||
| const dialogStore = useDialogStore() | ||
|
|
||
| function hide() { | ||
| dialogStore.closeDialog({ key: DIALOG_KEY }) | ||
| } | ||
|
|
||
| function show(props: ComponentAttrs<typeof MissingModelsWarning>) { | ||
| showSmallLayoutDialog({ | ||
|
Check failure on line 18 in src/composables/useMissingModelsDialog.ts
|
||
|
viva-jinyi marked this conversation as resolved.
|
||
| key: DIALOG_KEY, | ||
| component: MissingModelsWarning, | ||
| props | ||
| }) | ||
| } | ||
|
viva-jinyi marked this conversation as resolved.
|
||
|
|
||
| return { show, hide } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import type { ComponentAttrs } from 'vue-component-type-helpers' | ||
|
|
||
| import MissingNodesContent from '@/components/dialog/content/MissingNodesContent.vue' | ||
| import MissingNodesFooter from '@/components/dialog/content/MissingNodesFooter.vue' | ||
| import MissingNodesHeader from '@/components/dialog/content/MissingNodesHeader.vue' | ||
| import { useDialogService } from '@/services/dialogService' | ||
| import { useDialogStore } from '@/stores/dialogStore' | ||
|
|
||
| const DIALOG_KEY = 'global-missing-nodes' | ||
|
|
||
| export function useMissingNodesDialog() { | ||
| const { showSmallLayoutDialog } = useDialogService() | ||
| const dialogStore = useDialogStore() | ||
|
|
||
| function hide() { | ||
| dialogStore.closeDialog({ key: DIALOG_KEY }) | ||
| } | ||
|
|
||
| function show(props: ComponentAttrs<typeof MissingNodesContent>) { | ||
| showSmallLayoutDialog({ | ||
|
Check failure on line 20 in src/composables/useMissingNodesDialog.ts
|
||
| key: DIALOG_KEY, | ||
| headerComponent: MissingNodesHeader, | ||
| footerComponent: MissingNodesFooter, | ||
| component: MissingNodesContent, | ||
| props | ||
| }) | ||
| } | ||
|
|
||
| return { show, hide } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure we still need this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to
pnpm ito update the Vite rolldown types.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll fix it again in another PR 😉