Add PageNoteButton to various components for enhanced note management

This commit is contained in:
2026-01-17 10:25:38 -05:00
parent 947d95893f
commit e6eb35ee67
15 changed files with 69 additions and 19 deletions
+5 -2
View File
@@ -6,7 +6,7 @@
@inject ISnackbar Snackbar
@inject IDialogService DialogService
<MudDialog>
<MudDialog Class="@MarkdownHelper.GetNoteColorClass(_note.Id)">
<DialogContent>
<MudStack Spacing="3">
<MudTextField @bind-Value="_note.Title"
@@ -14,7 +14,8 @@
Variant="Variant.Outlined"
Required="true"
RequiredError="Title is required"
MaxLength="200" />
MaxLength="200"
ReadOnly="@IsPageNote" />
<MudText Typo="Typo.subtitle2" Class="mb-2">Content (Markdown)</MudText>
<MarkdownEditor Value="@_note.Content"
@@ -42,6 +43,8 @@
private Note _note = null!;
private bool IsPageNote => Note?.Title?.StartsWith("@") ?? false;
protected override void OnInitialized()
{
_note = new Note
@@ -4,7 +4,7 @@
@inject INotesService NotesService
@inject IDialogService DialogService
<MudDialog>
<MudDialog Class="@MarkdownHelper.GetNoteColorClass(NoteId)">
<DialogContent>
@if (_isLoading)
{
@@ -2,7 +2,7 @@
@using WebApp.Services
@using MudBlazor
<MudDialog>
<MudDialog Class="@MarkdownHelper.GetNoteColorClass(_history.NoteId)">
<DialogContent>
<MudStack Spacing="3">
<MudText Typo="Typo.h6">@_history.Title</MudText>
+3 -2
View File
@@ -54,7 +54,8 @@
<MudExpansionPanel @key="@($"note-{noteId}")"
Icon="@Icons.Material.Filled.Note"
IsExpanded="@isExpanded"
ExpandedChanged="@((bool expanded) => OnPanelExpandedChanged(noteId, expanded))">
ExpandedChanged="@((bool expanded) => OnPanelExpandedChanged(noteId, expanded))"
Class="@MarkdownHelper.GetNoteColorClass(noteId)">
<TitleContent>
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="flex-grow-1">
<MudText Typo="Typo.body1" Class="flex-grow-1" Style="min-width: 0;">
@@ -402,7 +403,7 @@
var result = await DialogService.ShowMessageBox(
"Delete Note",
(MarkupString)$"Are you sure you want to delete <b>{note.Title}</b>? This cannot be undone.",
(MarkupString)$"Are you sure you want to delete <b>{note.Title}</b>? You can restore it later from the 'Show Removed' view.",
yesText: "Yes",
noText: "Cancel");