Implemented modal styling with animations for confirmation dialogs, improving user experience.

This commit is contained in:
void-57 2025-10-14 01:56:30 +05:30
parent e4f0e8bba4
commit 3e001a995b
2 changed files with 1860 additions and 173 deletions

1550
index.html

File diff suppressed because it is too large Load Diff

483
style.css
View File

@ -546,6 +546,26 @@ body {
gap: 0.75rem;
}
/* Responsive page header for small screens */
@media (max-width: 768px) {
.page-header h2 {
font-size: 1.375rem;
flex-wrap: nowrap;
white-space: nowrap;
}
}
@media (max-width: 480px) {
.page-header h2 {
font-size: 1.125rem;
gap: 0.5rem;
flex-wrap: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.page-header h2 i {
color: var(--primary-color);
}
@ -1055,7 +1075,7 @@ body {
.wallet-security-notice {
display: flex;
align-items: flex-start;
gap: 1rem;
gap: 1.25rem;
padding: 1.25rem;
background: rgba(59, 130, 246, 0.05);
border: 1px solid var(--primary-light);
@ -1250,6 +1270,13 @@ body {
margin-bottom: 1rem;
}
.tx-top-row {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.tx-left {
display: flex;
align-items: flex-start;
@ -1757,22 +1784,83 @@ body {
/* Transaction Header Mobile */
.transaction-header {
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
flex-wrap: wrap;
}
.transaction-header h3 {
font-size: 1rem;
flex-shrink: 0;
}
.filter-buttons {
justify-content: flex-end;
margin-left: auto;
}
.filter-btn {
font-size: 0.75rem;
padding: 0.3rem 0.6rem;
min-width: 45px;
}
/* Transaction Card Mobile Layout */
.tx-header {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
}
.transaction-header h3 {
/* Create a top row with transaction info on left and date/status on right */
.tx-top-row {
display: flex;
justify-content: space-between;
align-items: flex-start;
width: 100%;
margin-bottom: 0.5rem;
}
.tx-left {
flex-direction: column;
gap: 0.25rem;
align-items: flex-start;
}
.tx-main-info {
gap: 0.25rem;
}
.tx-meta {
flex-direction: column;
align-items: flex-end;
gap: 0.25rem;
flex-shrink: 0;
}
.tx-direction-label {
font-size: 0.9rem;
font-weight: 600;
}
.tx-amount {
font-size: 1rem;
font-weight: 700;
}
.filter-buttons {
justify-content: center;
.tx-date {
font-size: 0.75rem;
margin-bottom: 0.25rem;
}
.filter-btn {
font-size: 0.8rem;
padding: 0.35rem 0.7rem;
.tx-status {
align-self: flex-end;
}
.tx-icon {
display: none; /* Hide icon on mobile to save space */
}
/* Pagination Mobile */
@ -1910,3 +1998,384 @@ body {
color: white;
border-color: var(--primary-color);
}
/* Searched Addresses Styles */
.searched-addresses-card {
margin-top: 2rem;
border-radius: 12px;
overflow: hidden;
}
.searched-addresses-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
border-bottom: 1px solid var(--border-color);
}
.searched-addresses-header h3 {
margin: 0;
font-size: 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.searched-addresses-header h3 i {
color: var(--primary-color);
}
.btn-clear-all {
background: none;
border: none;
cursor: pointer;
color: var(--danger-color);
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.875rem;
padding: 0.25rem 0.5rem;
border-radius: 4px;
}
.btn-clear-all:hover {
background-color: rgba(239, 68, 68, 0.1);
}
.searched-addresses-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0.5rem;
max-height: 300px;
overflow-y: auto;
width: 100%;
}
.searched-address-item {
display: flex;
flex-direction: column;
background: var(--card-bg);
border-radius: 8px;
border: 1px solid var(--border-color);
padding: 0.75rem;
position: relative;
transition: all 0.2s ease;
width: 100%;
box-sizing: border-box;
}
.searched-address-item:hover {
border-color: var(--primary-color);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.searched-address-item.has-source-info {
padding-bottom: 1rem;
}
.address-toggle-section {
margin-bottom: 0.5rem;
width: 100%;
}
.address-toggle-group {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.btn-toggle-address {
background: var(--bg-light);
border: 1px solid var(--border-color);
color: var(--text-secondary);
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
}
.btn-toggle-address.active {
background: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.address-content-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
.address-info {
flex-grow: 1;
min-width: 0;
width: 100%;
}
.address-display {
display: flex;
align-items: center;
gap: 0.5rem;
width: 100%;
font-family: monospace;
}
.address-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
.address-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.btn-copy-current,
.btn-copy,
.btn-delete,
.btn-check {
background: none;
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.25rem;
transition: all 0.2s ease;
}
.btn-copy-current i,
.btn-copy i,
.btn-check i {
color: var(--primary-color);
}
.btn-delete i {
color: var(--danger-color);
}
.btn-copy-current:hover,
.btn-copy:hover,
.btn-check:hover {
background-color: rgba(59, 130, 246, 0.1);
}
.btn-delete:hover {
background-color: rgba(239, 68, 68, 0.1);
}
/* Mobile responsive styles for searched addresses */
@media (max-width: 768px) {
.address-text {
white-space: normal;
word-break: break-all;
font-size: 0.75rem;
}
.address-content-wrapper {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.address-actions {
width: 100%;
justify-content: flex-start;
gap: 0.35rem;
}
.searched-addresses-card {
margin-top: 1.5rem;
}
.searched-addresses-header {
padding: 0.75rem;
flex-wrap: wrap;
gap: 0.5rem;
}
.searched-addresses-list {
padding: 0.5rem;
max-height: 250px;
}
.searched-address-item {
padding: 0.75rem 0.5rem;
}
}
/* Confirmation Modal Styling */
.modal {
display: none;
position: fixed;
z-index: 500;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(5px);
animation: fadeIn 0.3s ease;
}
.modal-content {
background-color: var(--card-bg);
margin: 10vh auto;
border-radius: var(--border-radius);
box-shadow: var(--shadow-lg);
width: 90%;
max-width: 500px;
overflow: hidden;
animation: slideUp 0.4s ease;
border: 1px solid var(--card-border);
}
.modal-header {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
font-size: 1.25rem;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 0.5rem;
}
.modal-close {
color: var(--text-light);
font-size: 1.5rem;
font-weight: bold;
cursor: pointer;
transition: color 0.2s;
line-height: 1;
}
.modal-close:hover {
color: var(--danger-color);
}
.modal-body {
padding: 1.5rem;
}
.modal-footer {
padding: 1rem 1.5rem;
border-top: 1px solid var(--border-color);
display: flex;
justify-content: flex-end;
gap: 1rem;
}
/* Confirm Details Styling */
.confirm-details {
display: flex;
flex-direction: column;
gap: 1rem;
}
.detail-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.detail-group label {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
color: var(--text-secondary);
font-size: 0.9rem;
}
.detail-group label i {
color: var(--primary-color);
}
.confirm-value {
background: var(--bg-color);
padding: 0.75rem 1rem;
border-radius: var(--border-radius-sm);
font-size: 1rem;
color: var(--text-primary);
font-weight: 500;
border: 1px solid var(--card-border);
}
.address-value {
font-family: "Courier New", monospace;
font-size: 0.9rem;
word-break: break-all;
}
.detail-group.warning {
background-color: rgba(245, 158, 11, 0.1);
border-left: 4px solid var(--warning-color);
padding: 1rem;
border-radius: var(--border-radius-sm);
display: flex;
align-items: flex-start;
gap: 0.75rem;
margin-top: 0.5rem;
}
.detail-group.warning i {
color: var(--warning-color);
font-size: 1.25rem;
flex-shrink: 0;
}
/* Modal Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (max-width: 768px) {
.modal-content {
width: 95%;
margin: 5vh auto;
}
.modal-header,
.modal-body,
.modal-footer {
padding: 1rem;
}
.detail-group.warning {
padding: 0.75rem;
}
}