From e275cbd240c483adc1b5156bc60b27a8bf23a3eb Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 19 Aug 2025 06:34:29 +0200 Subject: [PATCH] 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> --- .gitignore | 6 ++++- Client/Pages/Index.razor | 10 +++++--- Client/Pages/Index.razor.cs | 15 ++++++++++++ Client/Pages/Index.razor.css | 47 ++++++++++++++++++++++++++++++++---- 4 files changed, 69 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index fd490fc..c60101d 100644 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,8 @@ CodeCoverage/ # NUnit *.VisualState.xml TestResult.xml -nunit-*.xml \ No newline at end of file +nunit-*.xml + +# Temporary installation files +*.deb +*.rpm \ No newline at end of file diff --git a/Client/Pages/Index.razor b/Client/Pages/Index.razor index ac50d18..fa4ad60 100644 --- a/Client/Pages/Index.razor +++ b/Client/Pages/Index.razor @@ -25,7 +25,11 @@ } -
- - +
+ +
+ +
+ +
diff --git a/Client/Pages/Index.razor.cs b/Client/Pages/Index.razor.cs index ceda173..ea90886 100644 --- a/Client/Pages/Index.razor.cs +++ b/Client/Pages/Index.razor.cs @@ -107,5 +107,20 @@ namespace ShiftScheduler.Client.Pages SelectedSchedule = new Dictionary(); } } + + private async Task ResetSchedule() + { + SelectedSchedule.Clear(); + + try + { + var storageKey = $"ShiftSchedule_{EditYear}_{EditMonth:D2}"; + await JSRuntime.InvokeVoidAsync("localStorage.removeItem", storageKey); + } + catch (Exception) + { + // ignored + } + } } } diff --git a/Client/Pages/Index.razor.css b/Client/Pages/Index.razor.css index 8465dc8..c823f7e 100644 --- a/Client/Pages/Index.razor.css +++ b/Client/Pages/Index.razor.css @@ -52,14 +52,51 @@ } /* Export button */ -.export-btn { - margin-top: 20px; +.btn.export-btn { + margin: 5px; padding: 10px 20px; font-size: 16px; cursor: pointer; - background-color: #28a745; - color: white; - border: none; + background-color: #ADD8E6; /* Light blue */ + color: #333; + 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 */