Compare commits
5 Commits
feat/impor
...
d5f49fd86f
| Author | SHA1 | Date | |
|---|---|---|---|
| d5f49fd86f | |||
|
|
ab88a0553d | ||
| 0589da5005 | |||
| c50e48d564 | |||
|
|
ba3105bbe5 |
@@ -4,6 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="theme-color" content="#0f172a" />
|
<meta name="theme-color" content="#0f172a" />
|
||||||
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||||
<title>Семейный бюджет</title>
|
<title>Семейный бюджет</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
|||||||
4
frontend/public/favicon.svg
Normal file
4
frontend/public/favicon.svg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
||||||
|
<rect width="32" height="32" rx="8" fill="#0f172a"/>
|
||||||
|
<text x="16" y="23" font-family="Georgia, serif" font-size="20" font-weight="bold" fill="#3b82f6" text-anchor="middle">₽</text>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 271 B |
@@ -1,8 +1,6 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { clearAllTransactions } from '../api/transactions';
|
import { clearAllTransactions } from '../api/transactions';
|
||||||
|
|
||||||
const CONFIRM_WORD = 'УДАЛИТЬ';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
onDone: () => void;
|
onDone: () => void;
|
||||||
@@ -10,15 +8,11 @@ interface Props {
|
|||||||
|
|
||||||
export function ClearHistoryModal({ onClose, onDone }: Props) {
|
export function ClearHistoryModal({ onClose, onDone }: Props) {
|
||||||
const [check1, setCheck1] = useState(false);
|
const [check1, setCheck1] = useState(false);
|
||||||
const [confirmInput, setConfirmInput] = useState('');
|
|
||||||
const [check2, setCheck2] = useState(false);
|
const [check2, setCheck2] = useState(false);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
|
|
||||||
const canConfirm =
|
const canConfirm = check1 && check2;
|
||||||
check1 &&
|
|
||||||
confirmInput.trim().toUpperCase() === CONFIRM_WORD &&
|
|
||||||
check2;
|
|
||||||
|
|
||||||
const handleConfirm = async () => {
|
const handleConfirm = async () => {
|
||||||
if (!canConfirm || loading) return;
|
if (!canConfirm || loading) return;
|
||||||
@@ -65,20 +59,6 @@ export function ClearHistoryModal({ onClose, onDone }: Props) {
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="form-group">
|
|
||||||
<label>
|
|
||||||
Введите <strong>{CONFIRM_WORD}</strong> для подтверждения
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
value={confirmInput}
|
|
||||||
onChange={(e) => setConfirmInput(e.target.value)}
|
|
||||||
placeholder={CONFIRM_WORD}
|
|
||||||
className={confirmInput && confirmInput.trim().toUpperCase() !== CONFIRM_WORD ? 'input-error' : ''}
|
|
||||||
autoComplete="off"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="form-group form-group-checkbox clear-history-check">
|
<div className="form-group form-group-checkbox clear-history-check">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
Reference in New Issue
Block a user