mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
# Description of Changes - Added error handling and toast notifications --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
210 lines
3.6 KiB
CSS
210 lines
3.6 KiB
CSS
/* Toast Container Styles */
|
|
.toast-container {
|
|
position: fixed;
|
|
z-index: 1200;
|
|
display: flex;
|
|
gap: 12px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toast-container--top-left {
|
|
top: 16px;
|
|
left: 16px;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.toast-container--top-right {
|
|
top: 16px;
|
|
right: 16px;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.toast-container--bottom-left {
|
|
bottom: 16px;
|
|
left: 16px;
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.toast-container--bottom-right {
|
|
bottom: 16px;
|
|
right: 16px;
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
/* Toast Item Styles */
|
|
.toast-item {
|
|
min-width: 320px;
|
|
max-width: 560px;
|
|
box-shadow: var(--shadow-lg);
|
|
border-radius: 16px;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
pointer-events: auto;
|
|
}
|
|
|
|
/* Toast Alert Type Colors */
|
|
.toast-item--success {
|
|
background: var(--color-green-100);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--color-green-400);
|
|
}
|
|
|
|
.toast-item--error {
|
|
background: var(--color-red-100);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--color-red-400);
|
|
}
|
|
|
|
.toast-item--warning {
|
|
background: var(--color-yellow-100);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--color-yellow-400);
|
|
}
|
|
|
|
.toast-item--neutral {
|
|
background: var(--bg-surface);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-default);
|
|
}
|
|
|
|
/* Toast Header Row */
|
|
.toast-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.toast-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.toast-title-container {
|
|
font-weight: 700;
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.toast-count-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 20px;
|
|
height: 20px;
|
|
padding: 0 6px;
|
|
border-radius: 999px;
|
|
background: rgba(0, 0, 0, 0.08);
|
|
color: inherit;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.toast-controls {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.toast-button {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 999px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.toast-expand-button {
|
|
transform: rotate(0deg);
|
|
transition: transform 160ms ease;
|
|
}
|
|
|
|
.toast-expand-button--expanded {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
/* Progress Bar */
|
|
.toast-progress-container {
|
|
margin-top: 8px;
|
|
height: 6px;
|
|
background: var(--bg-muted);
|
|
border-radius: 999px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.toast-progress-bar {
|
|
height: 100%;
|
|
transition: width 160ms ease;
|
|
}
|
|
|
|
.toast-progress-bar--success {
|
|
background: var(--color-green-500);
|
|
}
|
|
|
|
.toast-progress-bar--error {
|
|
background: var(--color-red-500);
|
|
}
|
|
|
|
.toast-progress-bar--warning {
|
|
background: var(--color-yellow-500);
|
|
}
|
|
|
|
.toast-progress-bar--neutral {
|
|
background: var(--color-gray-500);
|
|
}
|
|
|
|
/* Toast Body */
|
|
.toast-body {
|
|
font-size: 14px;
|
|
opacity: 0.9;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* Toast Action Button */
|
|
.toast-action-container {
|
|
margin-top: 12px;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.toast-action-button {
|
|
padding: 8px 12px;
|
|
border-radius: 12px;
|
|
border: 1px solid;
|
|
background: transparent;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.toast-action-button--success {
|
|
color: var(--text-primary);
|
|
border-color: var(--color-green-400);
|
|
}
|
|
|
|
.toast-action-button--error {
|
|
color: var(--text-primary);
|
|
border-color: var(--color-red-400);
|
|
}
|
|
|
|
.toast-action-button--warning {
|
|
color: var(--text-primary);
|
|
border-color: var(--color-yellow-400);
|
|
}
|
|
|
|
.toast-action-button--neutral {
|
|
color: var(--text-primary);
|
|
border-color: var(--border-default);
|
|
}
|