Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
8a3845ff
Commit
8a3845ff
authored
Apr 29, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove external resource dialog
parent
155c5baf
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
184 deletions
+66
-184
CreateMemoRelationDialog.tsx
web/src/components/CreateMemoRelationDialog.tsx
+1
-1
CreateResourceDialog.tsx
web/src/components/CreateResourceDialog.tsx
+63
-178
BaseDialog.tsx
web/src/components/Dialog/BaseDialog.tsx
+2
-4
view.d.ts
web/src/types/view.d.ts
+0
-1
No files found.
web/src/components/CreateMemoRelationDialog.tsx
View file @
8a3845ff
...
...
@@ -145,7 +145,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
);
};
function
showCreateMemoRelationDialog
(
props
:
Omit
<
Props
,
"destroy"
|
"hide"
>
)
{
function
showCreateMemoRelationDialog
(
props
:
Omit
<
Props
,
"destroy"
>
)
{
generateDialog
(
{
className
:
"create-memo-relation-dialog"
,
...
...
web/src/components/CreateResourceDialog.tsx
View file @
8a3845ff
This diff is collapsed.
Click to expand it.
web/src/components/Dialog/BaseDialog.tsx
View file @
8a3845ff
...
...
@@ -67,7 +67,7 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
export
function
generateDialog
<
T
extends
DialogProps
>
(
config
:
DialogConfig
,
DialogComponent
:
React
.
FC
<
T
>
,
props
?:
Omit
<
T
,
"destroy"
|
"hide"
>
,
props
?:
Omit
<
T
,
"destroy"
>
,
):
DialogCallback
{
const
tempDiv
=
document
.
createElement
(
"div"
);
const
dialog
=
createRoot
(
tempDiv
);
...
...
@@ -82,20 +82,18 @@ export function generateDialog<T extends DialogProps>(
tempDiv
.
remove
();
});
},
hide
:
()
=>
{},
};
const
dialogProps
=
{
...
props
,
destroy
:
cbs
.
destroy
,
hide
:
cbs
.
hide
,
}
as
T
;
const
Fragment
=
(
<
Provider
store=
{
store
}
>
<
CssVarsProvider
theme=
{
theme
}
>
<
CommonContextProvider
>
<
BaseDialog
destroy=
{
cbs
.
destroy
}
hide=
{
cbs
.
hide
}
clickSpaceDestroy=
{
true
}
{
...
config
}
>
<
BaseDialog
destroy=
{
cbs
.
destroy
}
clickSpaceDestroy=
{
true
}
{
...
config
}
>
<
DialogComponent
{
...
dialogProps
}
/>
</
BaseDialog
>
</
CommonContextProvider
>
...
...
web/src/types/view.d.ts
View file @
8a3845ff
interface
DialogCallback
{
destroy
:
FunctionType
;
hide
:
FunctionType
;
}
type
DialogProps
=
DialogCallback
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment