mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
76 lines
1.5 KiB
Plaintext
76 lines
1.5 KiB
Plaintext
@page "/"
|
|
@using CanvasModel.EnrollmentTerms
|
|
@using Management.Web.Shared.Course
|
|
@using Management.Web.Shared.Semester
|
|
@using CanvasModel.Courses
|
|
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
|
@using LocalModels
|
|
|
|
@inject CanvasService canvas
|
|
@inject CoursePlanner planner
|
|
@inject ProtectedLocalStorage BrowserStorage
|
|
|
|
@code
|
|
{
|
|
private bool showNewFile { get; set; } = false;
|
|
protected override void OnInitialized()
|
|
{
|
|
planner.StateHasChanged += reload;
|
|
}
|
|
private void reload()
|
|
{
|
|
this.InvokeAsync(this.StateHasChanged);
|
|
}
|
|
public void Dispose()
|
|
{
|
|
planner.StateHasChanged -= reload;
|
|
}
|
|
|
|
}
|
|
<PageTitle>Index</PageTitle>
|
|
|
|
@if(planner.LocalCourse == null)
|
|
{
|
|
<CurrentFiles />
|
|
@if(!showNewFile)
|
|
{
|
|
<div class="text-center">
|
|
<button
|
|
@onclick="@(()=>showNewFile = true)"
|
|
class="btn btn-primary"
|
|
>
|
|
Create New File
|
|
</button>
|
|
</div>
|
|
}
|
|
|
|
@if(showNewFile)
|
|
{
|
|
<div class="text-center">
|
|
<button
|
|
@onclick="@(()=>showNewFile = false)"
|
|
class="btn btn-primary"
|
|
>
|
|
Hide File Initialization
|
|
</button>
|
|
</div>
|
|
|
|
<div class="border rounded bg-dark-subtle p-3 my-3">
|
|
<InitializeYamlFromCanvas />
|
|
</div>
|
|
}
|
|
}
|
|
|
|
@if(planner.LocalCourse != null)
|
|
{
|
|
<div class="">
|
|
<button
|
|
@onclick="@(() => planner.LocalCourse = null)"
|
|
class="btn btn-primary"
|
|
>
|
|
Select New Course
|
|
</button>
|
|
</div>
|
|
<CourseDetails />
|
|
}
|
|
<br> |