Add reset button with proper styling and improve export button appearance (#8)

* Initial plan

* Initial plan for reset button implementation

Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>

* Implement reset button with styling and export button improvements

Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>

* Remove code comments and clean up .deb file

Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: clayschaad <11883505+clayschaad@users.noreply.github.com>
This commit is contained in:
Copilot 2025-08-19 06:34:29 +02:00 committed by GitHub
parent ac6f471511
commit e275cbd240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 69 additions and 9 deletions

6
.gitignore vendored
View file

@ -51,4 +51,8 @@ CodeCoverage/
# NUnit # NUnit
*.VisualState.xml *.VisualState.xml
TestResult.xml TestResult.xml
nunit-*.xml nunit-*.xml
# Temporary installation files
*.deb
*.rpm

View file

@ -25,7 +25,11 @@
} }
</div> </div>
<div class="export-buttons"> <div class="reset-section">
<button class="btn" @onclick="ExportToIcs">Export to ICS</button> <button class="reset-btn" @onclick="ResetSchedule">Reset Schedule</button>
<button class="btn" @onclick="ExportToPdf">Export to PDF</button> </div>
<div class="export-buttons">
<button class="btn export-btn" @onclick="ExportToIcs">Export to ICS</button>
<button class="btn export-btn" @onclick="ExportToPdf">Export to PDF</button>
</div> </div>

View file

@ -107,5 +107,20 @@ namespace ShiftScheduler.Client.Pages
SelectedSchedule = new Dictionary<DateTime, string>(); SelectedSchedule = new Dictionary<DateTime, string>();
} }
} }
private async Task ResetSchedule()
{
SelectedSchedule.Clear();
try
{
var storageKey = $"ShiftSchedule_{EditYear}_{EditMonth:D2}";
await JSRuntime.InvokeVoidAsync("localStorage.removeItem", storageKey);
}
catch (Exception)
{
// ignored
}
}
} }
} }

View file

@ -52,14 +52,51 @@
} }
/* Export button */ /* Export button */
.export-btn { .btn.export-btn {
margin-top: 20px; margin: 5px;
padding: 10px 20px; padding: 10px 20px;
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
background-color: #28a745; background-color: #ADD8E6; /* Light blue */
color: white; color: #333;
border: none; border: 2px solid #87CEEB; /* Slightly darker blue border */
border-radius: 5px;
transition: background-color 0.2s ease;
}
.btn.export-btn:hover {
background-color: #87CEEB;
border-color: #4682B4;
}
/* Reset button */
.reset-btn {
margin: 5px;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
background-color: #FFB6C1; /* Light red/pink */
color: #333;
border: 2px solid #FF91A4; /* Slightly darker red border */
border-radius: 5px;
transition: background-color 0.2s ease;
}
.reset-btn:hover {
background-color: #FF91A4;
border-color: #FF69B4;
}
/* Reset section - separate from export buttons */
.reset-section {
margin: 30px 0 20px 0;
text-align: center;
}
/* Export buttons section */
.export-buttons {
margin: 20px 0;
text-align: center;
} }
/* Tooltip container */ /* Tooltip container */