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
c83fd1de
Unverified
Commit
c83fd1de
authored
Jul 01, 2023
by
boojack
Committed by
GitHub
Jul 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update dialog overflow style (#1872)
parent
db8b8f0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
BaseDialog.tsx
web/src/components/Dialog/BaseDialog.tsx
+0
-5
global.css
web/src/css/global.css
+2
-2
No files found.
web/src/components/Dialog/BaseDialog.tsx
View file @
c83fd1de
...
@@ -25,7 +25,6 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
...
@@ -25,7 +25,6 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
const
dialogIndex
=
dialogStore
.
state
.
dialogStack
.
findIndex
((
item
)
=>
item
===
dialogName
);
const
dialogIndex
=
dialogStore
.
state
.
dialogStack
.
findIndex
((
item
)
=>
item
===
dialogName
);
useEffect
(()
=>
{
useEffect
(()
=>
{
document
.
body
.
classList
.
add
(
"overflow-hidden"
);
dialogStore
.
pushDialogStack
(
dialogName
);
dialogStore
.
pushDialogStack
(
dialogName
);
const
handleKeyDown
=
(
event
:
KeyboardEvent
)
=>
{
const
handleKeyDown
=
(
event
:
KeyboardEvent
)
=>
{
if
(
event
.
code
===
"Escape"
)
{
if
(
event
.
code
===
"Escape"
)
{
...
@@ -40,9 +39,6 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
...
@@ -40,9 +39,6 @@ const BaseDialog: React.FC<Props> = (props: Props) => {
return
()
=>
{
return
()
=>
{
document
.
body
.
removeEventListener
(
"keydown"
,
handleKeyDown
);
document
.
body
.
removeEventListener
(
"keydown"
,
handleKeyDown
);
dialogStore
.
removeDialog
(
dialogName
);
dialogStore
.
removeDialog
(
dialogName
);
if
(
dialogStore
.
state
.
dialogStack
.
length
===
0
)
{
document
.
body
.
classList
.
remove
(
"overflow-hidden"
);
}
};
};
},
[]);
},
[]);
...
@@ -92,7 +88,6 @@ export function generateDialog<T extends DialogProps>(
...
@@ -92,7 +88,6 @@ export function generateDialog<T extends DialogProps>(
hide
:
()
=>
{
hide
:
()
=>
{
tempDiv
.
firstElementChild
?.
classList
.
remove
(
"showup"
);
tempDiv
.
firstElementChild
?.
classList
.
remove
(
"showup"
);
tempDiv
.
firstElementChild
?.
classList
.
add
(
"showoff"
);
tempDiv
.
firstElementChild
?.
classList
.
add
(
"showoff"
);
document
.
body
.
classList
.
remove
(
"overflow-hidden"
);
},
},
};
};
...
...
web/src/css/global.css
View file @
c83fd1de
html
,
html
,
body
{
body
{
@apply
text-base
w-full
h-full
dark
:
bg-zinc-800
;
@apply
text-base
w-full
h-full
overflow-hidden
dark
:
bg-zinc-800
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
"PingFang SC"
,
"Noto Sans"
,
font-family
:
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
"PingFang SC"
,
"Noto Sans"
,
"Noto Sans CJK SC"
,
"Microsoft YaHei UI"
,
"Microsoft YaHei"
,
"WenQuanYi Micro Hei"
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Noto Sans CJK SC"
,
"Microsoft YaHei UI"
,
"Microsoft YaHei"
,
"WenQuanYi Micro Hei"
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
,
"Noto Color Emoji"
,
sans-serif
;
"Segoe UI Symbol"
,
"Noto Color Emoji"
,
sans-serif
;
}
}
#root
{
#root
{
@apply
w-full
h-full;
@apply
w-full
h-full
overflow-auto
;
}
}
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