mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-21 22:58:24 +00:00
migrated the files to tsx (#4972)
* migrated the files to tsx * reverted unecessary changes * reverted unecessary changes to app.css * fixed the fails * fixed the fails
This commit is contained in:
parent
efd2980b8a
commit
9b75f52073
@ -1,13 +0,0 @@
|
||||
import * as React from "react"
|
||||
import ModalList from './ModalList'
|
||||
import { useAppSelector } from "../../ducks";
|
||||
|
||||
|
||||
export default function PureModal() {
|
||||
const activeModal = useAppSelector(state => state.ui.modal.activeModal)
|
||||
const ActiveModal = ModalList.find(m => m.name === activeModal )
|
||||
|
||||
return(
|
||||
activeModal ? <ActiveModal/> : <div/>
|
||||
)
|
||||
}
|
13
web/src/js/components/Modal/Modal.tsx
Normal file
13
web/src/js/components/Modal/Modal.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import * as React from "react"
|
||||
import ModalList from './ModalList'
|
||||
import { useAppSelector } from "../../ducks";
|
||||
|
||||
|
||||
export default function PureModal() {
|
||||
const activeModal : string = useAppSelector(state => state.ui.modal.activeModal)
|
||||
const ActiveModal:(() => JSX.Element) | undefined= ModalList.find(m => m.name === activeModal )
|
||||
|
||||
return(
|
||||
activeModal&&ActiveModal!==undefined ? <ActiveModal/> : <div/>
|
||||
)
|
||||
}
|
@ -1,10 +1,14 @@
|
||||
import * as React from "react"
|
||||
|
||||
export default function ModalLayout ({ children }) {
|
||||
type ModalLayoutProps = {
|
||||
children: React.ReactNode,
|
||||
}
|
||||
|
||||
export default function ModalLayout ({ children}: ModalLayoutProps ) {
|
||||
return (
|
||||
<div>
|
||||
<div className="modal-backdrop fade in"></div>
|
||||
<div className="modal modal-visible" id="optionsModal" tabIndex="-1" role="dialog" aria-labelledby="options">
|
||||
<div className="modal modal-visible" id="optionsModal" tabIndex={-1} role="dialog" aria-labelledby="options">
|
||||
<div className="modal-dialog modal-lg" role="document">
|
||||
<div className="modal-content">
|
||||
{children}
|
@ -2024,7 +2024,9 @@ export default (function() {
|
||||
new RegExp("application/x-javascript"),
|
||||
new RegExp("application/javascript"),
|
||||
new RegExp("text/css"),
|
||||
new RegExp("image/.*")
|
||||
new RegExp("image/.*"),
|
||||
new RegExp("font/.*"),
|
||||
new RegExp("application/font.*"),
|
||||
];
|
||||
function assetFilter(flow) {
|
||||
if (flow.response) {
|
||||
|
Loading…
Reference in New Issue
Block a user