Skip to content

Commit

Permalink
Merge pull request #19 from neozhu/net9rc1
Browse files Browse the repository at this point in the history
migration MudBlazor 8.0.0-preview.4
  • Loading branch information
neozhu authored Nov 1, 2024
2 parents 44b5ed1 + 7233fcb commit a988fe0
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MudBlazor" Version="8.0.0-preview.1" />
<PackageReference Include="MudBlazor" Version="8.0.0-preview.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0-rc.2.24474.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0-rc.2.24474.3" PrivateAssets="all" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
</DialogContent>
<DialogActions>
<MudButton StartIcon="@Icons.Material.Filled.Cancel" OnClick="@(()=>MudDialog.Cancel())">Cancel</MudButton>
<MudButton StartIcon="@Icons.Material.Filled.Delete" Color="Color.Error" Variant="Variant.Filled" OnClick="@(()=>MudDialog.Close(DialogResult.Ok(true)))">Confirm</MudButton>
<MudButton StartIcon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@(()=>MudDialog.Close(DialogResult.Ok(true)))">Confirm</MudButton>
</DialogActions>
</MudDialog>

@code
{
[CascadingParameter] private MudDialogInstance MudDialog { get; set; } = default!;
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = default!;

[EditorRequired][Parameter] public string? ContentText { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="d-flex flex-column gap-2">
<MudText>@L["Type your password to confirm changing your email address to"] @model.NewEmail</MudText>
<MudTextField InputType="InputType.Password" Label="Password" @bind-Value="model.Password" For="@(() => model.Password)" ShrinkLabel="true"></MudTextField>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" Variant="Variant.Filled">@L["Confirm new email"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" >@L["Confirm new email"]</MudButton>
</div>
</EditForm>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DataAnnotationsValidator />
<div class="d-flex flex-column gap-2">
<MudTextField @bind-Value="model.Email" For="@(() => model.Email)" Label="Email" Placeholder="Email" Required="true" RequiredError="@L["Email is required"]"></MudTextField>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" Variant="Variant.Filled">@L["Send Email"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" >@L["Send Email"]</MudButton>
</div>
</EditForm>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<MudText>Reset your user password for @model.Email</MudText>
<MudTextField InputType="InputType.Password" Label="@L["New password"]" @bind-Value="model.Password" For="@(() => model.Password)" ShrinkLabel="true"></MudTextField>
<MudTextField InputType="InputType.Password" Label="@L["New password confirm"]" @bind-Value="model.PasswordConfirm" For="@(() => model.PasswordConfirm)" ShrinkLabel="true"></MudTextField>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" Variant="Variant.Filled">@L["Set new password"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" >@L["Set new password"]</MudButton>
</div>
</EditForm>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<MudText>@L["Changing your username can have unintended side effects."]</MudText>
<div class="flex-grow-0">
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(()=>showChangeEmailDialog=true)">@L["Change email"]</MudButton>
<MudButton Color="Color.Primary" OnClick="@(()=>showChangeEmailDialog=true)">@L["Change email"]</MudButton>
</div>

<MudText Typo="Typo.body1">@L["Looking to manage account security settings? You can find them in the Password and authentication page."]</MudText>
Expand All @@ -16,7 +16,7 @@
<MudDivider />
<MudText>@L["You must remove yourself, transfer ownership, or delete these organizations before you can delete your user."]</MudText>
<div class="flex-grow-0">
<MudButton Variant="Variant.Filled" Color="Color.Error" OnClick="@(()=>showDeleteAccountDialog=true)">@L["Delete your account"]</MudButton>
<MudButton Color="Color.Error" OnClick="@(()=>showDeleteAccountDialog=true)">@L["Delete your account"]</MudButton>
</div>
</div>

Expand All @@ -33,7 +33,7 @@
</MudForm>
</DialogContent>
<DialogActions>
<MudButton Variant="Variant.Filled" Color="Color.Primary" Disabled="@(!success)" OnClick="OnChangeMyEmail" Class="px-10">@L["Change my email"]</MudButton>
<MudButton Color="Color.Primary" Disabled="@(!success)" OnClick="OnChangeMyEmail" Class="px-10">@L["Change my email"]</MudButton>
</DialogActions>
</MudDialog>

Expand Down Expand Up @@ -62,7 +62,7 @@
</MudForm>
</DialogContent>
<DialogActions>
<MudButton Variant="Variant.Filled" Color="Color.Error" Disabled="@(!deleteSuccess)" OnClick="OnDeleteAccount" Class="px-10">@L["Delete my account"]</MudButton>
<MudButton Color="Color.Error" Disabled="@(!deleteSuccess)" OnClick="OnDeleteAccount" Class="px-10">@L["Delete my account"]</MudButton>
</DialogActions>
</MudDialog>
@code {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<MudTextField Label="@L["Name"]" @bind-Value="model.Name" For="@(() => model.Name)" ShrinkLabel="true" Adornment="Adornment.End" IconSize="Size.Small" AdornmentIcon="@Icons.Material.Filled.Edit" HelperText="@L["Your name may appear around application where you contribute or are mentioned. You can remove it at any time."]"></MudTextField>
<MudTextField Label="@L["User name"]" @bind-Value="model.Username" For="@(() => model.Username)" ShrinkLabel="true" Adornment="Adornment.End" IconSize="Size.Small" AdornmentIcon="@Icons.Material.Filled.Edit"></MudTextField>
<MudTextField Label="@L["Email"]" @bind-Value="model.Email" For="@(() => model.Email)" ShrinkLabel="true" ReadOnly></MudTextField>
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled" Color="Color.Primary" Class="ml-auto">@L["Save Profile"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" Color="Color.Primary" Class="ml-auto">@L["Save Profile"]</MudButton>
</div>
<div class="d-flex flex-column gap-1 px-4">
@if (!string.IsNullOrEmpty(model.AvatarUrl))
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorPocket.WebAssembly/Pages/Account/SignIn.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<MudCheckBox T="bool">@L["remember me"]</MudCheckBox>
<MudLink Href="/account/forgetpassword">@L["forget password?"]</MudLink>
</div>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" Variant="Variant.Filled">@L["Sign In"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" >@L["Sign In"]</MudButton>
</div>
</EditForm>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/BlazorPocket.WebAssembly/Pages/Account/SignUp.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="d-flex flex-row align-center justify-space-between">
<MudCheckBox @bind-Value="model.CheckPrivacy" For="@(() => model.CheckPrivacy)">@L["I agree to the terms and privacy"]</MudCheckBox>
</div>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" Variant="Variant.Filled">@L["Signup"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" FullWidth="true" Color="Color.Primary" >@L["Signup"]</MudButton>
</div>
</EditForm>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
</MudItem>
</MudGrid>
<MudStack Row AlignItems="AlignItems.End" Justify="Justify.FlexEnd" Class="my-5">
<MudButton ButtonType="ButtonType.Submit" Variant="Variant.Filled">@L["Save"]</MudButton>
<MudButton ButtonType="ButtonType.Submit" >@L["Save"]</MudButton>
</MudStack>
</EditForm>
</DialogContent>
</MudDialog>

@code
{
[CascadingParameter] private MudDialogInstance MudDialog { get; set; } = default!;
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = default!;

[Parameter]
public ProductDto Model { get; set; } = new();
Expand Down
4 changes: 2 additions & 2 deletions src/BlazorPocket.WebAssembly/Pages/Products/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<MudText Typo="Typo.body2">@L["View all products"]</MudText>
</MudStack>
<MudStack Row Spacing="2">
<MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.Add" OnClick="@(()=>OnCreate())">@L["New"]</MudButton>
<MudButton Variant="Variant.Outlined" Disabled="@(!selectedItems.Any())" OnClick="@(()=>OnDelete())" StartIcon="@Icons.Material.Filled.Delete">@L["Delete"]</MudButton>
<MudButton StartIcon="@Icons.Material.Filled.Add" OnClick="@(()=>OnCreate())">@L["New"]</MudButton>
<MudButton Disabled="@(!selectedItems.Any())" OnClick="@(()=>OnDelete())" StartIcon="@Icons.Material.Filled.Delete">@L["Delete"]</MudButton>
</MudStack>
</MudStack>

Expand Down
4 changes: 1 addition & 3 deletions src/BlazorPocket.WebAssembly/Theme/Theme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ public static MudTheme ApplicationTheme()
ZIndex = new ZIndex(),
Typography = new()
{
Input = new InputTypography {
FontSize = ".75rem",
},

Default = new DefaultTypography
{
FontSize = ".8125rem",
Expand Down

0 comments on commit a988fe0

Please sign in to comment.