add: webhook
This commit is contained in:
@@ -5,6 +5,8 @@ import { useQueryClient } from "react-query";
|
||||
import "./PathManager.css";
|
||||
import {fetch_} from "../utils/request-utils";
|
||||
import {ConfigContext} from "../ConfigProvider";
|
||||
import PathSettingModal from "./Modals/PathSettingModal";
|
||||
|
||||
|
||||
const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
const [currentPath, setCurrentPath] = useState([{ name: "Root", id: 1 }]);
|
||||
@@ -17,6 +19,11 @@ const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
const { data: subPaths, isLoading: isSubPathsLoading, error: subPathsError } = usePaths(currentPathId);
|
||||
const createPath = useCreatePath();
|
||||
const config = useContext(ConfigContext).config;
|
||||
const [isPathSettingModalOpen, setIsPathSettingModalModalOpen] = useState(false);
|
||||
|
||||
const handleSettingClick = () => {
|
||||
setIsPathSettingModalModalOpen(true);
|
||||
}
|
||||
|
||||
const buildPath = async (pathId) => {
|
||||
const path = [];
|
||||
@@ -104,8 +111,8 @@ const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
|
||||
return (
|
||||
<div className="path-manager">
|
||||
<div className="path-manager-header">
|
||||
<div className="current-path">
|
||||
<div className="path-manager-header field has-addons">
|
||||
<div className="current-path control">
|
||||
{currentPath.map((path, index) => (
|
||||
<span
|
||||
key={path.id}
|
||||
@@ -117,6 +124,23 @@ const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
<div className="control">
|
||||
<span> </span>
|
||||
</div>
|
||||
<div className="control">
|
||||
<button
|
||||
className="button is-small is-primary"
|
||||
type="button"
|
||||
onClick={handleSettingClick}
|
||||
>
|
||||
Settings
|
||||
</button>
|
||||
<PathSettingModal
|
||||
isOpen={isPathSettingModalOpen}
|
||||
pathId={currentPathId}
|
||||
onClose={() => setIsPathSettingModalModalOpen(false)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="path-manager-body">
|
||||
@@ -144,6 +168,7 @@ const PathManager = ({ currentPathId = 1, onPathChange }) => {
|
||||
Create "{searchTerm}"
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{dropdownActive && (
|
||||
<div className="dropdown is-active">
|
||||
|
||||
Reference in New Issue
Block a user