Skip to content

Commit

Permalink
remove old project
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem committed Dec 27, 2023
1 parent 51dc6cd commit b78e5f0
Show file tree
Hide file tree
Showing 205 changed files with 89 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ public GlobalConfig(CookieStorage cookieStorage, I18n i18n)

public EventHandler? NavigationStyleChanged { get; set; }

public EventHandler? PageModeChanged { get; set; }

public EventHandler? ExpandOnHoverChanged { get; set; }

public string PageMode
{
get => _pageMode ?? PageModes.PageTab;
set
{
_pageMode = value;
PageModeChanged?.Invoke(this, EventArgs.Empty);
_cookieStorage.SetAsync(PageModeKey, value);
}
}
Expand All @@ -57,6 +62,7 @@ public bool ExpandOnHover
set
{
_expandOnHover = value;
ExpandOnHoverChanged?.Invoke(this, EventArgs.Empty);
_cookieStorage.SetAsync(ExpandOnHoverCookieKey, value);
}
}
Expand All @@ -83,10 +89,10 @@ public CultureInfo Culture

public async Task InitFromStorage()
{
_pageMode = await _cookieStorage.GetAsync(PageModeKey);
_navigationStyle = await _cookieStorage.GetAsync(NavigationStyleKey);
_expandOnHover = Convert.ToBoolean(await _cookieStorage.GetAsync(ExpandOnHoverCookieKey));
_favorite = await _cookieStorage.GetAsync(FavoriteCookieKey);
PageMode = await _cookieStorage.GetAsync(PageModeKey);
NavigationStyle = await _cookieStorage.GetAsync(NavigationStyleKey);
ExpandOnHover = Convert.ToBoolean(await _cookieStorage.GetAsync(ExpandOnHoverCookieKey));
Favorite = await _cookieStorage.GetAsync(FavoriteCookieKey);

var lang = await _cookieStorage.GetAsync(LangCookieKey);
if (!string.IsNullOrWhiteSpace(lang))
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,28 @@
@code {

private static readonly string[] s_selfPatterns =
{
[
"/app/todo"
};
];

private bool? _showSetting;

private PageTabs? _pageTabs;

private string PageModeClass => GlobalConfig.PageMode == PageModes.PageTab ? "page-mode--tab" : "page-mode--breadcrumb";

protected override void OnInitialized()
{
base.OnInitialized();

GlobalConfig.PageModeChanged += PageModeChanged;
}

private void PageModeChanged(object? sender, EventArgs e)
{
InvokeAsync(StateHasChanged);
}

protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
@inject GlobalConfig GlobalConfig
@implements IDisposable

<MNavigationDrawer @bind-Value="Visible"
<MNavigationDrawer @bind-Value="Visible"
Class="@($"navigation {ComputedNavigationClass}")"
Width=300
Width=300
MiniVariantWidth=80
Floating
ExpandOnHover="GlobalConfig.ExpandOnHover"
MiniVariant="GlobalConfig.ExpandOnHover"
ExpandOnHover="@GlobalConfig.ExpandOnHover"
MiniVariant="@GlobalConfig.ExpandOnHover"
App>

<div class="logo" @onclick="() => NavHelper.NavigateTo(GlobalVariables.DefaultRoute)">
<img class="hover-pointer" height="49" src="/img/mainLayout/logo-en.svg" />
</div>
Expand Down Expand Up @@ -77,6 +76,8 @@
[Inject]
public MasaBlazor Masa { get; set; } = default!;

private CancellationTokenSource? _cancellationTokenSource;

public bool? Visible { get; set; } = true;

public string ComputedNavigationClass => (GlobalConfig.NavigationStyle == NavigationStyles.Rounded ? "rounded-r-xl" : string.Empty);
Expand All @@ -85,12 +86,24 @@
{
base.OnInitialized();

GlobalConfig.NavigationStyleChanged += NavigationStyleChanged;
GlobalConfig.NavigationStyleChanged += GlobalConfigChanged;
GlobalConfig.ExpandOnHoverChanged += GlobalConfigChanged;
}

private void NavigationStyleChanged(object? sender, EventArgs e)
private async void GlobalConfigChanged(object? sender, EventArgs e)
{
InvokeAsync(StateHasChanged);
_cancellationTokenSource?.Cancel();
_cancellationTokenSource = new CancellationTokenSource();

try
{
await Task.Delay(100, _cancellationTokenSource.Token);
await InvokeAsync(StateHasChanged);
}
catch (TaskCanceledException)
{
// ignore
}
}

public void Switch()
Expand All @@ -108,7 +121,8 @@

void IDisposable.Dispose()
{
GlobalConfig.NavigationStyleChanged -= NavigationStyleChanged;
GlobalConfig.NavigationStyleChanged -= GlobalConfigChanged;
GlobalConfig.ExpandOnHoverChanged -= GlobalConfigChanged;
}

}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
</PropertyGroup>

<ItemGroup>
<!-- <PackageReference Include="Masa.Blazor" Version="1.3.0-beta.5" />-->
<PackageReference Include="Masa.Blazor" Version="1.3.0-beta.6" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Masa.Blazor\src\Masa.Blazor\Masa.Blazor.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
<MCol Md=4 Sm=12>
<MCard Class="max-height">
<MCardText Class="pt-6">
<img class="rounded-2 max-width" height=186 src="/img/eCommerce/rectangle.png" />
<img class="rounded-2 max-width" src="/img/eCommerce/rectangle.png" />
<div class="d-flex my-4">
<MAvatar Size=48 Color="fill-lighten-1">
<MIcon Color="primary" Size=20>fa:far fa-calendar-check</MIcon>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 34 additions & 15 deletions Masa.Blazor.Pro.sln
Original file line number Diff line number Diff line change
@@ -1,31 +1,50 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31710.8
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro", "Masa.Blazor.Pro\Masa.Blazor.Pro.csproj", "{55FC32F7-34BA-4244-8245-BD1880AC8E4E}"
# Visual Studio Version 16
VisualStudioVersion = 16.0.0.0
MinimumVisualStudioVersion = 16.0.0.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro", "Masa.Blazor.Pro\Masa.Blazor.Pro.csproj", "{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5E22849-20A1-4624-8169-9C7EF6EA1B74}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
README.zh-CN.md = README.zh-CN.md
EndProjectSection
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Blazor.Pro.Client", "Masa.Blazor.Pro.Client\Masa.Blazor.Pro.Client.csproj", "{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55FC32F7-34BA-4244-8245-BD1880AC8E4E}.Release|Any CPU.Build.0 = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x64.ActiveCfg = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x64.Build.0 = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x86.ActiveCfg = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Debug|x86.Build.0 = Debug|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|Any CPU.Build.0 = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x64.ActiveCfg = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x64.Build.0 = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x86.ActiveCfg = Release|Any CPU
{944BA7F3-6BDE-4008-81B2-13B9CB517DDB}.Release|x86.Build.0 = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x64.ActiveCfg = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x64.Build.0 = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x86.ActiveCfg = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Debug|x86.Build.0 = Debug|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|Any CPU.Build.0 = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x64.ActiveCfg = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x64.Build.0 = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x86.ActiveCfg = Release|Any CPU
{E505F326-BACB-4FF3-93A2-8EC64CC0DCCE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {104790D8-C1BA-4407-8024-8C6D1862A560}
SolutionGuid = {41A0DEFD-768D-440B-B382-E4BA2E314018}
EndGlobalSection
EndGlobal
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions Masa.Blazor.Pro/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_sdk:8.0.100-1 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
FROM registry.cn-hangzhou.aliyuncs.com/masa/dotnet_aspnet:8.0-1 AS build
WORKDIR /src
COPY ["Masa.Blazor.Pro/Masa.Blazor.Pro.csproj", "Masa.Blazor.Pro/"]
RUN dotnet restore "Masa.Blazor.Pro/Masa.Blazor.Pro.csproj"
Expand All @@ -20,3 +20,4 @@ FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Masa.Blazor.Pro.dll"]
y
File renamed without changes.
78 changes: 0 additions & 78 deletions Masa.Blazor.Pro/Masa.Blazor.Pro.sln

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1158,12 +1158,12 @@ tr:hover {
border-radius: 20px;
}

/* prevent the sliding animation at the first render */
/* avoid the entry animation at the first render */
@media (min-width: 1264px) {
.m-app-bar.m-app-bar--app:not([data-booted="true"]){
.m-app-bar.m-app-bar--app:not(.app--sized) {
left: 300px !important;
}
.m-main:not([data-booted="true"]){
.m-main:not(.app--sized){
padding-left: 300px !important;
}
}
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.

0 comments on commit b78e5f0

Please sign in to comment.