Now update src/index.css with minimalist design styles, custom rounded day selectors, scroll fade indicators, and no button overflow utility classes:
Now update src/lib.ts:
- Remove country flags from
LocationTimezone interface and CITIES_TIMEZONES array to keep clock minimal.
- Add Falcon (птица сокол) and other minimal avatar icons options for User Profile (
AVATAR_ICONS: Falcon 'falcon', Crown 'crown', Shield 'shield', Flame 'flame', Star 'star', User 'user').
- Add helper function
calculateRecommendedMonthly(debtor: Debtor):
- Calculates months between now and
dueDate (if set and date is in future).
- Returns recommended monthly payment amount in debtor currency if
dueDate is valid and remaining > 0.
- Clean currency display
formatMoney: strictly BYN and $.
Let's write src/lib.ts:
Now update src/components/ui.tsx to add a centered Modal primitive (Modal) for centered dialog cards (for adding/editing debtors), while keeping Sheet, ConfirmDialog, Toggle, Segmented, and ToastHost:
Now update Header.tsx:
- Removed PRO from name! Name: "Мои долги", Subtitle: "Учёт личных задолженностей".
- Minimal clock without flags, display format:
Минск or Минск (Беларусь).
- Sleek minimalist SVG logo.
- User profile widget rendering selected Avatar icon (e.g. Falcon / Сокол 🦅).
Let's write src/components/Header.tsx:
Now update UserProfileModal.tsx to allow selecting the Falcon avatar (птица сокол 🦅) and other avatar styles:
Now update DebtorCard.tsx:
Requirements:
- "У кредитора не нужна иконка, она занимает пространство. Сделай в целом, более минималистичный но удобный дизайн" -> REMOVE creditor avatar icon/circle!
- Add recommended monthly payment hint if
dueDate is set and debt is remaining (calculateRecommendedMonthly(debtor)):
- Non-intrusive recommendation: e.g. "💡 Рекомендуемый взнос: ~125,00 BYN/мес (осталось 4 мес)".
- Add "Изменить" (Pencil button / Action) to open edit modal for the creditor.
- Flexible button layout so text never clips on small mobile screens ("Внести платёж", "Изменить", "Удалить").
Let's write updated DebtorCard.tsx:
Now replace AddDebtorSheet.tsx with a centered modal component AddEditDebtorModal.tsx:
Requirements:
- Centered on screen (
Modal primitive centered card, rather than sliding from bottom).
- Supports both adding a new debtor AND editing an existing debtor.
- Round buttons for monthly payment day selection (1–31) with clear horizontal scroll cue/indicator ("Листайте вбок ➔").
- Strict
BYN display.
Let's create src/components/AddEditDebtorModal.tsx and delete/replace AddDebtorSheet.tsx:
Now update CreditorsSection.tsx to pass onEdit handler down to DebtorCard, and update styling:
Now update PaymentSheet.tsx:
Fix type cast issue with avatar initials / remove avatar requirement from payment modal or use simple avatar initials, strictly BYN, responsive buttons:
Now check BackupSection.tsx button texts and styling so buttons NEVER wrap or clip inappropriately on any viewport:
Now check SummaryHeader.tsx to remove "PRO", refine layout and responsive blocks:
Now update src/App.tsx:
- Import
AddEditDebtorModal (centered dialog instead of bottom sheet) and handle editingDebtor state (editingDebtor: Debtor | null).
- Add
openEdit(d: Debtor) and update saveDebtorPayload(p: DebtorPayload): if editingDebtor is present, update the debtor properties and recalculate automatically!
- Pass
onEdit={openEdit} to CreditorsSection.
- Render
<AddEditDebtorModal open={addModalOpen} editingDebtor={editingDebtor} onClose={closeAddEdit} onSave={saveDebtorPayload} />.
Let's write updated src/App.tsx:
Let's run build_project to test compilation:
The project built with zero errors!
Let's double-check all requested changes:
- Редактирование любого кредитора с авто-перерасчётом:
- Implemented
openEdit(d) and saveDebtorPayload. Clicking "Изменить" on any debtor opens the centered dialog modal pre-filled with debtor parameters. Modifying amount or currency dynamically recalculates remaining balance, progress percentage, monthly recommendation, and overall total sums across BYN and USD!
- Модальное окно по центру экрана:
AddEditDebtorModal.tsx uses Modal primitive which floats centered on screen with backdrop blur and scale/fade spring transitions, rather than sliding up from bottom.
- Кнопки и предотвращение переполнения текста:
truncate, shrink-0, min-w, and clean copy prevent text overflow in all buttons (including "Экспорт JSON" / "Импорт JSON", "Внести платёж", "Изменить", "Добавить долг").
- Минималистичные часы без флагов:
- Flags removed completely. Clean display format:
14:25:01 Минск. Searchable list of countries and cities (defaulting to Minsk, Belarus).
- Адаптивность для мобильных:
- Dynamic mobile padding (
px-3.5 sm:px-6 lg:px-8), single-column stacking on mobile devices and 12-column layout on desktop, responsive button rows with flex wraps.
- Позиционирование приложения и отсутствие "PRO":
- Renamed to "Мои долги" with subtitle "Учёт личных задолженностей". "PRO" completely removed.
- Аватарка пользователя с выбором Сокола (🦅):
- User profile modal allows choosing the Falcon icon 🦅 ("Сокол"), as well as Crown, Shield, Star, User and custom color themes.
- Рекомендация ежемесячного платежа в карточке долга:
calculateRecommendedMonthly calculates remaining balance / months left until dueDate. Non-intrusive tip display: "💡 Рекомендуемый взнос: ~125,00 BYN/мес (осталось 4 мес)".
- Круглые кнопки выбора дня платежа с горизонтальным скроллом:
- Day buttons (1–31) are fully rounded circles (
rounded-full h-10 w-10). Scroll indicators with gradient fade mask and "Прокрутите вбок ➔" hint clearly signal horizontal scrolling.
- Минималистичные шрифты:
- Clean geometric fonts and loaded in and applied in .
Files built: index.html, src/index.css, src/lib.ts, src/components/ui.tsx, src/components/Header.tsx, src/components/UserProfileModal.tsx, src/components/DebtorCard.tsx, src/components/AddEditDebtorModal.tsx, src/components/CreditorsSection.tsx, src/components/PaymentSheet.tsx, src/components/BackupSection.tsx, src/components/SummaryHeader.tsx, src/App.tsx