-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f36d4a5
commit 262348d
Showing
6 changed files
with
76 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,14 @@ | |
<base href="/" /> | ||
<link rel="stylesheet" href="app.css" /> | ||
<link rel="stylesheet" href="ToDoList.Frontend.styles.css" /> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | ||
<HeadOutlet /> | ||
</head> | ||
|
||
<body> | ||
<Routes /> | ||
<script src="_framework/blazor.web.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
ToDoList/src/ToDoList.Frontend/Components/Layout/MainLayout.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@inherits LayoutComponentBase | ||
|
||
@Body | ||
<div class="container"> | ||
@Body | ||
</div> |
12 changes: 0 additions & 12 deletions
12
ToDoList/src/ToDoList.Frontend/Components/Pages/AhojSvete.razor
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
ToDoList/src/ToDoList.Frontend/Components/Pages/EditToDoItem.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@page "/editToDoItem/{ItemId:int}" | ||
@using ToDoList.Frontend.Views | ||
@using ToDoList.Frontend.Clients | ||
@inject NavigationManager NavigationManager | ||
@inject IToDoItemsClient ToDoItemsClient | ||
@rendermode InteractiveServer | ||
|
||
<PageTitle>Edit To Do Item</PageTitle> | ||
|
||
@if (ToDoItem is not null) | ||
{ | ||
<EditForm Model="ToDoItem" FormName="EditToDoItem" OnSubmit="Submit"> | ||
<InputText id="Name" @bind-Value="ToDoItem.Name" /> | ||
<InputText id="Description" @bind-Value="ToDoItem.Description" /> | ||
<InputCheckbox id="IsCompleted" @bind-Value="ToDoItem.IsCompleted" /> | ||
<button type="submit">Submit</button> | ||
</EditForm> | ||
} | ||
|
||
@code | ||
{ | ||
protected override async Task OnInitializedAsync() | ||
{ | ||
ToDoItem = await ToDoItemsClient.ReadItemByIdAsync(ItemId); | ||
} | ||
|
||
[Parameter] | ||
public int ItemId { get; set; } | ||
|
||
[SupplyParameterFromForm] | ||
public ToDoItemView ToDoItem { get; set; } | ||
Check warning on line 31 in ToDoList/src/ToDoList.Frontend/Components/Pages/EditToDoItem.razor GitHub Actions / build
|
||
|
||
public async Task Submit() | ||
{ | ||
await ToDoItemsClient.UpdateItemAsync(ToDoItem); | ||
NavigationManager.NavigateTo("/"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters