Refactor: Improve domain list UI with search functionality and save button
Publish Docker image / build-and-push (push) Successful in 1m25s
Publish Docker image / build-and-push (push) Successful in 1m25s
This commit is contained in:
+14
-20
@@ -109,20 +109,22 @@ function App() {
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
<Card.Header as="h5">
|
<Card.Header>
|
||||||
<Row className="align-items-center">
|
<div className="d-flex justify-content-between align-items-center">
|
||||||
<Col>Список доменов</Col>
|
<h5 className="mb-0">Список доменов</h5>
|
||||||
<Col md={5}>
|
<Button variant="success" onClick={handleSaveChanges} disabled={domains.length === 0}>
|
||||||
<Form.Control
|
Сохранить все изменения в S3
|
||||||
type="text"
|
</Button>
|
||||||
placeholder="Поиск по домену..."
|
</div>
|
||||||
value={searchTerm}
|
|
||||||
onChange={(e) => setSearchTerm(e.target.value)}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<Card.Body>
|
<Card.Body>
|
||||||
|
<Form.Control
|
||||||
|
type="text"
|
||||||
|
placeholder="Поиск по домену..."
|
||||||
|
className="mb-3"
|
||||||
|
value={searchTerm}
|
||||||
|
onChange={(e) => setSearchTerm(e.target.value)}
|
||||||
|
/>
|
||||||
<Table striped bordered hover responsive>
|
<Table striped bordered hover responsive>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -153,14 +155,6 @@ function App() {
|
|||||||
{domains.length === 0 && <p className="text-center text-muted">Домены не найдены. Добавьте новый домен в форме выше.</p>}
|
{domains.length === 0 && <p className="text-center text-muted">Домены не найдены. Добавьте новый домен в форме выше.</p>}
|
||||||
</Card.Body>
|
</Card.Body>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{domains.length > 0 && (
|
|
||||||
<div className="text-center mt-4">
|
|
||||||
<Button variant="success" size="lg" onClick={handleSaveChanges}>
|
|
||||||
Сохранить все изменения в S3
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user