diff --git a/ConflictResolver/Pages/Home.razor b/ConflictResolver/Pages/Home.razor
index d56706e..526e02d 100644
--- a/ConflictResolver/Pages/Home.razor
+++ b/ConflictResolver/Pages/Home.razor
@@ -177,7 +177,7 @@
-
+
Copy Share Link
@@ -199,6 +199,8 @@
private IEnumerable? _selectedCourses;
private List _recommendedSchedules = new();
+ private bool _isGeneratingShareLink = false;
+
protected override async Task OnInitializedAsync()
{
var courses = await ScheduleRepository.GetSchedulesAsync();
@@ -274,13 +276,17 @@
private async Task OnShareSchedule()
{
+ _isGeneratingShareLink = true;
var schedules = _courses.Select(course => course.Course);
var recommendedSchedules = _recommendedSchedules.Select(course => course.Course);
var recommendedBlocks = _recommendedSchedules.Select(course => course.Block);
var sharingUrl = $"{NavigationManager.BaseUri}resolve?blocks={_selectedBlocks.SerializeAndEscape()}&recommendedBlocks={recommendedBlocks.SerializeAndEscape()}&courses={schedules.SerializeAndEscape()}&alternatives={recommendedSchedules.SerializeAndEscape()}";
await ClipboardHandler.CopyTextToClipboardAsync(sharingUrl);
+ await Task.Delay(500);
+
Snackbar.Add("Sharing link has been copied to clipboard", Severity.Success);
+ _isGeneratingShareLink = false;
}
}
\ No newline at end of file
diff --git a/ConflictResolver/Pages/Resolve.razor b/ConflictResolver/Pages/Resolve.razor
index 0aad055..10005e2 100644
--- a/ConflictResolver/Pages/Resolve.razor
+++ b/ConflictResolver/Pages/Resolve.razor
@@ -7,6 +7,8 @@
@inject NavigationManager NavigationManager
@inject ScheduleRepository ScheduleRepository
+@_pageTitle
+
@@ -157,6 +159,7 @@
[SupplyParameterFromQuery(Name = "alternatives")]
public string? AlternativeData { get; set; }
+ private string? _pageTitle;
private IEnumerable? _courses { get; set; }
private IEnumerable? _alternatives { get; set; }
@@ -168,6 +171,7 @@
var alternatives = AlternativeData.DeserializeAndUnescape>();
var alternativeSchedules = await ScheduleRepository.GetSchedulesByCourseCodeAsync(blocks: recommendedBlocks, courses: alternatives);
+ _pageTitle = $"Resolv - Schedule Alternatives for {string.Join(", ",alternatives.Distinct())}";
_courses = await ScheduleRepository.GetSchedulesByCourseCodeAsync(blocks: blocks, courses: courses, conflicts: true);
_alternatives = alternativeSchedules
diff --git a/ConflictResolver/wwwroot/images/preview.png b/ConflictResolver/wwwroot/images/preview.png
new file mode 100644
index 0000000..0483200
Binary files /dev/null and b/ConflictResolver/wwwroot/images/preview.png differ
diff --git a/ConflictResolver/wwwroot/index.html b/ConflictResolver/wwwroot/index.html
index 9d5c69e..db9f9bd 100644
--- a/ConflictResolver/wwwroot/index.html
+++ b/ConflictResolver/wwwroot/index.html
@@ -10,6 +10,7 @@
+