mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
🐛 fix modal hidden
This commit is contained in:
parent
338c41abd5
commit
620938c26c
@ -1,22 +1,20 @@
|
|||||||
from sys import intern
|
|
||||||
|
|
||||||
# used by Matcher
|
# used by Matcher
|
||||||
RECEIVE_KEY = intern("_receive_{id}")
|
RECEIVE_KEY = "_receive_{id}"
|
||||||
LAST_RECEIVE_KEY = intern("_last_receive")
|
LAST_RECEIVE_KEY = "_last_receive"
|
||||||
ARG_KEY = intern("{key}")
|
ARG_KEY = "{key}"
|
||||||
REJECT_TARGET = intern("_current_target")
|
REJECT_TARGET = "_current_target"
|
||||||
REJECT_CACHE_TARGET = intern("_next_target")
|
REJECT_CACHE_TARGET = "_next_target"
|
||||||
|
|
||||||
# used by Rule
|
# used by Rule
|
||||||
PREFIX_KEY = intern("_prefix")
|
PREFIX_KEY = "_prefix"
|
||||||
|
|
||||||
CMD_KEY = intern("command")
|
CMD_KEY = "command"
|
||||||
RAW_CMD_KEY = intern("raw_command")
|
RAW_CMD_KEY = "raw_command"
|
||||||
CMD_ARG_KEY = intern("command_arg")
|
CMD_ARG_KEY = "command_arg"
|
||||||
|
|
||||||
SHELL_ARGS = intern("_args")
|
SHELL_ARGS = "_args"
|
||||||
SHELL_ARGV = intern("_argv")
|
SHELL_ARGV = "_argv"
|
||||||
|
|
||||||
REGEX_MATCHED = intern("_matched")
|
REGEX_MATCHED = "_matched"
|
||||||
REGEX_GROUP = intern("_matched_groups")
|
REGEX_GROUP = "_matched_groups"
|
||||||
REGEX_DICT = intern("_matched_dict")
|
REGEX_DICT = "_matched_dict"
|
||||||
|
@ -15,11 +15,8 @@ export default function Modal({
|
|||||||
{/* overlay */}
|
{/* overlay */}
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center transition z-[200]",
|
"fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center transition z-[200] pointer-events-auto",
|
||||||
{
|
{ "!hidden": !active }
|
||||||
hidden: !active,
|
|
||||||
"pointer-events-auto": active,
|
|
||||||
}
|
|
||||||
)}
|
)}
|
||||||
onClick={() => setActive(false)}
|
onClick={() => setActive(false)}
|
||||||
>
|
>
|
||||||
@ -28,11 +25,12 @@ export default function Modal({
|
|||||||
{/* modal */}
|
{/* modal */}
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"fixed top-0 left-0 flex items-center justify-center h-full w-full transition z-[201] pointer-events-none",
|
"fixed top-0 left-0 flex items-center justify-center h-full w-full z-[201] pointer-events-none",
|
||||||
{ hidden: !active }
|
{ "!hidden": !active }
|
||||||
)}
|
)}
|
||||||
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<div className="w-full max-w-[600px] max-h-[90%] overflow-y-auto rounded shadow-lg m-6 origin-center transition z-[inherit] pointer-events-auto thin-scrollbar">
|
<div className="w-full max-w-[600px] max-h-[90%] overflow-y-auto rounded shadow-lg m-6 z-[inherit] pointer-events-auto thin-scrollbar">
|
||||||
<div className="bg-light-nonepress-100 dark:bg-dark-nonepress-100">
|
<div className="bg-light-nonepress-100 dark:bg-dark-nonepress-100">
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user