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.Header as="h5">
|
||||
<Row className="align-items-center">
|
||||
<Col>Список доменов</Col>
|
||||
<Col md={5}>
|
||||
<Form.Control
|
||||
type="text"
|
||||
placeholder="Поиск по домену..."
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Card.Header>
|
||||
<div className="d-flex justify-content-between align-items-center">
|
||||
<h5 className="mb-0">Список доменов</h5>
|
||||
<Button variant="success" onClick={handleSaveChanges} disabled={domains.length === 0}>
|
||||
Сохранить все изменения в S3
|
||||
</Button>
|
||||
</div>
|
||||
</Card.Header>
|
||||
<Card.Body>
|
||||
<Form.Control
|
||||
type="text"
|
||||
placeholder="Поиск по домену..."
|
||||
className="mb-3"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<Table striped bordered hover responsive>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -153,14 +155,6 @@ function App() {
|
||||
{domains.length === 0 && <p className="text-center text-muted">Домены не найдены. Добавьте новый домен в форме выше.</p>}
|
||||
</Card.Body>
|
||||
</Card>
|
||||
|
||||
{domains.length > 0 && (
|
||||
<div className="text-center mt-4">
|
||||
<Button variant="success" size="lg" onClick={handleSaveChanges}>
|
||||
Сохранить все изменения в S3
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</Container>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user