diff --git a/frontend/src/assets/icons/customer-service-01.svg b/frontend/src/assets/icons/customer-service-01.svg new file mode 100644 index 000000000..c8591ff23 --- /dev/null +++ b/frontend/src/assets/icons/customer-service-01.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/assets/images/background-form.png b/frontend/src/assets/images/background-form.png new file mode 100644 index 000000000..d97cf83df Binary files /dev/null and b/frontend/src/assets/images/background-form.png differ diff --git a/frontend/src/components/dashboard/borrow/Borrow.jsx b/frontend/src/components/dashboard/borrow/Borrow.jsx index 35c982d1f..3201ebd63 100644 --- a/frontend/src/components/dashboard/borrow/Borrow.jsx +++ b/frontend/src/components/dashboard/borrow/Borrow.jsx @@ -4,7 +4,7 @@ import { ReactComponent as BorrowIcon } from 'assets/icons/borrow_dynamic.svg'; function Borrow({ data }) { return ( -
+
{React.createElement(data[1]?.currencyIcon || BorrowIcon, { diff --git a/frontend/src/components/dashboard/borrow/borrow.css b/frontend/src/components/dashboard/borrow/borrow.css index d3ab13d23..0b209f130 100644 --- a/frontend/src/components/dashboard/borrow/borrow.css +++ b/frontend/src/components/dashboard/borrow/borrow.css @@ -9,7 +9,6 @@ } .currency-info { - margin-top: 1rem; display: flex; align-items: center; } diff --git a/frontend/src/components/dashboard/collateral/Collateral.jsx b/frontend/src/components/dashboard/collateral/Collateral.jsx index 2cc4c8772..3cb215ec0 100644 --- a/frontend/src/components/dashboard/collateral/Collateral.jsx +++ b/frontend/src/components/dashboard/collateral/Collateral.jsx @@ -5,7 +5,7 @@ import { TrendingDown, TrendingUp } from 'lucide-react'; function Collateral({ data, startSum, currentSum, getCurrentSumColor }) { return ( -
+
{React.createElement(data[0]?.currencyIcon || CollateralIcon, { @@ -26,7 +26,7 @@ function Collateral({ data, startSum, currentSum, getCurrentSumColor }) { Current sum: - + = 0 ? 'current-sum-green' : getCurrentSumColor()}> $ {currentSum ? Number(currentSum).toFixed(8) : '0.00'} {currentSum > startSum && currentSum !== 0 && } diff --git a/frontend/src/components/dashboard/dashboard-tab/DashboardTabs.jsx b/frontend/src/components/dashboard/dashboard-tab/DashboardTabs.jsx index 5850e678e..ad019cd16 100644 --- a/frontend/src/components/dashboard/dashboard-tab/DashboardTabs.jsx +++ b/frontend/src/components/dashboard/dashboard-tab/DashboardTabs.jsx @@ -1,3 +1,4 @@ +import React from 'react'; import './dashboardTabs.css'; import { ReactComponent as DepositIcon } from '../../../assets/icons/deposited_dynamic.svg'; import { ReactComponent as CollateralIcon } from '../../../assets/icons/collateral_dynamic.svg'; @@ -7,26 +8,40 @@ import { DASHBOARD_TABS } from 'utils/constants'; function DashboardTabs({ activeTab, switchTab }) { const { COLLATERAL, BORROW, DEPOSITED } = DASHBOARD_TABS; + const tabConfig = [ + { + key: COLLATERAL, + Icon: CollateralIcon, + title: 'Collateral & Earnings', + }, + { + key: BORROW, + Icon: BorrowIcon, + title: 'Borrow', + }, + { + key: DEPOSITED, + Icon: DepositIcon, + title: 'Deposited', + }, + ]; + return (
- - -
- - - -
- - + {tabConfig.map((tab, index) => ( + + + + {index < tabConfig.length - 1 &&
} +
+ ))}
diff --git a/frontend/src/components/dashboard/dashboard-tab/dashboardTabs.css b/frontend/src/components/dashboard/dashboard-tab/dashboardTabs.css index a2c7a8ab2..28dd9ece5 100644 --- a/frontend/src/components/dashboard/dashboard-tab/dashboardTabs.css +++ b/frontend/src/components/dashboard/dashboard-tab/dashboardTabs.css @@ -3,6 +3,12 @@ justify-content: space-between; position: relative; align-items: center; + overflow-x: auto; + overflow-y: hidden; + -ms-overflow-style: none; + scrollbar-width: none; + padding-bottom: 15px; + border-bottom: 1px solid #36294e; } .tab { @@ -74,6 +80,8 @@ height: 18px; border-radius: 8px; background-color: var(--border-color); + min-width: 3px; + min-height: 18px; margin: 0 1rem; } @@ -93,7 +101,7 @@ .tab-divider { width: 2px; height: 16px; - margin: 0 4px; + margin: 0 10px; background-color: var(--border-color); } @@ -122,7 +130,7 @@ .tab-divider { width: 2px; height: 16px; - margin: 0 18px; + margin: 0 15px; background-color: var(--border-color); } diff --git a/frontend/src/components/dashboard/deposited/Deposited.jsx b/frontend/src/components/dashboard/deposited/Deposited.jsx index 5c33493b3..208092ee1 100644 --- a/frontend/src/components/dashboard/deposited/Deposited.jsx +++ b/frontend/src/components/dashboard/deposited/Deposited.jsx @@ -5,7 +5,7 @@ import { ReactComponent as UsdIcon } from '../../../assets/icons/usdc-icon.svg'; function Deposited({ data }) { return ( -
+
diff --git a/frontend/src/components/dashboard/deposited/deposited.css b/frontend/src/components/dashboard/deposited/deposited.css index 9309f8572..bec778d7c 100644 --- a/frontend/src/components/dashboard/deposited/deposited.css +++ b/frontend/src/components/dashboard/deposited/deposited.css @@ -1,6 +1,6 @@ .tab-content { text-align: left; - width: 580px; + width: 100%; height: 190px; padding: 0px 40px 0 20px; margin: 16px auto 0; @@ -10,6 +10,23 @@ margin: 0; } +.collateral-tab-content, +.borrow-tab-content { + text-align: left; + width: 100%; + height: 190px; + margin: 16px auto 0; +} + +.collateral-tab-content, +.borrow-tab-content p { + margin: 0; +} + +.deposited-tab-content p { + margin: 0; +} + .deposited-info { display: flex; flex-direction: column; @@ -17,6 +34,14 @@ justify-content: center; } +.deposited-tab-content { + text-align: left; + width: 100%; + height: 190px; + padding: 0px 40px 0 20px; + margin: 16px auto 0; +} + .deposited-item { display: flex; align-items: center; @@ -71,12 +96,37 @@ padding: 16px; margin-top: 0; } + + .collateral-tab-content, + .borrow-tab-content { + width: 100%; + height: auto; + margin-top: 0; + } + + .deposited-tab-content { + width: 100%; + height: auto; + padding: 10px; + margin-top: 0; + } } @media (max-width: 480px) { .tab-content { - width: fit-content; font-size: 14px; + padding: 0px 0px 0px 0px; + } + + .collateral-tab-content, + .borrow-tab-content { + font-size: 14px; + padding: 15px 0px 0 0px; + } + + .deposited-tab-content { + font-size: 14px; + padding: 15px 0px 0 0px; } .icon { diff --git a/frontend/src/components/layout/header/Header.jsx b/frontend/src/components/layout/header/Header.jsx index ceee10616..cfcd05135 100644 --- a/frontend/src/components/layout/header/Header.jsx +++ b/frontend/src/components/layout/header/Header.jsx @@ -7,8 +7,11 @@ import NavigationLinks from '../navigation-links/NavigationLinks'; import useLockBodyScroll from '../../../hooks/useLockBodyScroll'; import MobDropdownMenu from '../mob-dropdown-menu/MobDropdownMenu'; import '../../../globals.css'; +import { ReportBugButton } from 'components/report-button/ReportBugButton'; +import { ReportBugModal } from 'components/report-modal/ReportBugModal'; function Header({ onConnectWallet, onLogout }) { + const [isModalOpen, setIsModalOpen] = useState(false); const [isMenuOpen, setIsMenuOpen] = useState(false); const location = useLocation(); @@ -51,7 +54,18 @@ function Header({ onConnectWallet, onLogout }) { setIsMenuOpen(false); }; + + const openModal = () => { + setIsModalOpen(true); + }; + + + const closeModal = () => { + setIsModalOpen(false); + }; + return ( + <>
- + + + + {!isModalOpen && } + + + {isModalOpen && ( + + )} + ); } diff --git a/frontend/src/components/layout/header/header.css b/frontend/src/components/layout/header/header.css index da5f89c34..a8dae51bf 100644 --- a/frontend/src/components/layout/header/header.css +++ b/frontend/src/components/layout/header/header.css @@ -275,6 +275,7 @@ height: 48px; font-size: 14px; } + .Toastify__toast { left: 50px; height: 60px; @@ -342,6 +343,7 @@ .header-nav { height: 80px; } + .list-items { padding: 0 25px; } @@ -383,3 +385,11 @@ width: 180px; } } + +.report-btn-cont { + display: flex; + width: 100%; + padding: 10px 30px; + justify-content: end; + height: fit-content; +} \ No newline at end of file diff --git a/frontend/src/components/report-button/ReportBugButton.css b/frontend/src/components/report-button/ReportBugButton.css new file mode 100644 index 000000000..f7293a33b --- /dev/null +++ b/frontend/src/components/report-button/ReportBugButton.css @@ -0,0 +1,33 @@ +.report-button { + display: flex; + align-items: center; + gap: 8px; + position: fixed; + right: 30px; + top: 125px; + z-index: 10; + height: 46px; + background: #11061e; + border: 1px solid #36294e; + border-radius: 12px; + padding: 12px 24px; + cursor: pointer; + transition: background-color 0.3s; +} + +.report-button:hover { + background: linear-gradient(to right, rgba(147, 51, 234, 0.3), rgba(59, 130, 246, 0.3)); +} + +.bug-icon { + width: 16px; + height: 16px; +} + +.bug-text { + color: #e7ecf0; + font-family: Open Sans; + font-size: 16px; + font-weight: 400; + margin-top: 13px; +} diff --git a/frontend/src/components/report-button/ReportBugButton.jsx b/frontend/src/components/report-button/ReportBugButton.jsx new file mode 100644 index 000000000..d40f7a4e5 --- /dev/null +++ b/frontend/src/components/report-button/ReportBugButton.jsx @@ -0,0 +1,25 @@ +import React from "react" +import "./ReportBugButton.css" +import ReportBugIcon from "../../assets/icons/customer-service-01.svg" + +export function ReportBugButton({ onClick }) { + return ( + + ) +} + diff --git a/frontend/src/components/report-modal/ReportBugModal.css b/frontend/src/components/report-modal/ReportBugModal.css new file mode 100644 index 000000000..cfd5e000c --- /dev/null +++ b/frontend/src/components/report-modal/ReportBugModal.css @@ -0,0 +1,134 @@ +.modall-overlay { + display: flex; + align-items: center; + justify-content: center; + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: var(--spinner-bgn); + backdrop-filter: blur(8px); + -webkit-backdrop-filter: blur(8px); + z-index: 10100; + + + padding: 100px 100px; + +} + +.text-group { + background-color: #120721; + border-radius: 8px; + padding: 24px; + width: 100%; + max-width: 642px; +} + +.report-bug-form { + border-radius: 2px; + +} + + + +.modall-content h3 { + + font-family: Open Sans; + font-size: 16px; + font-weight: 400; + line-height: 24px; + text-align: center; + text-underline-position: from-font; + text-decoration-skip-ink: none; + color: #798795; + padding-bottom: 5px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + +.line { + border: 1px solid #22153A; +} + +.modal-header { + font-family: Open Sans; + font-size: 16px; + font-weight: 400; + line-height: 24px; + text-align: center; + text-underline-position: from-font; + text-decoration-skip-ink: none; + color: #798795 +} + +.modal-paragraph-text { + font-family: Open Sans; + font-size: 14px; + font-weight: 400; + line-height: 20px; + text-align: center; + text-underline-position: from-font; + text-decoration-skip-ink: none; + padding: 5px 0px; + color: #f0f0f0 +} + +.telegram-icon { + width: 20px; + height: 20px; + +} + +.bug-textarea { + width: 100%; + min-height: 135px; + background-color: #120721; + border: 1px solid #22153a; + border-radius: 8px; + padding: 12px; + color: white; + margin-bottom: 24px; + resize: none; + outline: none; +} + +.bug-textarea::placeholder { + color: #f0f0f0; + font-family: Open Sans; + font-size: 14px; + font-weight: 400; + line-height: 24px; + text-align: left; + text-underline-position: from-font; + text-decoration-skip-ink: none; + +} + +.dev-group-link { + display: flex; + align-items: center; + gap: 8px; + color: rgba(255, 255, 255, 0.6); + cursor: pointer; + font-family: Open Sans; + font-size: 14px; + font-weight: 400; + margin-bottom: 24px; +} + +.dev-group-link:hover { + color: rgba(255, 255, 255, 0.8); +} + +.send-icon { + width: 16px; + height: 16px; + transform: rotate(-45deg); +} + +.button-group { + margin-top: 20px; + display: flex; + gap: 16px; + justify-content: center; +} \ No newline at end of file diff --git a/frontend/src/components/report-modal/ReportBugModal.jsx b/frontend/src/components/report-modal/ReportBugModal.jsx new file mode 100644 index 000000000..52016c290 --- /dev/null +++ b/frontend/src/components/report-modal/ReportBugModal.jsx @@ -0,0 +1,75 @@ +import React, { useState } from "react"; +import "./ReportBugModal.css"; +import telegramIcon from "../../assets/icons/telegram.svg"; +import { Button } from "components/ui/custom-button/Button"; +import { useWalletStore } from "stores/useWalletStore"; +import { useBugReport } from "hooks/useBugReport"; + +export function ReportBugModal({ onClose }) { + const { walletId } = useWalletStore(); + const [bugDescription, setBugDescription] = useState(""); + const { mutation, handleSubmit } = useBugReport(walletId, bugDescription, onClose); + + return ( +
+
e.stopPropagation()} + onSubmit={handleSubmit} + > +
+
+

Report Bug

+

+ Please describe the bug you've encountered +

+