mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-26 14:32:22 +02:00
[Haik]: and so it begins
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
.pull-button-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 40vw;
|
||||
}
|
||||
|
||||
.pull-button-img {
|
||||
margin-right: 20px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.pull-button-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.pull-button {
|
||||
background-color: #A3FFA9;
|
||||
color: black;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
font-size: 1.45rem;
|
||||
font-weight: bold; /* Changed from 900 to bold */
|
||||
font-family: 'Consolas', monospace;
|
||||
cursor: pointer;
|
||||
margin: 20px 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.pull-button:hover {
|
||||
background-color: #84d488;
|
||||
}
|
||||
|
||||
.pull-button:active {
|
||||
background-color: #65a568;
|
||||
}
|
||||
|
||||
.pull-button:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.pull-button-container p {
|
||||
color: #A3FFA9;
|
||||
font-family: 'Consolas', monospace;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { Button } from '@mui/material';
|
||||
import axios from 'axios';
|
||||
import pullImg from '../../assets/pull.png'; // Adjust the path according to your project structure
|
||||
import './PullButton.css';
|
||||
|
||||
|
||||
const PullButton = ({ setProjectStructure }) => {
|
||||
const pullStructure = async () => {
|
||||
try {
|
||||
const response = await axios.get('http://127.0.0.1:6969/pull_structure');
|
||||
console.log('Project structure:', response.data);
|
||||
setProjectStructure(response.data);
|
||||
} catch (error) {
|
||||
console.error('Error fetching project structure:', error);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="pull-button-container">
|
||||
<img src={pullImg} alt="Project Structure" className="pull-button-img" />
|
||||
<div className="pull-button-content">
|
||||
<button className="pull-button" onClick={pullStructure}>
|
||||
Pull
|
||||
</button>
|
||||
<p>Pull debugger config from backend</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PullButton;
|
||||
Reference in New Issue
Block a user