diff --git a/.github/workflows/adminpanel.cd.yml b/.github/workflows/adminpanel.cd.yml index bbc6e9e839..59ddd3aa85 100644 --- a/.github/workflows/adminpanel.cd.yml +++ b/.github/workflows/adminpanel.cd.yml @@ -29,14 +29,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - uses: actions/setup-node@v3 with: @@ -107,14 +107,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - uses: actions/setup-node@v3 with: @@ -134,7 +134,7 @@ jobs: run: dotnet build AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build exe - run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 + run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - name: Upload artifact uses: actions/upload-artifact@v2 @@ -154,14 +154,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - uses: actions/setup-node@v3 with: @@ -188,7 +188,7 @@ jobs: run: dotnet build AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build aab - run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-android + run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-android - name: Upload artifact uses: actions/upload-artifact@v2 @@ -208,18 +208,18 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: node-version: 18 - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 @@ -235,7 +235,7 @@ jobs: run: dotnet build AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build pkg - run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-maccatalyst + run: dotnet build AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-maccatalyst - name: Upload artifact uses: actions/upload-artifact@v2 @@ -255,7 +255,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: maxim-lobanov/setup-xcode@v1 with: @@ -265,12 +265,12 @@ jobs: with: node-version: 18 - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 @@ -307,7 +307,7 @@ jobs: run: dotnet build AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build ipa - run: dotnet publish AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="AdminPanel" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios + run: dotnet publish AdminPanel/src/Client/App/AdminPanel.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="AdminPanel" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="AdminPanel" -p:ApplicationId="com.bitplatform.AdminPanel.Template" -f net8.0-ios - name: Upload artifact uses: actions/upload-artifact@v2 @@ -327,14 +327,14 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/AdminPanel/Bit.AdminPanel/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - - name: Create project from AdminPanel + - name: Create project from Boilerplate run: | - cd src/Templates/AdminPanel && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.AdminPanel.0.0.0.nupkg - cd ../../../ && dotnet new bit-admin --name AdminPanel --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name AdminPanel --database SqlServer --sample AdminPanel - name: Setup .NET for Electron.NET uses: actions/setup-dotnet@v3 diff --git a/.github/workflows/todotemplate.cd.yml b/.github/workflows/todotemplate.cd.yml index f96d389d9f..5748f3f7b6 100644 --- a/.github/workflows/todotemplate.cd.yml +++ b/.github/workflows/todotemplate.cd.yml @@ -28,18 +28,18 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: node-version: 18 - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Switch to blazor web assembly run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' TodoTemplate/src/Client/Web/TodoTemplate.Client.Web.csproj @@ -106,18 +106,18 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: node-version: 18 - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 @@ -133,7 +133,7 @@ jobs: run: dotnet build TodoTemplate/src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build exe - run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 + run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - name: Upload artifact uses: actions/upload-artifact@v2 @@ -153,18 +153,18 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: node-version: 18 - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Extract Android signing key from env uses: timheuer/base64-to-file@v1 @@ -187,7 +187,7 @@ jobs: run: dotnet build TodoTemplate/src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build aab - run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-android + run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=bitplatform -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-android - name: Upload artifact uses: actions/upload-artifact@v2 @@ -207,18 +207,18 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: node-version: 18 - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 @@ -234,7 +234,7 @@ jobs: run: dotnet build TodoTemplate/src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build pkg - run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-maccatalyst + run: dotnet build TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-maccatalyst - name: Upload artifact uses: actions/upload-artifact@v2 @@ -254,7 +254,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - uses: actions/setup-node@v3 with: @@ -264,12 +264,12 @@ jobs: with: xcode-version: '15' - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 @@ -306,7 +306,7 @@ jobs: run: dotnet build TodoTemplate/src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build ipa - run: dotnet publish TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="TodoTemplate" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios + run: dotnet publish TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="TodoTemplate" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -p:ApplicationTitle="TodoTemplate" -p:ApplicationId="com.bitplatform.Todo.Template" -f net8.0-ios - name: Upload artifact uses: actions/upload-artifact@v2 @@ -326,7 +326,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - global-json-file: src/Templates/TodoTemplate/Bit.TodoTemplate/global.json + global-json-file: src/Templates/Boilerplate/Bit.Boilerplate/global.json - name: Setup .NET for Electron.NET uses: actions/setup-dotnet@v3 @@ -337,12 +337,12 @@ jobs: with: node-version: 18 - - name: Create project from TodoTemplate + - name: Create project from Boilerplate run: | - cd src/Templates/TodoTemplate && dotnet build -c Release + cd src/Templates/Boilerplate && dotnet build -c Release dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 - dotnet new install Bit.TodoTemplate.0.0.0.nupkg - cd ../../../ && dotnet new bit-todo --name TodoTemplate --database SqlServer + dotnet new install Bit.Boilerplate.0.0.0.nupkg + cd ../../../ && dotnet new bit-bp --name TodoTemplate --database SqlServer --sample Todo - name: Update appsettings.json api server address uses: microsoft/variable-substitution@v1 diff --git a/src/Bit-CI.sln b/src/Bit-CI.sln index b6ff0cde17..8451e0f418 100644 --- a/src/Bit-CI.sln +++ b/src/Bit-CI.sln @@ -56,22 +56,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Butil.Demo", "Butil\Bit EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{62A4748E-3F6F-4F20-9FBC-9261F40C4BF1}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TodoTemplate", "TodoTemplate", "{C236F999-4F4A-4D87-A49D-8F5977185F7B}" - ProjectSection(SolutionItems) = preProject - Templates\TodoTemplate\Bit.TodoTemplate\.gitignore = Templates\TodoTemplate\Bit.TodoTemplate\.gitignore - Templates\TodoTemplate\Bit.TodoTemplate\Clean.bat = Templates\TodoTemplate\Bit.TodoTemplate\Clean.bat - Templates\TodoTemplate\Bit.TodoTemplate\src\Directory.Build.props = Templates\TodoTemplate\Bit.TodoTemplate\src\Directory.Build.props - Templates\TodoTemplate\Bit.TodoTemplate\global.json = Templates\TodoTemplate\Bit.TodoTemplate\global.json - Templates\TodoTemplate\Readme.md = Templates\TodoTemplate\Readme.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.TodoTemplate.ProjectTemplate", "Templates\TodoTemplate\Bit.TodoTemplate.ProjectTemplate.csproj", "{08340313-0DA3-432D-8629-2F864218F678}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".template.config", ".template.config", "{D33BA747-D6F7-4297-8881-845ED09B7D74}" - ProjectSection(SolutionItems) = preProject - Templates\TodoTemplate\Bit.TodoTemplate\.template.config\template.json = Templates\TodoTemplate\Bit.TodoTemplate\.template.config\template.json - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeAnalyzers", "CodeAnalyzers", "{FC89582F-DC03-428C-A908-E90B3BC9C82F}" ProjectSection(SolutionItems) = preProject CodeAnalyzers\README.md = CodeAnalyzers\README.md @@ -88,22 +72,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.SourceGenerators", "Sou EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.BlazorUI.SourceGenerators", "BlazorUI\Bit.BlazorUI.SourceGenerators\Bit.BlazorUI.SourceGenerators.csproj", "{EA97D8FA-4EC5-4651-B4E4-D908988D8D1A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AdminPanel", "AdminPanel", "{5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD}" - ProjectSection(SolutionItems) = preProject - Templates\AdminPanel\Bit.AdminPanel\.gitignore = Templates\AdminPanel\Bit.AdminPanel\.gitignore - Templates\AdminPanel\Bit.AdminPanel\Clean.bat = Templates\AdminPanel\Bit.AdminPanel\Clean.bat - Templates\AdminPanel\Bit.AdminPanel\src\Directory.Build.props = Templates\AdminPanel\Bit.AdminPanel\src\Directory.Build.props - Templates\AdminPanel\Bit.AdminPanel\global.json = Templates\AdminPanel\Bit.AdminPanel\global.json - Templates\AdminPanel\Readme.md = Templates\AdminPanel\Readme.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.AdminPanel.ProjectTemplate", "Templates\AdminPanel\Bit.AdminPanel.ProjectTemplate.csproj", "{86731B01-337F-44B8-954C-644D36BFDA96}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".template.config", ".template.config", "{0ED5A2BE-64E3-4334-B8D5-9F1E87946F9A}" - ProjectSection(SolutionItems) = preProject - Templates\AdminPanel\Bit.AdminPanel\.template.config\template.json = Templates\AdminPanel\Bit.AdminPanel\.template.config\template.json - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FullDemo", "FullDemo", "{E3B0C460-3030-4DD8-81E0-53D8A84D5074}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Bswup.Demo.Client", "Bswup\FullDemo\Client\Bit.Bswup.Demo.Client.csproj", "{FCCA9BAF-AEFE-46FD-A456-E6562AAE5EF0}" @@ -126,46 +94,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sales", "Sales", "{9FBD6994 Websites\Sales\README.md = Websites\Sales\README.md EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{963564E7-DC64-4234-8EB1-EEE86E7D566E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{E9150694-BE42-4B80-94B2-FE1B241AEB3A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infra", "Infra", "{8B6A4261-47C4-45ED-9E49-8BCA8314C94E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Iac", "Templates\TodoTemplate\Bit.TodoTemplate\src\Infra\Iac\TodoTemplate.Iac.csproj", "{AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Server.Api", "Templates\TodoTemplate\Bit.TodoTemplate\src\Server\Api\TodoTemplate.Server.Api.csproj", "{A4B9F81E-10C1-43C9-92AD-AA82E1502346}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Shared", "Templates\TodoTemplate\Bit.TodoTemplate\src\Shared\TodoTemplate.Shared.csproj", "{C70F2196-D177-4833-82DD-176D8969B7EA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infra", "Infra", "{BC83A78A-29B9-4F00-96E3-547EBEA190B7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{ABBE5F60-8648-4874-8EBF-33C90CB1FBBE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{4CF28309-F7DD-46E2-97A9-5799772183E0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Shared", "Templates\AdminPanel\Bit.AdminPanel\src\Shared\AdminPanel.Shared.csproj", "{B8A51AA3-C935-4F2D-9519-237135D92765}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Server.Api", "Templates\AdminPanel\Bit.AdminPanel\src\Server\Api\AdminPanel.Server.Api.csproj", "{429EE2EB-FB9C-4484-AF84-8E92D60D97A3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Iac", "Templates\AdminPanel\Bit.AdminPanel\src\Infra\Iac\AdminPanel.Iac.csproj", "{E2049840-C454-498C-A0E2-F61DCAA541F5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{6F3CC99A-0FA7-421D-88CA-DBC747FA83D6}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{D9AA88AE-DE5A-43A3-9A78-75ED5EDC96A3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.App", "Templates\AdminPanel\Bit.AdminPanel\src\Client\App\AdminPanel.Client.App.csproj", "{32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.Core", "Templates\AdminPanel\Bit.AdminPanel\src\Client\Core\AdminPanel.Client.Core.csproj", "{55D18DF6-FC23-42C5-88CC-877AA102DC46}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.Web", "Templates\AdminPanel\Bit.AdminPanel\src\Client\Web\AdminPanel.Client.Web.csproj", "{C743096A-4363-4012-BAF8-B4E0818BFE91}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.App", "Templates\TodoTemplate\Bit.TodoTemplate\src\Client\App\TodoTemplate.Client.App.csproj", "{A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.Core", "Templates\TodoTemplate\Bit.TodoTemplate\src\Client\Core\TodoTemplate.Client.Core.csproj", "{BE702374-1B36-4E69-AE78-4301EDE9C3BF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.Web", "Templates\TodoTemplate\Bit.TodoTemplate\src\Client\Web\TodoTemplate.Client.Web.csproj", "{DEE6D281-B6E5-4F56-8451-389A4DFC146D}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bup", "Bup", "{96D8F7DE-8998-4196-AD73-B49DED4C8A38}" ProjectSection(SolutionItems) = preProject Bup\README.md = Bup\README.md @@ -181,38 +109,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Bup.Demo.Client", "Bup\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Bup.Demo.Server", "Bup\FullDemo\Server\Bit.Bup.Demo.Server.csproj", "{FEB36A70-3C51-4C7F-949C-B8B938839740}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-devops", ".azure-devops", "{20E7F2AC-9272-4DCD-99D9-6AF68B1516B5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7679D839-86EE-4556-B018-4BE184214B0A}" - ProjectSection(SolutionItems) = preProject - Templates\TodoTemplate\Bit.TodoTemplate\.azure-devops\workflows\cd.yml = Templates\TodoTemplate\Bit.TodoTemplate\.azure-devops\workflows\cd.yml - Templates\TodoTemplate\Bit.TodoTemplate\.azure-devops\workflows\ci.yml = Templates\TodoTemplate\Bit.TodoTemplate\.azure-devops\workflows\ci.yml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1B8E88F9-0492-4A96-B6CB-F090056166A0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{C21F4DF0-F40E-4E23-BB73-51843E404BE8}" - ProjectSection(SolutionItems) = preProject - Templates\TodoTemplate\Bit.TodoTemplate\.github\workflows\cd.yml = Templates\TodoTemplate\Bit.TodoTemplate\.github\workflows\cd.yml - Templates\TodoTemplate\Bit.TodoTemplate\.github\workflows\ci.yml = Templates\TodoTemplate\Bit.TodoTemplate\.github\workflows\ci.yml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-devops", ".azure-devops", "{F3EE0FBE-462B-4052-9EA3-E5E56A5B8A09}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{6659A6C4-1EB0-4FA0-B3B3-B791E566B65F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3FF48A63-4B71-47AB-A340-23C8B2BF8C47}" - ProjectSection(SolutionItems) = preProject - Templates\AdminPanel\Bit.AdminPanel\.azure-devops\workflows\cd.yml = Templates\AdminPanel\Bit.AdminPanel\.azure-devops\workflows\cd.yml - Templates\AdminPanel\Bit.AdminPanel\.azure-devops\workflows\ci.yml = Templates\AdminPanel\Bit.AdminPanel\.azure-devops\workflows\ci.yml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{23534FF2-DF1D-4A79-9C51-0C91E1918D56}" - ProjectSection(SolutionItems) = preProject - Templates\AdminPanel\Bit.AdminPanel\.github\workflows\cd.yml = Templates\AdminPanel\Bit.AdminPanel\.github\workflows\cd.yml - Templates\AdminPanel\Bit.AdminPanel\.github\workflows\ci.yml = Templates\AdminPanel\Bit.AdminPanel\.github\workflows\ci.yml - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BlazorDual", "BlazorDual", "{C6624DE1-7886-444E-BB96-380B807593BD}" ProjectSection(SolutionItems) = preProject Templates\BlazorDual\Bit.BlazorDual\.gitignore = Templates\BlazorDual\Bit.BlazorDual\.gitignore @@ -337,6 +233,49 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Server", "Templat EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Shared", "Templates\BlazorWeb\Bit.BlazorWeb\src\BlazorWeb.Shared\BlazorWeb.Shared.csproj", "{41016CF0-FBEA-4054-B992-9B893F6BC912}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boilerplate", "Boilerplate", "{B07A45DA-F7B7-4AF0-BE64-54DAE906FC01}" + ProjectSection(SolutionItems) = preProject + Templates\Boilerplate\Bit.Boilerplate\.gitignore = Templates\Boilerplate\Bit.Boilerplate\.gitignore + Templates\Boilerplate\Bit.Boilerplate\Clean.bat = Templates\Boilerplate\Bit.Boilerplate\Clean.bat + Templates\Boilerplate\Bit.Boilerplate\src\Directory.Build.props = Templates\Boilerplate\Bit.Boilerplate\src\Directory.Build.props + Templates\Boilerplate\Bit.Boilerplate\global.json = Templates\Boilerplate\Bit.Boilerplate\global.json + Templates\Boilerplate\Readme.md = Templates\Boilerplate\Readme.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-devops", ".azure-devops", "{D08A374C-FB7C-4C29-86B8-3C16344BCBD2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{396B8F1F-47C5-45B6-ACE8-D17A82053873}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{2F2A2956-A58E-438F-8846-9EA37D5E1BD9}" + ProjectSection(SolutionItems) = preProject + Templates\Boilerplate\Bit.Boilerplate\.azure-devops\workflows\cd.yml = Templates\Boilerplate\Bit.Boilerplate\.azure-devops\workflows\cd.yml + Templates\Boilerplate\Bit.Boilerplate\.azure-devops\workflows\ci.yml = Templates\Boilerplate\Bit.Boilerplate\.azure-devops\workflows\ci.yml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{F96FD99F-E0C5-40C9-B4B9-C4AF03DCFAF7}" + ProjectSection(SolutionItems) = preProject + Templates\Boilerplate\Bit.Boilerplate\.github\workflows\cd.yml = Templates\Boilerplate\Bit.Boilerplate\.github\workflows\cd.yml + Templates\Boilerplate\Bit.Boilerplate\.github\workflows\ci.yml = Templates\Boilerplate\Bit.Boilerplate\.github\workflows\ci.yml + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bit.Boilerplate.ProjectTemplate", "Templates\Boilerplate\Bit.Boilerplate.ProjectTemplate.csproj", "{52345787-7B00-41AA-A366-88392073C4DD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{AFAE52A7-7355-49B8-85B2-28B32C98CFDA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{EEAF80AE-EC5F-4E55-BD4D-CE7075D67C90}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{0E616D48-8E65-40BA-9582-BC49C8882A13}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Shared", "Templates\Boilerplate\Bit.Boilerplate\src\Shared\Boilerplate.Shared.csproj", "{91D0FEF4-872C-4DEF-AC93-E7D088B1A145}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.App", "Templates\Boilerplate\Bit.Boilerplate\src\Client\App\Boilerplate.Client.App.csproj", "{CA4A30E2-F844-4026-9CC2-6839FD28BF44}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.Core", "Templates\Boilerplate\Bit.Boilerplate\src\Client\Core\Boilerplate.Client.Core.csproj", "{EA92A298-A595-4405-BB55-B0844237DFFF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.Web", "Templates\Boilerplate\Bit.Boilerplate\src\Client\Web\Boilerplate.Client.Web.csproj", "{0749CBB8-8694-470C-B5F3-7428963A2F7D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Server.Api", "Templates\Boilerplate\Bit.Boilerplate\src\Server\Api\Boilerplate.Server.Api.csproj", "{8654B9AF-3598-49E6-A8FE-159F8F537733}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -471,26 +410,6 @@ Global {D85688C3-39DF-4EE9-976C-619A11FEC04E}.Release|x64.Build.0 = Release|Any CPU {D85688C3-39DF-4EE9-976C-619A11FEC04E}.Release|x86.ActiveCfg = Release|Any CPU {D85688C3-39DF-4EE9-976C-619A11FEC04E}.Release|x86.Build.0 = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|Any CPU.Build.0 = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|iPhone.Build.0 = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|x64.ActiveCfg = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|x64.Build.0 = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|x86.ActiveCfg = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Debug|x86.Build.0 = Debug|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|Any CPU.ActiveCfg = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|Any CPU.Build.0 = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|iPhone.ActiveCfg = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|iPhone.Build.0 = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|x64.ActiveCfg = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|x64.Build.0 = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|x86.ActiveCfg = Release|Any CPU - {08340313-0DA3-432D-8629-2F864218F678}.Release|x86.Build.0 = Release|Any CPU {5E0C22D5-4FBB-4F11-88A1-FEB25DA58D34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5E0C22D5-4FBB-4F11-88A1-FEB25DA58D34}.Debug|Any CPU.Build.0 = Debug|Any CPU {5E0C22D5-4FBB-4F11-88A1-FEB25DA58D34}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -551,26 +470,6 @@ Global {EA97D8FA-4EC5-4651-B4E4-D908988D8D1A}.Release|x64.Build.0 = Release|Any CPU {EA97D8FA-4EC5-4651-B4E4-D908988D8D1A}.Release|x86.ActiveCfg = Release|Any CPU {EA97D8FA-4EC5-4651-B4E4-D908988D8D1A}.Release|x86.Build.0 = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|Any CPU.Build.0 = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|iPhone.Build.0 = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|x64.ActiveCfg = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|x64.Build.0 = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|x86.ActiveCfg = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Debug|x86.Build.0 = Debug|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|Any CPU.ActiveCfg = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|Any CPU.Build.0 = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|iPhone.ActiveCfg = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|iPhone.Build.0 = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|x64.ActiveCfg = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|x64.Build.0 = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|x86.ActiveCfg = Release|Any CPU - {86731B01-337F-44B8-954C-644D36BFDA96}.Release|x86.Build.0 = Release|Any CPU {FCCA9BAF-AEFE-46FD-A456-E6562AAE5EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FCCA9BAF-AEFE-46FD-A456-E6562AAE5EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU {FCCA9BAF-AEFE-46FD-A456-E6562AAE5EF0}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -611,266 +510,6 @@ Global {1FF08EFF-5E81-404F-8679-8C54047F6835}.Release|x64.Build.0 = Release|Any CPU {1FF08EFF-5E81-404F-8679-8C54047F6835}.Release|x86.ActiveCfg = Release|Any CPU {1FF08EFF-5E81-404F-8679-8C54047F6835}.Release|x86.Build.0 = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|iPhone.Build.0 = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|x64.Build.0 = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Debug|x86.Build.0 = Debug|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|Any CPU.Build.0 = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|iPhone.ActiveCfg = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|iPhone.Build.0 = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|x64.ActiveCfg = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|x64.Build.0 = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|x86.ActiveCfg = Release|Any CPU - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262}.Release|x86.Build.0 = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|iPhone.Build.0 = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|x64.ActiveCfg = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|x64.Build.0 = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|x86.ActiveCfg = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Debug|x86.Build.0 = Debug|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|Any CPU.Build.0 = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|iPhone.ActiveCfg = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|iPhone.Build.0 = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|x64.ActiveCfg = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|x64.Build.0 = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|x86.ActiveCfg = Release|Any CPU - {A4B9F81E-10C1-43C9-92AD-AA82E1502346}.Release|x86.Build.0 = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|iPhone.Build.0 = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|x64.ActiveCfg = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|x64.Build.0 = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|x86.ActiveCfg = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Debug|x86.Build.0 = Debug|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|Any CPU.Build.0 = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|iPhone.ActiveCfg = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|iPhone.Build.0 = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|x64.ActiveCfg = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|x64.Build.0 = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|x86.ActiveCfg = Release|Any CPU - {C70F2196-D177-4833-82DD-176D8969B7EA}.Release|x86.Build.0 = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|iPhone.Build.0 = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|x64.ActiveCfg = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|x64.Build.0 = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|x86.ActiveCfg = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Debug|x86.Build.0 = Debug|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|Any CPU.Build.0 = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|iPhone.ActiveCfg = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|iPhone.Build.0 = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|x64.ActiveCfg = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|x64.Build.0 = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|x86.ActiveCfg = Release|Any CPU - {B8A51AA3-C935-4F2D-9519-237135D92765}.Release|x86.Build.0 = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|iPhone.Build.0 = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|x64.ActiveCfg = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|x64.Build.0 = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Debug|x86.Build.0 = Debug|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|Any CPU.Build.0 = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|iPhone.ActiveCfg = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|iPhone.Build.0 = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|x64.ActiveCfg = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|x64.Build.0 = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|x86.ActiveCfg = Release|Any CPU - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3}.Release|x86.Build.0 = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|iPhone.Build.0 = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|x64.ActiveCfg = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|x64.Build.0 = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|x86.ActiveCfg = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Debug|x86.Build.0 = Debug|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|Any CPU.Build.0 = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|iPhone.ActiveCfg = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|iPhone.Build.0 = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|x64.ActiveCfg = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|x64.Build.0 = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|x86.ActiveCfg = Release|Any CPU - {E2049840-C454-498C-A0E2-F61DCAA541F5}.Release|x86.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhone.Build.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhone.Deploy.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x64.ActiveCfg = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x64.Build.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x64.Deploy.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x86.ActiveCfg = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x86.Build.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Debug|x86.Deploy.0 = Debug|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|Any CPU.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|Any CPU.Deploy.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhone.ActiveCfg = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhone.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhone.Deploy.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x64.ActiveCfg = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x64.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x64.Deploy.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x86.ActiveCfg = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x86.Build.0 = Release|Any CPU - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3}.Release|x86.Deploy.0 = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|iPhone.Build.0 = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|x64.ActiveCfg = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|x64.Build.0 = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|x86.ActiveCfg = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Debug|x86.Build.0 = Debug|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|Any CPU.Build.0 = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|iPhone.ActiveCfg = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|iPhone.Build.0 = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|x64.ActiveCfg = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|x64.Build.0 = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|x86.ActiveCfg = Release|Any CPU - {55D18DF6-FC23-42C5-88CC-877AA102DC46}.Release|x86.Build.0 = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|iPhone.Build.0 = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|x64.ActiveCfg = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|x64.Build.0 = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|x86.ActiveCfg = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Debug|x86.Build.0 = Debug|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|Any CPU.Build.0 = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|iPhone.ActiveCfg = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|iPhone.Build.0 = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|x64.ActiveCfg = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|x64.Build.0 = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|x86.ActiveCfg = Release|Any CPU - {C743096A-4363-4012-BAF8-B4E0818BFE91}.Release|x86.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhone.Build.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhone.Deploy.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x64.ActiveCfg = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x64.Build.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x64.Deploy.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x86.ActiveCfg = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x86.Build.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Debug|x86.Deploy.0 = Debug|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|Any CPU.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|Any CPU.Deploy.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhone.ActiveCfg = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhone.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhone.Deploy.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x64.ActiveCfg = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x64.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x64.Deploy.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x86.ActiveCfg = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x86.Build.0 = Release|Any CPU - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46}.Release|x86.Deploy.0 = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|iPhone.Build.0 = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|x64.ActiveCfg = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|x64.Build.0 = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|x86.ActiveCfg = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Debug|x86.Build.0 = Debug|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|Any CPU.Build.0 = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|iPhone.ActiveCfg = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|iPhone.Build.0 = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|x64.ActiveCfg = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|x64.Build.0 = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|x86.ActiveCfg = Release|Any CPU - {BE702374-1B36-4E69-AE78-4301EDE9C3BF}.Release|x86.Build.0 = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|iPhone.Build.0 = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|x64.ActiveCfg = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|x64.Build.0 = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|x86.ActiveCfg = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Debug|x86.Build.0 = Debug|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|Any CPU.Build.0 = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|iPhone.ActiveCfg = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|iPhone.Build.0 = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|x64.ActiveCfg = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|x64.Build.0 = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|x86.ActiveCfg = Release|Any CPU - {DEE6D281-B6E5-4F56-8451-389A4DFC146D}.Release|x86.Build.0 = Release|Any CPU {E3A91674-E770-4D8A-B977-F87ECCCA01BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E3A91674-E770-4D8A-B977-F87ECCCA01BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {E3A91674-E770-4D8A-B977-F87ECCCA01BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU @@ -1461,6 +1100,136 @@ Global {41016CF0-FBEA-4054-B992-9B893F6BC912}.Release|x64.Build.0 = Release|Any CPU {41016CF0-FBEA-4054-B992-9B893F6BC912}.Release|x86.ActiveCfg = Release|Any CPU {41016CF0-FBEA-4054-B992-9B893F6BC912}.Release|x86.Build.0 = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|iPhone.Build.0 = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|x64.ActiveCfg = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|x64.Build.0 = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|x86.ActiveCfg = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Debug|x86.Build.0 = Debug|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|Any CPU.Build.0 = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|iPhone.ActiveCfg = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|iPhone.Build.0 = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|x64.ActiveCfg = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|x64.Build.0 = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|x86.ActiveCfg = Release|Any CPU + {52345787-7B00-41AA-A366-88392073C4DD}.Release|x86.Build.0 = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|iPhone.Build.0 = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|x64.ActiveCfg = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|x64.Build.0 = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|x86.ActiveCfg = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Debug|x86.Build.0 = Debug|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|Any CPU.Build.0 = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|iPhone.ActiveCfg = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|iPhone.Build.0 = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|x64.ActiveCfg = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|x64.Build.0 = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|x86.ActiveCfg = Release|Any CPU + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145}.Release|x86.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhone.Build.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhone.Deploy.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x64.Build.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x64.Deploy.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x86.ActiveCfg = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x86.Build.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Debug|x86.Deploy.0 = Debug|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|Any CPU.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|Any CPU.Deploy.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhone.ActiveCfg = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhone.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhone.Deploy.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x64.ActiveCfg = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x64.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x64.Deploy.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x86.ActiveCfg = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x86.Build.0 = Release|Any CPU + {CA4A30E2-F844-4026-9CC2-6839FD28BF44}.Release|x86.Deploy.0 = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|iPhone.Build.0 = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|x64.Build.0 = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Debug|x86.Build.0 = Debug|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|Any CPU.Build.0 = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|iPhone.ActiveCfg = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|iPhone.Build.0 = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|x64.ActiveCfg = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|x64.Build.0 = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|x86.ActiveCfg = Release|Any CPU + {EA92A298-A595-4405-BB55-B0844237DFFF}.Release|x86.Build.0 = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|iPhone.Build.0 = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|x64.ActiveCfg = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|x64.Build.0 = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|x86.ActiveCfg = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Debug|x86.Build.0 = Debug|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|Any CPU.Build.0 = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|iPhone.ActiveCfg = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|iPhone.Build.0 = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|x64.ActiveCfg = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|x64.Build.0 = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|x86.ActiveCfg = Release|Any CPU + {0749CBB8-8694-470C-B5F3-7428963A2F7D}.Release|x86.Build.0 = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|iPhone.Build.0 = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|x64.ActiveCfg = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|x64.Build.0 = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|x86.ActiveCfg = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Debug|x86.Build.0 = Debug|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|Any CPU.Build.0 = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|iPhone.ActiveCfg = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|iPhone.Build.0 = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|x64.ActiveCfg = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|x64.Build.0 = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|x86.ActiveCfg = Release|Any CPU + {8654B9AF-3598-49E6-A8FE-159F8F537733}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1473,53 +1242,19 @@ Global {B49D51B5-E173-4BBF-B645-6B876EB3A23F} = {C6EBC527-A489-44B4-A951-D023107A577F} {7BBE3699-B6CB-43CB-A848-435867F22664} = {75C951F0-BAF7-4E46-96DD-1A334B6B1471} {D85688C3-39DF-4EE9-976C-619A11FEC04E} = {75C951F0-BAF7-4E46-96DD-1A334B6B1471} - {C236F999-4F4A-4D87-A49D-8F5977185F7B} = {62A4748E-3F6F-4F20-9FBC-9261F40C4BF1} - {08340313-0DA3-432D-8629-2F864218F678} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {D33BA747-D6F7-4297-8881-845ED09B7D74} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} {5E0C22D5-4FBB-4F11-88A1-FEB25DA58D34} = {FC89582F-DC03-428C-A908-E90B3BC9C82F} {39B71654-3A8C-4177-A907-7187E855BB41} = {DEF2CF85-58F2-48C7-9A33-9B041314A4CB} {EA97D8FA-4EC5-4651-B4E4-D908988D8D1A} = {DC165533-038F-4D71-9BA1-44CF254E116F} - {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} = {62A4748E-3F6F-4F20-9FBC-9261F40C4BF1} - {86731B01-337F-44B8-954C-644D36BFDA96} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {0ED5A2BE-64E3-4334-B8D5-9F1E87946F9A} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} {E3B0C460-3030-4DD8-81E0-53D8A84D5074} = {C6EBC527-A489-44B4-A951-D023107A577F} {FCCA9BAF-AEFE-46FD-A456-E6562AAE5EF0} = {E3B0C460-3030-4DD8-81E0-53D8A84D5074} {1FF08EFF-5E81-404F-8679-8C54047F6835} = {E3B0C460-3030-4DD8-81E0-53D8A84D5074} {0691024C-D19B-41C0-AA76-7CBC1A875831} = {293480D2-1505-4C9F-B2B9-D78CA5573866} {9FBD6994-1614-454B-9F04-D5F282405E9E} = {293480D2-1505-4C9F-B2B9-D78CA5573866} - {963564E7-DC64-4234-8EB1-EEE86E7D566E} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {E9150694-BE42-4B80-94B2-FE1B241AEB3A} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {8B6A4261-47C4-45ED-9E49-8BCA8314C94E} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {AC72FB13-3D92-4CBC-8DA8-0CADA79B2262} = {8B6A4261-47C4-45ED-9E49-8BCA8314C94E} - {A4B9F81E-10C1-43C9-92AD-AA82E1502346} = {963564E7-DC64-4234-8EB1-EEE86E7D566E} - {C70F2196-D177-4833-82DD-176D8969B7EA} = {E9150694-BE42-4B80-94B2-FE1B241AEB3A} - {BC83A78A-29B9-4F00-96E3-547EBEA190B7} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {ABBE5F60-8648-4874-8EBF-33C90CB1FBBE} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {4CF28309-F7DD-46E2-97A9-5799772183E0} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {B8A51AA3-C935-4F2D-9519-237135D92765} = {4CF28309-F7DD-46E2-97A9-5799772183E0} - {429EE2EB-FB9C-4484-AF84-8E92D60D97A3} = {ABBE5F60-8648-4874-8EBF-33C90CB1FBBE} - {E2049840-C454-498C-A0E2-F61DCAA541F5} = {BC83A78A-29B9-4F00-96E3-547EBEA190B7} - {6F3CC99A-0FA7-421D-88CA-DBC747FA83D6} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {D9AA88AE-DE5A-43A3-9A78-75ED5EDC96A3} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {32C5FA58-8BB9-4F05-9444-CBDB608DC2B3} = {6F3CC99A-0FA7-421D-88CA-DBC747FA83D6} - {55D18DF6-FC23-42C5-88CC-877AA102DC46} = {6F3CC99A-0FA7-421D-88CA-DBC747FA83D6} - {C743096A-4363-4012-BAF8-B4E0818BFE91} = {6F3CC99A-0FA7-421D-88CA-DBC747FA83D6} - {A82F6E9B-0F55-42DD-80E3-C13C89AA9A46} = {D9AA88AE-DE5A-43A3-9A78-75ED5EDC96A3} - {BE702374-1B36-4E69-AE78-4301EDE9C3BF} = {D9AA88AE-DE5A-43A3-9A78-75ED5EDC96A3} - {DEE6D281-B6E5-4F56-8451-389A4DFC146D} = {D9AA88AE-DE5A-43A3-9A78-75ED5EDC96A3} {E3A91674-E770-4D8A-B977-F87ECCCA01BB} = {96D8F7DE-8998-4196-AD73-B49DED4C8A38} {AA0B6FD3-B676-4D7D-B78C-58050696DD73} = {96D8F7DE-8998-4196-AD73-B49DED4C8A38} {E3BD128F-554E-4875-85B8-9AC489AE49A6} = {96D8F7DE-8998-4196-AD73-B49DED4C8A38} {F0C6EF30-3D4F-4407-A605-974E5B42246E} = {E3BD128F-554E-4875-85B8-9AC489AE49A6} {FEB36A70-3C51-4C7F-949C-B8B938839740} = {E3BD128F-554E-4875-85B8-9AC489AE49A6} - {20E7F2AC-9272-4DCD-99D9-6AF68B1516B5} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {7679D839-86EE-4556-B018-4BE184214B0A} = {20E7F2AC-9272-4DCD-99D9-6AF68B1516B5} - {1B8E88F9-0492-4A96-B6CB-F090056166A0} = {C236F999-4F4A-4D87-A49D-8F5977185F7B} - {C21F4DF0-F40E-4E23-BB73-51843E404BE8} = {1B8E88F9-0492-4A96-B6CB-F090056166A0} - {F3EE0FBE-462B-4052-9EA3-E5E56A5B8A09} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {6659A6C4-1EB0-4FA0-B3B3-B791E566B65F} = {5CDE0A2E-FB17-47F0-AEDC-A74A6C10B1BD} - {3FF48A63-4B71-47AB-A340-23C8B2BF8C47} = {F3EE0FBE-462B-4052-9EA3-E5E56A5B8A09} - {23534FF2-DF1D-4A79-9C51-0C91E1918D56} = {6659A6C4-1EB0-4FA0-B3B3-B791E566B65F} {C6624DE1-7886-444E-BB96-380B807593BD} = {62A4748E-3F6F-4F20-9FBC-9261F40C4BF1} {54611242-B9F6-44F9-A541-B48600CAD28A} = {C6624DE1-7886-444E-BB96-380B807593BD} {89FD519C-8C08-41FB-979E-EDF6EB43F97F} = {C6624DE1-7886-444E-BB96-380B807593BD} @@ -1561,6 +1296,20 @@ Global {27B44C39-A85B-4B4C-84D4-01B3B5D9532C} = {0C76F4C8-8FB3-42A0-B06F-0F94828AC7F3} {6784B849-0F4E-42D2-AE0B-7E92C603152F} = {0C76F4C8-8FB3-42A0-B06F-0F94828AC7F3} {41016CF0-FBEA-4054-B992-9B893F6BC912} = {0C76F4C8-8FB3-42A0-B06F-0F94828AC7F3} + {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} = {62A4748E-3F6F-4F20-9FBC-9261F40C4BF1} + {D08A374C-FB7C-4C29-86B8-3C16344BCBD2} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {396B8F1F-47C5-45B6-ACE8-D17A82053873} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {2F2A2956-A58E-438F-8846-9EA37D5E1BD9} = {396B8F1F-47C5-45B6-ACE8-D17A82053873} + {F96FD99F-E0C5-40C9-B4B9-C4AF03DCFAF7} = {D08A374C-FB7C-4C29-86B8-3C16344BCBD2} + {52345787-7B00-41AA-A366-88392073C4DD} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {AFAE52A7-7355-49B8-85B2-28B32C98CFDA} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {EEAF80AE-EC5F-4E55-BD4D-CE7075D67C90} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {0E616D48-8E65-40BA-9582-BC49C8882A13} = {B07A45DA-F7B7-4AF0-BE64-54DAE906FC01} + {91D0FEF4-872C-4DEF-AC93-E7D088B1A145} = {0E616D48-8E65-40BA-9582-BC49C8882A13} + {CA4A30E2-F844-4026-9CC2-6839FD28BF44} = {EEAF80AE-EC5F-4E55-BD4D-CE7075D67C90} + {EA92A298-A595-4405-BB55-B0844237DFFF} = {EEAF80AE-EC5F-4E55-BD4D-CE7075D67C90} + {0749CBB8-8694-470C-B5F3-7428963A2F7D} = {EEAF80AE-EC5F-4E55-BD4D-CE7075D67C90} + {8654B9AF-3598-49E6-A8FE-159F8F537733} = {AFAE52A7-7355-49B8-85B2-28B32C98CFDA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DA107107-478F-477A-872B-787CEA7DD9B8} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.vscode/launch.json b/src/Templates/AdminPanel/Bit.AdminPanel/.vscode/launch.json deleted file mode 100644 index e8e4a9cdd5..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.vscode/launch.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "0.2.0", - "compounds": [ - { - "name": "Watch Api and Web", - "configurations": [ - "Watch Api", - "Watch Web" - ] - } - ], - "configurations": [ - { - "name": "Watch Api", - "type": "coreclr", - "request": "launch", - "cwd": "${workspaceFolder}/src/Server/Api", - "program": "dotnet", - "args": [ - "watch", - "--project", - ".", - "verbose" - ], - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - { - "name": "Watch Web", - "type": "coreclr", - "request": "launch", - "cwd": "${workspaceFolder}/src/Client/Web", - "program": "dotnet", - "args": [ - "watch", - "--project", - ".", - "verbose" - ], - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - ] -} \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Android/Resources/values/colors.xml b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Android/Resources/values/colors.xml deleted file mode 100644 index dd323b4d3e..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Android/Resources/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #002A66 - #002A66 - #002A66 - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs deleted file mode 100644 index bb1ff02801..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace AdminPanel.Client.App.Platforms.MacCatalyst; - -[Register(nameof(AppDelegate))] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Tizen/tizen-manifest.xml b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Tizen/tizen-manifest.xml deleted file mode 100644 index 4cade1aecd..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Tizen/tizen-manifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - appicon.xhigh.png - - - - - http://tizen.org/privilege/internet - - - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/AppIcon/appicon.svg b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/AppIcon/appicon.svg deleted file mode 100644 index a35156325b..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/AppIcon/appicon.svg +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/Splash/splash.svg b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/Splash/splash.svg deleted file mode 100644 index 42eb84e23b..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/Splash/splash.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj deleted file mode 100644 index 6ec0864527..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/AdminPanel.Client.Core.csproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - net8.0 - true - enable - enable - - BeforeBuildTasks; - $(ResolveStaticWebAssetsInputsDependsOn) - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - $([System.String]::Copy('%(Filename)').Replace('.Designer','')).resx - - - PublicResXFileCodeGenerator - %(Filename).Designer.cs - - - - - - - - - - - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/App.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/App.razor deleted file mode 100644 index ae06ef56ae..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/App.razor +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IServiceCollectionExtensions.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 7ba4027118..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -//-:cnd:noEmit - -using AdminPanel.Client.Core.Services.HttpMessageHandlers; - -namespace Microsoft.Extensions.DependencyInjection; - -public static class IServiceCollectionExtensions -{ - public static IServiceCollection AddClientSharedServices(this IServiceCollection services) - { - // Services registered in this class can be injected in client side (Web, Android, iOS, Windows, and macOS) - - services.AddCascadingAuthenticationState(); - services.AddScoped(); - services.AddScoped(); - services.AddBitBlazorUIServices(); - - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(sp => (AppAuthenticationStateProvider)sp.GetRequiredService()); - - services.AddScoped(); - - return services; - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/JsRuntimeExtension.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/JsRuntimeExtension.cs deleted file mode 100644 index 7c8acd4e15..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/JsRuntimeExtension.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Microsoft.JSInterop; - -public static class JsRuntimeExtension -{ - /// - /// To disable the scrollbar of the body when showing the modal, so the modal can be always shown in the viewport without being scrolled out. - /// - public static async Task SetBodyOverflow(this IJSRuntime jsRuntime, bool hidden) - { - await jsRuntime.InvokeVoidAsync("App.setBodyOverflow", hidden); - } - - public static async Task GoBack(this IJSRuntime jsRuntime) - { - await jsRuntime.InvokeVoidAsync("App.goBack"); - } - - public static async Task ApplyBodyElementClasses(this IJSRuntime jsRuntime, List cssClasses, Dictionary cssVariables) - { - await jsRuntime.InvokeVoidAsync("App.applyBodyElementClasses", cssClasses, cssVariables); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor.cs deleted file mode 100644 index 8a5b6dc646..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace AdminPanel.Client.Core.Pages.Home; - -[Authorize] -public partial class HomePage -{ -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor deleted file mode 100644 index c45eaf682c..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor +++ /dev/null @@ -1,15 +0,0 @@ -@inherits AppComponentBase - - -
-
- @Localizer[nameof(AppStrings.DeleteAccount)] - -
-
@Localizer[nameof(AppStrings.DeleteAccountPrompt)]
-
- @Localizer[nameof(AppStrings.Yes)] - @Localizer[nameof(AppStrings.No)] -
-
-
\ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs deleted file mode 100644 index 249b503e2e..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace AdminPanel.Client.Core.Pages.Identity; - -public partial class DeleteAccountConfirmModal -{ - private bool isOpen; - - [Parameter] - public bool IsOpen - { - get => isOpen; - set - { - if (value == isOpen) return; - - isOpen = value; - - _ = IsOpenChanged.InvokeAsync(value); - } - } - - [Parameter] public EventCallback IsOpenChanged { get; set; } - - private async Task CloseModal() - { - IsOpen = false; - - await JsRuntime.SetBodyOverflow(false); - } - - private async Task DeleteAccount() - { - await HttpClient.DeleteAsync("User/Delete"); - - await AuthenticationService.SignOut(); - - await CloseModal(); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor deleted file mode 100644 index f2d6e17c25..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor +++ /dev/null @@ -1,120 +0,0 @@ -@page "/edit-profile" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.EditProfileTitle)] - -
- @if (string.IsNullOrEmpty(_editProfileMessage) is false) - { - @_editProfileMessage - } - - - - @if (_isLoadingData) - { -
- -
- } - else - { -
- -
- -
- @if (_user.ProfileImageName is not null) - { - - @Localizer[nameof(AppStrings.Remove)] - - } - - @Localizer[nameof(AppStrings.ProfileImage)] - -
@_profileImageError
-
- - - - -
- - -
- -
- - -
- -
- - - - - - -
- - - @Localizer[nameof(AppStrings.Save)] - -
- } - -
-
-
-
-
- - - @Localizer[nameof(AppStrings.DeleteAccount)] - -
- - @Localizer[nameof(AppStrings.DeleteAccountPrompt)] - -
- - @Localizer[nameof(AppStrings.DeleteAccount)] - -
-
- - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs deleted file mode 100644 index 8d0d8ad3ed..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs +++ /dev/null @@ -1,124 +0,0 @@ -//-:cnd:noEmit -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Client.Core.Pages.Identity; - -[Authorize] -public partial class EditProfilePage -{ - private bool _isLoading; - private bool _isRemoving; - private bool _isLoadingData; - private string? _profileImageUrl; - private string? _profileImageError; - private string? _editProfileMessage; - private string? _profileImageUploadUrl; - private string? _profileImageRemoveUrl; - private BitMessageBarType _editProfileMessageType; - private UserDto _user = new(); - private readonly EditUserDto _userToEdit = new(); - private bool _isDeleteAccountConfirmModalOpen; - - protected override async Task OnInitAsync() - { - _isLoadingData = true; - - try - { - await LoadEditProfileData(); - - var access_token = await PrerenderStateService.GetValue($"{nameof(EditProfilePage)}-access_token", AuthTokenProvider.GetAccessTokenAsync); - - _profileImageUploadUrl = $"{Configuration.GetApiServerAddress()}Attachment/UploadProfileImage?access_token={access_token}"; - _profileImageUrl = $"{Configuration.GetApiServerAddress()}Attachment/GetProfileImage?access_token={access_token}"; - _profileImageRemoveUrl = $"Attachment/RemoveProfileImage?access_token={access_token}"; - } - finally - { - _isLoadingData = false; - } - } - - private async Task LoadEditProfileData() - { - _user = await PrerenderStateService.GetValue($"{nameof(EditProfilePage)}-{nameof(_user)}", GetCurrentUser) ?? new(); - - UpdateEditProfileData(); - } - - private async Task RefreshProfileData() - { - _user = await GetCurrentUser() ?? new(); - - UpdateEditProfileData(); - - PubSubService.Publish(PubSubMessages.PROFILE_UPDATED, _user); - } - - private void UpdateEditProfileData() - { - _userToEdit.FullName = _user.FullName; - _userToEdit.BirthDate = _user.BirthDate; - _userToEdit.Gender = _user.Gender; - } - - private Task GetCurrentUser() => HttpClient.GetFromJsonAsync("User/GetCurrentUser", AppJsonContext.Default.UserDto); - - private async Task GoBack() => await JsRuntime.GoBack(); - - private async Task DoSave() - { - if (_isLoading) return; - - _isLoading = true; - _editProfileMessage = null; - - try - { - _user.FullName = _userToEdit.FullName; - _user.BirthDate = _userToEdit.BirthDate; - _user.Gender = _userToEdit.Gender; - - (await (await HttpClient.PutAsJsonAsync("User/Update", _userToEdit, AppJsonContext.Default.EditUserDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.UserDto))!.Patch(_user); - - PubSubService.Publish(PubSubMessages.PROFILE_UPDATED, _user); - - _editProfileMessageType = BitMessageBarType.Success; - - _editProfileMessage = Localizer[nameof(AppStrings.ProfileUpdatedSuccessfullyMessage)]; - } - catch (KnownException e) - { - _editProfileMessage = e.Message; - _editProfileMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } - - private async Task RemoveProfileImage() - { - if (_isRemoving) return; - - _isRemoving = true; - - try - { - await HttpClient.DeleteAsync(_profileImageRemoveUrl); - - await RefreshProfileData(); - } - catch (KnownException e) - { - _editProfileMessage = e.Message; - _editProfileMessageType = BitMessageBarType.Error; - } - finally - { - _isRemoving = false; - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor deleted file mode 100644 index 78203d9a4b..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor +++ /dev/null @@ -1,52 +0,0 @@ -@page "/email-confirmation" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.EmailConfirmationTitle)] - -
-
-
-
-

@Localizer[nameof(AppStrings.StartupPageTitle)]

-
@Localizer[nameof(AppStrings.StartupPageDescription)]
-
-
-
-
- @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) - { - @_emailConfirmationMessage - } - - @if (EmailConfirmed) - { -

- @Localizer[nameof(AppStrings.EmailConfirmedSuccessfullyMessage)] -

- - @Localizer[nameof(AppStrings.SignIn)] - - } - else - { -

- @Localizer[nameof(AppStrings.EmailConfirmationFailedMessage)] -

-
- @Localizer[nameof(AppStrings.InvalidConfirmationLinkMessage)] -
- - @Localizer[nameof(AppStrings.ResendEmail)] - - } -
-
-
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss deleted file mode 100644 index 6bfce88d29..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.scss +++ /dev/null @@ -1,174 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; -@import '../../Styles/abstracts/_bit-css-variables.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - flex-flow: row nowrap; - align-items: flex-start; - justify-content: center; - - @include md { - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - } -} - -.page-section { - width: 50%; - height: 100%; - position: relative; - - @include lt-lg { - width: 100%; - height: unset; - } - - &:first-child { - display: flex; - justify-content: center; - align-items: flex-start; - flex-flow: column nowrap; - padding: rem2(135px) rem2(76px) rem2(40px); - - @include md { - align-items: flex-end; - padding: rem2(25px) rem2(32px); - flex-flow: row-reverse nowrap; - justify-content: space-between; - } - - @include sm { - display: none; - } - } - - &:last-child { - display: flex; - align-items: center; - justify-content: center; - - @include lt-lg { - height: 100%; - } - - @include sm { - padding: 0 rem2(16px); - } - } -} - -.bg-img { - width: 100%; - flex-shrink: 0; - height: rem2(348px); - margin-bottom: rem2(48px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/sign-in-up-bg.webp'); - - @include md { - width: rem2(287px); - height: rem2(180px); - margin-bottom: rem2(0); - margin-left: rem2(52px); - } -} - -.section-content { - width: 100%; - display: flex; - max-width: rem2(357px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - - .section-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(12px); - - @include md { - font-size: rem2(20px); - line-height: rem2(28px); - } - } - - .section-desc { - font-weight: 400; - font-size: rem2(16px); - line-height: rem2(24px); - - @include md { - font-size: rem2(14px); - line-height: rem2(20px); - } - } - - @include md { - max-width: 100%; - } -} - -::deep .form { - width: 100%; - display: flex; - text-align: center; - align-items: center; - max-width: rem2(384px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.form-title { - margin: 0; - font-weight: 600; - font-size: rem2(42px); - line-height: rem2(52px); - margin-bottom: rem2(60px); - - @include md { - font-size: rem2(32px); - line-height: rem2(40px); - } - - @include sm { - font-size: rem2(28px); - line-height: rem2(36px); - } -} - -.form-input-container { - width: 100%; - margin-bottom: rem2(24px); -} - -::deep .bit-msg-bar-fluent { - top: 0; - position: absolute; -} - -.form-description { - font-weight: 600; - width: rem2(398px); - height: rem2(20px); - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(25px); - - @include md { - width: rem2(398px); - height: rem2(20px); - } - - @include sm { - width: rem2(280px); - height: rem2(40px); - } -} \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor deleted file mode 100644 index fee0ab4c86..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor +++ /dev/null @@ -1,49 +0,0 @@ -@page "/forgot-password" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.ForgotPasswordTitle)] - -
-
-
-
-

@Localizer[nameof(AppStrings.StartupPageTitle)]

-
@Localizer[nameof(AppStrings.StartupPageDescription)]
-
-
- -
- - - - @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) - { - - @_forgotPasswordMessage - - } - -

@Localizer[nameof(AppStrings.ForgotPasswordTitle)]

-
- @Localizer[nameof(AppStrings.ForgotPasswordMessage)] -
- -
- - -
- - - @Localizer[nameof(AppStrings.SendResetLink)] - -
-
-
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs deleted file mode 100644 index 78e44a9b54..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.cs +++ /dev/null @@ -1,37 +0,0 @@ -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Client.Core.Pages.Identity; - -public partial class ForgotPasswordPage -{ - public bool _isLoading; - public string? _forgotPasswordMessage; - public BitMessageBarType _forgotPasswordMessageType; - public SendResetPasswordEmailRequestDto _forgotPasswordModel = new(); - - private async Task DoSubmit() - { - if (_isLoading) return; - - _isLoading = true; - _forgotPasswordMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendResetPasswordEmail", _forgotPasswordModel, AppJsonContext.Default.SendResetPasswordEmailRequestDto); - - _forgotPasswordMessageType = BitMessageBarType.Success; - - _forgotPasswordMessage = @Localizer[nameof(AppStrings.ResetPasswordLinkSentMessage)]; - } - catch (KnownException e) - { - _forgotPasswordMessage = e.Message; - _forgotPasswordMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss deleted file mode 100644 index d6712b6004..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ForgotPasswordPage.razor.scss +++ /dev/null @@ -1,166 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; -@import '../../Styles/abstracts/_bit-css-variables.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - flex-flow: row nowrap; - justify-content: center; - align-items: flex-start; - - @include md { - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - } -} - -.page-section { - width: 50%; - height: 100%; - position: relative; - - @include lt-lg { - width: 100%; - height: unset; - } - - &:first-child { - display: flex; - align-items: flex-start; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(135px) rem2(76px) rem2(40px); - - @include md { - align-items: flex-end; - padding: rem2(25px) rem2(32px); - flex-flow: row-reverse nowrap; - justify-content: space-between; - } - - @include sm { - display: none; - } - } - - &:last-child { - display: flex; - align-items: center; - justify-content: center; - - @include lt-lg { - height: 100%; - } - - @include sm { - padding: 0 rem2(16px); - } - } -} - -.bg-img { - width: 100%; - flex-shrink: 0; - height: rem2(348px); - margin-bottom: rem2(48px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/sign-in-up-bg.webp'); - - @include md { - width: rem2(287px); - height: rem2(180px); - margin-bottom: rem2(0); - margin-left: rem2(52px); - } -} - -.section-content { - width: 100%; - display: flex; - max-width: rem2(357px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - - .section-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(12px); - - @include md { - font-size: rem2(20px); - line-height: rem2(28px); - } - } - - .section-desc { - font-weight: 400; - font-size: rem2(16px); - line-height: rem2(24px); - - @include md { - font-size: rem2(14px); - line-height: rem2(20px); - } - } - - @include md { - max-width: 100%; - } -} - -::deep .form { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(384px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.form-title { - margin: 0; - font-weight: 600; - font-size: rem2(42px); - line-height: rem2(52px); - margin-bottom: rem2(60px); - - @include md { - font-size: rem2(32px); - line-height: rem2(40px); - } - - @include sm { - font-size: rem2(28px); - line-height: rem2(36px); - } -} - -.form-input-container { - width: 100%; - margin-bottom: rem2(24px); -} - -::deep .bit-msg-bar-fluent { - top: 0; - position: absolute; -} - -.form-description { - text-align: center; - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(16px); -} - -::deep .send-reset-link-btn { - width: rem2(130px); - max-width: rem2(130px); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor deleted file mode 100644 index 0926f42afd..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor +++ /dev/null @@ -1,54 +0,0 @@ -@page "/reset-password" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.ResetPasswordTitle)] - -
-
-
-
-

@Localizer[nameof(AppStrings.StartupPageTitle)]

-
@Localizer[nameof(AppStrings.StartupPageDescription)]
-
-
- -
- - - - @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) - { - @_resetPasswordMessage - } - -

@Localizer[nameof(AppStrings.ResetPasswordTitle)]

- -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.ResetPassword)] - -
-
-
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs deleted file mode 100644 index fdb9bffd59..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.cs +++ /dev/null @@ -1,70 +0,0 @@ -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Client.Core.Pages.Identity; - -public partial class ResetPasswordPage -{ - private bool _isLoading; - private string? _resetPasswordMessage; - private BitMessageBarType _resetPasswordMessageType; - private readonly ResetPasswordRequestDto _resetPasswordModel = new(); - - [Parameter] - [SupplyParameterFromQuery] - public string? Email { get; set; } - - [Parameter] - [SupplyParameterFromQuery] - public string? Token { get; set; } - - protected override async Task OnInitAsync() - { - _resetPasswordModel.Email = Email; - _resetPasswordModel.Token = Token; - - await base.OnInitAsync(); - } - - protected async override Task OnAfterFirstRenderAsync() - { - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - - await base.OnAfterFirstRenderAsync(); - } - private async Task DoSubmit() - { - if (_isLoading) return; - - _isLoading = true; - _resetPasswordMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/ResetPassword", _resetPasswordModel, AppJsonContext.Default.ResetPasswordRequestDto); - - _resetPasswordMessageType = BitMessageBarType.Success; - - _resetPasswordMessage = Localizer[nameof(AppStrings.PasswordChangedSuccessfullyMessage)]; - - await AuthenticationService.SignIn(new SignInRequestDto - { - UserName = Email, - Password = _resetPasswordModel.Password - }); - - NavigationManager.NavigateTo("/"); - } - catch (KnownException e) - { - _resetPasswordMessage = e.Message; - _resetPasswordMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss deleted file mode 100644 index a9e4ae47b6..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/ResetPasswordPage.razor.scss +++ /dev/null @@ -1,158 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - flex-flow: row nowrap; - align-items: flex-start; - justify-content: center; - - @include md { - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - } -} - -.page-section { - width: 50%; - height: 100%; - position: relative; - - @include lt-lg { - width: 100%; - height: unset; - } - - &:first-child { - display: flex; - align-items: flex-start; - justify-content: center; - flex-flow: column nowrap; - padding: rem2(135px) rem2(76px) rem2(40px); - - @include md { - align-items: flex-end; - flex-flow: row-reverse nowrap; - justify-content: space-between; - padding: rem2(25px) rem2(32px); - } - - @include sm { - display: none; - } - } - - &:last-child { - display: flex; - align-items: center; - justify-content: center; - - @include lt-lg { - height: 100%; - } - - @include sm { - padding: 0 rem2(16px); - } - } -} - -.bg-img { - width: 100%; - flex-shrink: 0; - height: rem2(348px); - margin-bottom: rem2(48px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/sign-in-up-bg.webp'); - - @include md { - width: rem2(287px); - height: rem2(180px); - margin-bottom: rem2(0); - margin-left: rem2(52px); - } -} - -.section-content { - width: 100%; - display: flex; - max-width: rem2(357px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - - .section-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(12px); - - @include md { - font-size: rem2(20px); - line-height: rem2(28px); - } - } - - .section-desc { - font-weight: 400; - font-size: rem2(16px); - line-height: rem2(24px); - - @include md { - font-size: rem2(14px); - line-height: rem2(20px); - } - } - - @include md { - max-width: 100%; - } -} - -::deep .form { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(384px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.form-title { - margin: 0; - font-weight: 600; - font-size: rem2(42px); - line-height: rem2(52px); - margin-bottom: rem2(60px); - - @include md { - font-size: rem2(32px); - line-height: rem2(40px); - } - - @include sm { - font-size: rem2(28px); - line-height: rem2(36px); - } -} - -.form-input-container { - width: 100%; - margin-bottom: rem2(24px); -} - -::deep .bit-msg-bar-fluent { - top: 0; - position: absolute; -} - -::deep .reset-password-btn { - width: rem2(130px); - max-width: rem2(130px); -} \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor deleted file mode 100644 index e475f61d91..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor +++ /dev/null @@ -1,61 +0,0 @@ -@page "/sign-in" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.SignInTitle)] - -
-
-
-
-

@Localizer[nameof(AppStrings.StartupPageTitle)]

-
@Localizer[nameof(AppStrings.StartupPageDescription)]
-
-
- -
- - - -

@Localizer[nameof(AppStrings.SignInTitle)]

- - @if (string.IsNullOrEmpty(_signInMessage) is false) - { - @_signInMessage -
- } - -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.SignIn)] - - -
- @Localizer[nameof(AppStrings.ForgotPasswordLink)] -
- - -
-
-
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.cs deleted file mode 100644 index ba47f71364..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.cs +++ /dev/null @@ -1,49 +0,0 @@ -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Client.Core.Pages.Identity; - -public partial class SignInPage -{ - public bool _isLoading; - public string? _signInMessage; - public BitMessageBarType _signInMessageType; - public SignInRequestDto _signInModel = new(); - - [Parameter] - [SupplyParameterFromQuery] - public string? RedirectUrl { get; set; } - - protected async override Task OnAfterFirstRenderAsync() - { - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - - await base.OnAfterFirstRenderAsync(); - } - private async Task DoSignIn() - { - if (_isLoading) return; - - _isLoading = true; - _signInMessage = null; - - try - { - await AuthenticationService.SignIn(_signInModel); - - NavigationManager.NavigateTo(RedirectUrl ?? "/"); - } - catch (KnownException e) - { - _signInMessage = e.Message; - _signInMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } -} - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.scss deleted file mode 100644 index 8701e35948..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignInPage.razor.scss +++ /dev/null @@ -1,182 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - flex-flow: row nowrap; - align-items: flex-start; - justify-content: center; - - @include md { - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - } -} - -.page-section { - width: 50%; - height: 100%; - position: relative; - - @include lt-lg { - width: 100%; - height: unset; - } - - &:first-child { - display: flex; - justify-content: center; - align-items: flex-start; - flex-flow: column nowrap; - padding: rem2(135px) rem2(76px) rem2(40px); - - @include md { - align-items: flex-end; - padding: rem2(25px) rem2(32px); - flex-flow: row-reverse nowrap; - justify-content: space-between; - } - - @include sm { - display: none; - } - - @media screen and (max-height:700px) { - display: none; - } - } - - &:last-child { - display: flex; - align-items: center; - justify-content: center; - - @include lt-lg { - height: 100%; - } - - @include sm { - padding: 0 rem2(16px); - } - } -} - -.bg-img { - width: 100%; - flex-shrink: 0; - height: rem2(348px); - margin-bottom: rem2(48px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/sign-in-up-bg.webp'); - - @include md { - width: rem2(287px); - height: rem2(180px); - margin-bottom: rem2(0); - margin-left: rem2(52px); - } -} - -.section-content { - width: 100%; - display: flex; - max-width: rem2(357px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - - .section-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(12px); - - @include md { - font-size: rem2(20px); - line-height: rem2(28px); - } - } - - .section-desc { - font-weight: 400; - font-size: rem2(16px); - line-height: rem2(24px); - - @include md { - font-size: rem2(14px); - line-height: rem2(20px); - } - } - - @include md { - max-width: 100%; - } -} - -::deep .form { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(384px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.form-title { - margin: 0; - font-weight: 600; - font-size: rem2(42px); - line-height: rem2(52px); - margin-bottom: rem2(60px); - - @include md { - font-size: rem2(32px); - line-height: rem2(40px); - } - - @include sm { - font-size: rem2(28px); - line-height: rem2(36px); - } -} - -.form-input-container { - width: 100%; - margin-bottom: rem2(24px); -} - -.sign-up-row { - font-weight: 400; - font-size: rem2(14px); - margin-top: rem2(24px); - line-height: rem2(20px); -} - -.form-forgot-password { - font-weight: 400; - font-size: rem2(14px); - margin-top: rem2(24px); - line-height: rem2(20px); -} - -::deep .bit-msg-bar-fluent { - top: 24px; - position: absolute; - width: calc(100% - 48px); - - @include md { - top: 16px; - width: calc(100% - 32px); - } - - @include sm { - top: 16px; - width: calc(100% - 32px); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor deleted file mode 100644 index 7b1e1f8792..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor +++ /dev/null @@ -1,93 +0,0 @@ -@page "/sign-up" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.SingUpTitle)] - -
-
-
-
-

@Localizer[nameof(AppStrings.StartupPageTitle)]

-
@Localizer[nameof(AppStrings.StartupPageDescription)]
-
-
- -
- - - - @if (_isSignedUp) - { -

- @Localizer[nameof(AppStrings.ConfirmEmailTitle)] -

- -
- @Localizer[nameof(AppStrings.ConfirmEmailMessage)] -
-
-
- @Localizer[nameof(AppStrings.NotReceivedConfirmationEmailMessage)] -
- -
- @Localizer[nameof(AppStrings.CheckSpamMailMessage)] -
-
- -@Localizer[nameof(AppStrings.Or)] - -
-
- - @Localizer[nameof(AppStrings.ResendEmail)] - -
-
- @Localizer[nameof(AppStrings.SignIn)] -
- } - else - { -

@Localizer[nameof(AppStrings.SignUp)]

- - @if (string.IsNullOrEmpty(_signUpMessage) is false) - { - @_signUpMessage -
- } - -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.SignUp)] - - - - } -
-
-
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.cs deleted file mode 100644 index 311f1418e8..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.cs +++ /dev/null @@ -1,76 +0,0 @@ -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Client.Core.Pages.Identity; - -public partial class SignUpPage -{ - public bool _isLoading; - public bool _isSignedUp; - public string? _signUpMessage; - public BitMessageBarType _signUpMessageType; - public SignUpRequestDto _signUpModel = new(); - - protected async override Task OnAfterFirstRenderAsync() - { - if (await AuthenticationStateProvider.IsUserAuthenticatedAsync()) - { - NavigationManager.NavigateTo("/"); - } - - await base.OnAfterFirstRenderAsync(); - } - - private async Task DoSignUp() - { - if (_isLoading) return; - - _isLoading = true; - _signUpMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SignUp", _signUpModel, AppJsonContext.Default.SignUpRequestDto); - - _isSignedUp = true; - } - catch (ResourceValidationException e) - { - _signUpMessageType = BitMessageBarType.Error; - _signUpMessage = string.Join(Environment.NewLine, e.Payload.Details.SelectMany(d => d.Errors).Select(e => e.Message)); - } - catch (KnownException e) - { - _signUpMessage = e.Message; - _signUpMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } - - private async Task DoResendLink() - { - if (_isLoading) return; - - _isLoading = true; - _signUpMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendConfirmationEmail", new() { Email = _signUpModel.Email }, AppJsonContext.Default.SendConfirmationEmailRequestDto); - - _signUpMessageType = BitMessageBarType.Success; - _signUpMessage = Localizer[nameof(AppStrings.ResendConfirmationLinkMessage)]; - } - catch (KnownException e) - { - _signUpMessage = e.Message; - _signUpMessageType = BitMessageBarType.Error; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.scss deleted file mode 100644 index e98c94a35d..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/SignUpPage.razor.scss +++ /dev/null @@ -1,163 +0,0 @@ -@import '../../Styles/abstracts/_functions.scss'; -@import '../../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - height: 100%; - display: flex; - flex-flow: row nowrap; - align-items: flex-start; - justify-content: center; - - @include md { - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - } -} - -.page-section { - width: 50%; - height: 100%; - position: relative; - - @include lt-lg { - width: 100%; - height: unset; - } - - &:first-child { - display: flex; - justify-content: center; - align-items: flex-start; - flex-flow: column nowrap; - padding: rem2(135px) rem2(76px) rem2(40px); - - @include md { - align-items: flex-end; - padding: rem2(25px) rem2(32px); - flex-flow: row-reverse nowrap; - justify-content: space-between; - } - - @include sm { - display: none; - } - } - - &:last-child { - display: flex; - align-items: center; - justify-content: center; - - @include lt-lg { - height: 100%; - } - - @include sm { - padding: 0 rem2(16px); - } - } -} - -.bg-img { - width: 100%; - flex-shrink: 0; - height: rem2(348px); - margin-bottom: rem2(48px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/sign-in-up-bg.webp'); - - @include md { - width: rem2(287px); - height: rem2(180px); - margin-bottom: rem2(0); - margin-left: rem2(52px); - } -} - -.section-content { - width: 100%; - display: flex; - max-width: rem2(357px); - align-items: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - - .section-title { - margin: 0; - font-weight: 600; - font-size: rem2(28px); - line-height: rem2(36px); - margin-bottom: rem2(12px); - - @include md { - font-size: rem2(20px); - line-height: rem2(28px); - } - } - - .section-desc { - font-weight: 400; - font-size: rem2(16px); - line-height: rem2(24px); - - @include md { - font-size: rem2(14px); - line-height: rem2(20px); - } - } - - @include md { - max-width: 100%; - } -} - -::deep .form { - width: 100%; - display: flex; - text-align: center; - align-items: center; - max-width: rem2(405px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.form-title { - margin: 0; - font-weight: 600; - font-size: rem2(42px); - line-height: rem2(52px); - margin-bottom: rem2(60px); - - @include md { - font-size: rem2(32px); - line-height: rem2(40px); - } - - @include sm { - font-size: rem2(28px); - line-height: rem2(36px); - } -} - -.form-input-container { - width: 100%; - text-align: left; - margin-bottom: rem2(24px); -} - -.sign-in-row { - font-weight: 400; - font-size: rem2(14px); - margin-top: rem2(24px); - line-height: rem2(20px); -} - -.form-description { - font-weight: 600; - font-size: rem2(14px); - line-height: rem2(20px); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.cs deleted file mode 100644 index bdb439ca77..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace AdminPanel.Client.Core.Pages; - -public partial class TermsPage -{ -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.scss deleted file mode 100644 index 8eeafffec4..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.scss +++ /dev/null @@ -1,33 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main { - width: 100%; - display: flex; - padding: rem2(8px); - text-align: center; - max-width: rem2(800px); - max-height: rem2(600px); - flex-direction: column; - border-radius: rem2(4px); - background-color: $bit-color-background-secondary; -} - -.header { - text-align: right; -} - -.title { - color: $bit-color-state-error; -} - -.exception { - overflow: auto; - text-align: left; - white-space: pre; - margin: rem2(24px); -} - -.buttons { - margin-bottom: rem2(24px); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.cs deleted file mode 100644 index e406a04005..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.cs +++ /dev/null @@ -1,38 +0,0 @@ -namespace AdminPanel.Client.Core.Shared; - -public partial class ConfirmMessageBox -{ - private bool _isOpen; - private string? _title; - private string? _message; - - public async Task Show(string message, string title) - { - if (_tsc is not null) - await _tsc.Task; - - _tsc = new TaskCompletionSource(); - - await InvokeAsync(() => - { - _ = JsRuntime.SetBodyOverflow(true); - - _isOpen = true; - _title = title; - _message = message; - - StateHasChanged(); - }); - - return await _tsc.Task; - } - - private TaskCompletionSource? _tsc; - - public async Task Confirm(bool value) - { - _isOpen = false; - await JsRuntime.SetBodyOverflow(false); - _tsc?.SetResult(value); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.scss deleted file mode 100644 index 2716646377..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor.scss +++ /dev/null @@ -1,56 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main-container { - display: flex; - width: rem2(560px); - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(16px) rem2(24px); - background-color: $bit-color-background-primary; - - .bit-ios & { - padding-bottom: calc(rem2(16px) + env(safe-area-inset-bottom)); - } - - @include sm { - left: 0; - bottom: 0; - width: 100%; - position: fixed; - border-radius: rem2(8px) rem2(8px) 0 0; - } -} - -.header { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(20px); - justify-content: space-between; -} - -.title { - font-weight: 600; - font-size: rem2(20px); - line-height: rem2(28px); -} - -.body { - width: 100%; - font-weight: 400; - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(16px); -} - -.btn-group { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - justify-content: flex-end; -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor deleted file mode 100644 index e94ed2c282..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor +++ /dev/null @@ -1,21 +0,0 @@ -@inherits AppComponentBase - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.cs deleted file mode 100644 index b398495258..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.cs +++ /dev/null @@ -1,48 +0,0 @@ -//-:cnd:noEmit - -namespace AdminPanel.Client.Core.Shared; - -public partial class Footer -{ - private BitDropdownItem[] _cultures = default!; - - protected override Task OnInitAsync() - { - _cultures = CultureInfoManager.SupportedCultures - .Select(sc => new BitDropdownItem { Value = sc.code, Text = sc.name }) - .ToArray(); - return base.OnInitAsync(); - } - -#if MultilingualEnabled - - protected async override Task OnAfterFirstRenderAsync() - { -#if BlazorHybrid - var preferredCultureCookie = Preferences.Get(".AspNetCore.Culture", null); -#else - var preferredCultureCookie = await JsRuntime.InvokeAsync("window.App.getCookie", ".AspNetCore.Culture"); -#endif - SelectedCulture = CultureInfoManager.GetCurrentCulture(preferredCultureCookie); - - StateHasChanged(); - - await base.OnAfterFirstRenderAsync(); - } -#endif - - private string? SelectedCulture; - - private async Task OnCultureChanged() - { - var cultureCookie = $"c={SelectedCulture}|uic={SelectedCulture}"; - -#if BlazorHybrid - Preferences.Set(".AspNetCore.Culture", cultureCookie); -#else - await JsRuntime.InvokeVoidAsync("window.App.setCookie", ".AspNetCore.Culture", cultureCookie, 30 * 24 * 3600); -#endif - - NavigationManager.Refresh(forceReload: true); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.scss deleted file mode 100644 index e1873d5073..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Footer.razor.scss +++ /dev/null @@ -1,114 +0,0 @@ -@import '../Styles/abstracts/_vars.scss'; -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.footer { - width: 100%; - display: flex; - align-items: center; - justify-content: center; - flex-flow: column nowrap; - border-top: rem2(1px) solid $bit-color-border-secondary; - - .bit-ios & { - padding-bottom: env(safe-area-inset-bottom); - } -} - -.footer-content { - width: 100%; - display: flex; - margin-left: auto; - margin-right: auto; - align-items: center; - flex-flow: row nowrap; - height: rem2($HeaderHeight); - justify-content: space-between; - padding: 0 rem2($LargeScreenPadding); - max-width: rem2($LargeScreenMaxWidth); - - @include md { - padding: 0 rem2($MediumScreenPadding); - max-width: rem2($MediumScreenMaxWidth); - } - - @include sm { - padding: 0 rem2($SmallScreenPadding); - max-width: rem2($SmallScreenMaxWidth); - } -} - -.footer-email { - font-weight: 400; - font-size: rem2(12px); - line-height: rem2(16px); - - @include sm { - font-size: rem2(10px); - line-height: rem2(12px); - } -} - -.footer-copyright { - font-weight: 400; - font-size: rem2(10px); - line-height: rem2(12px); - color: $bit-color-primary-main; - - @include sm { - display: none; - } -} - -.text--red { - color: red; -} - -.footer-txt-group { - .footer-copyright { - display: none; - - @include sm { - margin-bottom: rem2(4px); - display: inline-block !important; - } - } -} - -.footer-social-lnk-grp { - display: flex; - align-items: center; - flex-flow: row nowrap; - justify-content: center; -} - -.social-lnk { - width: rem2(24px); - height: rem2(24px); - margin: 0 rem2(6px); - border-radius: 50%; - background-position: center; - background-repeat: no-repeat; - border: rem2(0.5px) solid $bit-color-border-primary; -} - -.twitter-lnk { - background-size: rem2(13px) rem2(11px); - background-image: url('images/icons/twitter-icon.svg'); -} - -.youtube-lnk { - background-size: rem2(12px) rem2(9px); - background-image: url('images/icons/youtube-icon.svg'); -} - -.linkedin-lnk { - background-size: rem2(11px) rem2(11px); - background-image: url('images/icons/linkedin-icon.svg'); -} - -.github-lnk { - background-size: rem2(11px) rem2(12px); - background-image: url('images/icons/github-icon.svg'); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor deleted file mode 100644 index 8875125bdb..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor +++ /dev/null @@ -1,51 +0,0 @@ -@inherits AppComponentBase - -
-
-
- - - -
- - - - -
- - - - @if (_isHeaderDrpDownOpen) - { -
- -
- - - - @Localizer[nameof(AppStrings.EditProfileTitle)] - - - - @Localizer[nameof(AppStrings.SignOut)] - -
- } -
-
-
- - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.cs deleted file mode 100644 index c82db44eb6..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.cs +++ /dev/null @@ -1,228 +0,0 @@ -//-:cnd:noEmit -using AdminPanel.Shared.Dtos.Identity; -using Microsoft.AspNetCore.Components.Routing; - -namespace AdminPanel.Client.Core.Shared; - -public partial class Header : IDisposable -{ - private static List _homeBreadcrumbItems = default!; - private static List _profileBreadcrumbItems = default!; - private static List _productsBreadcrumbItems = default!; - private static List _categoriesBreadcrumbItems = default!; - private static List _addCategoryBreadcrumbItems = default!; - - private bool _disposed; - private UserDto _user = new(); - private string? _profileImageUrl; - private string? _profileImageUrlBase; - private bool _isUserAuthenticated; - private bool _isHeaderDrpDownOpen; - private bool _isSignOutModalOpen; - private string _currentUrl = string.Empty; - private List _currentBreadcrumbItems = default!; - private Action _unsubscribe = default!; - - [AutoInject] private BitThemeManager _bitThemeManager { get; set; } = default!; - [AutoInject] private IBitDeviceCoordinator _bitDeviceCoordinator { get; set; } = default!; - - - [Parameter] public EventCallback OnToggleMenu { get; set; } - - protected override async Task OnInitAsync() - { - SetCurrentUrl(); - SetBreadcrumbItems(); - SetCurrentBreadcrumbItems(); - - NavigationManager.LocationChanged += OnLocationChanged; - - AuthenticationStateProvider.AuthenticationStateChanged += VerifyUserIsAuthenticatedOrNot; - - _unsubscribe = PubSubService.Subscribe(PubSubMessages.PROFILE_UPDATED, payload => - { - if (payload is null) return; - - _user = (UserDto)payload; - - SetProfileImageUrl(); - - StateHasChanged(); - }); - - _user = await PrerenderStateService.GetValue($"{nameof(Header)}-User", async () => await HttpClient.GetFromJsonAsync("User/GetCurrentUser", AppJsonContext.Default.UserDto)) ?? new(); - - _isUserAuthenticated = await PrerenderStateService.GetValue($"{nameof(Header)}-IsUserAuthenticated", AuthenticationStateProvider.IsUserAuthenticatedAsync); - - var access_token = await PrerenderStateService.GetValue($"{nameof(Header)}-access_token", AuthTokenProvider.GetAccessTokenAsync); - _profileImageUrlBase = $"{Configuration.GetApiServerAddress()}Attachment/GetProfileImage?access_token={access_token}&file="; - - SetProfileImageUrl(); - } - - private void SetProfileImageUrl() - { - _profileImageUrl = _user.ProfileImageName is not null ? _profileImageUrlBase + _user.ProfileImageName : null; - } - - private void SetBreadcrumbItems() - { - _homeBreadcrumbItems = new List - { - new() - { - Text = Localizer[nameof(AppStrings.Home)], - Href = "/", - IsSelected = true - } - }; - - _profileBreadcrumbItems = new List - { - new() - { - Text = Localizer[nameof(AppStrings.EditProfile)], - Href = "/edit-profile", - IsSelected = true - } - }; - - _productsBreadcrumbItems = new List - { - new() - { - Text = Localizer[nameof(AppStrings.ProductCatologue)], - }, - new() - { - Text = Localizer[nameof(AppStrings.Products)], - Href = "/products", - IsSelected = true - } - }; - - _categoriesBreadcrumbItems = new List - { - new() - { - Text = Localizer[nameof(AppStrings.ProductCatologue)], - }, - new() - { - Text = Localizer[nameof(AppStrings.Categories)], - Href = "/categories", - IsSelected = true - } - }; - - _addCategoryBreadcrumbItems = new List - { - new() - { - Text = Localizer[nameof(AppStrings.ProductCatologue)], - }, - new() - { - Text = Localizer[nameof(AppStrings.Categories)], - Href = "/categories", - }, - new() - { - Text = Localizer[nameof(AppStrings.AddEditCategory)], - IsSelected = true - } - }; - } - - private async void VerifyUserIsAuthenticatedOrNot(Task task) - { - try - { - _isUserAuthenticated = await AuthenticationStateProvider.IsUserAuthenticatedAsync(); - } - catch (Exception ex) - { - ExceptionHandler.Handle(ex); - } - finally - { - StateHasChanged(); - } - } - - private void OnLocationChanged(object? sender, LocationChangedEventArgs args) - { - SetCurrentUrl(); - SetCurrentBreadcrumbItems(); - StateHasChanged(); - } - - private void SetCurrentUrl() - { - _currentUrl = NavigationManager.Uri.Replace(NavigationManager.BaseUri, "/", StringComparison.InvariantCultureIgnoreCase); - } - - private void SetCurrentBreadcrumbItems() - { - if (_currentUrl.Contains("/add-edit-category")) - { - _currentBreadcrumbItems = _addCategoryBreadcrumbItems; - } - else - { - _currentBreadcrumbItems = _currentUrl switch - { - "/" => _homeBreadcrumbItems, - "/products" => _productsBreadcrumbItems, - "/categories" => _categoriesBreadcrumbItems, - "/edit-profile" => _profileBreadcrumbItems, - _ => new(), - }; - } - } - - private async Task ToggleMenu() - { - await OnToggleMenu.InvokeAsync(); - } - - private async Task OpenSignOutModal() - { - ToggleHeaderDropdown(); - await JsRuntime.SetBodyOverflow(true); - _isSignOutModalOpen = true; - } - - private void ToggleHeaderDropdown() - { - _isHeaderDrpDownOpen = !_isHeaderDrpDownOpen; - } - - private void OpenEditProfilePage() - { - ToggleHeaderDropdown(); - NavigationManager.NavigateTo("/edit-profile"); - } - - private async Task ToggleTheme() - { - await _bitDeviceCoordinator.ApplyTheme(await _bitThemeManager.ToggleDarkLightAsync() == "dark"); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (_disposed || disposing is false) return; - - AuthenticationStateProvider.AuthenticationStateChanged -= VerifyUserIsAuthenticatedOrNot; - - _unsubscribe?.Invoke(); - - _disposed = true; - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.scss deleted file mode 100644 index c2e10bde21..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/Header.razor.scss +++ /dev/null @@ -1,160 +0,0 @@ -@import '../Styles/abstracts/_vars.scss'; -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main-header { - top: 0; - z-index: 100; - display: flex; - position: fixed; - flex-flow: column; - min-height: rem2($HeaderHeight); - width: calc(100% - $NavMenuWidth); - padding-top: var(--bit-status-bar-height); - background-color: $bit-color-background-primary; - border-bottom: rem2(1px) solid $bit-color-border-secondary; - - @include lt-lg { - width: 100%; - } - - .bit-ios & { - padding-top: env(safe-area-inset-top); - } -} - -.header-main-container { - width: 100%; - flex-grow: 1; - display: flex; - margin-left: auto; - margin-right: auto; - align-items: center; - flex-flow: row nowrap; - min-height: rem2($HeaderHeight); - justify-content: space-between; - padding: 0 rem2($LargeScreenPadding); - max-width: rem2($LargeScreenMaxWidth); - - @include md { - padding: 0 rem2($MediumScreenPadding); - max-width: rem2($MediumScreenMaxWidth); - } - - @include sm { - padding: 0 rem2($SmallScreenPadding); - max-width: rem2($SmallScreenMaxWidth); - } -} - -.header-content-container { - height: 100%; - display: flex; - cursor: pointer; - position: relative; - align-items: center; - flex-flow: row nowrap; -} - -.left-section { - flex-grow: 1; -} - -.header-logo { - cursor: pointer; - width: rem2(30px); - height: rem2(20px); - margin-right: rem2(24px); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - background-image: url('images/bit-logo.svg'); - - @include gt-md { - display: none; - } -} - -::deep { - .header-breadcrumb { - @include sm { - display: none; - } - } - - .header-menu-btn { - margin-right: rem2(12px); - - @include gt-md { - display: none; - } - } -} - -.header-drp-wrapper { - right: 0; - display: flex; - top: rem2(40px); - cursor: default; - width: rem2(224px); - height: rem2(200px); - position: absolute; - padding: 0 rem2(8px); - align-items: flex-start; - border-radius: rem2(2px); - flex-flow: column nowrap; - justify-content: flex-start; - box-shadow: $bit-box-shadow-callout; - background: $bit-color-background-secondary; -} - -.user-info-container { - width: 100%; - display: flex; - height: rem2(100px); - padding: 0 rem2(2px); - align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(10px); - justify-content: flex-start; - border-bottom: rem2(1px) solid $bit-color-border-secondary; -} - -.toggle-theme-btn { - padding: 0; - border: none; - cursor: pointer; - height: rem2(32px); - border-radius: 50%; - min-width: rem2(32px); - margin-right: rem2(10px); - color: $bit-color-primary-text; - background-color: $bit-color-primary-main; - - .icon-container { - height: 100%; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: center; - - .bit-icon { - margin: 0 rem2(4px); - } - } - - &.dark-theme { - .icon-container { - padding: 2px 0px 0 1px; - } - } -} - -.theme-dark .light-theme { - display: none; -} - -.theme-light .dark-theme { - display: none; -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor deleted file mode 100644 index ff0e4db22d..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor +++ /dev/null @@ -1,19 +0,0 @@ -@inherits LayoutComponentBase - -
AdminPanel
- -
- @if (_isUserAuthenticated) - { -
- - } -
- - @Body - -
-
-
- - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.cs deleted file mode 100644 index 02f45a3edb..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.cs +++ /dev/null @@ -1,82 +0,0 @@ -using Microsoft.AspNetCore.Components.Web; - -namespace AdminPanel.Client.Core.Shared; - -public partial class MainLayout : IDisposable -{ - private bool _disposed; - private bool _isMenuOpen; - private bool _isUserAuthenticated; - private ErrorBoundary _errorBoundaryRef = default!; - - [AutoInject] private IPrerenderStateService _stateService = default!; - - [AutoInject] private IExceptionHandler _exceptionHandler = default!; - - [AutoInject] private AppAuthenticationStateProvider _authStateProvider = default!; - - [AutoInject] private IJSRuntime _jsRuntime = default!; - - protected override void OnParametersSet() - { - // TODO: we can try to recover from exception after rendering the ErrorBoundary with this line. - // but for now it's better to persist the error ui until a force refresh. - // ErrorBoundaryRef.Recover(); - - base.OnParametersSet(); - } - - protected override async Task OnInitializedAsync() - { - try - { - _authStateProvider.AuthenticationStateChanged += VerifyUserIsAuthenticatedOrNot; - - _isUserAuthenticated = await _stateService.GetValue($"{nameof(MainLayout)}-IsUserAuthenticated", _authStateProvider.IsUserAuthenticatedAsync); - - await base.OnInitializedAsync(); - } - catch (Exception exp) - { - _exceptionHandler.Handle(exp); - } - } - - async void VerifyUserIsAuthenticatedOrNot(Task task) - { - try - { - _isUserAuthenticated = await _authStateProvider.IsUserAuthenticatedAsync(); - } - catch (Exception ex) - { - _exceptionHandler.Handle(ex); - } - finally - { - StateHasChanged(); - } - } - - private async Task ToggleMenuHandler() - { - _isMenuOpen = !_isMenuOpen; - - await _jsRuntime.SetBodyOverflow(_isMenuOpen); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (_disposed || disposing is false) return; - - _authStateProvider.AuthenticationStateChanged -= VerifyUserIsAuthenticatedOrNot; - - _disposed = true; - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.scss deleted file mode 100644 index 00787e16fe..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MainLayout.razor.scss +++ /dev/null @@ -1,124 +0,0 @@ -@import '../Styles/abstracts/_vars.scss'; -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main { - width: 100%; - display: flex; - min-height: 100vh; - position: relative; - flex-flow: column nowrap; - justify-content: flex-start; - padding-top: rem2($HeaderHeight); - padding-left: rem2($NavMenuWidth); - background-color: $bit-color-background-secondary; - - @include lt-lg { - padding-left: 0; - } -} - -.main--full-page { - padding: 0; - min-height: 100%; - - .site-content { - height: calc(100vh - 49px); - padding: var(--bit-status-bar-height) 0 0 0; - - .bit-ios & { - padding-top: env(safe-area-inset-top); - height: calc(100vh - 49px - env(safe-area-inset-bottom)); - } - - @media screen and (max-height:700px) { - display: flex; - align-items: center; - height: unset !important; - min-height: calc(100vh - 49px - var(--bit-status-bar-height)); - - .bit-ios & { - min-height: calc(100vh - 49px - env(safe-area-inset-bottom)); - } - } - } -} - -.site-content { - width: 100%; - margin-left: auto; - margin-right: auto; - min-height: calc(100vh - 103px); - padding: 0 rem2($LargeScreenPadding); - max-width: rem2($LargeScreenMaxWidth); - padding-top: calc(rem2(32px) + var(--bit-status-bar-height)); - padding-bottom: rem2(32px); - - .bit-ios & { - padding-top: calc(rem2(32px) + env(safe-area-inset-top)); - min-height: calc(100vh - 103px - env(safe-area-inset-bottom)); - } - - @include md { - padding: 0 rem2($MediumScreenPadding); - max-width: rem2($MediumScreenMaxWidth); - padding-top: calc(rem2(32px) + var(--bit-status-bar-height)); - padding-bottom: rem2(32px); - - .bit-ios & { - padding-top: calc(rem2(32px) + env(safe-area-inset-top)); - } - } - - @include sm { - padding: 0 rem2($SmallScreenPadding); - max-width: rem2($SmallScreenMaxWidth); - padding-top: calc(rem2(16px) + var(--bit-status-bar-height)); - padding-bottom: rem2(16px); - - .bit-ios & { - padding-top: calc(rem2(16px) + env(safe-area-inset-top)); - } - } -} - -::deep { - a { - text-decoration: none; - } - - .validation-message { - color: $bit-color-state-error; - } -} - -.status-bar { - top: 0; - width: 100%; - z-index: 1101; - display: none; - position: fixed; - overflow: hidden; - text-align: center; - align-items: center; - font-size: rem2(14px); - justify-content: center; - color: $bit-color-primary-main; -} - -.bit-windows, .bit-macos { - .status-bar { - display: flex; - background-color: transparent; - color: $bit-color-primary-main; - height: var(--bit-status-bar-height); - } -} - -.bit-ios .status-bar { - display: flex; - color: transparent; - background-color: transparent; - height: env(safe-area-inset-top); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor deleted file mode 100644 index 7899d39bae..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor +++ /dev/null @@ -1,16 +0,0 @@ -@inherits AppComponentBase - - -
-
- @_title - -
-
- @_body -
- -
-
\ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor.cs deleted file mode 100644 index 3f17234021..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor.cs +++ /dev/null @@ -1,73 +0,0 @@ -namespace AdminPanel.Client.Core.Shared; - -public partial class MessageBox : IDisposable -{ - private bool _isOpen; - private string? _title; - private string? _body; - - private TaskCompletionSource? _tsc; - - private async Task OnCloseClick() - { - _isOpen = false; - await JsRuntime.SetBodyOverflow(false); - _tsc?.SetResult(null); - _tsc = null; - } - - private async Task OnOkClick() - { - _isOpen = false; - await JsRuntime.SetBodyOverflow(false); - _tsc?.SetResult(null); - _tsc = null; - } - - Action? _dispose; - bool _disposed = false; - - protected override Task OnInitAsync() - { - _dispose = PubSubService.Subscribe(PubSubMessages.SHOW_MESSAGE, async args => - { - (var message, string title, TaskCompletionSource tsc) = ((string message, string title, TaskCompletionSource tsc))args!; - await (_tsc?.Task ?? Task.CompletedTask); - _tsc = tsc; - await ShowMessageBox(message, title); - }); - - return base.OnInitAsync(); - } - - private async Task ShowMessageBox(string message, string title = "") - { - await InvokeAsync(() => - { - _ = JsRuntime.SetBodyOverflow(true); - - _isOpen = true; - _title = title; - _body = message; - - StateHasChanged(); - }); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (_disposed || disposing is false) return; - - _tsc?.TrySetResult(null); - _tsc = null; - _dispose?.Invoke(); - - _disposed = true; - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor deleted file mode 100644 index a744d22f88..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor +++ /dev/null @@ -1,17 +0,0 @@ -@inherits AppComponentBase - -@if (IsMenuOpen) -{ - -} - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.cs deleted file mode 100644 index d47f6787f4..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.cs +++ /dev/null @@ -1,76 +0,0 @@ -//-:cnd:noEmit - -namespace AdminPanel.Client.Core.Shared; - -public partial class NavMenu -{ - private bool isMenuOpen; - - private List _navItems = default!; - - [CascadingParameter] public Task AuthenticationStateTask { get; set; } = default!; - - [Parameter] - public bool IsMenuOpen - { - get => isMenuOpen; - set - { - if (value == isMenuOpen) return; - - isMenuOpen = value; - - _ = IsMenuOpenChanged.InvokeAsync(value); - } - } - - [Parameter] public EventCallback IsMenuOpenChanged { get; set; } - - protected override async Task OnInitAsync() - { - _navItems = new() - { - new BitNavItem - { - Text = Localizer[nameof(AppStrings.Home)], - IconName = BitIconName.Home, - Url = "/", - }, - new BitNavItem - { - Text = Localizer[nameof(AppStrings.ProductCategory)], - IconName = BitIconName.Product, - IsExpanded = true, - ChildItems = new List - { - new BitNavItem - { - Text = Localizer[nameof(AppStrings.Products)], - Url = "/products", - }, - new BitNavItem - { - Text = Localizer[nameof(AppStrings.Categories)], - Url = "/categories", - }, - } - } - }; - - await base.OnInitAsync(); - } - - private async Task HandleOnItemClick(BitNavItem item) - { - if (string.IsNullOrWhiteSpace(item.Url)) return; - - await CloseNavMenu(); - } - - private async Task CloseNavMenu() - { - IsMenuOpen = false; - - await JsRuntime.SetBodyOverflow(false); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.scss deleted file mode 100644 index c488568f6c..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NavMenu.razor.scss +++ /dev/null @@ -1,82 +0,0 @@ -@import '../Styles/abstracts/_vars.scss'; -@import '../Styles/abstracts/_colors.scss'; -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.nav-menu { - top: 0; - left: 0; - outline: 0; - height: 100vh; - z-index: 1000; - display: flex; - flex: 1 0 auto; - flex-shrink: 0; - position: fixed; - box-shadow: none; - overflow-y: auto; - align-items: center; - flex-direction: column; - width: rem2($NavMenuWidth); - padding-bottom: rem2(24px); - max-width: rem2($NavMenuWidth); - justify-content: space-between; - padding-top: var(--bit-status-bar-height); - background-color: $bit-color-background-primary; - - .bit-ios & { - padding-top: env(safe-area-inset-top); - } - - @include lt-lg { - top: 0; - inset: 0; - height: 100vh; - z-index: 1200; - position: fixed; - } -} - -.nav-menu--closed { - display: none; - - @include gt-md { - display: flex; - } -} - -.menu-shadow { - top: 0; - left: 0; - width: 100%; - height: 100vh; - z-index: 1101; - display: none; - position: fixed; - background-color: rgba(0, 0, 0, 0.5); - - @include lt-lg { - display: block; - } -} - -.menu-content { - width: 100%; -} - -.menu-top-row { - width: 100%; - height: rem2(calc($HeaderHeight + 1px)); - background-repeat: no-repeat; - background-size: rem2(30px) rem2(20px); - background-image: url('images/bit-logo.svg'); - background-position: top rem2(16px) left rem2(16px); - border-bottom: rem2(1px) solid $bit-color-border-secondary; -} - -::deep { - .bit-nav-menu { - padding-top: rem2(32px); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor deleted file mode 100644 index b11e192f60..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor +++ /dev/null @@ -1,15 +0,0 @@ -@inherits AppComponentBase - - -
-
- @Localizer[nameof(AppStrings.SignOut)] - -
-
@Localizer[nameof(AppStrings.AreYouSureYouWantToSignout)]
-
- @Localizer[nameof(AppStrings.SignOut)] - @Localizer[nameof(AppStrings.Cancel)] -
-
-
\ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.cs deleted file mode 100644 index cfb3b454fc..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace AdminPanel.Client.Core.Shared; - -public partial class SignOutConfirmModal -{ - private bool isOpen; - - [Parameter] - public bool IsOpen - { - get => isOpen; - set - { - if (value == isOpen) return; - - isOpen = value; - - _ = IsOpenChanged.InvokeAsync(value); - } - } - - [Parameter] public EventCallback IsOpenChanged { get; set; } - - private async Task CloseModal() - { - IsOpen = false; - - await JsRuntime.SetBodyOverflow(false); - } - - private async Task SignOut() - { - await AuthenticationService.SignOut(); - - await CloseModal(); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.scss deleted file mode 100644 index 82b430d677..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/SignOutConfirmModal.razor.scss +++ /dev/null @@ -1,61 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main-container { - display: flex; - width: rem2(560px); - align-items: center; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(16px) rem2(24px); - background-color: $bit-color-background-primary; - - .bit-ios & { - padding-bottom: calc(rem2(16px) + env(safe-area-inset-bottom)); - } - - @include sm { - left: 0; - bottom: 0; - width: 100%; - position: fixed; - border-radius: rem2(8px) rem2(8px) 0 0; - } -} - -.header { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(20px); - justify-content: space-between; -} - -.title { - font-weight: 600; - font-size: rem2(20px); - line-height: rem2(28px); -} - -.body { - width: 100%; - font-weight: 400; - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(16px); -} - -.btn-group { - width: 100%; - gap: rem2(8px); - display: flex; - flex-flow: row nowrap; - justify-content: flex-end; - align-items: center; -} - -::deep .bit-mdl-container { - min-height: unset; -} \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_media-queries.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_media-queries.scss deleted file mode 100644 index 358e117ecb..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_media-queries.scss +++ /dev/null @@ -1,62 +0,0 @@ -@import '_functions.scss'; - -/// https://github.com/Necromancerx/media-queries-scss-mixins - -$screen-lg-min: rem2(1201px); -$screen-lg-max: rem2(1920px); - -$screen-md-min: rem2(769px); -$screen-md-max: rem2(1200px); - -$screen-sm-max: rem2(768px); - -// media devices -@mixin sm { - @media screen and (max-width: #{$screen-sm-max}) { - @content; - } -} - -@mixin md { - @media screen and (min-width: #{$screen-md-min}) and (max-width: #{$screen-md-max}) { - @content; - } -} - -@mixin lg { - @media screen and (min-width: #{$screen-lg-min}) and (max-width: #{$screen-lg-max}) { - @content; - } -} - -// media lt queries -@mixin lt-md { - @media screen and (max-width: #{$screen-sm-max}) { - @content; - } -} - -@mixin lt-lg { - @media screen and (max-width: #{$screen-md-max}) { - @content; - } -} - -@mixin lt-xl { - @media screen and (max-width: #{$screen-lg-max}) { - @content; - } -} - -// media gt queries -@mixin gt-sm { - @media screen and (min-width: #{$screen-md-min}) { - @content; - } -} - -@mixin gt-md { - @media screen and (min-width: #{$screen-lg-min}) { - @content; - } -} \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_vars.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_vars.scss deleted file mode 100644 index 50f45837ee..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_vars.scss +++ /dev/null @@ -1,10 +0,0 @@ -$LargeScreenMaxWidth: 1416px; -$MediumScreenMaxWidth: 1008px; -$SmallScreenMaxWidth: 572px; - -$LargeScreenPadding: 48px; -$MediumScreenPadding: 24px; -$SmallScreenPadding: 16px; - -$HeaderHeight: 48px; -$NavMenuWidth: 206px; \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/app.scss b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/app.scss deleted file mode 100644 index 87641b570f..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/app.scss +++ /dev/null @@ -1,35 +0,0 @@ -:root { - --bit-status-bar-height: 0px; -} - -* { - box-sizing: border-box; - -webkit-text-size-adjust: none; - -webkit-tap-highlight-color: transparent; - font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; -} - -.bit-blazor-hybrid, .bit-blazor-electron { - *:not(input) { - -webkit-user-select: none; - user-select: none; - } -} - -.bit-blazor-hybrid { - &.bit-windows * { - -webkit-user-drag: none; - } -} - -html, body, #app-container { - margin: 0; - padding: 0; - width: 100%; - height: 100%; - -webkit-font-smoothing: antialiased; -} - -ul { - margin: 0; -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/bit-logo.svg b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/bit-logo.svg deleted file mode 100644 index 4328472aff..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/bit-logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/ServerSideAuthTokenProvider.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/ServerSideAuthTokenProvider.cs deleted file mode 100644 index 10222fd483..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/ServerSideAuthTokenProvider.cs +++ /dev/null @@ -1,51 +0,0 @@ -//-:cnd:noEmit -#if BlazorServer -using System.Reflection; -#endif - -namespace AdminPanel.Client.Web.Services; - -/// -/// The reads the token from the cookie, -/// but during prerendering, there is no access to localStorage or the stored cookies. -/// However, the cookies are sent automatically in http request and The provides that token to the application. -/// -#if BlazorServer -public partial class ServerSideAuthTokenProvider : IAuthTokenProvider -{ - [AutoInject] private IJSRuntime _jsRuntime = default!; - [AutoInject] private IHttpContextAccessor _httpContextAccessor = default!; - - private static readonly PropertyInfo? IsInitializedProp = Assembly.Load("Microsoft.AspNetCore.Components.Server") - .GetType("Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime") - ?.GetProperty("IsInitialized"); - - public async Task GetAccessTokenAsync() - { - var isInitialized = (bool)(IsInitializedProp?.GetValue(_jsRuntime) ?? false); - - if (isInitialized) - { - return await _jsRuntime.InvokeAsync("App.getCookie", "access_token"); - } - - return _httpContextAccessor.HttpContext?.Request.Cookies["access_token"]; - } -} -#else -public class ServerSideAuthTokenProvider : IAuthTokenProvider -{ - private readonly IHttpContextAccessor _httpContextAccessor; - - public ServerSideAuthTokenProvider(IHttpContextAccessor httpContextAccessor) - { - _httpContextAccessor = httpContextAccessor; - } - - public async Task GetAccessTokenAsync() - { - await Task.CompletedTask; - return _httpContextAccessor.HttpContext?.Request.Cookies["access_token"]; - } -} -#endif diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Program.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Program.cs deleted file mode 100644 index a91a49dd28..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Program.cs +++ /dev/null @@ -1,7 +0,0 @@ -using AdminPanel.Iac; -using Pulumi; - -public class Program -{ - static Task Main() => Deployment.RunAsync(); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Pulumi.yaml b/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Pulumi.yaml deleted file mode 100644 index d75505a6d4..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: AdminPanel.Iac -runtime: dotnet -description: AdminPanel infrastructure as a code diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AdminPanel.Server.Api.csproj b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AdminPanel.Server.Api.csproj deleted file mode 100644 index c97bb48121..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AdminPanel.Server.Api.csproj +++ /dev/null @@ -1,98 +0,0 @@ - - - - net8.0 - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - $([System.String]::Copy('%(Filename)').Replace('.Designer','')).resx - - - PublicResXFileCodeGenerator - %(Filename).Designer.cs - - - - - - Always - - - - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.cs deleted file mode 100644 index b641e941fc..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.cs +++ /dev/null @@ -1,326 +0,0 @@ -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace AdminPanel.Server.Api.Migrations -{ - /// - public partial class InitialMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Categories", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Color = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Categories", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Roles", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Roles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FullName = table.Column(type: "nvarchar(max)", nullable: true), - Gender = table.Column(type: "int", nullable: true), - BirthDate = table.Column(type: "datetimeoffset", nullable: true), - ProfileImageName = table.Column(type: "nvarchar(max)", nullable: true), - ConfirmationEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - ResetPasswordEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Products", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Price = table.Column(type: "money", nullable: false), - Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), - CreatedOn = table.Column(type: "datetimeoffset", nullable: false), - CategoryId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Products", x => x.Id); - table.ForeignKey( - name: "FK_Products_Categories_CategoryId", - column: x => x.CategoryId, - principalTable: "Categories", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "RoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_RoleClaims_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserClaims", x => x.Id); - table.ForeignKey( - name: "FK_UserClaims_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_UserLogins_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserRoles", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - RoleId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_UserRoles_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserRoles_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserTokens", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_UserTokens_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.InsertData( - table: "Categories", - columns: new[] { "Id", "Color", "Name" }, - values: new object[,] - { - { 1, "#FFCD56", "Ford" }, - { 2, "#FF6384", "Nissan" }, - { 3, "#4BC0C0", "Benz" }, - { 4, "#FF9124", "BMW" }, - { 5, "#2B88D8", "Tesla" } - }); - - migrationBuilder.InsertData( - table: "Users", - columns: new[] { "Id", "AccessFailedCount", "BirthDate", "ConcurrencyStamp", "ConfirmationEmailRequestedOn", "Email", "EmailConfirmed", "FullName", "Gender", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "ProfileImageName", "ResetPasswordEmailRequestedOn", "SecurityStamp", "TwoFactorEnabled", "UserName" }, - values: new object[] { 1, 0, new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), "9f7f7dc2-da36-431a-a390-f65aa6589582", null, "test@bitplatform.dev", true, "AdminPanel test account", 2, false, null, "TEST@BITPLATFORM.DEV", "TEST@BITPLATFORM.DEV", "AQAAAAIAAYagAAAAEHLM21HNl59v+pj1RM37VDwsDBTwCihJF/4NBXBTwYz2picGLk+OuXHrc7KWj0Nl/g==", null, false, null, null, "4d3447a4-022e-4ba7-8828-dad2a3a76459", false, "test@bitplatform.dev" }); - - migrationBuilder.InsertData( - table: "Products", - columns: new[] { "Id", "CategoryId", "CreatedOn", "Description", "Name", "Price" }, - values: new object[,] - { - { 1, 1, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Mustang is ranked #1 in Sports Cars", "Mustang", 27155m }, - { 2, 1, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", "GT", 500000m }, - { 3, 1, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", "Ranger", 25000m }, - { 4, 1, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Raptor is a SCORE off-road trophy truck living in a asphalt world", "Raptor", 53205m }, - { 5, 1, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", "Maverick", 22470m }, - { 6, 2, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A powerful convertible sports car", "Roadster", 42800m }, - { 7, 2, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A perfectly adequate family sedan with sharp looks", "Altima", 24550m }, - { 8, 2, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", "GT-R", 113540m }, - { 9, 2, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A new smart SUV", "Juke", 28100m }, - { 10, 3, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "H247", 54950m }, - { 11, 3, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "V297", 103360m }, - { 12, 3, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "R50", 2000000m }, - { 13, 4, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M550i", 77790m }, - { 14, 4, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "540i", 60945m }, - { 15, 4, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530e", 56545m }, - { 16, 4, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530i", 55195m }, - { 17, 4, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M850i", 100045m }, - { 18, 4, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "X7", 77980m }, - { 19, 4, new DateTimeOffset(new DateTime(2022, 6, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "IX", 87000m }, - { 20, 5, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "rapid acceleration and dynamic handling", "Model 3", 61990m }, - { 21, 5, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "finishes near the top of our luxury electric car rankings.", "Model S", 135000m }, - { 22, 5, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Heart-pumping acceleration, long drive range", "Model X", 138890m }, - { 23, 5, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "extensive driving range, lots of standard safety features", "Model Y", 67790m } - }); - - migrationBuilder.CreateIndex( - name: "IX_Products_CategoryId", - table: "Products", - column: "CategoryId"); - - migrationBuilder.CreateIndex( - name: "IX_RoleClaims_RoleId", - table: "RoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "Roles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_UserClaims_UserId", - table: "UserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserLogins_UserId", - table: "UserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_RoleId", - table: "UserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "Users", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "Users", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Products"); - - migrationBuilder.DropTable( - name: "RoleClaims"); - - migrationBuilder.DropTable( - name: "UserClaims"); - - migrationBuilder.DropTable( - name: "UserLogins"); - - migrationBuilder.DropTable( - name: "UserRoles"); - - migrationBuilder.DropTable( - name: "UserTokens"); - - migrationBuilder.DropTable( - name: "Categories"); - - migrationBuilder.DropTable( - name: "Roles"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/Role.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/Role.cs deleted file mode 100644 index 78d394ed00..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/Role.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace AdminPanel.Server.Api.Models.Identity; - -public class Role : IdentityRole -{ -} - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailConfirmationTemplate.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailConfirmationTemplate.razor deleted file mode 100644 index c0088bca75..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailConfirmationTemplate.razor +++ /dev/null @@ -1,63 +0,0 @@ -@using AdminPanel.Server.Api.Models.Emailing -@using System -@using AdminPanel.Server.Api.Resources -@using Microsoft.Extensions.Localization - -@code { - [Parameter] public EmailConfirmationModel Model { get; set; } = default!; - [Inject] public IStringLocalizer EmailLocalizer { get; set; } = default!; -} - - - - - - - @EmailLocalizer[nameof(EmailStrings.ConfirmationEmailSubject)] - - -
- - - - - - - - - - -
- @EmailLocalizer[nameof(EmailStrings.WelcomeToApp)] -
- @EmailLocalizer[nameof(EmailStrings.EmailConfirmationMessageBody)] -
- - - - -
- - @EmailLocalizer[nameof(EmailStrings.ConfirmEmail)] - -
-
- - - - - - - -
- Company Logo -
- - @EmailLocalizer[nameof(EmailStrings.AppName)] - -
-
- - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/ResetPasswordTemplate.razor b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/ResetPasswordTemplate.razor deleted file mode 100644 index 95b7f3f66b..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/ResetPasswordTemplate.razor +++ /dev/null @@ -1,78 +0,0 @@ -@using AdminPanel.Server.Api.Models.Emailing -@using System -@using AdminPanel.Server.Api.Resources -@using Microsoft.Extensions.Localization - -@code { - [Parameter] public ResetPasswordModel Model { get; set; } = default!; - [Inject] public IStringLocalizer EmailLocalizer { get; set; } = default!; -} - - - - - - - @EmailLocalizer[nameof(EmailStrings.ResetPasswordEmailSubject)] - - -
- - - - - - - - - - - - - - - - - - - -
- @EmailLocalizer.GetString(nameof(EmailStrings.ResetPasswordHello), Model.DisplayName!) -
- @EmailLocalizer[nameof(EmailStrings.ResetPasswordMessage)] -
- - - - -
- - @EmailLocalizer[nameof(EmailStrings.ResetYourPassword)] - -
-
- @EmailLocalizer[nameof(EmailStrings.CopyLink)] -
- @Model.ResetPasswordLink -
- @EmailLocalizer[nameof(EmailStrings.ResetPasswordNote)] -
- - - - - - - -
- Company Logo -
- - @EmailLocalizer[nameof(EmailStrings.AppName)] - -
-
- - diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IJwtService.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IJwtService.cs deleted file mode 100644 index 2799006a89..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IJwtService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Shared.Dtos.Identity; - -namespace AdminPanel.Server.Api.Services.Contracts; - -public interface IJwtService -{ - Task GenerateToken(User user); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Middlewares.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Middlewares.cs deleted file mode 100644 index 34866f7836..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Middlewares.cs +++ /dev/null @@ -1,95 +0,0 @@ -//-:cnd:noEmit -using HealthChecks.UI.Client; -using Microsoft.AspNetCore.Diagnostics.HealthChecks; -using Microsoft.Net.Http.Headers; - -namespace AdminPanel.Server.Api.Startup; - -public class Middlewares -{ - public static void Use(WebApplication app, IHostEnvironment env, IConfiguration configuration) - { - app.UseForwardedHeaders(); - - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - -#if BlazorWebAssembly - if (env.IsDevelopment()) - { - app.UseWebAssemblyDebugging(); - } -#endif - } - -#if BlazorWebAssembly - app.UseBlazorFrameworkFiles(); -#endif - - if (env.IsDevelopment() is false) - { - app.UseHttpsRedirection(); - app.UseResponseCompression(); - } - - app.UseStaticFiles(new StaticFileOptions - { - OnPrepareResponse = ctx => - { - // https://bitplatform.dev/templates/cache-mechanism - ctx.Context.Response.GetTypedHeaders().CacheControl = new CacheControlHeaderValue() - { - MaxAge = TimeSpan.FromDays(7), - Public = true - }; - } - }); - - app.UseCors(options => options.WithOrigins("https://localhost:4031" /*BlazorServer*/, "http://localhost:8001" /*BlazorElectron*/, "https://0.0.0.0" /*BlazorHybrid*/, "app://0.0.0.0" /*BlazorHybrid*/) - .AllowAnyHeader().AllowAnyMethod().AllowCredentials()); - - app.UseResponseCaching(); - app.UseAuthentication(); - app.UseAuthorization(); - -#if MultilingualEnabled - var supportedCultures = CultureInfoManager.SupportedCultures.Select(sc => CultureInfoManager.CreateCultureInfo(sc.code)).ToArray(); - app.UseRequestLocalization(new RequestLocalizationOptions - { - SupportedCultures = supportedCultures, - SupportedUICultures = supportedCultures, - ApplyCurrentCultureToResponseHeaders = true - }.SetDefaultCulture(CultureInfoManager.DefaultCulture.code)); -#endif - - app.UseExceptionHandler("/", createScopeForErrors: true); - - app.UseSwagger(); - - app.UseSwaggerUI(options => - { - options.InjectJavascript($"/swagger/swagger-utils.js?v={Environment.TickCount64}"); - }); - - app.MapControllers().RequireAuthorization(); - - var appSettings = configuration.GetSection(nameof(AppSettings)).Get()!; - - var healthCheckSettings = appSettings.HealthCheckSettings; - - if (healthCheckSettings.EnableHealthChecks) - { - app.MapHealthChecks("/healthz", new HealthCheckOptions - { - ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse - }); - - app.MapHealthChecksUI(); - } - -#if BlazorWebAssembly - app.MapFallbackToPage("/_Host"); -#endif - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Attributes/DtoResourceTypeAttribute.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Attributes/DtoResourceTypeAttribute.cs deleted file mode 100644 index 57ecfdd38d..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Attributes/DtoResourceTypeAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace AdminPanel.Shared.Attributes; - -/// -/// Gets or sets the resource type to use for error message and localizations lookups. -/// -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] -public class DtoResourceTypeAttribute : Attribute -{ - public Type ResourceType { get; } - - public DtoResourceTypeAttribute(Type resourceType) - { - ResourceType = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignUpRequestDto.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignUpRequestDto.cs deleted file mode 100644 index 0795a64bc1..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignUpRequestDto.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace AdminPanel.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class SignUpRequestDto -{ - /// - /// The user's email - /// - /// me@gmail.com - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } - - /// 123456 - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [MinLength(6, ErrorMessage = nameof(AppStrings.MinLengthAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Password))] - public string? Password { get; set; } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/CultureInfoManager.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/CultureInfoManager.cs deleted file mode 100644 index 8eb53a817b..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/CultureInfoManager.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System.Reflection; - -namespace AdminPanel.Shared.Infra; - -public class CultureInfoManager -{ - public static (string name, string code) DefaultCulture { get; } = ("English", "en-US"); - - public static (string name, string code)[] SupportedCultures { get; } = new (string name, string code)[] - { - ("English US", "en-US"), - ("English UK", "en-GB"), - ("Française", "fr-FR"), - // ("فارسی", "fa-IR"), // To add more languages, you've to provide resx files. You might also put some efforts to change your app flow direction based on CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft - }; - - public static CultureInfo CreateCultureInfo(string cultureInfoId) - { - var cultureInfo = OperatingSystem.IsBrowser() ? CultureInfo.CreateSpecificCulture(cultureInfoId) : new CultureInfo(cultureInfoId); - - if (cultureInfoId == "fa-IR") - { - CustomizeCultureInfoForFaCulture(cultureInfo); - } - - return cultureInfo; - } - - public static void SetCurrentCulture(string? cultureInfoCookie) - { - var currentCulture = GetCurrentCulture(cultureInfoCookie); - - var cultureInfo = CreateCultureInfo(currentCulture); - - CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = CultureInfo.DefaultThreadCurrentCulture = CultureInfo.DefaultThreadCurrentUICulture = Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = cultureInfo; - } - - public static string GetCurrentCulture(string? preferredCultureCookie) - { - string culture = CultureInfo.CurrentUICulture.Name; - if (preferredCultureCookie is not null) - { - culture = preferredCultureCookie[(preferredCultureCookie.IndexOf("|uic=") + 5)..]; - } - if (SupportedCultures.Any(sc => sc.code == culture) is false) - { - culture = DefaultCulture.code; - } - return culture; - } - - /// - /// This is an example to demonstrate the way you can customize application culture - /// - public static CultureInfo CustomizeCultureInfoForFaCulture(CultureInfo cultureInfo) - { - cultureInfo.DateTimeFormat.MonthNames = new[] - { - "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" - }; - - cultureInfo.DateTimeFormat.AbbreviatedMonthNames = new[] - { - "فرور", "ارد", "خرد", "تیر", "مرد", "شهر", "مهر", "آبا", "آذر", "دی", "بهم", "اسف", "" - }; - - cultureInfo.DateTimeFormat.MonthGenitiveNames = cultureInfo.DateTimeFormat.MonthNames; - cultureInfo.DateTimeFormat.AbbreviatedMonthGenitiveNames = cultureInfo.DateTimeFormat.AbbreviatedMonthNames; - cultureInfo.DateTimeFormat.DayNames = new[] - { - "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" - }; - - cultureInfo.DateTimeFormat.AbbreviatedDayNames = new[] - { - "ی", "د", "س", "چ", "پ", "ج", "ش" - }; - - cultureInfo.DateTimeFormat.ShortestDayNames = new[] - { - "ی", "د", "س", "چ", "پ", "ج", "ش" - }; - - cultureInfo.DateTimeFormat.AMDesignator = "ق.ظ"; - cultureInfo.DateTimeFormat.PMDesignator = "ب.ظ"; - cultureInfo.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd"; - cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Saturday; - - var cultureData = _cultureDataField.GetValue(cultureInfo.TextInfo); - - _iReadingLayoutField.SetValue(cultureData, 1 /*rtl*/); // this affects cultureInfo.TextInfo.IsRightToLeft - - if (cultureInfo.DateTimeFormat.Calendar is not PersianCalendar) - { - cultureInfo.DateTimeFormat.Calendar = new PersianCalendar(); - } - - return cultureInfo; - } - - private static readonly FieldInfo _cultureDataField = typeof(TextInfo).GetField("_cultureData", BindingFlags.NonPublic | BindingFlags.Instance)!; - - private static readonly FieldInfo _iReadingLayoutField = Type.GetType("System.Globalization.CultureData, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e")!.GetField("_iReadingLayout", BindingFlags.NonPublic | BindingFlags.Instance)!; -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.Designer.cs b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.Designer.cs deleted file mode 100644 index a889652b33..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.Designer.cs +++ /dev/null @@ -1,2422 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AdminPanel.Shared.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class AppStrings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal AppStrings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AdminPanel.Shared.Resources.AppStrings", typeof(AppStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Action. - /// - public static string Action { - get { - return ResourceManager.GetString("Action", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Active. - /// - public static string Active { - get { - return ResourceManager.GetString("Active", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add. - /// - public static string Add { - get { - return ResourceManager.GetString("Add", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New category. - /// - public static string AddCategory { - get { - return ResourceManager.GetString("AddCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add/Edit category. - /// - public static string AddEditCategory { - get { - return ResourceManager.GetString("AddEditCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New product. - /// - public static string AddProduct { - get { - return ResourceManager.GetString("AddProduct", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to All. - /// - public static string All { - get { - return ResourceManager.GetString("All", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field does not equal any of the values specified in AllowedValuesAttribute.. - /// - public static string AllowedValuesAttribute_Invalid { - get { - return ResourceManager.GetString("AllowedValuesAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Alphabetical. - /// - public static string Alphabetical { - get { - return ResourceManager.GetString("Alphabetical", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Already have an account?. - /// - public static string AlreadyHaveAccountMessage { - get { - return ResourceManager.GetString("AlreadyHaveAccountMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Admin​Panel. - /// - public static string AppTitle { - get { - return ResourceManager.GetString("AppTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete category {0}. - /// - public static string AreYouSureWannaDeleteCategory { - get { - return ResourceManager.GetString("AreYouSureWannaDeleteCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete product {0}. - /// - public static string AreYouSureWannaDeleteProduct { - get { - return ResourceManager.GetString("AreYouSureWannaDeleteProduct", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to Sign out?. - /// - public static string AreYouSureYouWantToSignout { - get { - return ResourceManager.GetString("AreYouSureYouWantToSignout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.. - /// - public static string AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties { - get { - return ResourceManager.GetString("AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type '{0}' does not contain a public property named '{1}'.. - /// - public static string AttributeStore_Unknown_Property { - get { - return ResourceManager.GetString("AttributeStore_Unknown_Property", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Back. - /// - public static string Back { - get { - return ResourceManager.GetString("Back", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid request. - /// - public static string BadRequestException { - get { - return ResourceManager.GetString("BadRequestException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is not a valid Base64 encoding.. - /// - public static string Base64StringAttribute_Invalid { - get { - return ResourceManager.GetString("Base64StringAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Birthdate. - /// - public static string BirthDate { - get { - return ResourceManager.GetString("BirthDate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cancel. - /// - public static string Cancel { - get { - return ResourceManager.GetString("Cancel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Categories. - /// - public static string Categories { - get { - return ResourceManager.GetString("Categories", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Categories. - /// - public static string CategoriesPageTitle { - get { - return ResourceManager.GetString("CategoriesPageTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Category. - /// - public static string Category { - get { - return ResourceManager.GetString("Category", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Category entity could not be found. - /// - public static string CategoryCouldNotBeFound { - get { - return ResourceManager.GetString("CategoryCouldNotBeFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This category contain some products, so you can't delete it. - /// - public static string CategoryNotEmpty { - get { - return ResourceManager.GetString("CategoryNotEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check your Spam/Junk, if you could not find it in the Inbox.. - /// - public static string CheckSpamMailMessage { - get { - return ResourceManager.GetString("CheckSpamMailMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Close. - /// - public static string Close { - get { - return ResourceManager.GetString("Close", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Color. - /// - public static string Color { - get { - return ResourceManager.GetString("Color", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property {0}.{1} could not be found.. - /// - public static string Common_PropertyNotFound { - get { - return ResourceManager.GetString("Common_PropertyNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not find a property named {0}.. - /// - public static string CompareAttribute_UnknownProperty { - get { - return ResourceManager.GetString("CompareAttribute_UnknownProperty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to '{0}' and '{1}' do not match.. - /// - public static string CompareAttribute_ValidationError { - get { - return ResourceManager.GetString("CompareAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Completed. - /// - public static string Completed { - get { - return ResourceManager.GetString("Completed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Optimistic concurrency failure, object has been modified.. - /// - public static string ConcurrencyFailure { - get { - return ResourceManager.GetString("ConcurrencyFailure", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to We have sent a confirmation link to your email address. - ///Please confirm your email by clicking on the link.. - /// - public static string ConfirmEmailMessage { - get { - return ResourceManager.GetString("ConfirmEmailMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confirm Your Email Address. - /// - public static string ConfirmEmailTitle { - get { - return ResourceManager.GetString("ConfirmEmailTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confirm New Password. - /// - public static string ConfirmNewPassword { - get { - return ResourceManager.GetString("ConfirmNewPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Request could not be processed because of conflict in the request. - /// - public static string ConflicException { - get { - return ResourceManager.GetString("ConflicException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is not a valid credit card number.. - /// - public static string CreditCardAttribute_Invalid { - get { - return ResourceManager.GetString("CreditCardAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Custom color. - /// - public static string CustomColor { - get { - return ResourceManager.GetString("CustomColor", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.. - /// - public static string CustomValidationAttribute_Method_Must_Return_ValidationResult { - get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Must_Return_ValidationResult", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.. - /// - public static string CustomValidationAttribute_Method_Not_Found { - get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Not_Found", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The CustomValidationAttribute.Method was not specified.. - /// - public static string CustomValidationAttribute_Method_Required { - get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Required", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional.. - /// - public static string CustomValidationAttribute_Method_Signature { - get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Signature", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}.. - /// - public static string CustomValidationAttribute_Type_Conversion_Failed { - get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Conversion_Failed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The custom validation type '{0}' must be public.. - /// - public static string CustomValidationAttribute_Type_Must_Be_Public { - get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Must_Be_Public", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} is not valid.. - /// - public static string CustomValidationAttribute_ValidationError { - get { - return ResourceManager.GetString("CustomValidationAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The CustomValidationAttribute.ValidatorType was not specified.. - /// - public static string CustomValidationAttribute_ValidatorType_Required { - get { - return ResourceManager.GetString("CustomValidationAttribute_ValidatorType_Required", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The custom DataType string cannot be null or empty.. - /// - public static string DataTypeAttribute_EmptyDataTypeString { - get { - return ResourceManager.GetString("DataTypeAttribute_EmptyDataTypeString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Date. - /// - public static string Date { - get { - return ResourceManager.GetString("Date", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Default color picker. - /// - public static string DefaultColorPicker { - get { - return ResourceManager.GetString("DefaultColorPicker", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An unknown failure has occurred.. - /// - public static string DefaultError { - get { - return ResourceManager.GetString("DefaultError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete. - /// - public static string Delete { - get { - return ResourceManager.GetString("Delete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete Account. - /// - public static string DeleteAccount { - get { - return ResourceManager.GetString("DeleteAccount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete your account?. - /// - public static string DeleteAccountPrompt { - get { - return ResourceManager.GetString("DeleteAccountPrompt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete category. - /// - public static string DeleteCategory { - get { - return ResourceManager.GetString("DeleteCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete product. - /// - public static string DeleteProduct { - get { - return ResourceManager.GetString("DeleteProduct", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field equals one of the values specified in DeniedValuesAttribute.. - /// - public static string DeniedValuesAttribute_Invalid { - get { - return ResourceManager.GetString("DeniedValuesAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Description. - /// - public static string Description { - get { - return ResourceManager.GetString("Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} property has not been set. Use the {1} method to get the value.. - /// - public static string DisplayAttribute_PropertyNotSet { - get { - return ResourceManager.GetString("DisplayAttribute_PropertyNotSet", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Don’t have an account?. - /// - public static string DontHaveAccountMessage { - get { - return ResourceManager.GetString("DontHaveAccountMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email '{0}' is already taken.. - /// - public static string DuplicateEmail { - get { - return ResourceManager.GetString("DuplicateEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Role name '{0}' is already taken.. - /// - public static string DuplicateRoleName { - get { - return ResourceManager.GetString("DuplicateRoleName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username '{0}' is already taken.. - /// - public static string DuplicateUserName { - get { - return ResourceManager.GetString("DuplicateUserName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit. - /// - public static string Edit { - get { - return ResourceManager.GetString("Edit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit category. - /// - public static string EditCategory { - get { - return ResourceManager.GetString("EditCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit product. - /// - public static string EditProduct { - get { - return ResourceManager.GetString("EditProduct", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit profile. - /// - public static string EditProfile { - get { - return ResourceManager.GetString("EditProfile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edit profile. - /// - public static string EditProfileTitle { - get { - return ResourceManager.GetString("EditProfileTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email. - /// - public static string Email { - get { - return ResourceManager.GetString("Email", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is not a valid e-mail address.. - /// - public static string EmailAddressAttribute_ValidationError { - get { - return ResourceManager.GetString("EmailAddressAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your email is already confirmed.. - /// - public static string EmailAlreadyConfirmed { - get { - return ResourceManager.GetString("EmailAlreadyConfirmed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email Confirmation Failed!. - /// - public static string EmailConfirmationFailedMessage { - get { - return ResourceManager.GetString("EmailConfirmationFailedMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email Confirmation. - /// - public static string EmailConfirmationTitle { - get { - return ResourceManager.GetString("EmailConfirmationTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email Confirmed Successfully!. - /// - public static string EmailConfirmedSuccessfullyMessage { - get { - return ResourceManager.GetString("EmailConfirmedSuccessfullyMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter category name. - /// - public static string EnterCategoryName { - get { - return ResourceManager.GetString("EnterCategoryName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter product name. - /// - public static string EnterProductName { - get { - return ResourceManager.GetString("EnterProductName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type provided for EnumDataTypeAttribute cannot be null.. - /// - public static string EnumDataTypeAttribute_TypeCannotBeNull { - get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeCannotBeNull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type '{0}' needs to represent an enumeration type.. - /// - public static string EnumDataTypeAttribute_TypeNeedsToBeAnEnum { - get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeNeedsToBeAnEnum", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error. - /// - public static string Error { - get { - return ResourceManager.GetString("Error", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field only accepts files with the following extensions: {1}. - /// - public static string FileExtensionsAttribute_Invalid { - get { - return ResourceManager.GetString("FileExtensionsAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while removing file. - /// - public static string FileRemoveFailed { - get { - return ResourceManager.GetString("FileRemoveFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while uploading file. - /// - public static string FileUploadFailed { - get { - return ResourceManager.GetString("FileUploadFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Access to the requested resource is forbidden. - /// - public static string ForbiddenException { - get { - return ResourceManager.GetString("ForbiddenException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter the email address you have been signed up with so we can send a reset password link to your email address.. - /// - public static string ForgetPasswordMessage { - get { - return ResourceManager.GetString("ForgetPasswordMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Forget password. - /// - public static string ForgetPasswordTitle { - get { - return ResourceManager.GetString("ForgetPasswordTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Forgot password?. - /// - public static string ForgotPasswordLink { - get { - return ResourceManager.GetString("ForgotPasswordLink", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please enter the email address you have been signed up with so we can send a reset password link to your email address.. - /// - public static string ForgotPasswordMessage { - get { - return ResourceManager.GetString("ForgotPasswordMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Forgot password. - /// - public static string ForgotPasswordTitle { - get { - return ResourceManager.GetString("ForgotPasswordTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to FullName. - /// - public static string FullName { - get { - return ResourceManager.GetString("FullName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gender. - /// - public static string Gender { - get { - return ResourceManager.GetString("Gender", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Female. - /// - public static string GenderFemale { - get { - return ResourceManager.GetString("GenderFemale", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Male. - /// - public static string GenderMale { - get { - return ResourceManager.GetString("GenderMale", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Other. - /// - public static string GenderOther { - get { - return ResourceManager.GetString("GenderOther", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to GitHub Repo. - /// - public static string GitHubRepo { - get { - return ResourceManager.GetString("GitHubRepo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Go to today. - /// - public static string GoToToday { - get { - return ResourceManager.GetString("GoToToday", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Home. - /// - public static string Home { - get { - return ResourceManager.GetString("Home", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor Admin​Panel easily in the shortest time ever!. - /// - public static string HomeMessage { - get { - return ResourceManager.GetString("HomeMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to bit Admin​Panel. - /// - public static string HomeTitle { - get { - return ResourceManager.GetString("HomeTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Id. - /// - public static string Id { - get { - return ResourceManager.GetString("Id", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Looks like the confirmation link either is invalid or has expired.. - /// - public static string InvalidConfirmationLinkMessage { - get { - return ResourceManager.GetString("InvalidConfirmationLinkMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Email '{0}' is invalid.. - /// - public static string InvalidEmail { - get { - return ResourceManager.GetString("InvalidEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type {0} must derive from {1}<{2}>.. - /// - public static string InvalidManagerType { - get { - return ResourceManager.GetString("InvalidManagerType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The provided PasswordHasherCompatibilityMode is invalid.. - /// - public static string InvalidPasswordHasherCompatibilityMode { - get { - return ResourceManager.GetString("InvalidPasswordHasherCompatibilityMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The iteration count must be a positive integer.. - /// - public static string InvalidPasswordHasherIterationCount { - get { - return ResourceManager.GetString("InvalidPasswordHasherIterationCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Role name '{0}' is invalid.. - /// - public static string InvalidRoleName { - get { - return ResourceManager.GetString("InvalidRoleName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid token.. - /// - public static string InvalidToken { - get { - return ResourceManager.GetString("InvalidToken", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username '{0}' is invalid, can only contain letters or digits.. - /// - public static string InvalidUserName { - get { - return ResourceManager.GetString("InvalidUserName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid username or password. - /// - public static string InvalidUsernameOrPassword { - get { - return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Is accept privacy policy?. - /// - public static string IsAcceptPrivacy { - get { - return ResourceManager.GetString("IsAcceptPrivacy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Known error. - /// - public static string KnownException { - get { - return ResourceManager.GetString("KnownException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Last 30 days category count. - /// - public static string Last30DaysCategoryCount { - get { - return ResourceManager.GetString("Last30DaysCategoryCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Last 30 days product count. - /// - public static string Last30DaysProductCount { - get { - return ResourceManager.GetString("Last30DaysProductCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength.. - /// - public static string LengthAttribute_InvalidMaxLength { - get { - return ResourceManager.GetString("LengthAttribute_InvalidMaxLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to LengthAttribute must have a MinimumLength value that is zero or greater.. - /// - public static string LengthAttribute_InvalidMinLength { - get { - return ResourceManager.GetString("LengthAttribute_InvalidMinLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field of type {0} must be a string, array or ICollection type.. - /// - public static string LengthAttribute_InvalidValueType { - get { - return ResourceManager.GetString("LengthAttribute_InvalidValueType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'.. - /// - public static string LengthAttribute_ValidationError { - get { - return ResourceManager.GetString("LengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'.. - /// - public static string LocalizableString_LocalizationFailed { - get { - return ResourceManager.GetString("LocalizableString_LocalizationFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A user with this login already exists.. - /// - public static string LoginAlreadyAssociated { - get { - return ResourceManager.GetString("LoginAlreadyAssociated", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Made with. - /// - public static string MadeWith { - get { - return ResourceManager.GetString("MadeWith", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.. - /// - public static string MaxLengthAttribute_InvalidMaxLength { - get { - return ResourceManager.GetString("MaxLengthAttribute_InvalidMaxLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a maximum length of '{1}'.. - /// - public static string MaxLengthAttribute_ValidationError { - get { - return ResourceManager.GetString("MaxLengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to MetadataClassType cannot be null.. - /// - public static string MetadataTypeAttribute_TypeCannotBeNull { - get { - return ResourceManager.GetString("MetadataTypeAttribute_TypeCannotBeNull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to MinLengthAttribute must have a Length value that is zero or greater.. - /// - public static string MinLengthAttribute_InvalidMinLength { - get { - return ResourceManager.GetString("MinLengthAttribute_InvalidMinLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a minimum length of '{1}'.. - /// - public static string MinLengthAttribute_ValidationError { - get { - return ResourceManager.GetString("MinLengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AddIdentity must be called on the service collection.. - /// - public static string MustCallAddIdentity { - get { - return ResourceManager.GetString("MustCallAddIdentity", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Name. - /// - public static string Name { - get { - return ResourceManager.GetString("Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Password. - /// - public static string NewPassword { - get { - return ResourceManager.GetString("NewPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No. - /// - public static string No { - get { - return ResourceManager.GetString("No", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true.. - /// - public static string NoPersonalDataProtector { - get { - return ResourceManager.GetString("NoPersonalDataProtector", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No RoleType was specified, try AddRoles<TRole>().. - /// - public static string NoRoleType { - get { - return ResourceManager.GetString("NoRoleType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered.. - /// - public static string NoTokenProvider { - get { - return ResourceManager.GetString("NoTokenProvider", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Haven’t you received the confirmation email?. - /// - public static string NotReceivedConfirmationEmailMessage { - get { - return ResourceManager.GetString("NotReceivedConfirmationEmailMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User security stamp cannot be null.. - /// - public static string NullSecurityStamp { - get { - return ResourceManager.GetString("NullSecurityStamp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to OR. - /// - public static string Or { - get { - return ResourceManager.GetString("Or", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password. - /// - public static string Password { - get { - return ResourceManager.GetString("Password", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your password changed successfully.. - /// - public static string PasswordChangedSuccessfullyMessage { - get { - return ResourceManager.GetString("PasswordChangedSuccessfullyMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Incorrect password.. - /// - public static string PasswordMismatch { - get { - return ResourceManager.GetString("PasswordMismatch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must have at least one digit ('0'-'9').. - /// - public static string PasswordRequiresDigit { - get { - return ResourceManager.GetString("PasswordRequiresDigit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must have at least one lowercase ('a'-'z').. - /// - public static string PasswordRequiresLower { - get { - return ResourceManager.GetString("PasswordRequiresLower", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must have at least one non alphanumeric character.. - /// - public static string PasswordRequiresNonAlphanumeric { - get { - return ResourceManager.GetString("PasswordRequiresNonAlphanumeric", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must use at least {0} different characters.. - /// - public static string PasswordRequiresUniqueChars { - get { - return ResourceManager.GetString("PasswordRequiresUniqueChars", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must have at least one uppercase ('A'-'Z').. - /// - public static string PasswordRequiresUpper { - get { - return ResourceManager.GetString("PasswordRequiresUpper", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Passwords must be at least {0} characters.. - /// - public static string PasswordTooShort { - get { - return ResourceManager.GetString("PasswordTooShort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is not a valid phone number.. - /// - public static string PhoneAttribute_Invalid { - get { - return ResourceManager.GetString("PhoneAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Price. - /// - public static string Price { - get { - return ResourceManager.GetString("Price", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Privacy. - /// - public static string Privacy { - get { - return ResourceManager.GetString("Privacy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to I agree to the . - /// - public static string PrivacyPolicyAgreementMessage { - get { - return ResourceManager.GetString("PrivacyPolicyAgreementMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use this page to detail your site's privacy policy.. - /// - public static string PrivacyPolicyPageMessage { - get { - return ResourceManager.GetString("PrivacyPolicyPageMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use this section to detail your site's privacy policy.. - /// - public static string PrivacyPolicySectionMessage { - get { - return ResourceManager.GetString("PrivacyPolicySectionMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Privacy Policy. - /// - public static string PrivacyPolicyTitle { - get { - return ResourceManager.GetString("PrivacyPolicyTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Product category. - /// - public static string ProductCategory { - get { - return ResourceManager.GetString("ProductCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Product catologue. - /// - public static string ProductCatologue { - get { - return ResourceManager.GetString("ProductCatologue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Product entity could not be found. - /// - public static string ProductCouldNotBeFound { - get { - return ResourceManager.GetString("ProductCouldNotBeFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Products. - /// - public static string Products { - get { - return ResourceManager.GetString("Products", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Product sales. - /// - public static string ProductSales { - get { - return ResourceManager.GetString("ProductSales", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This chart shows the sale number of each product.. - /// - public static string ProductSalesText { - get { - return ResourceManager.GetString("ProductSalesText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Products count per category chart. - /// - public static string ProductsCountPerCategoryChart { - get { - return ResourceManager.GetString("ProductsCountPerCategoryChart", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This chart shows the number of products in each category.. - /// - public static string ProductsCountPerCategoryChartText { - get { - return ResourceManager.GetString("ProductsCountPerCategoryChartText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Products. - /// - public static string ProductsPageTitle { - get { - return ResourceManager.GetString("ProductsPageTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Products percentage per category. - /// - public static string ProductsPercentagePerCategory { - get { - return ResourceManager.GetString("ProductsPercentagePerCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This chart shows the percentage of products in each category.. - /// - public static string ProductsPercentagePerCategoryText { - get { - return ResourceManager.GetString("ProductsPercentagePerCategoryText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Image profile. - /// - public static string ProfileImage { - get { - return ResourceManager.GetString("ProfileImage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Profile updated successfully.. - /// - public static string ProfileUpdatedSuccessfullyMessage { - get { - return ResourceManager.GetString("ProfileUpdatedSuccessfullyMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type {0} must implement {1}.. - /// - public static string RangeAttribute_ArbitraryTypeNotIComparable { - get { - return ResourceManager.GetString("RangeAttribute_ArbitraryTypeNotIComparable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot use exclusive bounds when the maximum value is equal to the minimum value.. - /// - public static string RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual { - get { - return ResourceManager.GetString("RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.. - /// - public static string RangeAttribute_MinGreaterThanMax { - get { - return ResourceManager.GetString("RangeAttribute_MinGreaterThanMax", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The minimum and maximum values must be set.. - /// - public static string RangeAttribute_Must_Set_Min_And_Max { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Min_And_Max", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The OperandType must be set when strings are used for minimum and maximum values.. - /// - public static string RangeAttribute_Must_Set_Operand_Type { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Operand_Type", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2}.. - /// - public static string RangeAttribute_ValidationError { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2}.. - /// - public static string RangeAttribute_ValidationError_MinExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MinExclusive_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Recovery code redemption failed.. - /// - public static string RecoveryCodeRedemptionFailed { - get { - return ResourceManager.GetString("RecoveryCodeRedemptionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must match the regular expression '{1}'.. - /// - public static string RegexAttribute_ValidationError { - get { - return ResourceManager.GetString("RegexAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The pattern must be set to a valid regular expression.. - /// - public static string RegularExpressionAttribute_Empty_Pattern { - get { - return ResourceManager.GetString("RegularExpressionAttribute_Empty_Pattern", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove. - /// - public static string Remove { - get { - return ResourceManager.GetString("Remove", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is required.. - /// - public static string RequiredAttribute_ValidationError { - get { - return ResourceManager.GetString("RequiredAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The confirmation link has been re-sent to your email address.. - /// - public static string ResendConfirmationLinkMessage { - get { - return ResourceManager.GetString("ResendConfirmationLinkMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resend email. - /// - public static string ResendEmail { - get { - return ResourceManager.GetString("ResendEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPassword { - get { - return ResourceManager.GetString("ResetPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The reset password link has been sent to your email address.. - /// - public static string ResetPasswordLinkSentMessage { - get { - return ResourceManager.GetString("ResetPasswordLinkSentMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPasswordTitle { - get { - return ResourceManager.GetString("ResetPasswordTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resource not found. - /// - public static string ResourceNotFoundException { - get { - return ResourceManager.GetString("ResourceNotFoundException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Request data is not valid. - /// - public static string ResourceValidationException { - get { - return ResourceManager.GetString("ResourceValidationException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while communicating with server. - /// - public static string RestException { - get { - return ResourceManager.GetString("RestException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Role {0} does not exist.. - /// - public static string RoleNotFound { - get { - return ResourceManager.GetString("RoleNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save. - /// - public static string Save { - get { - return ResourceManager.GetString("Save", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Search on name. - /// - public static string SearchOnName { - get { - return ResourceManager.GetString("SearchOnName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select a category. - /// - public static string SelectACategory { - get { - return ResourceManager.GetString("SelectACategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select your birth date. - /// - public static string SelectBirthDate { - get { - return ResourceManager.GetString("SelectBirthDate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select category. - /// - public static string SelectCategory { - get { - return ResourceManager.GetString("SelectCategory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Submit. - /// - public static string SendResetLink { - get { - return ResourceManager.GetString("SendResetLink", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to connect to server.. - /// - public static string ServerConnectionException { - get { - return ResourceManager.GetString("ServerConnectionException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignIn { - get { - return ResourceManager.GetString("SignIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in as different user. - /// - public static string SignInAsDifferentUser { - get { - return ResourceManager.GetString("SignInAsDifferentUser", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignInTitle { - get { - return ResourceManager.GetString("SignInTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign out. - /// - public static string SignOut { - get { - return ResourceManager.GetString("SignOut", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to Sign out?. - /// - public static string SignOutPrompt { - get { - return ResourceManager.GetString("SignOutPrompt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign up. - /// - public static string SignUp { - get { - return ResourceManager.GetString("SignUp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign up. - /// - public static string SingUpTitle { - get { - return ResourceManager.GetString("SingUpTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sort by. - /// - public static string SortBy { - get { - return ResourceManager.GetString("SortBy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Admin​Panel is a project template that provides common features such as Sign-up & Sign-in. This template is powered by bit BlazorUI components.. - /// - public static string StartupPageDescription { - get { - return ResourceManager.GetString("StartupPageDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to bit Admin​Panel. - /// - public static string StartupPageTitle { - get { - return ResourceManager.GetString("StartupPageTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true.. - /// - public static string StoreNotIProtectedUserStore { - get { - return ResourceManager.GetString("StoreNotIProtectedUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableRoleStore<TRole>.. - /// - public static string StoreNotIQueryableRoleStore { - get { - return ResourceManager.GetString("StoreNotIQueryableRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableUserStore<TUser>.. - /// - public static string StoreNotIQueryableUserStore { - get { - return ResourceManager.GetString("StoreNotIQueryableUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IRoleClaimStore<TRole>.. - /// - public static string StoreNotIRoleClaimStore { - get { - return ResourceManager.GetString("StoreNotIRoleClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticationTokenStore<User>.. - /// - public static string StoreNotIUserAuthenticationTokenStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticationTokenStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticatorKeyStore<User>.. - /// - public static string StoreNotIUserAuthenticatorKeyStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticatorKeyStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserClaimStore<TUser>.. - /// - public static string StoreNotIUserClaimStore { - get { - return ResourceManager.GetString("StoreNotIUserClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserConfirmationStore<TUser>.. - /// - public static string StoreNotIUserConfirmationStore { - get { - return ResourceManager.GetString("StoreNotIUserConfirmationStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserEmailStore<TUser>.. - /// - public static string StoreNotIUserEmailStore { - get { - return ResourceManager.GetString("StoreNotIUserEmailStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLockoutStore<TUser>.. - /// - public static string StoreNotIUserLockoutStore { - get { - return ResourceManager.GetString("StoreNotIUserLockoutStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLoginStore<TUser>.. - /// - public static string StoreNotIUserLoginStore { - get { - return ResourceManager.GetString("StoreNotIUserLoginStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPasswordStore<TUser>.. - /// - public static string StoreNotIUserPasswordStore { - get { - return ResourceManager.GetString("StoreNotIUserPasswordStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPhoneNumberStore<TUser>.. - /// - public static string StoreNotIUserPhoneNumberStore { - get { - return ResourceManager.GetString("StoreNotIUserPhoneNumberStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserRoleStore<TUser>.. - /// - public static string StoreNotIUserRoleStore { - get { - return ResourceManager.GetString("StoreNotIUserRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserSecurityStampStore<TUser>.. - /// - public static string StoreNotIUserSecurityStampStore { - get { - return ResourceManager.GetString("StoreNotIUserSecurityStampStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorRecoveryCodeStore<User>.. - /// - public static string StoreNotIUserTwoFactorRecoveryCodeStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorRecoveryCodeStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorStore<TUser>.. - /// - public static string StoreNotIUserTwoFactorStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The maximum length must be a nonnegative integer.. - /// - public static string StringLengthAttribute_InvalidMaxLength { - get { - return ResourceManager.GetString("StringLengthAttribute_InvalidMaxLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a maximum length of {1}.. - /// - public static string StringLengthAttribute_ValidationError { - get { - return ResourceManager.GetString("StringLengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.. - /// - public static string StringLengthAttribute_ValidationErrorIncludingMinimum { - get { - return ResourceManager.GetString("StringLengthAttribute_ValidationErrorIncludingMinimum", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Submit. - /// - public static string Submit { - get { - return ResourceManager.GetString("Submit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Terms. - /// - public static string TermsTitle { - get { - return ResourceManager.GetString("TermsTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Too many requests. - /// - public static string TooManyRequestsExceptions { - get { - return ResourceManager.GetString("TooManyRequestsExceptions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Total categories. - /// - public static string TotalCategories { - get { - return ResourceManager.GetString("TotalCategories", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Total products. - /// - public static string TotalProducts { - get { - return ResourceManager.GetString("TotalProducts", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.. - /// - public static string UIHintImplementation_ControlParameterKeyIsNotAString { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNotAString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} is null. Every key control parameter must be a string.. - /// - public static string UIHintImplementation_ControlParameterKeyIsNull { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' occurs more than once.. - /// - public static string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyOccursMoreThanOnce", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The number of control parameters must be even.. - /// - public static string UIHintImplementation_NeedEvenNumberOfControlParameters { - get { - return ResourceManager.GetString("UIHintImplementation_NeedEvenNumberOfControlParameters", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your request lacks valid authentication credentials. - /// - public static string UnauthorizedException { - get { - return ResourceManager.GetString("UnauthorizedException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unknown error has occurred. - /// - public static string UnknownException { - get { - return ResourceManager.GetString("UnknownException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Update. - /// - public static string Update { - get { - return ResourceManager.GetString("Update", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The record was modified by another user after you got the original data. the operation was canceled.. - /// - public static string UpdateConcurrencyException { - get { - return ResourceManager.GetString("UpdateConcurrencyException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Upload a new profile image. - /// - public static string UploadNewProfileImage { - get { - return ResourceManager.GetString("UploadNewProfileImage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is not a valid fully-qualified http, https, or ftp URL.. - /// - public static string UrlAttribute_Invalid { - get { - return ResourceManager.GetString("UrlAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already has a password set.. - /// - public static string UserAlreadyHasPassword { - get { - return ResourceManager.GetString("UserAlreadyHasPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already in role '{0}'.. - /// - public static string UserAlreadyInRole { - get { - return ResourceManager.GetString("UserAlreadyInRole", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User image could not be found. - /// - public static string UserImageCouldNotBeFound { - get { - return ResourceManager.GetString("UserImageCouldNotBeFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User is locked out.. - /// - public static string UserLockedOut { - get { - return ResourceManager.GetString("UserLockedOut", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lockout is not enabled for this user.. - /// - public static string UserLockoutNotEnabled { - get { - return ResourceManager.GetString("UserLockoutNotEnabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username. - /// - public static string UserName { - get { - return ResourceManager.GetString("UserName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User {0} does not exist.. - /// - public static string UserNameNotFound { - get { - return ResourceManager.GetString("UserNameNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User is not in role '{0}'.. - /// - public static string UserNotInRole { - get { - return ResourceManager.GetString("UserNotInRole", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Using bit platform!. - /// - public static string UsingBitPlatform { - get { - return ResourceManager.GetString("UsingBitPlatform", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.. - /// - public static string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource { - get { - return ResourceManager.GetString("ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context).. - /// - public static string ValidationAttribute_IsValid_NotImplemented { - get { - return ResourceManager.GetString("ValidationAttribute_IsValid_NotImplemented", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.. - /// - public static string ValidationAttribute_NeedBothResourceTypeAndResourceName { - get { - return ResourceManager.GetString("ValidationAttribute_NeedBothResourceTypeAndResourceName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property '{0}' on resource type '{1}' is not a string type.. - /// - public static string ValidationAttribute_ResourcePropertyNotStringType { - get { - return ResourceManager.GetString("ValidationAttribute_ResourcePropertyNotStringType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The resource type '{0}' does not have an accessible static property named '{1}'.. - /// - public static string ValidationAttribute_ResourceTypeDoesNotHaveProperty { - get { - return ResourceManager.GetString("ValidationAttribute_ResourceTypeDoesNotHaveProperty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} is invalid.. - /// - public static string ValidationAttribute_ValidationError { - get { - return ResourceManager.GetString("ValidationAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance provided must match the ObjectInstance on the ValidationContext supplied.. - /// - public static string Validator_InstanceMustMatchValidationContextInstance { - get { - return ResourceManager.GetString("Validator_InstanceMustMatchValidationContextInstance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value for property '{0}' must be of type '{1}'.. - /// - public static string Validator_Property_Value_Wrong_Type { - get { - return ResourceManager.GetString("Validator_Property_Value_Wrong_Type", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You have already requested the confirmation email. Try again in {0}. - /// - public static string WaitForConfirmationEmailResendDelay { - get { - return ResourceManager.GetString("WaitForConfirmationEmailResendDelay", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You have already requested the reset password email. Try again in {0}. - /// - public static string WaitForResetPasswordEmailResendDelay { - get { - return ResourceManager.GetString("WaitForResetPasswordEmailResendDelay", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Yes. - /// - public static string Yes { - get { - return ResourceManager.GetString("Yes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You're signed in as. - /// - public static string YouAreSignInAs { - get { - return ResourceManager.GetString("YouAreSignInAs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You must agree to our privacy policy.. - /// - public static string YouHaveToAcceptPrivacyPolicy { - get { - return ResourceManager.GetString("YouHaveToAcceptPrivacyPolicy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You must be signed in to continue.. - /// - public static string YouNeedToSignIn { - get { - return ResourceManager.GetString("YouNeedToSignIn", resourceCulture); - } - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.fr.resx b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.fr.resx deleted file mode 100644 index 3a6b849baf..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.fr.resx +++ /dev/null @@ -1,929 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Active - - - Nouvelle catégorie - - - Nouveau produit - - - Créez facilement votre application Blazor multi-mode (WASM, serveur, hybride, pré-rendu) dans les plus brefs délais ! - - - Admin​Panel Accueil - - - Admin​Panel - - - Toute - - - Alphabétique - - - Annuler - - - Catégories - - - Complété - - - Complété - - - Éditer - - - Modifier la catégorie - - - Modifier le produit - - - Editer le profil - - - Nom et prénom - - - Autre - - - Femelle - - - Mâle - - - Dépôt GitHub - - - Nombre de catégories des 30 derniers jours - - - Nombre de produits des 30 derniers jours - - - Vous n'avez pas reçu le mail de confirmation ? - - - je suis d'accord avec le - - - Utilisez cette page pour détailler la politique de confidentialité de votre site. - - - Utilisez cette section pour détailler la politique de confidentialité de votre site. - - - Politique de confidentialité - - - Ventes de produits - - - Ce tableau montre le nombre de vente de chaque produit. - - - Tableau de nombre de produits par catégorie - - - Ce graphique montre le nombre de produits dans chaque catégorie. - - - Des produits - - - Pourcentage de produits par catégorie - - - Ce graphique montre le pourcentage de produits dans chaque catégorie. - - - Mise à jour du profil réussie. - - - Retirer - - - sauvegarder - - - Sélectionnez votre date de naissance - - - Trier par - - - Le panneau d'administration est un modèle de projet qui fournit des fonctionnalités communes telles que l'inscription et la connexion. Ce modèle est alimenté par les composants bit BlazorUI. - - - bit Admin​Panel - - - Catégories totales - - - Produits totaux - - - Télécharger une nouvelle image de profil - - - Vous avez déjà un compte? - - - Vérifiez votre Spam/Junk, si vous ne le trouvez pas dans la boîte de réception. - - - Nous avons envoyé un lien de confirmation à votre adresse e-mail. -Veuillez confirmer votre email en cliquant sur le lien. - - - confirmez votre adresse email - - - Confirmer le nouveau mot de passe - - - Vous n'avez pas de compte ? - - - E-mail - - - Echec de la confirmation par e-mail ! - - - confirmation de l'émail - - - E-mail confirmé avec succès ! - - - mot de passe oublié? - - - Veuillez saisir l'adresse e-mail avec laquelle vous vous êtes inscrit afin que nous puissions vous envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. - - - Mot de passe oublié - - - Il semble que le lien de confirmation soit invalide ou ait expiré. - - - nouveau mot de passe - - - OU - - - Mot de passe - - - Votre mot de passe a été modifié avec succès. - - - Le lien de confirmation a été renvoyé à votre adresse e-mail. - - - Ré-envoyer l'email - - - Réinitialiser le mot de passe - - - Le lien de réinitialisation du mot de passe a été envoyé. - - - Réinitialiser le mot de passe - - - S'identifier - - - S'identifier - - - Déconnexion - - - Chantez - - - Chantez - - - Soumettre - - - Requête invalide - - - La demande n'a pas pu être traitée en raison d'un conflit dans la demande - - - Une erreur s'est produite lors de la suppression du fichier - - - Une erreur s'est produite lors du téléchargement du fichier - - - L'accès à la ressource demandée est interdit - - - Les données de la demande ne sont pas valides - - - Une erreur s'est produite lors de la communication avec le serveur - - - Votre demande ne contient pas d'identifiants d'authentification valides - - - Une erreur inconnue s'est produite - - - L'image de l'utilisateur est introuvable - - - Échec de concurrence optimiste, l'objet a été modifié. - Error when optimistic concurrency fails - - - L'e-mail '{0}' est déjà pris. - Error for duplicate emails - - - Le nom de rôle '{0}' est déjà pris. - Error for duplicate roles - - - Le nom d'utilisateur '{0}' est déjà pris. - Error for duplicate user names - - - L'e-mail '{0}' n'est pas valide. - Invalid email - - - Le nom de rôle '{0}' n'est pas valide. - Error for invalid role names - - - Jeton invalide. - Error when a token is not recognized - - - Le nom d'utilisateur '{0}' n'est pas valide, ne peut contenir que des lettres ou des chiffres. - User names can only contain letters or digits - - - Un utilisateur avec ce login existe déjà. - Error when a login already linked - - - Mot de passe incorrect. - Error when a password doesn't match - - - Les mots de passe doivent comporter au moins un chiffre ('0'-'9'). - Error when passwords do not have a digit - - - Les mots de passe doivent avoir au moins une minuscule ('a'-'z'). - Error when passwords do not have a lowercase letter - - - Les mots de passe doivent comporter au moins un caractère non alphanumérique. - Error when password does not have enough non alphanumeric characters - - - Les mots de passe doivent avoir au moins une majuscule ('A'-'Z'). - Error when passwords do not have an uppercase letter - - - Le champ {0} doit être une chaîne ou un type de tableau avec une longueur minimale de '{1}'. - - - Le rôle {0} n'existe pas. - Error when a role does not exist - - - Échec de l'utilisation du code de récupération. - Error when a recovery code is not redeemed. - - - L'utilisateur a déjà défini un mot de passe. - Error when AddPasswordAsync called when a user already has a password - - - Utilisateur déjà dans le rôle '{0}'. - Error when a user is already in a role - - - L'utilisateur est verrouillé. Réessayez dans {0} - Error when a user is locked out - - - L'utilisateur {0} n'existe pas. - Error when a user does not exist - - - L'utilisateur n'est pas dans le rôle '{0}'. - Error when a user is not in the role - - - Les mots de passe doivent utiliser au moins {0} caractères différents. - Error message for passwords that are based on similar characters - - - Vous avez déjà demandé l'e-mail de confirmation. Réessayez dans {0} - - - Vous avez déjà demandé l'e-mail de réinitialisation du mot de passe. Réessayez dans {0} - - - Votre email est déjà confirmé. - - - L'enregistrement a été modifié par un autre utilisateur après que vous ayez obtenu les données d'origine. l'opération a été annulée. - - - Erreur connue - - - L'entité de produit est introuvable - - - Cette catégorie contient certains produits, vous ne pouvez donc pas la supprimer - - - Ressource introuvable - - - Trop de demandes - - - Erreur - - - Ajouter - - - Mot de passe oublié - - - Le type de métadonnées associé au type « {0} » contient les propriétés ou champs inconnus suivants : {1}. Veuillez vous assurer que les noms de ces membres correspondent aux noms des propriétés du type principal. - - - Le type '{0}' ne contient pas de propriété publique nommée '{1}'. - - - La propriété {0}.{1} est introuvable. - - - Impossible de trouver une propriété nommée {0}. - - - Le champ {0} n'est pas un numéro de carte de crédit valide. - - - La méthode CustomValidationAttribute '{0}' dans le type '{1}' doit renvoyer System.ComponentModel.DataAnnotations.ValidationResult. Utilisez System.ComponentModel.DataAnnotations.ValidationResult.Success pour représenter le succès. - - - La méthode CustomValidationAttribute '{0}' n'existe pas dans le type '{1}' ou n'est pas publique et statique. - - - Le CustomValidationAttribute.Method n'a pas été spécifié. - - - La méthode CustomValidationAttribute '{0}' dans le type '{1}' doit correspondre à la signature attendue : public static ValidationResult {0}(valeur d'objet, contexte ValidationContext). La valeur peut être fortement typée. Le paramètre ValidationContext est facultatif. - - - Impossible de convertir la valeur de type '{0}' en '{1}' comme prévu par la méthode {2}.{3}. - - - Le type de validation personnalisé '{0}' doit être public. - - - {0} n'est pas valide. - - - Le CustomValidationAttribute.ValidatorType n'a pas été spécifié. - - - La chaîne DataType personnalisée ne peut pas être nulle ou vide. - - - La propriété {0} n'a pas été définie. Utilisez la méthode {1} pour obtenir la valeur. - - - Le type fourni pour EnumDataTypeAttribute ne peut pas être nul. - - - Le type '{0}' doit représenter un type d'énumération. - - - Le champ {0} n'accepte que les fichiers avec les extensions suivantes : {1} - - - Le champ de type {0} doit être une chaîne, un tableau ou un type ICollection. - - - Impossible de récupérer la propriété '{0}' car la localisation a échoué. Le type '{1}' n'est pas public ou ne contient pas de propriété de chaîne statique publique portant le nom '{2}'. - - - MaxLengthAttribute doit avoir une valeur de longueur supérieure à zéro. Utilisez MaxLength() sans paramètres pour indiquer que la chaîne ou le tableau peut avoir la longueur maximale autorisée. - - - Le champ {0} doit être une chaîne ou un type de tableau d'une longueur maximale de '{1}'. - - - MetadataClassType cannot be null. - - - MinLengthAttribute doit avoir une valeur de longueur égale ou supérieure à zéro. - - - Le champ {0} n'est pas un numéro de téléphone valide. - - - Le type {0} doit implémenter {1}. - - - La valeur maximale '{0}' doit être supérieure ou égale à la valeur minimale '{1}'. - - - Les valeurs minimale et maximale doivent être définies. - - - L'OperandType doit être défini lorsque des chaînes sont utilisées pour les valeurs minimales et maximales. - - - Le champ {0} doit être compris entre {1} et {2}. - - - Le champ {0} doit correspondre à l'expression régulière '{1}'. - - - Le modèle doit être défini sur une expression régulière valide. - - - Le champ {0} est obligatoire. - - - La longueur maximale doit être un entier non négatif. - - - Le champ {0} doit être une chaîne d'une longueur maximale de {1}. - - - Le champ {0} doit être une chaîne d'une longueur minimale de {2} et d'une longueur maximale de {1}. - - - Le paramètre clé à la position {0} avec la valeur '{1}' n'est pas une chaîne. Chaque paramètre de contrôle clé doit être une chaîne. - - - Le paramètre clé à la position {0} est nul. Chaque paramètre de contrôle clé doit être une chaîne. - - - Le paramètre clé à la position {0} avec la valeur '{1}' apparaît plus d'une fois. - - - Le nombre de paramètres de contrôle doit être pair. - - - Le champ {0} n'est pas une URL http, https ou ftp complète valide. - - - ErrorMessageString ou ErrorMessageResourceName doivent être définis, mais pas les deux. - - - IsValid(object value) n'a pas été implémenté par cette classe. Le point d'entrée préféré est GetValidationResult() et les classes doivent remplacer IsValid(valeur d'objet, contexte ValidationContext). - - - ErrorMessageResourceType et ErrorMessageResourceName doivent être définis sur cet attribut. - - - La propriété '{0}' sur le type de ressource '{1}' n'est pas un type de chaîne. - - - Le type de ressource '{0}' n'a pas de propriété statique accessible nommée '{1}'. - - - Le champ {0} est invalide. - - - L'instance fournie doit correspondre à l'ObjectInstance sur le ValidationContext fourni. - - - La valeur de la propriété '{0}' doit être de type '{1}'. - - - Accepte-t-il la politique de confidentialité ? - - - Nom d'utilisateur - - - Vous devez accepter notre politique de confidentialité. - - - Aller à aujourd'hui - - - Veuillez saisir l'adresse e-mail avec laquelle vous vous êtes inscrit afin que nous puissions vous envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. - - - Le genre - - - Intimité - - - Êtes-vous certain de vouloir vous déconnecter? - - - Date de naissance - - - Maison - - - Catégorie - - - L'entité de catégorie est introuvable - - - Description - - - Nom - - - Prix - - - Fabriqué avec - - - Non - - - Utiliser bit platform ! - - - Oui - - - Êtes-vous certain de vouloir vous déconnecter? - - - proche - - - Entrez le nom du produit - - - choisissez une catégorie - - - Choisir une catégorie - - - Action - - - Couleur personnalisée - - - Effacer - - - Recherche par nom - - - Ajouter/Modifier une catégorie - - - Catégories - - - Editer le profil - - - Catégorie de produit - - - Catalogue de produits - - - Des produits - - - Id - - - Couleur - - - Profil d'image - - - Êtes-vous sûr de vouloir supprimer la catégorie {0} - - - Êtes-vous sûr de vouloir supprimer le produit {0} - - - Envoyer le lien de réinitialisation - - - Vous devez être connecté pour continuer. - - - Conditions - - - Nom d'utilisateur ou mot de passe invalide - - - Supprimer le compte - - - Êtes-vous sûr de vouloir supprimer votre compte? - - - Mise à jour - - - Vous êtes connecté en tant que - - - Connectez-vous en tant qu'utilisateur différent - - - Entrez le nom de la catégorie - - - Supprimer le produit - - - Supprimer la catégorie - - - Sélecteur de couleurs par défaut - - - Dos - - - '{0}' et '{1}' ne correspondent pas. - - - Le champ {0} n’est égal à aucune des valeurs spécifiées dans AllowedValuesAttribute. - - - Le champ {0} n’est pas un codage Base64 valide. - - - Le champ {0} est égal à l’une des valeurs spécifiées dans DeniedValuesAttribute. - - - Le champ {0} n’est pas une adresse e-mail valide. - - - LengthAttribute doit avoir une valeur MinimumLength égale ou supérieure à zéro. - - - LengthAttribute doit avoir une valeur MaximumLength supérieure ou égale à MinimumLength. - - - Le champ {0} doit être un type de chaîne ou de collection dont la longueur minimale est de « {1} » et la longueur maximale de « {2} ». - - - Impossible d’utiliser des limites exclusives lorsque la valeur maximale est égale à la valeur minimale. - - - Le champ {0} doit être compris entre {1} exclusif et {2}. - - - Le champ {0} doit être compris entre {1} et {2} exclusif. - - - Le champ {0} doit être compris entre {1} exclusif et {2} exclusif. - - - Une défaillance inconnue s’est produite. - - - Le type {0} doit dériver de {1}<{2}>. - - - Le PasswordHasherCompatibilityMode fourni n’est pas valide. - - - Le nombre d’itérations doit être un entier positif. - - - AddIdentity doit être appelé sur la collection de services. - - - Aucun IUserTwoFactorTokenProvider<{0}> nommé '{1}' n’est enregistré. - - - Le tampon de sécurité de l’utilisateur ne peut pas être nul. - - - Les mots de passe doivent comporter au moins {0} caractères. - - - Store n’implémente pas IQueryableRoleStore<TRole>.</TRole> - - - Store n’implémente pas IQueryableUserStore<TUser>.</TUser> - - - Store n’implémente pas IRoleClaimStore<TRole>.</TRole> - - - Store n’implémente pas IUserAuthenticationTokenStore<User>.</User> - - - Store n’implémente pas IUserClaimStore<TUser>.</TUser> - - - Store n’implémente pas IUserConfirmationStore<TUser>.</TUser> - - - Store n’implémente pas IUserEmailStore<TUser>.</TUser> - - - Store n’implémente pas IUserLockoutStore<TUser>.</TUser> - - - Store n’implémente pas IUserLoginStore<TUser>.</TUser> - - - Store n’implémente pas IUserPasswordStore<TUser>.</TUser> - - - Store n’implémente pas IUserPhoneNumberStore<TUser>.</TUser> - - - Store n’implémente pas IUserRoleStore<TUser>.</TUser> - - - Store n’implémente pas IUserSecurityStampStore<TUser>.</TUser> - - - Store n’implémente pas IUserAuthenticatorKeyStore<User>.</User> - - - Store n’implémente pas IUserTwoFactorStore<TUser>.</TUser> - - - Le verrouillage n’est pas activé pour cet utilisateur. - - - Store n’implémente pas IUserTwoFactorRecoveryCodeStore<User>.</User> - - - Aucun RoleType n’a été spécifié, essayez AddRoles<TRole>().</TRole> - - - Store n’implémente pas IProtectedUserStore,<TUser> ce qui est requis lorsque ProtectPersonalData = true.</TUser> - - - Aucun service IPersonalDataProtector n’a été enregistré, cela est requis lorsque ProtectPersonalData = true. - - - Incapable de se connecter au serveur. - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.resx b/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.resx deleted file mode 100644 index dae9c31d16..0000000000 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/AppStrings.resx +++ /dev/null @@ -1,961 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - The {0} field does not equal any of the values specified in AllowedValuesAttribute. - - - The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type. - - - The type '{0}' does not contain a public property named '{1}'. - - - The {0} field is not a valid Base64 encoding. - - - The property {0}.{1} could not be found. - - - '{0}' and '{1}' do not match. - - - Could not find a property named {0}. - - - The {0} field is not a valid credit card number. - - - The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success. - - - The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static. - - - The CustomValidationAttribute.Method was not specified. - - - The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional. - - - Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}. - - - The custom validation type '{0}' must be public. - - - {0} is not valid. - - - The CustomValidationAttribute.ValidatorType was not specified. - - - The custom DataType string cannot be null or empty. - - - The {0} field equals one of the values specified in DeniedValuesAttribute. - - - The {0} property has not been set. Use the {1} method to get the value. - - - The {0} field is not a valid e-mail address. - - - The type provided for EnumDataTypeAttribute cannot be null. - - - The type '{0}' needs to represent an enumeration type. - - - The {0} field only accepts files with the following extensions: {1} - - - Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'. - - - MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length. - - - The field {0} must be a string or array type with a maximum length of '{1}'. - - - MetadataClassType cannot be null. - - - MinLengthAttribute must have a Length value that is zero or greater. - - - The field {0} must be a string or array type with a minimum length of '{1}'. - - - LengthAttribute must have a MinimumLength value that is zero or greater. - - - LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength. - - - The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'. - - - The field of type {0} must be a string, array or ICollection type. - - - The {0} field is not a valid phone number. - - - The type {0} must implement {1}. - - - The maximum value '{0}' must be greater than or equal to the minimum value '{1}'. - - - Cannot use exclusive bounds when the maximum value is equal to the minimum value. - - - The minimum and maximum values must be set. - - - The OperandType must be set when strings are used for minimum and maximum values. - - - The field {0} must be between {1} and {2}. - - - The field {0} must be between {1} exclusive and {2}. - - - The field {0} must be between {1} and {2} exclusive. - - - The field {0} must be between {1} exclusive and {2} exclusive. - - - The field {0} must match the regular expression '{1}'. - - - The pattern must be set to a valid regular expression. - - - The {0} field is required. - - - The maximum length must be a nonnegative integer. - - - The field {0} must be a string with a maximum length of {1}. - - - The field {0} must be a string with a minimum length of {2} and a maximum length of {1}. - - - The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string. - - - The key parameter at position {0} is null. Every key control parameter must be a string. - - - The key parameter at position {0} with value '{1}' occurs more than once. - - - The number of control parameters must be even. - - - The {0} field is not a valid fully-qualified http, https, or ftp URL. - - - Either ErrorMessageString or ErrorMessageResourceName must be set, but not both. - - - IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context). - - - Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute. - - - The property '{0}' on resource type '{1}' is not a string type. - - - The resource type '{0}' does not have an accessible static property named '{1}'. - - - The field {0} is invalid. - - - The instance provided must match the ObjectInstance on the ValidationContext supplied. - - - The value for property '{0}' must be of type '{1}'. - - - - Optimistic concurrency failure, object has been modified. - Error when optimistic concurrency fails - - - An unknown failure has occurred. - Default identity result error message - - - Email '{0}' is already taken. - Error for duplicate emails - - - Role name '{0}' is already taken. - Error for duplicate roles - - - Username '{0}' is already taken. - Error for duplicate user names - - - Email '{0}' is invalid. - Invalid email - - - Type {0} must derive from {1}<{2}>. - Error when the manager type is not derived correctly - - - The provided PasswordHasherCompatibilityMode is invalid. - Error when the password hasher doesn't understand the format it's being asked to produce. - - - The iteration count must be a positive integer. - Error when the iteration count is < 1. - - - Role name '{0}' is invalid. - Error for invalid role names - - - Invalid token. - Error when a token is not recognized - - - Username '{0}' is invalid, can only contain letters or digits. - User names can only contain letters or digits - - - A user with this login already exists. - Error when a login already linked - - - AddIdentity must be called on the service collection. - Error when AddIdentity is not called - - - No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered. - Error when there is no IUserTwoFactorTokenProvider - - - User security stamp cannot be null. - Error when a user's security stamp is null. - - - Incorrect password. - Error when a password doesn't match - - - Passwords must have at least one digit ('0'-'9'). - Error when passwords do not have a digit - - - Passwords must have at least one lowercase ('a'-'z'). - Error when passwords do not have a lowercase letter - - - Passwords must have at least one non alphanumeric character. - Error when password does not have enough non alphanumeric characters - - - Passwords must have at least one uppercase ('A'-'Z'). - Error when passwords do not have an uppercase letter - - - Passwords must be at least {0} characters. - Error message for passwords that are too short - - - Role {0} does not exist. - Error when a role does not exist - - - Store does not implement IQueryableRoleStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IQueryableUserStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IRoleClaimStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticationTokenStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserClaimStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserConfirmationStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserEmailStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLockoutStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLoginStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPasswordStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPhoneNumberStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserRoleStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserSecurityStampStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticatorKeyStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserTwoFactorStore<TUser>. - Error when the store does not implement this interface - - - Recovery code redemption failed. - Error when a recovery code is not redeemed. - - - User already has a password set. - Error when AddPasswordAsync called when a user already has a password - - - User already in role '{0}'. - Error when a user is already in a role - - - User is locked out. - Error when a user is locked out - - - Lockout is not enabled for this user. - Error when lockout is not enabled - - - User {0} does not exist. - Error when a user does not exist - - - User is not in role '{0}'. - Error when a user is not in the role - - - Store does not implement IUserTwoFactorRecoveryCodeStore<User>. - Error when the store does not implement this interface - - - Passwords must use at least {0} different characters. - Error message for passwords that are based on similar characters - - - No RoleType was specified, try AddRoles<TRole>(). - Error when the IdentityBuilder.RoleType was not specified - - - Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true. - Error when the store does not implement this interface - - - No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true. - Error when there is no IPersonalDataProtector - - - - Invalid request - - - Request could not be processed because of conflict in the request - - - Access to the requested resource is forbidden - - - Request data is not valid - - - An error occurred while communicating with server - - - Your request lacks valid authentication credentials - - - Unknown error has occurred - - - The record was modified by another user after you got the original data. the operation was canceled. - - - Known error - - - Resource not found - - - Too many requests - - - Unable to connect to server. - - - - Active - - - New category - - - New product - - - Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor Admin​Panel easily in the shortest time ever! - - - bit Admin​Panel - - - Admin​Panel - - - All - - - Alphabetical - - - Cancel - - - Categories - - - Completed - - - Date - - - Edit - - - Edit category - - - Edit product - - - Edit profile - - - FullName - - - Other - - - Female - - - Male - - - GitHub Repo - - - Last 30 days category count - - - Last 30 days product count - - - Haven’t you received the confirmation email? - - - I agree to the - - - Use this page to detail your site's privacy policy. - - - Use this section to detail your site's privacy policy. - - - Privacy Policy - - - Product sales - - - This chart shows the sale number of each product. - - - Products count per category chart - - - This chart shows the number of products in each category. - - - Products - - - Products percentage per category - - - This chart shows the percentage of products in each category. - - - Profile updated successfully. - - - Remove - - - Save - - - Select your birth date - - - Sort by - - - Admin​Panel is a project template that provides common features such as Sign-up & Sign-in. This template is powered by bit BlazorUI components. - - - bit Admin​Panel - - - Total categories - - - Total products - - - Upload a new profile image - - - Already have an account? - - - Check your Spam/Junk, if you could not find it in the Inbox. - - - We have sent a confirmation link to your email address. -Please confirm your email by clicking on the link. - - - Confirm Your Email Address - - - Confirm New Password - - - Don’t have an account? - - - Email - - - Email Confirmation Failed! - - - Email Confirmation - - - Email Confirmed Successfully! - - - Forgot password? - - - Please enter the email address you have been signed up with so we can send a reset password link to your email address. - - - Forgot password - - - Looks like the confirmation link either is invalid or has expired. - - - New Password - - - OR - - - Password - - - Your password changed successfully. - - - The confirmation link has been re-sent to your email address. - - - Resend email - - - Reset password - - - The reset password link has been sent to your email address. - - - Reset password - - - Sign in - - - Sign in - - - Sign out - - - Sign up - - - Sign up - - - Submit - - - An error occurred while removing file - - - An error occurred while uploading file - - - User image could not be found - - - Category entity could not be found - - - Product entity could not be found - - - This category contain some products, so you can't delete it - - - Error - - - Back - - - Default color picker - - - Enter category name - - - You have already requested the reset password email. Try again in {0} - - - Add - - - Please enter the email address you have been signed up with so we can send a reset password link to your email address. - - - Forget password - - - Is accept privacy policy? - - - Username - - - You must agree to our privacy policy. - - - Gender - - - Privacy - - - Are you sure you want to Sign out? - - - Birthdate - - - Name - - - Category - - - Description - - - Price - - - Go to today - - - Sign in as different user - - - You're signed in as - - - Made with - - - No - - - Using bit platform! - - - Yes - - - Are you sure you want to Sign out? - - - Close - - - Enter product name - - - Select a category - - - Select category - - - Action - - - Custom color - - - Delete - - - Search on name - - - Add/Edit category - - - Categories - - - Edit profile - - - Home - - - Product category - - - Product catologue - - - Products - - - Color - - - Id - - - Image profile - - - Are you sure you want to delete category {0} - - - Are you sure you want to delete product {0} - - - Delete category - - - Delete product - - - Submit - - - You must be signed in to continue. - - - Terms - - - Invalid username or password - - - Delete Account - - - Are you sure you want to delete your account? - - - Update - - - You have already requested the confirmation email. Try again in {0} - - - Your email is already confirmed. - - \ No newline at end of file diff --git a/src/Templates/AdminPanel/Readme.md b/src/Templates/AdminPanel/Readme.md deleted file mode 100644 index 28f21dabad..0000000000 --- a/src/Templates/AdminPanel/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# bit AdminPanel Template - -More info at https://bitplatform.dev/templates/overview \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/.editorconfig b/src/Templates/BlazorWeb/Bit.BlazorWeb/.editorconfig index 19ef1c5602..09b151e99d 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/.editorconfig +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/.editorconfig @@ -56,12 +56,6 @@ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_sty dotnet_naming_symbols.constant_fields.applicable_kinds = field dotnet_naming_symbols.constant_fields.applicable_accessibilities = * dotnet_naming_symbols.constant_fields.required_modifiers = const -dotnet_style_operator_placement_when_wrapping = beginning_of_line -tab_width = 4 -end_of_line = crlf -dotnet_style_prefer_collection_expression = true:suggestion -dotnet_style_prefer_simplified_boolean_expressions = true:suggestion -dotnet_style_prefer_compound_assignment = true:suggestion ############################### # C# Coding Conventions # ############################### @@ -122,13 +116,6 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false # Wrapping preferences csharp_preserve_single_line_statements = true csharp_preserve_single_line_blocks = true -csharp_using_directive_placement = outside_namespace:silent -csharp_prefer_simple_using_statement = true:suggestion -csharp_style_prefer_method_group_conversion = true:silent -csharp_style_prefer_top_level_statements = true:silent -csharp_style_prefer_primary_constructors = true:suggestion -csharp_style_expression_bodied_lambdas = true:silent -csharp_style_expression_bodied_local_functions = false:silent ############################### # VB Coding Conventions # ############################### diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/.gitignore b/src/Templates/BlazorWeb/Bit.BlazorWeb/.gitignore index 367052844a..c592ddbc94 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/.gitignore +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/.gitignore @@ -213,6 +213,9 @@ ModelManifest.xml # VS Code .vscode +# .NET Meteor +.meteor + # Rider .idea @@ -222,6 +225,7 @@ profile.arm.json *.map *Resource.designer.cs /**/*.css +custom.aprof /src/Server/Api/Attachments/**/*.* diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/.template.config/template.json b/src/Templates/BlazorWeb/Bit.BlazorWeb/.template.config/template.json index 94f23e38a8..741e21cead 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/.template.config/template.json +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/.template.config/template.json @@ -16,6 +16,14 @@ "sourceName": "BlazorWeb", "preferNameDirectory": true, "symbols": { + "SeedDataProductCreatedOn": { + "type": "generated", + "generator": "now", + "replaces": "2022-07-12", + "parameters": { + "format": "yyyy-MM-dd" + } + }, "database": { "displayName": "Database", "type": "parameter", @@ -55,6 +63,26 @@ "description": "Other" } ] + }, + "sample": { + "displayName": "Sample", + "type": "parameter", + "datatype": "choice", + "defaultValue": "AdminPanel", + "choices": [ + { + "choice": "AdminPanel", + "description": "AdminPanel" + }, + { + "choice": "Todo", + "description": "Todo app" + }, + { + "choice": "None", + "description": "None" + } + ] } }, "sources": [ @@ -88,6 +116,31 @@ { "condition": "(pipeline != Azure)", "exclude": [ ".azure-devops/**" ] + }, + { + "condition": "(sample != AdminPanel)", + "exclude": [ "src/BlazorWeb.Shared/Dtos/Categories/**", + "src/BlazorWeb.Shared/Dtos/Dashboard/**", + "src/BlazorWeb.Shared/Dtos/Products/**", + "src/BlazorWeb.Server/Controllers/Categories/**", + "src/BlazorWeb.Server/Controllers/Products/**", + "src/BlazorWeb.Server/Data/Configurations/Category/**", + "src/BlazorWeb.Server/Data/Configurations/Product/**", + "src/BlazorWeb.Server/Mappers/CategoriesMapper.cs", + "src/BlazorWeb.Server/Mappers/ProductsMapper.cs", + "src/BlazorWeb.Server/Models/Categories/**", + "src/BlazorWeb.Server/Models/Products/**", + "src/BlazorWeb.Client/Pages/Categories/**", + "src/BlazorWeb.Client/Pages/Dashboard/**", + "src/BlazorWeb.Client/Pages/Products/**"] + }, + { + "condition": "(sample != Todo)", + "exclude": [ "src/BlazorWeb.Shared/Dtos/Todo/**", + "src/BlazorWeb.Server/Controllers/Todo/**", + "src/BlazorWeb.Server/Mappers/TodoMapper.cs", + "src/BlazorWeb.Server/Models/Todo/**", + "src/BlazorWeb.Client/Pages/Todo/**"] } ] } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/BlazorWeb.sln b/src/Templates/BlazorWeb/Bit.BlazorWeb/BlazorWeb.sln index 8b3fb66953..11ee175c4e 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/BlazorWeb.sln +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/BlazorWeb.sln @@ -37,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Server", "src\Bla EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Client", "src\BlazorWeb.Client\BlazorWeb.Client.csproj", "{2B84944A-F323-4F0D-9D70-7FF99B0F7EA7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Iac", "src\BlazorWeb.Infra\BlazorWeb.Iac.csproj", "{F63859EB-108D-48FA-9F3D-5232E2A12184}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,15 +57,22 @@ Global {2B84944A-F323-4F0D-9D70-7FF99B0F7EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {2B84944A-F323-4F0D-9D70-7FF99B0F7EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B84944A-F323-4F0D-9D70-7FF99B0F7EA7}.Release|Any CPU.Build.0 = Release|Any CPU + {F63859EB-108D-48FA-9F3D-5232E2A12184}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F63859EB-108D-48FA-9F3D-5232E2A12184}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F63859EB-108D-48FA-9F3D-5232E2A12184}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F63859EB-108D-48FA-9F3D-5232E2A12184}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution +#if (pipeline == "Azure") {DE7F66C7-5190-4846-8949-C99444148634} = {07D3DE94-9EB8-41FE-8888-0A483D30EBFD} + {5F2028FC-13C5-479D-8665-7346B7C3D990} = {DE7F66C7-5190-4846-8949-C99444148634} +#elif (pipeline == "GitHub") {CB4F0FA9-2686-497C-A3D1-6E730B818A74} = {07D3DE94-9EB8-41FE-8888-0A483D30EBFD} {F502B327-2CA6-48DC-992F-0B432ABF60B1} = {CB4F0FA9-2686-497C-A3D1-6E730B818A74} - {5F2028FC-13C5-479D-8665-7346B7C3D990} = {DE7F66C7-5190-4846-8949-C99444148634} +#endif EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {62EABCA9-B5C9-489A-B101-38E38ACEDC1E} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/global.json b/src/Templates/BlazorWeb/Bit.BlazorWeb/global.json index 1b99e7d61d..273f0cf810 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/global.json +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/global.json @@ -1,6 +1,6 @@ { "sdk": { "version": "8.0.100-rc.2.23502.2", - "rollForward": "disable" + "rollForward": "disable" } } \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/BlazorWeb.Client.csproj b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/BlazorWeb.Client.csproj index d83aaf7a3d..5605035178 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/BlazorWeb.Client.csproj +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/BlazorWeb.Client.csproj @@ -33,6 +33,9 @@ + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IConfigurationExtensions.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IConfigurationExtensions.cs index 4bb315c1db..e88b29bed5 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IConfigurationExtensions.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IConfigurationExtensions.cs @@ -1,4 +1,5 @@ -namespace Microsoft.Extensions.Configuration; +//-:cnd:noEmit +namespace Microsoft.Extensions.Configuration; public static class IConfigurationExtensions { public static string GetApiServerAddress(this IConfiguration configuration) diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IListExtensions.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IListExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IListExtensions.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IListExtensions.cs diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IServiceCollectionExtensions.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IServiceCollectionExtensions.cs index 084d53a286..1ccfa701d8 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/IServiceCollectionExtensions.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -using BlazorWeb.Web.Services.HttpMessageHandlers; +using BlazorWeb.Client.Services.HttpMessageHandlers; namespace Microsoft.Extensions.DependencyInjection; diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/JsRuntimeExtension.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/JsRuntimeExtension.cs index 492c491c88..a279c37811 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/JsRuntimeExtension.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Extensions/JsRuntimeExtension.cs @@ -1,6 +1,6 @@ namespace Microsoft.JSInterop; -public static class JsRuntimeExtension +public static class JSRuntimeExtension { /// /// To disable the scrollbar of the body when showing the modal, so the modal can be always shown in the viewport without being scrolled out. @@ -14,4 +14,9 @@ public static async Task GoBack(this IJSRuntime jsRuntime) { await jsRuntime.InvokeVoidAsync("App.goBack"); } + + public static async Task ApplyBodyElementClasses(this IJSRuntime jsRuntime, List cssClasses, Dictionary cssVariables) + { + await jsRuntime.InvokeVoidAsync("App.applyBodyElementClasses", cssClasses, cssVariables); + } } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor.cs index 8fe1958ef2..320033ece5 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor.cs @@ -1,6 +1,6 @@ -using AdminPanel.Shared.Dtos.Categories; +using BlazorWeb.Shared.Dtos.Categories; -namespace AdminPanel.Client.Core.Pages.Categories; +namespace BlazorWeb.Client.Pages.Categories; [Authorize] public partial class AddOrEditCategoryPage diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/AddOrEditCategoryPage.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor index 5a9cad42fe..8803c70dec 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor @@ -1,5 +1,5 @@ @page "/categories" -@using AdminPanel.Shared.Dtos.Categories +@using BlazorWeb.Shared.Dtos.Categories @inherits AppComponentBase @Localizer[nameof(AppStrings.CategoriesPageTitle)] diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor.cs index 337a717c24..031de1b5cd 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit -using AdminPanel.Shared.Dtos.Categories; +using BlazorWeb.Shared.Dtos.Categories; -namespace AdminPanel.Client.Core.Pages.Categories; +namespace BlazorWeb.Client.Pages.Categories; [Authorize] public partial class CategoriesPage diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Categories/CategoriesPage.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Categories/CategoriesPage.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor similarity index 92% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor index 66983e6a94..6f30d8fc5a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor @@ -1,4 +1,4 @@ -@page "/" +@page "/dashboard" @inherits AppComponentBase
diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor.cs new file mode 100644 index 0000000000..0cd07e0f05 --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor.cs @@ -0,0 +1,6 @@ +namespace BlazorWeb.Client.Pages.Dashboard; + +[Authorize] +public partial class DashboardPage +{ +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/HomePage.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/DashboardPage.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor.cs index e9a90666e1..e09c2139cc 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor.cs @@ -1,6 +1,6 @@ -using AdminPanel.Shared.Dtos.Dashboard; +using BlazorWeb.Shared.Dtos.Dashboard; -namespace AdminPanel.Client.Core.Pages.Home; +namespace BlazorWeb.Client.Pages.Dashboard; public partial class OverallStatsWidget { @@ -18,7 +18,7 @@ private async Task GetData() try { - _data = await PrerenderStateService.GetValue($"{nameof(HomePage)}-{nameof(OverallStatsWidget)}", + _data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(OverallStatsWidget)}", async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetOverallAnalyticsStatsData", AppJsonContext.Default.OverallAnalyticsStatsDataDto)) ?? new(); } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/OverallStatsWidget.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/OverallStatsWidget.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs similarity index 80% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs index 2b5355bdd8..cbacdee74e 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Pages.Home; +namespace BlazorWeb.Client.Pages.Dashboard; public partial class ProductsCountPerCategotyWidget { @@ -30,12 +30,11 @@ private async Task GetData() { _isLoading = true; - var data = await PrerenderStateService.GetValue($"{nameof(HomePage)}-{nameof(ProductsCountPerCategotyWidget)}", + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsCountPerCategotyWidget)}", async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsCountPerCategotyStats", - AppJsonContext.Default.ListProductsCountPerCategoryDto)) ?? new(); + AppJsonContext.Default.ListProductsCountPerCategoryDto)) ?? []; - BitChartBarDataset chartDataSet = new BitChartBarDataset(); - chartDataSet.AddRange(data.Select(d => d.ProductCount)); + BitChartBarDataset chartDataSet = [.. data.Select(d => d.ProductCount)]; chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); _config.Data.Datasets.Add(chartDataSet); _config.Data.Labels.AddRange(data.Select(d => d.CategoryName ?? string.Empty)); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsCountPerCategotyWidget.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor.cs similarity index 77% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor.cs index d51eb29be7..103e3fc1fa 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Pages.Home; +namespace BlazorWeb.Client.Pages.Dashboard; public partial class ProductsPercentageWidget { @@ -24,12 +24,11 @@ private async Task GetData() try { - var data = await PrerenderStateService.GetValue($"{nameof(HomePage)}-{nameof(ProductsPercentageWidget)}", + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsPercentageWidget)}", async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsPercentagePerCategoryStats", - AppJsonContext.Default.ListProductPercentagePerCategoryDto)) ?? new(); + AppJsonContext.Default.ListProductPercentagePerCategoryDto)) ?? []; - BitChartPieDataset chartDataSet = new BitChartPieDataset(); - chartDataSet.AddRange(data!.Select(d => d.ProductPercentage)); + BitChartPieDataset chartDataSet = [.. data!.Select(d => d.ProductPercentage)]; chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); _config.Data.Datasets.Add(chartDataSet); _config.Data.Labels.AddRange(data.Select(d => d.CategoryName ?? string.Empty)); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsPercentageWidget.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsPercentageWidget.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor.cs similarity index 80% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor.cs index 748a9839e5..2ac016cd23 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Pages.Home; +namespace BlazorWeb.Client.Pages.Dashboard; public partial class ProductsSalesWidget { @@ -29,12 +29,11 @@ private async Task GetData() { _isLoading = true; - var data = await PrerenderStateService.GetValue($"{nameof(HomePage)}-{nameof(ProductsSalesWidget)}", + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsSalesWidget)}", async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsSalesStats", - AppJsonContext.Default.ListProductSaleStatDto)) ?? new(); + AppJsonContext.Default.ListProductSaleStatDto)) ?? []; - BitChartBarDataset chartDataSet = new BitChartBarDataset(); - chartDataSet.AddRange(data.Select(d => d.SaleAmount)); + BitChartBarDataset chartDataSet = [.. data.Select(d => d.SaleAmount)]; chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); _config.Data.Datasets.Add(chartDataSet); _config.Data.Labels.AddRange(data.Select(d => d.ProductName ?? string.Empty)); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Home/ProductsSalesWidget.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Dashboard/ProductsSalesWidget.razor.scss diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/HomePage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/HomePage.razor index 3bd8525f18..26fbd9ff63 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/HomePage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/HomePage.razor @@ -9,7 +9,7 @@
@Localizer[nameof(AppStrings.HomeMessage)]
- @Localizer[nameof(AppStrings.EditProfileTitle)] -
-
- @if (string.IsNullOrEmpty(_editProfileMessage) is false) +
+
+ @if (string.IsNullOrEmpty(_editProfileMessage) is false) { @Localizer[nameof(AppStrings.ProfileImage)] - -
@_profileImageError
+ +
@_profileImageError
@@ -125,4 +125,4 @@
- \ No newline at end of file + diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EditProfilePage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EditProfilePage.razor.cs index 1eca97fcaf..d38fc9d156 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EditProfilePage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EditProfilePage.razor.cs @@ -123,4 +123,3 @@ private async Task RemoveProfileImage() } } } - diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EmailConfirmationPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EmailConfirmationPage.razor index 0851881d9e..e942ee887d 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EmailConfirmationPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/EmailConfirmationPage.razor @@ -3,9 +3,9 @@ @Localizer[nameof(AppStrings.EmailConfirmationTitle)] -
-
- @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) +
+
+ @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) { @Localizer[nameof(AppStrings.ForgetPasswordTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) + @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) { @Localizer[nameof(AppStrings.ResetPasswordTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) + @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) { @if (string.IsNullOrEmpty(_signInMessage) is false) - { - - @_signInMessage - - } - -

@Localizer[nameof(AppStrings.SignInTitle)]

- -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.SignIn)] - - -
- @Localizer[nameof(AppStrings.ForgotPasswordLink)] + { + + @_signInMessage + + } + +

@Localizer[nameof(AppStrings.SignInTitle)]

+ +
+ + +
+ +
+ + +
+ + + @Localizer[nameof(AppStrings.SignIn)] + + +
+ @Localizer[nameof(AppStrings.ForgotPasswordLink)]
diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignInPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignInPage.razor.cs index 51d883a0be..4b80473d78 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignInPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignInPage.razor.cs @@ -13,7 +13,7 @@ public partial class SignInPage [SupplyParameterFromQuery] public string? RedirectUrl { get; set; } - protected async override Task OnAfterFirstRenderAsync() + protected override async Task OnAfterFirstRenderAsync() { await base.OnAfterFirstRenderAsync(); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor index f387506518..b40cd9fee4 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor @@ -3,11 +3,11 @@ @Localizer[nameof(AppStrings.SingUpTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_signUpMessage) is false) + @if (string.IsNullOrEmpty(_signUpMessage) is false) {
@Localizer[nameof(AppStrings.SignIn)] -
+
} else { @@ -73,13 +73,13 @@
- + - @Localizer[nameof(AppStrings.PrivacyPolicyAgreementMessage)]   @Localizer[nameof(AppStrings.PrivacyPolicyTitle)] - - - -
+ @Localizer[nameof(AppStrings.TermsMessage)] @Localizer[nameof(AppStrings.TermsTitle)] + + + +
@Localizer[nameof(AppStrings.SignUp)] -
+
@Localizer[nameof(AppStrings.AlreadyHaveAccountMessage)] @Localizer[nameof(AppStrings.SignIn)] -
+
}
diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.cs index a30794be5a..47f52032e8 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.cs @@ -11,7 +11,7 @@ public partial class SignUpPage private SignUpRequestDto _signUpModel = new(); - protected async override Task OnAfterFirstRenderAsync() + protected override async Task OnAfterFirstRenderAsync() { await base.OnAfterFirstRenderAsync(); @@ -37,7 +37,7 @@ private async Task DoSignUp() catch (ResourceValidationException e) { _signUpMessageType = BitMessageBarType.Error; - _signUpMessage = string.Join(Environment.NewLine, e.Payload.Details.SelectMany(p => p.Errors).Select(e => e.Message)); + _signUpMessage = string.Join(Environment.NewLine, e.Payload.Details.SelectMany(d => d.Errors).Select(e => e.Message)); } catch (KnownException e) { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.scss index b86ae7a5a2..65b7a6f5af 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Identity/SignUpPage.razor.scss @@ -31,6 +31,11 @@ width: 100%; max-width: rem2(340px); + .label { + text-align: start; + align-items: start; + } + @include lt-xl { max-width: rem2(300px); } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/NotAuthorizedPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/NotAuthorizedPage.razor index 2a5726870d..e548080d47 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/NotAuthorizedPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/NotAuthorizedPage.razor @@ -6,11 +6,11 @@
-
+

@Localizer[nameof(AppStrings.ForbiddenException)]

-

You're signed in as @_user.GetUserName()

+

@Localizer[nameof(AppStrings.YouAreSignInAs)] @_user.GetUserName()

- Sign in as different user + @Localizer[nameof(AppStrings.SignInAsDifferentUser)]
-
+ \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor deleted file mode 100644 index 191213153c..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor +++ /dev/null @@ -1,22 +0,0 @@ -@page "/privacy" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.PrivacyPolicyTitle)] - -
-
-
-

@Localizer[nameof(AppStrings.PrivacyPolicyTitle)]

-
- @Localizer[nameof(AppStrings.PrivacyPolicySectionMessage)] -
-
- -
-

@Localizer[nameof(AppStrings.PrivacyPolicyTitle)]

-
- @Localizer[nameof(AppStrings.PrivacyPolicyPageMessage)] -
-
-
-
diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.scss deleted file mode 100644 index 20cbcb79bc..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.scss +++ /dev/null @@ -1,59 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; - -.page-container { - width: 100%; - display: flex; - align-items: center; - align-self: flex-start; - flex-flow: column nowrap; - justify-content: flex-start; - padding: rem2(88px) rem2(32px); -} - -.page-content { - width: 100%; - display: flex; - align-items: center; - max-width: rem2(1128px); - flex-flow: column nowrap; - justify-content: flex-start; -} - -.main-section { - width: 100%; - margin-bottom: rem2(24px); -} - -.main-section-title { - width: 100%; - text-align: left; - font-weight: bold; - font-size: rem2(34px); - line-height: rem2(56px); - margin-bottom: rem2(24px); -} - -.section-desc { - width: 100%; - font-size: rem2(18px); - line-height: rem2(28px); -} - -.sub-section { - width: 100%; - margin-bottom: rem2(24px); - - &:last-child { - margin-bottom: 0; - } -} - -.sub-section-title { - width: 100%; - text-align: left; - font-weight: 600; - font-size: rem2(24px); - line-height: rem2(36px); - margin-bottom: rem2(16px); -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor similarity index 99% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor index ec6be653af..94c3d51440 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor @@ -31,7 +31,7 @@ IsMultiSelect="false" Items="_allCategoryList" OnSelectItem="((BitDropdownItem item) => { _product.CategoryId = int.Parse(item.Value!); _product.CategoryName = item.Text; })" - Placeholder="@Localizer[(nameof(AppStrings.SelectACategory))]" + Placeholder="@Localizer[(nameof(AppStrings.SelectCategory))]" Label="@Localizer[(nameof(AppStrings.SelectCategory))]" />
diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor.cs similarity index 86% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor.cs index bfe35c864e..313ce6ee30 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor.cs @@ -1,6 +1,6 @@ -using AdminPanel.Shared.Dtos.Products; +using BlazorWeb.Shared.Dtos.Products; -namespace AdminPanel.Client.Core.Pages.Products; +namespace BlazorWeb.Client.Pages.Products; public partial class AddOrEditProductModal { @@ -9,7 +9,7 @@ public partial class AddOrEditProductModal private bool _isLoading; private bool _isSaving; private ProductDto _product = new(); - private List> _allCategoryList = new(); + private List> _allCategoryList = []; private string _selectedCategoyId = string.Empty; [Parameter] public EventCallback OnSave { get; set; } @@ -23,7 +23,7 @@ public async Task ShowModal(ProductDto product) { await InvokeAsync(() => { - _ = JsRuntime.SetBodyOverflow(true); + _ = JSRuntime.SetBodyOverflow(true); _isOpen = true; _product = product; @@ -41,7 +41,7 @@ private async Task LoadAllCategoriesAsync() { var categoryList = await PrerenderStateService.GetValue($"{nameof(ProductsPage)}-AllCategoryList", async () => await HttpClient.GetFromJsonAsync("Category/Get", - AppJsonContext.Default.ListCategoryDto)) ?? new(); + AppJsonContext.Default.ListCategoryDto)) ?? []; _allCategoryList = categoryList.Select(c => new BitDropdownItem() { @@ -75,7 +75,7 @@ private async Task Save() _isOpen = false; - await JsRuntime.SetBodyOverflow(false); + await JSRuntime.SetBodyOverflow(false); } finally { @@ -89,6 +89,6 @@ private async Task OnCloseClick() { _isOpen = false; - await JsRuntime.SetBodyOverflow(false); + await JSRuntime.SetBodyOverflow(false); } } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/AddOrEditProductModal.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor index b19a50ea8d..1bf343bb8c 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor @@ -1,5 +1,5 @@ @page "/products" -@using AdminPanel.Shared.Dtos.Products +@using BlazorWeb.Shared.Dtos.Products @inherits AppComponentBase @Localizer[nameof(AppStrings.ProductsPageTitle)] diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor.cs index 7290a8b672..7c2cfb078f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit -using AdminPanel.Shared.Dtos.Products; +using BlazorWeb.Shared.Dtos.Products; -namespace AdminPanel.Client.Core.Pages.Products; +namespace BlazorWeb.Client.Pages.Products; [Authorize] public partial class ProductsPage diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Products/ProductsPage.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Products/ProductsPage.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor similarity index 71% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor index c482d6df8e..9fab1351d9 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor @@ -7,18 +7,18 @@
-

TodoTemplate license

+

BlazorWeb license

- This EULA and Privacy Policy are written for individuals who use the TodoTemplate Demo Version through the todo.bitplatform.dev website, or the published version of this app on the bit platform's Google Play, Apple Store, and Microsoft Store accounts. + This EULA and Privacy Policy are written for individuals who use the BlazorWeb Demo Version through the todo.bitplatform.dev website, or the published version of this app on the bit platform's Google Play, Apple Store, and Microsoft Store accounts.
If you want to build your own project based on this Project Template, please refer to the License and create your own project, publish it with the relevant EULA and Privacy Policy for your business.s
-

End-User License Agreement (EULA) for TodoTemplate Demo Version

+

End-User License Agreement (EULA) for BlazorWeb Demo Version

- This End-User License Agreement (EULA) is a legal agreement between you (the "user") and bit platform, located at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands, with phone number +31684207362, for the use of TodoTemplate Demo Version (the "Software"). + This End-User License Agreement (EULA) is a legal agreement between you (the "user") and bit platform, located at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands, with phone number +31684207362, for the use of BlazorWeb Demo Version (the "Software").
By using the Software, you agree to be bound by the terms and conditions of this agreement.
@@ -27,7 +27,7 @@

License Grant

- bit platform hereby grants the user a non-exclusive, non-transferable license to use the Software, solely for the purpose of evaluating and testing the features of the TodoTemplate Demo Version during the term of this EULA. + bit platform hereby grants the user a non-exclusive, non-transferable license to use the Software, solely for the purpose of evaluating and testing the features of the BlazorWeb Demo Version during the term of this EULA.
@@ -41,7 +41,7 @@

User Data

- bit platform may collect user data, including name, surname, photo, date of birth, and gender. Providing this information is optional, and bit platform will only use it for the purposes of the TodoTemplate Demo Version. If the user requests, bit platform will delete this data within one day, using one of the contact methods provided at the end of this EULA. In addition, the user is required to provide an email address for account verification purposes, but bit platform will not use this email for any other purposes. + bit platform may collect user data, including name, surname, photo, date of birth, and gender. Providing this information is optional, and bit platform will only use it for the purposes of the BlazorWeb Demo Version. If the user requests, bit platform will delete this data within one day, using one of the contact methods provided at the end of this EULA. In addition, the user is required to provide an email address for account verification purposes, but bit platform will not use this email for any other purposes.
@@ -93,10 +93,10 @@
  • bit platform is committed to protecting the privacy of the user data.
  • -
  • We will only use the data collected from the user for the purposes of the TodoTemplate Demo Version and will delete this data upon user request, using one of the contact methods provided above.
  • +
  • We will only use the data collected from the user for the purposes of the BlazorWeb Demo Version and will delete this data upon user request, using one of the contact methods provided above.
  • We do not share the user data with any third parties and do not allow users to share data with anyone in any way.
  • -
  • We do not collect any information on user's usage in the TodoTemplate Demo Version.
  • -
  • We do not display any Third-Party content, advertisements, or any purchases in the TodoTemplate Demo Version.
  • +
  • We do not collect any information on user's usage in the BlazorWeb Demo Version.
  • +
  • We do not display any Third-Party content, advertisements, or any purchases in the BlazorWeb Demo Version.
  • This Privacy Policy is effective until 2025-12-31 and is subject to change without notice.
diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor.cs similarity index 56% rename from src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor.cs index 713c99c3bc..f42ee21983 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/PrivacyPage.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor.cs @@ -1,5 +1,5 @@ namespace BlazorWeb.Client.Pages; -public partial class PrivacyPage +public partial class TermsPage { } diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/TermsPage.razor.scss diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Todo/TodoPage.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Todo/TodoPage.razor.scss index 5fa62d56fc..0b12a2e654 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Todo/TodoPage.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Pages/Todo/TodoPage.razor.scss @@ -179,6 +179,14 @@ .sort-todo-icn { color: $bit-color-primary-main; } + + .bit-drp-iwp .bit-drp-rsp-lbl-ctn { + margin-top: calc(var(--bit-status-bar-height) - rem2(24px)); + + @supports (-webkit-touch-callout: none) { + margin-top: calc(env(safe-area-inset-top) - rem2(24px)); + } + } } .todo-input { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Program.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Program.cs index 6790849c6c..1c7d6baf36 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Program.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Program.cs @@ -1,4 +1,4 @@ -using BlazorWeb.Web.Services.HttpMessageHandlers; +using BlazorWeb.Client.Services.HttpMessageHandlers; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; var builder = WebAssemblyHostBuilder.CreateDefault(args); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Routes.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Routes.razor.cs index d7133d8aca..be9f34f353 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Routes.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Routes.razor.cs @@ -7,15 +7,13 @@ public partial class Routes private List _lazyLoadedAssemblies = []; [AutoInject] private Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader _assemblyLoader = default!; - [AutoInject] private IJSRuntime _jsRuntime = default!; - private async Task OnNavigateAsync(NavigationContext args) { if (OperatingSystem.IsBrowser()) { - if (args.Path.Contains("some-lazy-loaded-page") && _lazyLoadedAssemblies.Any(asm => asm.GetName().Name == "SomeAssembly") is false) + if ((args.Path is "dashboard") && _lazyLoadedAssemblies.Any(asm => asm.GetName().Name == "Newtonsoft.Json") is false) { - var assemblies = await _assemblyLoader.LoadAssembliesAsync(["SomeAssembly.wasm"]); + var assemblies = await _assemblyLoader.LoadAssembliesAsync(["Newtonsoft.Json.wasm", "System.Private.Xml.wasm", "System.Data.Common.wasm"]); _lazyLoadedAssemblies.AddRange(assemblies); } } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Scripts/app.ts b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Scripts/app.ts index 9685630286..3009cd6273 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Scripts/app.ts +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Scripts/app.ts @@ -24,6 +24,11 @@ public static setBodyOverflow(hidden: boolean) { document.body.style.overflow = hidden ? "hidden" : "auto"; } + + public static applyBodyElementClasses(cssClasses: string[], cssVariables: any): void { + cssClasses?.forEach(c => document.body.classList.add(c)); + Object.keys(cssVariables).forEach(key => document.body.style.setProperty(key, cssVariables[key])); + } } declare class BitTheme { static init(options: any): void; }; @@ -41,4 +46,4 @@ BitTheme.init({ document.querySelector("meta[name=theme-color]")!.setAttribute('content', '#ffffff'); } } -}); \ No newline at end of file +}); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AppAuthenticationStateProvider.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AppAuthenticationStateProvider.cs index 5c54976152..02927b710d 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AppAuthenticationStateProvider.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AppAuthenticationStateProvider.cs @@ -16,10 +16,7 @@ public override async Task GetAuthenticationStateAsync() { var access_token = await _tokenProvider.GetAccessTokenAsync(); - if (string.IsNullOrWhiteSpace(access_token)) - { - return NotSignedIn(); - } + if (string.IsNullOrWhiteSpace(access_token)) return NotSignedIn(); var identity = new ClaimsIdentity(claims: ParseTokenClaims(access_token), authenticationType: "Bearer", nameType: "name", roleType: "role"); @@ -31,7 +28,7 @@ public async Task IsUserAuthenticatedAsync() return (await GetAuthenticationStateAsync()).User.Identity?.IsAuthenticated == true; } - AuthenticationState NotSignedIn() + private static AuthenticationState NotSignedIn() { return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity())); } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AuthenticationService.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AuthenticationService.cs index a050ca61e2..f67012e2e8 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AuthenticationService.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/AuthenticationService.cs @@ -14,7 +14,7 @@ public partial class AuthenticationService : IAuthenticationService public async Task SignIn(SignInRequestDto dto) { var result = await (await _httpClient.PostAsJsonAsync("Auth/SignIn", dto, AppJsonContext.Default.SignInRequestDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.SignInResponseDto); + .Content.ReadFromJsonAsync(AppJsonContext.Default.SignInResponseDto); await _jsRuntime.InvokeVoidAsync("App.setCookie", "access_token", result!.AccessToken, result.ExpiresIn); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/AuthDelegatingHandler.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/AuthDelegatingHandler.cs index 9ea606a35c..d0d2afe1c6 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/AuthDelegatingHandler.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/AuthDelegatingHandler.cs @@ -1,6 +1,6 @@ using System.Net.Http.Headers; -namespace BlazorWeb.Web.Services.HttpMessageHandlers; +namespace BlazorWeb.Client.Services.HttpMessageHandlers; public class AuthDelegatingHandler : DelegatingHandler diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs index d119f0a41c..309f56bcf9 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs @@ -1,11 +1,11 @@ using System.Net; -namespace BlazorWeb.Web.Services.HttpMessageHandlers; +namespace BlazorWeb.Client.Services.HttpMessageHandlers; public class ExceptionDelegatingHandler : DelegatingHandler { - public ExceptionDelegatingHandler(HttpClientHandler httpClientHandler) + public ExceptionDelegatingHandler(HttpClientHandler httpClientHandler) : base(httpClientHandler) { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs index a53c844c73..03f055e66e 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs @@ -1,6 +1,6 @@ using System.Net.Http.Headers; -namespace BlazorWeb.Web.Services.HttpMessageHandlers; +namespace BlazorWeb.Client.Services.HttpMessageHandlers; public class LocalizationDelegatingHandler : DelegatingHandler diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/RetryDelegatingHandler.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/RetryDelegatingHandler.cs index 4c7a3c6d51..181f77ef90 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/RetryDelegatingHandler.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/HttpMessageHandlers/RetryDelegatingHandler.cs @@ -1,4 +1,4 @@ -namespace BlazorWeb.Web.Services.HttpMessageHandlers; +namespace BlazorWeb.Client.Services.HttpMessageHandlers; public class RetryDelegatingHandler : DelegatingHandler diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/MessageBoxService.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/MessageBoxService.cs index 5ca7c5adb1..1cf08fcfcc 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/MessageBoxService.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Services/MessageBoxService.cs @@ -1,5 +1,4 @@ namespace BlazorWeb.Client.Services; - public partial class MessageBoxService { [AutoInject] IPubSubService _pubSubService = default!; diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppComponentBase.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppComponentBase.cs index b13960362e..eae1d0aced 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppComponentBase.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppComponentBase.cs @@ -2,6 +2,8 @@ public partial class AppComponentBase : ComponentBase { + [AutoInject] protected IJSRuntime JSRuntime = default!; + [AutoInject] protected HttpClient HttpClient = default!; /// @@ -16,8 +18,6 @@ public partial class AppComponentBase : ComponentBase [AutoInject] protected IConfiguration Configuration = default!; - [AutoInject] protected IJSRuntime JSRuntime { get; set; } = default!; - [AutoInject] protected NavigationManager NavigationManager = default!; [AutoInject] protected IAuthTokenProvider AuthTokenProvider = default!; @@ -30,7 +30,7 @@ public partial class AppComponentBase : ComponentBase [AutoInject] protected AppAuthenticationStateProvider AuthenticationStateProvider = default!; - protected async sealed override Task OnInitializedAsync() + protected sealed override async Task OnInitializedAsync() { try { @@ -43,7 +43,7 @@ protected async sealed override Task OnInitializedAsync() } } - protected async sealed override Task OnParametersSetAsync() + protected sealed override async Task OnParametersSetAsync() { try { @@ -56,7 +56,15 @@ protected async sealed override Task OnParametersSetAsync() } } - protected async override Task OnAfterRenderAsync(bool firstRender) + /// + /// Replacement for which catches all possible exceptions in order to prevent app crash. + /// + protected virtual Task OnInitAsync() + { + return Task.CompletedTask; + } + + protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { @@ -73,12 +81,9 @@ protected async override Task OnAfterRenderAsync(bool firstRender) await base.OnAfterRenderAsync(firstRender); } - /// - /// Replacement for which catches all possible exceptions in order to prevent app crash. - /// - protected virtual Task OnInitAsync() + protected sealed override void OnInitialized() { - return Task.CompletedTask; + base.OnInitialized(); } /// diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppDataAnnotationsValidator.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppDataAnnotationsValidator.cs index 93681bd86f..fde765cea4 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppDataAnnotationsValidator.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppDataAnnotationsValidator.cs @@ -1,12 +1,11 @@ using System.Reflection; using System.Runtime.InteropServices; -using Microsoft.AspNetCore.Components.Forms; using BlazorWeb.Shared.Attributes; using BlazorWeb.Shared.Dtos.Identity; +using Microsoft.AspNetCore.Components.Forms; namespace BlazorWeb.Client.Shared; - /// /// To implement forms where each error is displayed according to the language chosen by the user, you can use the /// on the corresponding class instead of using `ErrorResourceType` on each property. Check out for an example. @@ -14,8 +13,7 @@ namespace BlazorWeb.Client.Shared; /// public partial class AppDataAnnotationsValidator : AppComponentBase, IDisposable { - private static readonly PropertyInfo _OtherPropertyNamePropertyInfo = - typeof(CompareAttribute).GetProperty(nameof(CompareAttribute.OtherPropertyDisplayName))!; + private static readonly PropertyInfo _OtherPropertyNamePropertyInfo = typeof(CompareAttribute).GetProperty(nameof(CompareAttribute.OtherPropertyDisplayName))!; private bool _disposed; private ValidationMessageStore _validationMessageStore = default!; @@ -53,11 +51,7 @@ private void OnFieldChanged(object? sender, FieldChangedEventArgs eventArgs) var parent = propertyInfo.DeclaringType!; var dtoResourceTypeAttr = parent.GetCustomAttribute(); - if (dtoResourceTypeAttr is null) - { - Validator.TryValidateProperty(propertyValue, validationContext, results); - } - else + if (dtoResourceTypeAttr is not null) { var resourceType = dtoResourceTypeAttr.ResourceType; var stringLocalizer = _stringLocalizerFactory.Create(resourceType); @@ -93,9 +87,12 @@ private void OnFieldChanged(object? sender, FieldChangedEventArgs eventArgs) } } + else + { + Validator.TryValidateProperty(propertyValue, validationContext, results); + } _validationMessageStore.Clear(fieldIdentifier); - foreach (var result in CollectionsMarshal.AsSpan(results)) { _validationMessageStore.Add(fieldIdentifier, result.ErrorMessage!); @@ -114,12 +111,7 @@ private void OnValidationRequested(object? sender, ValidationRequestedEventArgs var dtoResourceTypeAttr = objectType.GetCustomAttribute(); _validationMessageStore.Clear(); - - if (dtoResourceTypeAttr is null) - { - Validator.TryValidateObject(_editContext.Model, validationContext, results, true); - } - else + if (dtoResourceTypeAttr is not null) { var resourceType = dtoResourceTypeAttr.ResourceType; @@ -129,7 +121,8 @@ private void OnValidationRequested(object? sender, ValidationRequestedEventArgs foreach (var propertyInfo in properties) { - var context = new ValidationContext(objectInstance, validationContext, validationContext.Items) { MemberName = propertyInfo.Name }; + var context = new ValidationContext(objectInstance, validationContext, validationContext.Items); + context.MemberName = propertyInfo.Name; var propertyValue = propertyInfo.GetValue(objectInstance); var validationAttributes = propertyInfo.GetCustomAttributes(); foreach (var attribute in validationAttributes) @@ -147,11 +140,8 @@ private void OnValidationRequested(object? sender, ValidationRequestedEventArgs validationContext.DisplayName = stringLocalizer.GetString(displayAttribute?.Name ?? propertyInfo.Name); if (attribute is CompareAttribute compareAttribute) { - var otherPropertyInfoDisplayAttribute = (properties.FirstOrDefault(p => p.Name == compareAttribute.OtherProperty) - ?? throw new InvalidOperationException($"Invalid OtherProperty {compareAttribute.OtherProperty}")).GetCustomAttribute(); - - _OtherPropertyNamePropertyInfo.SetValue(attribute, stringLocalizer.GetString(otherPropertyInfoDisplayAttribute?.Name - ?? compareAttribute.OtherProperty).ToString()); + var otherPropertyInfoDisplayAttribute = (properties.FirstOrDefault(p => p.Name == compareAttribute.OtherProperty) ?? throw new InvalidOperationException($"Invalid OtherProperty {compareAttribute.OtherProperty}")).GetCustomAttribute(); + _OtherPropertyNamePropertyInfo.SetValue(attribute, stringLocalizer.GetString(otherPropertyInfoDisplayAttribute?.Name ?? compareAttribute.OtherProperty).ToString()); } } @@ -164,15 +154,17 @@ private void OnValidationRequested(object? sender, ValidationRequestedEventArgs } } } + else + { + Validator.TryValidateObject(_editContext.Model, validationContext, results, true); + } _validationMessageStore.Clear(); - foreach (var validationResult in results) { if (validationResult == null) continue; var hasMemberNames = false; - foreach (var memberName in validationResult.MemberNames) { hasMemberNames = true; diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor index 4cb5fa222e..c198a23a93 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor @@ -14,7 +14,7 @@ else if (ErrorContent is null)

Oops, something went wrong...

- @if (ShowException) + @if (_showException) {
@CurrentException?.ToString()
} @@ -27,4 +27,4 @@ else if (ErrorContent is null) else { @ErrorContent(CurrentException) -} +} \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor.cs index 74779019da..807b7e747c 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/AppErrorBoundary.razor.cs @@ -1,4 +1,5 @@ //-:cnd:noEmit + namespace BlazorWeb.Client.Shared; /// @@ -6,24 +7,22 @@ namespace BlazorWeb.Client.Shared; /// public partial class AppErrorBoundary { + private bool _showException; + [AutoInject] private IExceptionHandler _exceptionHandler = default!; [AutoInject] private NavigationManager _navigationManager = default!; - private bool ShowException { get; set; } - #if DEBUG protected override void OnInitialized() { - ShowException = true; + _showException = true; } #endif - protected override Task OnErrorAsync(Exception exception) + protected override async Task OnErrorAsync(Exception exception) { _exceptionHandler.Handle(exception); - - return Task.CompletedTask; } private void Refresh() diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/ConfirmMessageBox.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/ConfirmMessageBox.razor.cs index c7979bae78..4a8638bb80 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/ConfirmMessageBox.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/ConfirmMessageBox.razor.cs @@ -16,9 +16,11 @@ public async Task Show(string message, string title) await InvokeAsync(() => { _ = JSRuntime.SetBodyOverflow(true); + _isOpen = true; _title = title; _message = message; + StateHasChanged(); }); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Footer.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Footer.razor.scss index c040fec305..061405cf83 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Footer.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Footer.razor.scss @@ -65,7 +65,6 @@ ::deep { .culture-drp { - top: rem2(-3px); left: rem2(5px); width: rem2(105px); position: absolute; @@ -78,7 +77,6 @@ } .toggle-theme-btn { - top: rem2(-3px); right: rem2(12px); position: absolute; padding: 0; diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor index de558e49eb..8e3c764b0d 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor @@ -4,16 +4,16 @@
@if (_isUserAuthenticated) { - + }
@if (!_isUserAuthenticated) { - @Localizer[nameof(AppStrings.PrivacyPolicyTitle)] - @Localizer[nameof(AppStrings.SignUp)] - @Localizer[nameof(AppStrings.SignIn)] + @Localizer[nameof(AppStrings.Term)] + @Localizer[nameof(AppStrings.SignUp)] + @Localizer[nameof(AppStrings.SignIn)] }
\ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor.scss index 5d1424a290..8918f25b03 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/Header.razor.scss @@ -11,13 +11,13 @@ align-items: center; flex-flow: row nowrap; min-height: rem2(48px); - padding-top: rem2(7px); padding-left: rem2(16px); padding-right: rem2(16px); padding-bottom: rem2(7px); justify-content: space-between; box-shadow: $bit-box-shadow-callout; background-color: $bit-color-background-primary; + padding-top: rem2(7px); } .logo-lnk { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MainLayout.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MainLayout.razor.scss index 0f0cd1b0b2..b3a0910c15 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MainLayout.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MainLayout.razor.scss @@ -6,11 +6,11 @@ .main { width: 100%; display: flex; - flex-flow: column; min-height: 100vh; + flex-flow: column; position: relative; - padding-top: rem2(48px); background-color: $bit-color-background-secondary; + padding-top: rem2(48px); } .main--authenticated { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MessageBox.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MessageBox.razor.scss index 55d93d9286..bbf208cc52 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MessageBox.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/MessageBox.razor.scss @@ -20,9 +20,9 @@ flex-grow: 1; display: flex; overflow: auto; + max-width: 90vw; white-space: pre; margin: rem2(10px) 0; - max-width: 90vw; } .footer { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.cs index 9934867ec7..78a7682672 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.cs @@ -1,4 +1,4 @@ -//-:cnd:noEmit +//+:cnd:noEmit using BlazorWeb.Shared.Dtos.Identity; namespace BlazorWeb.Client.Shared; @@ -29,12 +29,36 @@ protected override async Task OnInitAsync() IconName = BitIconName.Home, Url = "/", }, + //#if (sample == "AdminPanel") + new BitNavItem + { + Text = Localizer[nameof(AppStrings.ProductCategory)], + IconName = BitIconName.Product, + IsExpanded = true, + ChildItems = + [ + new() { + Text = Localizer[nameof(AppStrings.Dashboard)], + Url = "/dashboard", + }, + new() { + Text = Localizer[nameof(AppStrings.Products)], + Url = "/products", + }, + new() { + Text = Localizer[nameof(AppStrings.Categories)], + Url = "/categories", + }, + ] + }, + //#elif (sample == "Todo") new BitNavItem { Text = Localizer[nameof(AppStrings.TodoTitle)], IconName = BitIconName.ToDoLogoOutline, Url = "/todo", }, + //#endif new BitNavItem { Text = Localizer[nameof(AppStrings.EditProfileTitle)], @@ -43,9 +67,9 @@ protected override async Task OnInitAsync() }, new BitNavItem { - Text = Localizer[nameof(AppStrings.PrivacyPolicyTitle)], + Text = Localizer[nameof(AppStrings.TermsTitle)], IconName = BitIconName.EntityExtraction, - Url = "/privacy", + Url = "/terms", } ]; diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.scss index a91276a284..b662ce7d99 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/NavMenu.razor.scss @@ -9,11 +9,11 @@ display: flex; position: fixed; min-height: 100%; - padding-top: rem2(48px); flex-flow: column nowrap; width: rem2($navMenuWidth); justify-content: flex-start; background-color: $bit-color-background-primary; + padding-top: rem2(48px); } .main-container--closed { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/PageNotFound.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/PageNotFound.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/PageNotFound.razor rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/PageNotFound.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/PageNotFound.razor.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/PageNotFound.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/PageNotFound.razor.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Shared/PageNotFound.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_colors.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_colors.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_colors.scss rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_colors.scss diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_functions.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_functions.scss index 29bd35e9c0..c2359935dd 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_functions.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_functions.scss @@ -12,4 +12,4 @@ $html-font-size: 16px; @function rem2($pxValue) { @return #{calc(stripUnit($pxValue) / stripUnit($html-font-size))}rem; -} +} \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_media-queries.scss b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_media-queries.scss index e5074723d1..9662a3bb91 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_media-queries.scss +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/Styles/abstracts/_media-queries.scss @@ -75,4 +75,4 @@ $screen-sm-max: rem2(360px); @media screen and (min-width: #{$screen-xl-min}) { @content; } -} \ No newline at end of file +} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/_Imports.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/_Imports.razor index a591790846..ba50f83fb2 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/_Imports.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/_Imports.razor @@ -1,19 +1,20 @@ @using System.Reflection @using System.Globalization +@using Microsoft.JSInterop +@using Microsoft.Extensions.Logging @using Microsoft.AspNetCore.Components @using Microsoft.AspNetCore.Authorization +@using Microsoft.Extensions.Configuration @using Microsoft.AspNetCore.Components.Web @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.Web.Virtualization -@using Microsoft.Extensions.Configuration -@using Microsoft.JSInterop @using Bit.BlazorUI @using BlazorWeb +@using BlazorWeb.Shared.Enums @using BlazorWeb.Client @using BlazorWeb.Client.Shared @using BlazorWeb.Client.Pages @using BlazorWeb.Client.Services.Contracts -@using BlazorWeb.Client.Services -@using BlazorWeb.Shared.Enums \ No newline at end of file +@using BlazorWeb.Client.Services \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/compilerconfig.json b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/compilerconfig.json index 02df7bf640..7b3e085b6d 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/compilerconfig.json +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/compilerconfig.json @@ -1,3 +1,4 @@ +//+:cnd:noEmit [ { "outputFile": "Shared/MainLayout.razor.css", @@ -42,32 +43,32 @@ "options": { "sourceMap": false } }, { - "outputFile": "Shared/SignOutConfirmModal.razor.css", - "inputFile": "Shared/SignOutConfirmModal.razor.scss", + "outputFile": "Shared/NotAuthorizedComponent.razor.css", + "inputFile": "Shared/NotAuthorizedComponent.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/HomePage.razor.css", - "inputFile": "Pages/HomePage.razor.scss", + "outputFile": "Shared/SignOutConfirmModal.razor.css", + "inputFile": "Shared/SignOutConfirmModal.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/NotAuthorizedPage.razor.css", - "inputFile": "Pages/NotAuthorizedPage.razor.scss", + "outputFile": "Shared/PageNotFound.razor.css", + "inputFile": "Shared/PageNotFound.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/NotFoundPage.razor.css", - "inputFile": "Pages/NotFoundPage.razor.scss", + "outputFile": "Pages/HomePage.razor.css", + "inputFile": "Pages/HomePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/PrivacyPage.razor.css", - "inputFile": "Pages/PrivacyPage.razor.scss", + "outputFile": "Pages/TermsPage.razor.css", + "inputFile": "Pages/TermsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, @@ -101,12 +102,6 @@ "minify": { "enabled": false }, "options": { "sourceMap": false } }, - { - "outputFile": "Pages/Todo/TodoPage.razor.css", - "inputFile": "Pages/Todo/TodoPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, { "outputFile": "Pages/Identity/EditProfilePage.razor.css", "inputFile": "Pages/Identity/EditProfilePage.razor.scss", @@ -124,5 +119,68 @@ "inputFile": "Styles/app.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } + }, + //#if (sample == "Todo") + { + "outputFile": "Pages/TodoPage.razor.css", + "inputFile": "Pages/TodoPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + //#elif (sample == "AdminPanel") + { + "outputFile": "Pages/Categories/AddOrEditCategoryPage.razor.css", + "inputFile": "Pages/Categories/AddOrEditCategoryPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Categories/CategoriesPage.razor.css", + "inputFile": "Pages/Categories/CategoriesPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Dashboard/DashboardPage.razor.css", + "inputFile": "Pages/Dashboard/DashboardPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Dashboard/OverallStatsWidget.razor.css", + "inputFile": "Pages/Dashboard/OverallStatsWidget.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Dashboard/ProductsCountPerCategotyWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Dashboard/ProductsPercentageWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsPercentageWidget.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Dashboard/ProductsSalesWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsSalesWidget.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Products/AddOrEditProductModal.razor.css", + "inputFile": "Pages/Products/AddOrEditProductModal.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Products/ProductsPage.razor.css", + "inputFile": "Pages/Products/ProductsPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } } + //#endif ] \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-logo.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-logo.svg index fbd43466a7..731f817a0b 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-logo.svg +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-logo.svg @@ -1,8 +1,7 @@ - - - - - - - + + + + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/bit-white-logo.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-white-logo.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/bit-white-logo.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/bit-white-logo.svg diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/bit-icon-512.png b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/bit-icon-512.png index da8055f6ca..b9809b15c6 100644 Binary files a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/bit-icon-512.png and b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/bit-icon-512.png differ diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/checkmark-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/checkmark-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/checkmark-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/checkmark-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/chevron-bottom-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/chevron-bottom-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/chevron-bottom-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/chevron-bottom-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/github-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/github-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/github-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/github-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/linkedin-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/linkedin-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/linkedin-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/linkedin-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/twitter-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/twitter-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/twitter-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/twitter-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/youtube-icon.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/youtube-icon.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/youtube-icon.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/icons/youtube-icon.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/menu-banner.webp b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/menu-banner.webp similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/menu-banner.webp rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/menu-banner.webp diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/sign-in-up-bg.webp b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/sign-in-up-bg.webp similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/sign-in-up-bg.webp rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/sign-in-up-bg.webp diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/stat-card-bg-hover.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/stat-card-bg-hover.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/stat-card-bg-hover.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/stat-card-bg-hover.svg diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/stat-card-bg.svg b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/stat-card-bg.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/stat-card-bg.svg rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Client/wwwroot/images/stat-card-bg.svg diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TodoTemplate.Iac.csproj b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BlazorWeb.Iac.csproj similarity index 83% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TodoTemplate.Iac.csproj rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BlazorWeb.Iac.csproj index 98a53e6336..83a8b52c30 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TodoTemplate.Iac.csproj +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BlazorWeb.Iac.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TdStack.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BwStack.cs similarity index 88% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TdStack.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BwStack.cs index c73d2f8af2..90076460bc 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/TdStack.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/BwStack.cs @@ -18,18 +18,18 @@ using VaultSkuName = Pulumi.AzureNative.KeyVault.SkuName; using WebAppManagedServiceIdentityArgs = Pulumi.AzureNative.Web.Inputs.ManagedServiceIdentityArgs; -namespace TodoTemplate.Iac; +namespace BlazorWeb.Iac; -public class TdStack : Stack +public class BpStack : Stack { - public TdStack() + public BpStack() { string stackName = Pulumi.Deployment.Instance.StackName; Config pulumiConfig = new(); - var sqlDatabaseDbAdminId = pulumiConfig.Require("sql-server-td-db-admin-id"); - var sqlDatabaseDbAdminPassword = pulumiConfig.RequireSecret("sql-server-td-db-admin-password"); + var sqlDatabaseDbAdminId = pulumiConfig.Require("sql-server-bw-db-admin-id"); + var sqlDatabaseDbAdminPassword = pulumiConfig.RequireSecret("sql-server-bw-db-admin-password"); var defaultEmailFrom = pulumiConfig.Require("default-email-from"); var emailServerHost = pulumiConfig.Require("email-server-host"); @@ -39,22 +39,22 @@ public TdStack() var identityCertificatePassword = pulumiConfig.RequireSecret("identity-certificate-password"); - ResourceGroup resourceGroup = new($"td-{stackName}", new ResourceGroupArgs + ResourceGroup resourceGroup = new($"bw-{stackName}", new ResourceGroupArgs { - ResourceGroupName = $"td-{stackName}" - }, options: new() { ImportId = $"/subscriptions/{GetClientConfig.InvokeAsync().GetAwaiter().GetResult().SubscriptionId}/resourceGroups/td-prod" }); + ResourceGroupName = $"bw-{stackName}" + }, options: new() { ImportId = $"/subscriptions/{GetClientConfig.InvokeAsync().GetAwaiter().GetResult().SubscriptionId}/resourceGroups/bw-prod" }); - Workspace appInsightsWorkspace = new($"insights-wkspc-td-{stackName}", new() + Workspace appInsightsWorkspace = new($"insights-wkspc-bw-{stackName}", new() { - WorkspaceName = $"insights-wkspc-td-{stackName}", + WorkspaceName = $"insights-wkspc-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, RetentionInDays = 30 }); - AppInsights appInsights = new($"app-insights-td-{stackName}", new() + AppInsights appInsights = new($"app-insights-bw-{stackName}", new() { - ResourceName = $"app-insights-td-{stackName}", + ResourceName = $"app-insights-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ApplicationType = AppInsightsWebApplicationType.Web, @@ -68,18 +68,18 @@ public TdStack() }).Apply(workspace => workspace.Id) }); - SqlServer sqlServer = new($"sql-server-td-{stackName}", new() + SqlServer sqlServer = new($"sql-server-bw-{stackName}", new() { - ServerName = $"sql-server-td-{stackName}", + ServerName = $"sql-server-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, AdministratorLogin = sqlDatabaseDbAdminId, AdministratorLoginPassword = sqlDatabaseDbAdminPassword }); - SqlDatabase sqlDatabase = new($"sql-database-td-{stackName}", new() + SqlDatabase sqlDatabase = new($"sql-database-bw-{stackName}", new() { - DatabaseName = $"sql-database-td-{stackName}", + DatabaseName = $"sql-database-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ServerName = sqlServer.Name, @@ -91,9 +91,9 @@ public TdStack() } }); - AppServicePlan appServicePlan = new($"app-plan-td-{stackName}", new() + AppServicePlan appServicePlan = new($"app-plan-bw-{stackName}", new() { - Name = $"app-plan-td-{stackName}", + Name = $"app-plan-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, Kind = "Linux", @@ -108,14 +108,14 @@ public TdStack() } }); - string vaultName = $"vault-td-{stackName}"; + string vaultName = $"vault-bw-{stackName}"; string sqlDatabaseConnectionStringSecretName = $"sql-connection-secret"; string emailServerPasswordSecretName = "email-server-password-secret"; string identityCertificatePasswordSecretName = "identity-certificate-password-secret"; - WebApp webApp = new($"app-service-td-{stackName}", new() + WebApp webApp = new($"app-service-bw-{stackName}", new() { - Name = $"app-service-td-{stackName}", + Name = $"app-service-bw-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ServerFarmId = appServicePlan.Id, @@ -131,9 +131,9 @@ public TdStack() NetFrameworkVersion = "v8.0", FtpsState = FtpsState.Disabled, LinuxFxVersion = "DOTNETCORE|8.0", - AppCommandLine = "dotnet TodoTemplate.Server.Api.dll", - AppSettings = new() - { + AppCommandLine = "dotnet BlazorWeb.Server.dll", + AppSettings = + [ new NameValuePairArgs { Name = "ApplicationInsights__InstrumentationKey", Value = appInsights.InstrumentationKey }, new NameValuePairArgs { Name = "APPINSIGHTS_INSTRUMENTATIONKEY", Value = appInsights.InstrumentationKey }, new NameValuePairArgs { Name = "ASPNETCORE_ENVIRONMENT", Value = stackName == "test" ? "Test" : "Production" }, @@ -160,16 +160,16 @@ public TdStack() Name = "AppSettings__JwtSettings__IdentityCertificatePassword", Value = $"@Microsoft.KeyVault(VaultName={vaultName};SecretName={identityCertificatePasswordSecretName})" }, - }, - ConnectionStrings = new() - { + ], + ConnectionStrings = + [ new ConnStringInfoArgs { Name = "SqlServerConnectionString", Type = ConnectionStringType.SQLAzure, ConnectionString = $"@Microsoft.KeyVault(VaultName={vaultName};SecretName={sqlDatabaseConnectionStringSecretName})" } - } + ] } }); @@ -201,7 +201,7 @@ public TdStack() return string.Empty; }); - Vault vault = new Vault($"vault-td-{stackName}", new() + Vault vault = new Vault($"vault-bw-{stackName}", new() { ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, @@ -216,8 +216,7 @@ public TdStack() EnableSoftDelete = false, AccessPolicies = new List { - new AccessPolicyEntryArgs - { + new() { TenantId = Output.Create(GetClientConfig.InvokeAsync()).Apply(clientConfig => clientConfig.TenantId), ObjectId = Output.Tuple(resourceGroup.Name, webApp.Name).Apply(t => { @@ -268,7 +267,7 @@ public TdStack() Value = Output.Tuple(sqlServer.Name, sqlDatabase.Name, sqlDatabaseDbAdminPassword).Apply(t => { (string _sqlServer, string _sqlDatabase, string _sqlDatabasePassword) = t; - return $"Data Source=tcp:{_sqlServer}.database.windows.net;Initial Catalog={_sqlDatabase};User ID={sqlDatabaseDbAdminId};Password={_sqlDatabasePassword};Application Name=Todo;Encrypt=True;"; + return $"Data Source=tcp:{_sqlServer}.database.windows.net;Initial Catalog={_sqlDatabase};User ID={sqlDatabaseDbAdminId};Password={_sqlDatabasePassword};Application Name=BlazorWeb;Encrypt=True;"; }) } }); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Program.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Program.cs new file mode 100644 index 0000000000..143bff8f84 --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Program.cs @@ -0,0 +1,7 @@ +using BlazorWeb.Iac; +using Pulumi; + +public class Program +{ + static Task Main() => Deployment.RunAsync(); +} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Pulumi.yaml b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Pulumi.yaml new file mode 100644 index 0000000000..d8386cc4cb --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Pulumi.yaml @@ -0,0 +1,3 @@ +name: BlazorWeb.Iac +runtime: dotnet +description: BlazorWeb infrastructure as a code diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Readme.md b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Readme.md similarity index 73% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Readme.md rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Readme.md index e2a28ccb5a..e877338a99 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/Readme.md +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Infra/Readme.md @@ -25,26 +25,26 @@ az provider register --namespace 'Microsoft.KeyVault' ``` -2- Create ad-prod resource group +2- Create bw-prod resource group ``` -az group create --name ad-prod --location eastus +az group create --name bw-prod --location eastus ``` Notes: -* `ad` is an abbreviation for Admin, use the acronym of your choice and replace ad with that (for example abc) using exact match - case sensitive find and replace in this file and AdStack.cs. +* `bw` is an abbreviation for BlazorWeb, use the acronym of your choice and replace bw with that (for example abc) using exact match - case sensitive find and replace in this file and AdStack.cs. * You can use any location supported by azure cloud (run `az account list-locations -o table` to see full list of locations) 3- Create [service principals](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals) for prod using followings: ``` -az ad sp create-for-rbac -n "ad-prod" --role Contributor --scopes /subscriptions/{subscriptionId}/resourceGroups/ad-prod +az bw sp create-for-rbac -n "bw-prod" --role Contributor --scopes /subscriptions/{subscriptionId}/resourceGroups/bw-prod ``` Notes: * Replace `{subscriptionId}` with [your own subscription id](https://docs.microsoft.com/en-us/azure/media-services/latest/setup-azure-subscription-how-to) -* Running `az ad sp` will return a json like response that contains `appId`l, `password` and `tenant`. Store them somewhere safe. +* Running `az bw sp` will return a json like response that contains `appId`l, `password` and `tenant`. Store them somewhere safe. 4- Create the stacks folder first, then create `prod` folder in the `stacks` folder. @@ -86,18 +86,18 @@ pulumi config set azure-native:tenantId pulumi config set azure-native:subscriptionId # Provide SQL server's admin user/pass -pulumi config set AdminPanel.Iac:sql-server-ad-db-admin-id -pulumi config set AdminPanel.Iac:sql-server-ad-db-admin-password --secret +pulumi config set BlazorWeb.Iac:sql-server-bw-db-admin-id +pulumi config set BlazorWeb.Iac:sql-server-bw-db-admin-password --secret # Provide SMTP server's host, port, user, pass and default email sender. -pulumi config set AdminPanel.Iac:default-email-from -pulumi config set AdminPanel.Iac:email-server-host -pulumi config set AdminPanel.Iac:email-server-port -pulumi config set AdminPanel.Iac:email-server-userName -pulumi config set AdminPanel.Iac:email-server-password --secret +pulumi config set BlazorWeb.Iac:default-email-from +pulumi config set BlazorWeb.Iac:email-server-host +pulumi config set BlazorWeb.Iac:email-server-port +pulumi config set BlazorWeb.Iac:email-server-userName +pulumi config set BlazorWeb.Iac:email-server-password --secret # Create and provide an identity certificate password -pulumi config set AdminPanel.Iac:identity-certificate-password --secret +pulumi config set BlazorWeb.Iac:identity-certificate-password --secret ``` 9- Create azure resources using: diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Components/App.razor b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Components/App.razor index 6006f2cba8..556e08e8ae 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Components/App.razor +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Components/App.razor @@ -1,4 +1,5 @@ -@using BlazorWeb.Client.Services +@*+:cnd:noEmit*@ +@using BlazorWeb.Client.Services @attribute [StreamRendering(true)] @@ -20,14 +21,20 @@ + @*#if (sample == "AdminPanel")*@ + + @*#endif*@ - + + @*#if (sample == "AdminPanel")*@ + + @*#endif*@ diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/AttachmentController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/AttachmentController.cs index 8706480e90..85369db819 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/AttachmentController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/AttachmentController.cs @@ -1,6 +1,6 @@ -using ImageMagick; +using BlazorWeb.Server.Models.Identity; +using ImageMagick; using MimeTypes; -using BlazorWeb.Server.Models.Identity; using SystemFile = System.IO.File; namespace BlazorWeb.Server.Controllers; @@ -10,6 +10,7 @@ namespace BlazorWeb.Server.Controllers; public partial class AttachmentController : AppControllerBase { [AutoInject] private UserManager _userManager = default!; + [AutoInject] private IWebHostEnvironment _webHostEnvironment = default!; [HttpPost] diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Categories/CategoryController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Categories/CategoryController.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Categories/CategoryController.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Categories/CategoryController.cs index fcab373cc4..d2b790ccf4 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Categories/CategoryController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Categories/CategoryController.cs @@ -1,7 +1,7 @@ -using AdminPanel.Server.Api.Models.Categories; -using AdminPanel.Shared.Dtos.Categories; +using BlazorWeb.Server.Models.Categories; +using BlazorWeb.Shared.Dtos.Categories; -namespace AdminPanel.Server.Api.Controllers; +namespace BlazorWeb.Server.Controllers; [Route("api/[controller]/[action]")] [ApiController] diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/AuthController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/AuthController.cs index c5fd5bb513..82de248457 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/AuthController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/AuthController.cs @@ -1,13 +1,13 @@ //-:cnd:noEmit using System.Web; -using FluentEmail.Core; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; using BlazorWeb.Server.Components; using BlazorWeb.Server.Models.Emailing; using BlazorWeb.Server.Models.Identity; using BlazorWeb.Server.Resources; using BlazorWeb.Shared.Dtos.Identity; +using FluentEmail.Core; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Web; namespace BlazorWeb.Server.Controllers.Identity; @@ -27,6 +27,8 @@ public partial class AuthController : AppControllerBase [AutoInject] private HtmlRenderer _htmlRenderer = default!; + [AutoInject] protected IStringLocalizer IdentityLocalizer = default!; + /// /// By leveraging summary tags in your controller's actions and DTO properties you can make your codes much easier to maintain. /// These comments will also be used in swagger docs and ui. @@ -55,7 +57,7 @@ public async Task SignUp(SignUpRequestDto signUpRequest, CancellationToken cance if (result.Succeeded is false) { - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, signUpRequest.Email!)).ToArray()); + throw new ResourceValidationException(result.Errors.Select(e => IdentityLocalizer.GetString(e.Code, signUpRequest.Email!)).ToArray()); } await SendConfirmationEmail(new() { Email = userToAdd.Email }, userToAdd, cancellationToken); @@ -86,7 +88,9 @@ private async Task SendConfirmationEmail(SendConfirmationEmailRequestDto sendCon var controller = RouteData.Values["controller"]!.ToString(); - var confirmationLink = Url.Action(nameof(ConfirmEmail), controller, new { user.Email, token }, HttpContext.Request.Scheme); + var confirmationLink = Url.Action(nameof(ConfirmEmail), controller, + new { user.Email, token }, + HttpContext.Request.Scheme); var body = await _htmlRenderer.Dispatcher.InvokeAsync(async () => { @@ -120,7 +124,7 @@ private async Task SendConfirmationEmail(SendConfirmationEmailRequestDto sendCon [HttpPost] public async Task SendResetPasswordEmail(SendResetPasswordEmailRequestDto sendResetPasswordEmailRequest - , CancellationToken cancellationToken) + , CancellationToken cancellationToken) { var user = await _userManager.FindByEmailAsync(sendResetPasswordEmailRequest.Email!); @@ -179,9 +183,7 @@ public async Task ConfirmEmail(string email, string token) var emailConfirmed = user.EmailConfirmed || (await _userManager.ConfirmEmailAsync(user, token)).Succeeded; - string url = $"email-confirmation?email={email}&email-confirmed={emailConfirmed}"; - - url = $"/{url}"; + string url = $"/email-confirmation?email={email}&email-confirmed={emailConfirmed}"; return Redirect(url); } @@ -197,7 +199,7 @@ public async Task ResetPassword(ResetPasswordRequestDto resetPasswordRequest) var result = await _userManager.ResetPasswordAsync(user, resetPasswordRequest.Token!, resetPasswordRequest.Password!); if (!result.Succeeded) - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, resetPasswordRequest.Email!)).ToArray()); + throw new ResourceValidationException(result.Errors.Select(e => IdentityLocalizer.GetString(e.Code, resetPasswordRequest.Email!)).ToArray()); } [HttpPost] diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/UserController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/UserController.cs index f1ac2982b4..a5598e960f 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/UserController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Identity/UserController.cs @@ -12,7 +12,7 @@ public partial class UserController : AppControllerBase [HttpGet] public async Task GetCurrentUser(CancellationToken cancellationToken) { - var userId = UserInformationProvider.GetUserId(); + var userId = User.GetUserId(); var user = await _userManager.Users.FirstOrDefaultAsync(user => user.Id == userId, cancellationToken); @@ -25,7 +25,7 @@ public async Task GetCurrentUser(CancellationToken cancellationToken) [HttpPut] public async Task Update(EditUserDto userDto, CancellationToken cancellationToken) { - var userId = UserInformationProvider.GetUserId(); + var userId = User.GetUserId(); var user = await _userManager.Users.FirstOrDefaultAsync(user => user.Id == userId, cancellationToken); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/DashboardController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/DashboardController.cs similarity index 93% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/DashboardController.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/DashboardController.cs index 493b9a658b..bf703f2e7a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/DashboardController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/DashboardController.cs @@ -1,6 +1,6 @@ -using AdminPanel.Shared.Dtos.Dashboard; +using BlazorWeb.Shared.Dtos.Dashboard; -namespace AdminPanel.Server.Api.Controllers; +namespace BlazorWeb.Server.Controllers; [Route("api/[controller]/[action]")] [ApiController] @@ -53,7 +53,7 @@ public async Task> GetProductsPercentagePe if (productsTotalCount == 0) { - return new List(); + return []; } return await DbContext.Categories diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/ProductController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/ProductController.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/ProductController.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/ProductController.cs index 4ed8f5bb3d..419c458dd3 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Products/ProductController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Products/ProductController.cs @@ -1,7 +1,7 @@ -using AdminPanel.Server.Api.Models.Products; -using AdminPanel.Shared.Dtos.Products; +using BlazorWeb.Server.Models.Products; +using BlazorWeb.Shared.Dtos.Products; -namespace AdminPanel.Server.Api.Controllers; +namespace BlazorWeb.Server.Controllers; [Route("api/[controller]/[action]")] [ApiController] diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Todo/TodoItemController.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Todo/TodoItemController.cs index 4a577542c3..fee625fb5e 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Todo/TodoItemController.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Controllers/Todo/TodoItemController.cs @@ -28,6 +28,22 @@ public async Task Get(int id, CancellationToken cancellationToken) return todoItem; } + [HttpGet] + public async Task> GetTodoItems(ODataQueryOptions odataQuery, CancellationToken cancellationToken) + { + var query = (IQueryable)odataQuery.ApplyTo(Get(), ignoreQueryOptions: AllowedQueryOptions.Top | AllowedQueryOptions.Skip); + + var totalCount = await query.LongCountAsync(cancellationToken); + + if (odataQuery.Skip is not null) + query = query.Skip(odataQuery.Skip.Value); + + if (odataQuery.Top is not null) + query = query.Take(odataQuery.Top.Value); + + return new PagedResult(await query.ToListAsync(cancellationToken), totalCount); + } + [HttpPost] public async Task Create(TodoItemDto dto, CancellationToken cancellationToken) { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/AppDbContext.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/AppDbContext.cs index 8e1502a2ae..4d02ae60de 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/AppDbContext.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/AppDbContext.cs @@ -1,18 +1,25 @@ //+:cnd:noEmit -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using BlazorWeb.Server.Models.Identity; +//#if (sample == "Todo") using BlazorWeb.Server.Models.Todo; +//#elif (sample == "AdminPanel") +using BlazorWeb.Server.Models.Categories; +using BlazorWeb.Server.Models.Products; +//#endif +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace BlazorWeb.Server.Data; -public class AppDbContext : IdentityDbContext +public class AppDbContext(DbContextOptions options) + : IdentityDbContext(options) { - public AppDbContext(DbContextOptions options) - : base(options) - { - } + //#if (sample == "Todo") public DbSet TodoItems { get; set; } + //#elif (sample == "AdminPanel") + public DbSet Categories { get; set; } + public DbSet Products { get; set; } + //#endif protected override void OnModelCreating(ModelBuilder builder) { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Category/CategoryConfiguration.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Category/CategoryConfiguration.cs index c744696643..ef18f2cd34 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Category/CategoryConfiguration.cs @@ -1,6 +1,6 @@ -using AdminPanel.Server.Api.Models.Categories; +using BlazorWeb.Server.Models.Categories; -namespace AdminPanel.Server.Api.Data.Configurations.Identity; +namespace BlazorWeb.Server.Data.Configurations.Identity; public class CategoryConfiguration : IEntityTypeConfiguration { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Product/ProductConfiguration.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Product/ProductConfiguration.cs index 60d7c3fca7..ecc9c526ab 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Configurations/Product/ProductConfiguration.cs @@ -1,6 +1,6 @@ -using AdminPanel.Server.Api.Models.Products; +using BlazorWeb.Server.Models.Products; -namespace AdminPanel.Server.Api.Data.Configurations.Identity; +namespace BlazorWeb.Server.Data.Configurations.Identity; public class ProductConfiguration : IEntityTypeConfiguration { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.Designer.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.Designer.cs similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.Designer.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.Designer.cs index bb24b8855f..1ef74055ee 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/20230824104659_InitialMigration.Designer.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.Designer.cs @@ -1,6 +1,6 @@ // using System; -using AdminPanel.Server.Api.Data; +using BlazorWeb.Server.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -9,10 +9,10 @@ #nullable disable -namespace AdminPanel.Server.Api.Migrations +namespace BlazorWeb.Server.Data.Migrations { [DbContext(typeof(AppDbContext))] - [Migration("20230824104659_InitialMigration")] + [Migration("20231114012959_InitialMigration")] partial class InitialMigration { /// @@ -20,12 +20,12 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Categories.Category", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Categories.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -78,7 +78,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) }); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Identity.Role", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Identity.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -108,7 +108,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("Roles", (string)null); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Identity.User", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Identity.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -199,23 +199,23 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) Id = 1, AccessFailedCount = 0, BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "9f7f7dc2-da36-431a-a390-f65aa6589582", + ConcurrencyStamp = "a93803e4-4826-4f8f-a3c0-9b3915222944", Email = "test@bitplatform.dev", EmailConfirmed = true, - FullName = "AdminPanel test account", + FullName = "BlazorWeb test account", Gender = 2, LockoutEnabled = false, NormalizedEmail = "TEST@BITPLATFORM.DEV", NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEHLM21HNl59v+pj1RM37VDwsDBTwCihJF/4NBXBTwYz2picGLk+OuXHrc7KWj0Nl/g==", + PasswordHash = "AQAAAAIAAYagAAAAEHkXKL/4p8zGmGPVrQLM4FFbgg0ZDGlCtICfXdEArQg/Ih7Kkn9LfNCZME2+wd0APw==", PhoneNumberConfirmed = false, - SecurityStamp = "4d3447a4-022e-4ba7-8828-dad2a3a76459", + SecurityStamp = "e8fe621c-97fd-41ec-9d33-29c931496432", TwoFactorEnabled = false, UserName = "test@bitplatform.dev" }); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Products.Product", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Products.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -457,6 +457,33 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) }); }); + modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Date") + .HasColumnType("datetimeoffset"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("TodoItems"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") @@ -560,9 +587,9 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("UserTokens", (string)null); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Products.Product", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Products.Product", b => { - b.HasOne("AdminPanel.Server.Api.Models.Categories.Category", "Category") + b.HasOne("BlazorWeb.Server.Models.Categories.Category", "Category") .WithMany("Products") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -571,9 +598,20 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("Category"); }); + modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => + { + b.HasOne("BlazorWeb.Server.Models.Identity.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.Role", null) + b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) @@ -582,7 +620,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -591,7 +629,7 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -600,13 +638,13 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.Role", null) + b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -615,14 +653,14 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Categories.Category", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Categories.Category", b => { b.Navigation("Products"); }); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.cs new file mode 100644 index 0000000000..b36d14b499 --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/20231114012959_InitialMigration.cs @@ -0,0 +1,358 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable DateTimeOffsetInsteadOfDateTimeAnalyzer + +namespace BlazorWeb.Server.Data.Migrations; + +/// +public partial class InitialMigration : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Categories", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Color = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Categories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Roles", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Roles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + FullName = table.Column(type: "nvarchar(max)", nullable: true), + Gender = table.Column(type: "int", nullable: true), + BirthDate = table.Column(type: "datetimeoffset", nullable: true), + ProfileImageName = table.Column(type: "nvarchar(max)", nullable: true), + ConfirmationEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), + ResetPasswordEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), + SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Products", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Price = table.Column(type: "money", nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreatedOn = table.Column(type: "datetimeoffset", nullable: false), + CategoryId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Products", x => x.Id); + table.ForeignKey( + name: "FK_Products_Categories_CategoryId", + column: x => x.CategoryId, + principalTable: "Categories", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RoleClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "int", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_RoleClaims_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "TodoItems", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Title = table.Column(type: "nvarchar(max)", nullable: true), + Date = table.Column(type: "datetimeoffset", nullable: false), + IsDone = table.Column(type: "bit", nullable: false), + UserId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TodoItems", x => x.Id); + table.ForeignKey( + name: "FK_TodoItems_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + UserId = table.Column(type: "int", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserClaims", x => x.Id); + table.ForeignKey( + name: "FK_UserClaims_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserLogins", + columns: table => new + { + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_UserLogins_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserRoles", + columns: table => new + { + UserId = table.Column(type: "int", nullable: false), + RoleId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_UserRoles_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserRoles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserTokens", + columns: table => new + { + UserId = table.Column(type: "int", nullable: false), + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_UserTokens_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Categories", + columns: new[] { "Id", "Color", "Name" }, + values: new object[,] + { + { 1, "#FFCD56", "Ford" }, + { 2, "#FF6384", "Nissan" }, + { 3, "#4BC0C0", "Benz" }, + { 4, "#FF9124", "BMW" }, + { 5, "#2B88D8", "Tesla" } + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "AccessFailedCount", "BirthDate", "ConcurrencyStamp", "ConfirmationEmailRequestedOn", "Email", "EmailConfirmed", "FullName", "Gender", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "ProfileImageName", "ResetPasswordEmailRequestedOn", "SecurityStamp", "TwoFactorEnabled", "UserName" }, + values: new object[] { 1, 0, new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), "a93803e4-4826-4f8f-a3c0-9b3915222944", null, "test@bitplatform.dev", true, "BlazorWeb test account", 2, false, null, "TEST@BITPLATFORM.DEV", "TEST@BITPLATFORM.DEV", "AQAAAAIAAYagAAAAEHkXKL/4p8zGmGPVrQLM4FFbgg0ZDGlCtICfXdEArQg/Ih7Kkn9LfNCZME2+wd0APw==", null, false, null, null, "e8fe621c-97fd-41ec-9d33-29c931496432", false, "test@bitplatform.dev" }); + + migrationBuilder.InsertData( + table: "Products", + columns: new[] { "Id", "CategoryId", "CreatedOn", "Description", "Name", "Price" }, + values: new object[,] + { + { 1, 1, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Mustang is ranked #1 in Sports Cars", "Mustang", 27155m }, + { 2, 1, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", "GT", 500000m }, + { 3, 1, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", "Ranger", 25000m }, + { 4, 1, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Raptor is a SCORE off-road trophy truck living in a asphalt world", "Raptor", 53205m }, + { 5, 1, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", "Maverick", 22470m }, + { 6, 2, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A powerful convertible sports car", "Roadster", 42800m }, + { 7, 2, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A perfectly adequate family sedan with sharp looks", "Altima", 24550m }, + { 8, 2, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", "GT-R", 113540m }, + { 9, 2, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A new smart SUV", "Juke", 28100m }, + { 10, 3, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "H247", 54950m }, + { 11, 3, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "V297", 103360m }, + { 12, 3, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "R50", 2000000m }, + { 13, 4, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M550i", 77790m }, + { 14, 4, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "540i", 60945m }, + { 15, 4, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530e", 56545m }, + { 16, 4, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530i", 55195m }, + { 17, 4, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M850i", 100045m }, + { 18, 4, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "X7", 77980m }, + { 19, 4, new DateTimeOffset(new DateTime(2022, 6, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "IX", 87000m }, + { 20, 5, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "rapid acceleration and dynamic handling", "Model 3", 61990m }, + { 21, 5, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "finishes near the top of our luxury electric car rankings.", "Model S", 135000m }, + { 22, 5, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Heart-pumping acceleration, long drive range", "Model X", 138890m }, + { 23, 5, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "extensive driving range, lots of standard safety features", "Model Y", 67790m } + }); + + migrationBuilder.CreateIndex( + name: "IX_Products_CategoryId", + table: "Products", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleClaims_RoleId", + table: "RoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "Roles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_TodoItems_UserId", + table: "TodoItems", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserClaims_UserId", + table: "UserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLogins_UserId", + table: "UserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_RoleId", + table: "UserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "Users", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "Users", + column: "NormalizedUserName", + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Products"); + + migrationBuilder.DropTable( + name: "RoleClaims"); + + migrationBuilder.DropTable( + name: "TodoItems"); + + migrationBuilder.DropTable( + name: "UserClaims"); + + migrationBuilder.DropTable( + name: "UserLogins"); + + migrationBuilder.DropTable( + name: "UserRoles"); + + migrationBuilder.DropTable( + name: "UserTokens"); + + migrationBuilder.DropTable( + name: "Categories"); + + migrationBuilder.DropTable( + name: "Roles"); + + migrationBuilder.DropTable( + name: "Users"); + } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/AppDbContextModelSnapshot.cs similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/AppDbContextModelSnapshot.cs index 88b798e2ea..52af41fec0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Data/Migrations/AppDbContextModelSnapshot.cs @@ -1,6 +1,6 @@ // using System; -using AdminPanel.Server.Api.Data; +using BlazorWeb.Server.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; @@ -8,7 +8,7 @@ #nullable disable -namespace AdminPanel.Server.Api.Migrations +namespace BlazorWeb.Server.Data.Migrations { [DbContext(typeof(AppDbContext))] partial class AppDbContextModelSnapshot : ModelSnapshot @@ -17,12 +17,12 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") + .HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Categories.Category", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Categories.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -75,7 +75,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) }); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Identity.Role", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Identity.Role", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -105,7 +105,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("Roles", (string)null); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Identity.User", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Identity.User", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -196,23 +196,23 @@ protected override void BuildModel(ModelBuilder modelBuilder) Id = 1, AccessFailedCount = 0, BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "9f7f7dc2-da36-431a-a390-f65aa6589582", + ConcurrencyStamp = "a93803e4-4826-4f8f-a3c0-9b3915222944", Email = "test@bitplatform.dev", EmailConfirmed = true, - FullName = "AdminPanel test account", + FullName = "BlazorWeb test account", Gender = 2, LockoutEnabled = false, NormalizedEmail = "TEST@BITPLATFORM.DEV", NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEHLM21HNl59v+pj1RM37VDwsDBTwCihJF/4NBXBTwYz2picGLk+OuXHrc7KWj0Nl/g==", + PasswordHash = "AQAAAAIAAYagAAAAEHkXKL/4p8zGmGPVrQLM4FFbgg0ZDGlCtICfXdEArQg/Ih7Kkn9LfNCZME2+wd0APw==", PhoneNumberConfirmed = false, - SecurityStamp = "4d3447a4-022e-4ba7-8828-dad2a3a76459", + SecurityStamp = "e8fe621c-97fd-41ec-9d33-29c931496432", TwoFactorEnabled = false, UserName = "test@bitplatform.dev" }); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Products.Product", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Products.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -454,6 +454,33 @@ protected override void BuildModel(ModelBuilder modelBuilder) }); }); + modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Date") + .HasColumnType("datetimeoffset"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("TodoItems"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") @@ -557,9 +584,9 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.ToTable("UserTokens", (string)null); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Products.Product", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Products.Product", b => { - b.HasOne("AdminPanel.Server.Api.Models.Categories.Category", "Category") + b.HasOne("BlazorWeb.Server.Models.Categories.Category", "Category") .WithMany("Products") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) @@ -568,9 +595,20 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("Category"); }); + modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => + { + b.HasOne("BlazorWeb.Server.Models.Identity.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.Role", null) + b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) @@ -579,7 +617,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -588,7 +626,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -597,13 +635,13 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.Role", null) + b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) @@ -612,14 +650,14 @@ protected override void BuildModel(ModelBuilder modelBuilder) modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { - b.HasOne("AdminPanel.Server.Api.Models.Identity.User", null) + b.HasOne("BlazorWeb.Server.Models.Identity.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); - modelBuilder.Entity("AdminPanel.Server.Api.Models.Categories.Category", b => + modelBuilder.Entity("BlazorWeb.Server.Models.Categories.Category", b => { b.Navigation("Products"); }); diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/IServiceCollectionExtensions.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/IServiceCollectionExtensions.cs index e599457aa0..2162a7b429 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/IServiceCollectionExtensions.cs @@ -11,7 +11,7 @@ using BlazorWeb.Server.Services; using BlazorWeb.Client.Services; using Microsoft.JSInterop; -using BlazorWeb.Web.Services.HttpMessageHandlers; +using BlazorWeb.Client.Services.HttpMessageHandlers; namespace Microsoft.Extensions.DependencyInjection; @@ -187,7 +187,7 @@ public static void AddHealthChecks(this IServiceCollection services, IWebHostEnv services.AddHealthChecksUI(setupSettings: setup => { - setup.AddHealthCheckEndpoint("TodoHealthChecks", env.IsDevelopment() ? "https://localhost:5051/healthz" : "/healthz"); + setup.AddHealthCheckEndpoint("WebHealthChecks", env.IsDevelopment() ? "https://localhost:5051/healthz" : "/healthz"); }).AddInMemoryStorage(); var healthChecksBuilder = services.AddHealthChecks() diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/ODataOperationFilter.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/ODataOperationFilter.cs index 6057cb4a80..bc15442072 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/ODataOperationFilter.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Extensions/ODataOperationFilter.cs @@ -14,7 +14,7 @@ public void Apply(OpenApiOperation operation, OperationFilterContext context) var descriptor = (ControllerActionDescriptor)context.ApiDescription.ActionDescriptor; - var odataQueryOptionsParameter = descriptor.Parameters.SingleOrDefault(p => typeof(ODataQueryOptions).IsAssignableFrom(p.ParameterType)); + var odataQueryOptionsParameter = descriptor!.Parameters.SingleOrDefault(p => typeof(ODataQueryOptions).IsAssignableFrom(p.ParameterType)); if (descriptor != null && descriptor.FilterDescriptors.Any(filter => filter.Filter is EnableQueryAttribute) || odataQueryOptionsParameter is not null) { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/CategoriesMapper.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/CategoriesMapper.cs similarity index 81% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/CategoriesMapper.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/CategoriesMapper.cs index 1fb6c8903f..df26908b79 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/CategoriesMapper.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/CategoriesMapper.cs @@ -1,8 +1,8 @@ -using AdminPanel.Server.Api.Models.Categories; -using AdminPanel.Shared.Dtos.Categories; +using BlazorWeb.Server.Models.Categories; +using BlazorWeb.Shared.Dtos.Categories; using Riok.Mapperly.Abstractions; -namespace AdminPanel.Server.Api.Mappers; +namespace BlazorWeb.Server.Mappers; /// /// More info at Server/Api/Mappers/README.md diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/IdentityMapper.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/IdentityMapper.cs index b33c90954f..6ff466ee62 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/IdentityMapper.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/IdentityMapper.cs @@ -1,6 +1,6 @@ -using Riok.Mapperly.Abstractions; -using BlazorWeb.Server.Models.Identity; +using BlazorWeb.Server.Models.Identity; using BlazorWeb.Shared.Dtos.Identity; +using Riok.Mapperly.Abstractions; namespace BlazorWeb.Server.Mappers; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/ProductsMapper.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/ProductsMapper.cs similarity index 82% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/ProductsMapper.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/ProductsMapper.cs index c67dd43a29..95ce855103 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/ProductsMapper.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Mappers/ProductsMapper.cs @@ -1,8 +1,8 @@ -using AdminPanel.Server.Api.Models.Products; -using AdminPanel.Shared.Dtos.Products; +using BlazorWeb.Server.Models.Products; +using BlazorWeb.Shared.Dtos.Products; using Riok.Mapperly.Abstractions; -namespace AdminPanel.Server.Api.Mappers; +namespace BlazorWeb.Server.Mappers; /// /// More info at Server/Api/Mappers/README.md diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.Designer.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.Designer.cs deleted file mode 100644 index f2ec08f2b3..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.Designer.cs +++ /dev/null @@ -1,359 +0,0 @@ -// -using System; -using BlazorWeb.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BlazorWeb.Server.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20230824105110_InitialMigration")] - partial class InitialMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("BlazorWeb.Server.Models.Identity.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Identity.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("BirthDate") - .HasColumnType("datetimeoffset"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("ConfirmationEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("FullName") - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfileImageName") - .HasColumnType("nvarchar(max)"); - - b.Property("ResetPasswordEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "2e94af2d-0b0f-446b-9018-4c8dbe6ca764", - Email = "test@bitplatform.dev", - EmailConfirmed = true, - FullName = "BlazorWeb test account", - Gender = 2, - LockoutEnabled = false, - NormalizedEmail = "TEST@BITPLATFORM.DEV", - NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEC8Chdkxj7JjRFGIVBuO4uIUM8MShPvMlkcHzmaKgvthqvyw6QKK/XAwJy3B+SFauw==", - PhoneNumberConfirmed = false, - SecurityStamp = "4d670635-e8d9-4b62-bd02-46b8bff61d91", - TwoFactorEnabled = false, - UserName = "test@bitplatform.dev" - }); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Date") - .HasColumnType("datetimeoffset"); - - b.Property("IsDone") - .HasColumnType("bit"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.cs deleted file mode 100644 index ef9ebc9829..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/20230824105110_InitialMigration.cs +++ /dev/null @@ -1,264 +0,0 @@ -#nullable disable - -namespace BlazorWeb.Server.Migrations -{ - /// - public partial class InitialMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Roles", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Roles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FullName = table.Column(type: "nvarchar(max)", nullable: true), - Gender = table.Column(type: "int", nullable: true), - BirthDate = table.Column(type: "datetimeoffset", nullable: true), - ProfileImageName = table.Column(type: "nvarchar(max)", nullable: true), - ConfirmationEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - ResetPasswordEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_RoleClaims_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "TodoItems", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(max)", nullable: true), - Date = table.Column(type: "datetimeoffset", nullable: false), - IsDone = table.Column(type: "bit", nullable: false), - UserId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TodoItems", x => x.Id); - table.ForeignKey( - name: "FK_TodoItems_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserClaims", x => x.Id); - table.ForeignKey( - name: "FK_UserClaims_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_UserLogins_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserRoles", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - RoleId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_UserRoles_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserRoles_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserTokens", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_UserTokens_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.InsertData( - table: "Users", - columns: new[] { "Id", "AccessFailedCount", "BirthDate", "ConcurrencyStamp", "ConfirmationEmailRequestedOn", "Email", "EmailConfirmed", "FullName", "Gender", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "ProfileImageName", "ResetPasswordEmailRequestedOn", "SecurityStamp", "TwoFactorEnabled", "UserName" }, - values: new object[] { 1, 0, new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), "2e94af2d-0b0f-446b-9018-4c8dbe6ca764", null, "test@bitplatform.dev", true, "BlazorWeb test account", 2, false, null, "TEST@BITPLATFORM.DEV", "TEST@BITPLATFORM.DEV", "AQAAAAIAAYagAAAAEC8Chdkxj7JjRFGIVBuO4uIUM8MShPvMlkcHzmaKgvthqvyw6QKK/XAwJy3B+SFauw==", null, false, null, null, "4d670635-e8d9-4b62-bd02-46b8bff61d91", false, "test@bitplatform.dev" }); - - migrationBuilder.CreateIndex( - name: "IX_RoleClaims_RoleId", - table: "RoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "Roles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItems_UserId", - table: "TodoItems", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserClaims_UserId", - table: "UserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserLogins_UserId", - table: "UserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_RoleId", - table: "UserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "Users", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "Users", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RoleClaims"); - - migrationBuilder.DropTable( - name: "TodoItems"); - - migrationBuilder.DropTable( - name: "UserClaims"); - - migrationBuilder.DropTable( - name: "UserLogins"); - - migrationBuilder.DropTable( - name: "UserRoles"); - - migrationBuilder.DropTable( - name: "UserTokens"); - - migrationBuilder.DropTable( - name: "Roles"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/AppDbContextModelSnapshot.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/AppDbContextModelSnapshot.cs deleted file mode 100644 index 25ff477201..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Migrations/AppDbContextModelSnapshot.cs +++ /dev/null @@ -1,356 +0,0 @@ -// -using System; -using BlazorWeb.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace BlazorWeb.Server.Migrations -{ - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("BlazorWeb.Server.Models.Identity.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Identity.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("BirthDate") - .HasColumnType("datetimeoffset"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("ConfirmationEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("FullName") - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfileImageName") - .HasColumnType("nvarchar(max)"); - - b.Property("ResetPasswordEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "2e94af2d-0b0f-446b-9018-4c8dbe6ca764", - Email = "test@bitplatform.dev", - EmailConfirmed = true, - FullName = "BlazorWeb test account", - Gender = 2, - LockoutEnabled = false, - NormalizedEmail = "TEST@BITPLATFORM.DEV", - NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEC8Chdkxj7JjRFGIVBuO4uIUM8MShPvMlkcHzmaKgvthqvyw6QKK/XAwJy3B+SFauw==", - PhoneNumberConfirmed = false, - SecurityStamp = "4d670635-e8d9-4b62-bd02-46b8bff61d91", - TwoFactorEnabled = false, - UserName = "test@bitplatform.dev" - }); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Date") - .HasColumnType("datetimeoffset"); - - b.Property("IsDone") - .HasColumnType("bit"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("BlazorWeb.Server.Models.Todo.TodoItem", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("BlazorWeb.Server.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Categories/Category.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Categories/Category.cs similarity index 68% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Categories/Category.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Categories/Category.cs index c92ed5a3cd..4dabb833c9 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Categories/Category.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Categories/Category.cs @@ -1,6 +1,6 @@ -using AdminPanel.Server.Api.Models.Products; +using BlazorWeb.Server.Models.Products; -namespace AdminPanel.Server.Api.Models.Categories; +namespace BlazorWeb.Server.Models.Categories; public class Category { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Products/Product.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Products/Product.cs similarity index 85% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Products/Product.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Products/Product.cs index c1c87e8d03..9ece41f7b0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Products/Product.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Models/Products/Product.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; -using AdminPanel.Server.Api.Models.Categories; +using BlazorWeb.Server.Models.Categories; -namespace AdminPanel.Server.Api.Models.Products; +namespace BlazorWeb.Server.Models.Products; public class Product { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Resources/EmailStrings.fr.resx b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Resources/EmailStrings.fr.resx index 9277807d1a..e1170c3ca3 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Resources/EmailStrings.fr.resx +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Resources/EmailStrings.fr.resx @@ -117,27 +117,24 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Panneau d'administration + BlazorWeb - Confirmez votre adresse e-mail - - BlazorWeb - Réinitialiser votre mot de passe - Confirmez votre email + + Ou copiez le lien ci-dessous dans la barre d'adresse de votre navigateur : + - Vous recevez ce message car vous vous êtes récemment inscrit à un compte BlazorWeb. + Vous recevez ce message car vous vous êtes récemment inscrit pour un compte BlazorWeb. Confirmez votre adresse e-mail en cliquant sur le bouton ci-dessous. - - Bienvenue sur BlazorWeb ! - - - BlazorWeb - - - Ou copiez le lien ci-dessous dans la barre d'adresse de votre navigateur : + + BlazorWeb - Réinitialisez votre mot de passe Bonjour {0} @@ -151,4 +148,7 @@ réinitialisez votre mot de passe + + Bienvenue dans le panneau d'administration ! + \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/ApiExceptionHandler.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/ApiExceptionHandler.cs index 2df8e3113c..ab3edf629b 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/ApiExceptionHandler.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/ApiExceptionHandler.cs @@ -54,4 +54,3 @@ private Exception UnWrapException(Exception exp) : exp; } } - diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/JwtService.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/JwtService.cs index 15bac702e2..0c5d501f73 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/JwtService.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/Services/JwtService.cs @@ -1,17 +1,17 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using Microsoft.IdentityModel.Tokens; using BlazorWeb.Server.Models.Identity; using BlazorWeb.Shared.Dtos.Identity; +using Microsoft.IdentityModel.Tokens; namespace BlazorWeb.Server.Services; public partial class JwtService : IJwtService { - [AutoInject] private SignInManager _signInManager = default!; + [AutoInject] private readonly SignInManager _signInManager = default!; - [AutoInject] private AppSettings _appSettings = default!; + [AutoInject] private readonly AppSettings _appSettings = default!; public async Task GenerateToken(User user) { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/appsettings.json b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/appsettings.json index 993bac8821..f10f1ff5ef 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/appsettings.json +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Server/appsettings.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { //#if (database == "SqlServer") - "SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=BlazorWebDb;Integrated Security=true;Application Name=Todo;TrustServerCertificate=True;", + "SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=BlazorWebDb;Integrated Security=true;Application Name=BlazorWeb;TrustServerCertificate=True;", //#elif (database == "Sqlite") "SqliteConnectionString": "Data Source=BlazorWebDb.db;" //#endif diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Attributes/DtoResourceTypeAttribute.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Attributes/DtoResourceTypeAttribute.cs index f965ef812a..2c6a7d9444 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Attributes/DtoResourceTypeAttribute.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Attributes/DtoResourceTypeAttribute.cs @@ -4,12 +4,7 @@ /// Gets or sets the resource type to use for error message and localizations lookups. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] -public class DtoResourceTypeAttribute : Attribute +public class DtoResourceTypeAttribute(Type resourceType) : Attribute { - public Type ResourceType { get; } - - public DtoResourceTypeAttribute(Type resourceType) - { - ResourceType = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); - } + public Type ResourceType { get; } = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.csproj b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.csproj index d7dbb72a30..934b123aea 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.csproj +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.csproj @@ -1,7 +1,8 @@  + net8.0 - en-US + en-US @@ -17,10 +18,10 @@ + compile; build; native; contentfiles; analyzers; buildtransitive - diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.sln b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.sln deleted file mode 100644 index 4995b5397f..0000000000 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/BlazorWeb.Shared.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.002.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWeb.Shared", "BlazorWeb.Shared.csproj", "{EC145EF7-A302-46F8-B7C9-C6F408EDE6F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EC145EF7-A302-46F8-B7C9-C6F408EDE6F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC145EF7-A302-46F8-B7C9-C6F408EDE6F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC145EF7-A302-46F8-B7C9-C6F408EDE6F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC145EF7-A302-46F8-B7C9-C6F408EDE6F9}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9405E0B3-48FA-4202-B2C7-613EDD051A01} - EndGlobalSection -EndGlobal diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/AppJsonContext.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/AppJsonContext.cs index c31ba17f43..c795bf6bd8 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/AppJsonContext.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/AppJsonContext.cs @@ -1,5 +1,11 @@ -using BlazorWeb.Shared.Dtos.Identity; +//#if (sample == "Todo") using BlazorWeb.Shared.Dtos.Todo; +//#elif (sample == "AdminPanel") +using BlazorWeb.Shared.Dtos.Categories; +using BlazorWeb.Shared.Dtos.Dashboard; +using BlazorWeb.Shared.Dtos.Products; +//#endif +using BlazorWeb.Shared.Dtos.Identity; namespace BlazorWeb.Shared.Dtos; @@ -8,10 +14,23 @@ namespace BlazorWeb.Shared.Dtos; /// [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] [JsonSerializable(typeof(Dictionary))] -[JsonSerializable(typeof(TodoItemDto))] -[JsonSerializable(typeof(List))] [JsonSerializable(typeof(UserDto))] [JsonSerializable(typeof(List))] +//#if (sample == "Todo") +[JsonSerializable(typeof(TodoItemDto))] +[JsonSerializable(typeof(List))] +//#elif (sample == "AdminPanel") +[JsonSerializable(typeof(OverallAnalyticsStatsDataDto))] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(ProductDto))] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(PagedResult))] +[JsonSerializable(typeof(CategoryDto))] +[JsonSerializable(typeof(List))] +[JsonSerializable(typeof(PagedResult))] +//#endif [JsonSerializable(typeof(SignInRequestDto))] [JsonSerializable(typeof(SignInResponseDto))] [JsonSerializable(typeof(SignUpRequestDto))] diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Categories/CategoryDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Categories/CategoryDto.cs similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Categories/CategoryDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Categories/CategoryDto.cs index 4d442c585f..daa1e3e800 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Categories/CategoryDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Categories/CategoryDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Categories; +namespace BlazorWeb.Shared.Dtos.Categories; [DtoResourceType(typeof(AppStrings))] public class CategoryDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs index 390b02cc34..31ec554a36 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Dashboard; +namespace BlazorWeb.Shared.Dtos.Dashboard; public class OverallAnalyticsStatsDataDto { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs similarity index 80% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs index 75fd49e5ae..2cf549bb78 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Dashboard; +namespace BlazorWeb.Shared.Dtos.Dashboard; public class ProductPercentagePerCategoryDto { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductSaleStatDto.cs similarity index 78% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductSaleStatDto.cs index 543a85425a..e577f4678a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductSaleStatDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Dashboard; +namespace BlazorWeb.Shared.Dtos.Dashboard; public class ProductSaleStatDto { public string? ProductName { get; set; } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs similarity index 79% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs index 074531a2b5..70858dbb2f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Dashboard; +namespace BlazorWeb.Shared.Dtos.Dashboard; public class ProductsCountPerCategoryDto { diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/EmailConfirmedRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/EmailConfirmedRequestDto.cs index 3d8c625c73..3fc159d24e 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/EmailConfirmedRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/EmailConfirmedRequestDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class EmailConfirmedRequestDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/ResetPasswordRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/ResetPasswordRequestDto.cs index d6156c1837..c8970260dd 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/ResetPasswordRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/ResetPasswordRequestDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class ResetPasswordRequestDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/RoleDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/RoleDto.cs index 00e5dd7d75..bac2f12d0b 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/RoleDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/RoleDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class RoleDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs index 53b3869590..ce81fc53d8 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs @@ -1,10 +1,11 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SendConfirmationEmailRequestDto { - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError)), - EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] [Display(Name = nameof(AppStrings.Email))] public string? Email { get; set; } } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs index f645887f4a..130060bf94 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SendResetPasswordEmailRequestDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInRequestDto.cs index 51d82be968..d40576f1e1 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInRequestDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SignInRequestDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInResponseDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInResponseDto.cs index 10c7b5723c..1408f89eae 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInResponseDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignInResponseDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SignInResponseDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignUpRequestDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignUpRequestDto.cs index 03f8a6204c..bcc19a0c85 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignUpRequestDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/SignUpRequestDto.cs @@ -16,10 +16,10 @@ public class SignUpRequestDto [MinLength(6, ErrorMessage = nameof(AppStrings.MinLengthAttribute_ValidationError))] [Display(Name = nameof(AppStrings.Password))] public string? Password { get; set; } - + /// true [NotMapped] [Range(typeof(bool), "true", "true", ErrorMessage = nameof(AppStrings.YouHaveToAcceptTerms))] - [Display(Name = nameof(AppStrings.IsTermsAccepted))] - public bool IsAcceptPrivacy { get; set; } + [Display(Name = nameof(AppStrings.TermsAccepted))] + public bool TermsAccepted { get; set; } } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/UserDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/UserDto.cs index 3032224a40..f6dd9a7cd3 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/UserDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Identity/UserDto.cs @@ -1,4 +1,5 @@ -namespace BlazorWeb.Shared.Dtos.Identity; + +namespace BlazorWeb.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class UserDto @@ -6,8 +7,8 @@ public class UserDto public int Id { get; set; } // By default, username gets filled from email during signup in Api/Models/Mapper.cs class. - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError)), - EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] [Display(Name = nameof(AppStrings.Email))] public string? UserName { get; set; } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/PagedResultDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/PagedResultDto.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/PagedResultDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/PagedResultDto.cs index 3ffa98f34f..3c1936483c 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/PagedResultDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/PagedResultDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos; +namespace BlazorWeb.Shared.Dtos; public class PagedResult { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Products/ProductDto.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Products/ProductDto.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Products/ProductDto.cs rename to src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Products/ProductDto.cs index 6592ca5472..720e7edd51 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Products/ProductDto.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Dtos/Products/ProductDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Products; +namespace BlazorWeb.Shared.Dtos.Products; [DtoResourceType(typeof(AppStrings))] public class ProductDto diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/DomainLogicException.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/DomainLogicException.cs index 2d264e65e6..4e29b30394 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/DomainLogicException.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/DomainLogicException.cs @@ -21,5 +21,4 @@ public DomainLogicException(LocalizedString message, Exception? innerException) : base(message, innerException) { } - } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/UnknownException.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/UnknownException.cs index 47833a1428..aeb04b8326 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/UnknownException.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Exceptions/UnknownException.cs @@ -17,4 +17,3 @@ public UnknownException(string message, Exception innerException) { } } - diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Extensions/IServiceCollectionExtensions.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Extensions/IServiceCollectionExtensions.cs index ff64b78b81..729a58761f 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Extensions/IServiceCollectionExtensions.cs @@ -4,14 +4,16 @@ namespace Microsoft.Extensions.DependencyInjection; public static class IServiceCollectionExtensions { - public static void AddSharedServices(this IServiceCollection services) + public static IServiceCollection AddSharedServices(this IServiceCollection services) { - // Services being registered here can get injected everywhere (Api & Web) + // Services being registered here can get injected everywhere (Api, Web, Android, iOS, Windows, macOS and Linux) - services.AddLocalization(); + services.AddSingleton(); services.AddAuthorizationCore(); - services.AddSingleton(); + services.AddLocalization(); + + return services; } } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Infra/CultureInfoManager.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Infra/CultureInfoManager.cs index acc63798c9..46ccc1c497 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Infra/CultureInfoManager.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Infra/CultureInfoManager.cs @@ -1,17 +1,15 @@ -using System.Reflection; - -namespace BlazorWeb.Shared.Infra; +namespace BlazorWeb.Shared.Infra; public class CultureInfoManager { public static (string name, string code) DefaultCulture { get; } = ("English", "en-US"); - public static (string name, string code)[] SupportedCultures { get; } = new (string name, string code)[] - { + public static (string name, string code)[] SupportedCultures { get; } = + [ ("English US", "en-US"), ("English UK", "en-GB"), ("Française", "fr-FR"), // ("فارسی", "fa-IR"), // To add more languages, you've to provide resx files. You might also put some efforts to change your app flow direction based on CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft - }; + ]; public static CultureInfo CreateCultureInfo(string cultureInfoId) { @@ -53,51 +51,10 @@ public static string GetCurrentCulture(string? preferredCultureCookie) /// public static CultureInfo CustomizeCultureInfoForFaCulture(CultureInfo cultureInfo) { - cultureInfo.DateTimeFormat.MonthNames = new[] - { - "فروردین", "اردیبهشت", "خرداد", "تیر", "مرداد", "شهریور", "مهر", "آبان", "آذر", "دی", "بهمن", "اسفند", "" - }; - - cultureInfo.DateTimeFormat.AbbreviatedMonthNames = new[] - { - "فرور", "ارد", "خرد", "تیر", "مرد", "شهر", "مهر", "آبا", "آذر", "دی", "بهم", "اسف", "" - }; - - cultureInfo.DateTimeFormat.MonthGenitiveNames = cultureInfo.DateTimeFormat.MonthNames; - cultureInfo.DateTimeFormat.AbbreviatedMonthGenitiveNames = cultureInfo.DateTimeFormat.AbbreviatedMonthNames; - cultureInfo.DateTimeFormat.DayNames = new[] - { - "یکشنبه", "دوشنبه", "ﺳﻪشنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه" - }; - - cultureInfo.DateTimeFormat.AbbreviatedDayNames = new[] - { - "ی", "د", "س", "چ", "پ", "ج", "ش" - }; - - cultureInfo.DateTimeFormat.ShortestDayNames = new[] - { - "ی", "د", "س", "چ", "پ", "ج", "ش" - }; - cultureInfo.DateTimeFormat.AMDesignator = "ق.ظ"; cultureInfo.DateTimeFormat.PMDesignator = "ب.ظ"; cultureInfo.DateTimeFormat.ShortDatePattern = "yyyy/MM/dd"; - cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Saturday; - - var cultureData = _cultureDataField.GetValue(cultureInfo.TextInfo); - - _iReadingLayoutField.SetValue(cultureData, 1 /*rtl*/); // this affects cultureInfo.TextInfo.IsRightToLeft - - if (cultureInfo.DateTimeFormat.Calendar is not PersianCalendar) - { - cultureInfo.DateTimeFormat.Calendar = new PersianCalendar(); - } return cultureInfo; } - - private static readonly FieldInfo _cultureDataField = typeof(TextInfo).GetField("_cultureData", BindingFlags.NonPublic | BindingFlags.Instance)!; - - private static readonly FieldInfo _iReadingLayoutField = Type.GetType("System.Globalization.CultureData, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e")!.GetField("_iReadingLayout", BindingFlags.NonPublic | BindingFlags.Instance)!; } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Mapper.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Mapper.cs index be75e63edd..fc14b0a10c 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Mapper.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Mapper.cs @@ -1,6 +1,12 @@ -using Riok.Mapperly.Abstractions; +//+:cnd:noEmit using BlazorWeb.Shared.Dtos.Identity; +//#if (sample == "Todo") using BlazorWeb.Shared.Dtos.Todo; +//#elif (sample == "AdminPanel") +using BlazorWeb.Shared.Dtos.Categories; +using BlazorWeb.Shared.Dtos.Products; +//#endif +using Riok.Mapperly.Abstractions; namespace BlazorWeb.Shared; @@ -16,6 +22,11 @@ namespace BlazorWeb.Shared; [Mapper(UseDeepCloning = true)] public static partial class Mapper { + //#if (sample == "Todo") public static partial void Patch(this TodoItemDto source, TodoItemDto destination); + //#elif (sample == "AdminPanel") + public static partial void Patch(this CategoryDto source, CategoryDto destination); + public static partial void Patch(this ProductDto source, ProductDto destination); + //#endif public static partial void Patch(this UserDto source, UserDto destination); } diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.Designer.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.Designer.cs index 29e3e8a50c..7341fd53e6 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.Designer.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.Designer.cs @@ -60,6 +60,15 @@ internal AppStrings() { } } + /// + /// Looks up a localized string similar to Action. + /// + public static string Action { + get { + return ResourceManager.GetString("Action", resourceCulture); + } + } + /// /// Looks up a localized string similar to Active. /// @@ -79,20 +88,29 @@ public static string Add { } /// - /// Looks up a localized string similar to All. + /// Looks up a localized string similar to New category. /// - public static string All { + public static string AddCategory { get { - return ResourceManager.GetString("All", resourceCulture); + return ResourceManager.GetString("AddCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add product. + /// + public static string AddProduct { + get { + return ResourceManager.GetString("AddProduct", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field does not equal any of the values specified in AllowedValuesAttribute.. + /// Looks up a localized string similar to All. /// - public static string AllowedValuesAttribute_Invalid { + public static string All { get { - return ResourceManager.GetString("AllowedValuesAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("All", resourceCulture); } } @@ -124,38 +142,38 @@ public static string AreYouSureWannaDelete { } /// - /// Looks up a localized string similar to The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.. + /// Looks up a localized string similar to Are you sure you want to delete category {0}. /// - public static string AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties { + public static string AreYouSureWannaDeleteCategory { get { - return ResourceManager.GetString("AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties", resourceCulture); + return ResourceManager.GetString("AreYouSureWannaDeleteCategory", resourceCulture); } } /// - /// Looks up a localized string similar to The type '{0}' does not contain a public property named '{1}'.. + /// Looks up a localized string similar to Are you sure you want to delete product {0}. /// - public static string AttributeStore_Unknown_Property { + public static string AreYouSureWannaDeleteProduct { get { - return ResourceManager.GetString("AttributeStore_Unknown_Property", resourceCulture); + return ResourceManager.GetString("AreYouSureWannaDeleteProduct", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid request. + /// Looks up a localized string similar to Back. /// - public static string BadRequestException { + public static string Back { get { - return ResourceManager.GetString("BadRequestException", resourceCulture); + return ResourceManager.GetString("Back", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid Base64 encoding.. + /// Looks up a localized string similar to Invalid request. /// - public static string Base64StringAttribute_Invalid { + public static string BadRequestException { get { - return ResourceManager.GetString("Base64StringAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("BadRequestException", resourceCulture); } } @@ -178,219 +196,201 @@ public static string Cancel { } /// - /// Looks up a localized string similar to Check your Spam/Junk, if you could not find it in the Inbox.. - /// - public static string CheckSpamMailMessage { - get { - return ResourceManager.GetString("CheckSpamMailMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property {0}.{1} could not be found.. - /// - public static string Common_PropertyNotFound { - get { - return ResourceManager.GetString("Common_PropertyNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not find a property named {0}.. + /// Looks up a localized string similar to Categories. /// - public static string CompareAttribute_UnknownProperty { + public static string Categories { get { - return ResourceManager.GetString("CompareAttribute_UnknownProperty", resourceCulture); + return ResourceManager.GetString("Categories", resourceCulture); } } /// - /// Looks up a localized string similar to '{0}' and '{1}' do not match.. + /// Looks up a localized string similar to Categories. /// - public static string CompareAttribute_ValidationError { + public static string CategoriesPageTitle { get { - return ResourceManager.GetString("CompareAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("CategoriesPageTitle", resourceCulture); } } /// - /// Looks up a localized string similar to Completed. + /// Looks up a localized string similar to Category. /// - public static string Completed { + public static string Category { get { - return ResourceManager.GetString("Completed", resourceCulture); + return ResourceManager.GetString("Category", resourceCulture); } } /// - /// Looks up a localized string similar to Optimistic concurrency failure, object has been modified.. + /// Looks up a localized string similar to Category entity could not be found. /// - public static string ConcurrencyFailure { + public static string CategoryCouldNotBeFound { get { - return ResourceManager.GetString("ConcurrencyFailure", resourceCulture); + return ResourceManager.GetString("CategoryCouldNotBeFound", resourceCulture); } } /// - /// Looks up a localized string similar to We have sent a confirmation link to your email address. - ///Please confirm your email by clicking on the link.. + /// Looks up a localized string similar to This category contain some products, so you can't delete it. /// - public static string ConfirmEmailMessage { + public static string CategoryNotEmpty { get { - return ResourceManager.GetString("ConfirmEmailMessage", resourceCulture); + return ResourceManager.GetString("CategoryNotEmpty", resourceCulture); } } /// - /// Looks up a localized string similar to Confirm Your Email Address. + /// Looks up a localized string similar to Check your Spam/Junk, if you could not find it in the Inbox.. /// - public static string ConfirmEmailTitle { + public static string CheckSpamMailMessage { get { - return ResourceManager.GetString("ConfirmEmailTitle", resourceCulture); + return ResourceManager.GetString("CheckSpamMailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Confirm New Password. + /// Looks up a localized string similar to Color. /// - public static string ConfirmNewPassword { + public static string Color { get { - return ResourceManager.GetString("ConfirmNewPassword", resourceCulture); + return ResourceManager.GetString("Color", resourceCulture); } } /// - /// Looks up a localized string similar to Request could not be processed because of conflict in the request. + /// Looks up a localized string similar to '{0}' and '{1}' do not match.. /// - public static string ConflicException { + public static string CompareAttribute_ValidationError { get { - return ResourceManager.GetString("ConflicException", resourceCulture); + return ResourceManager.GetString("CompareAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid credit card number.. + /// Looks up a localized string similar to Completed. /// - public static string CreditCardAttribute_Invalid { + public static string Completed { get { - return ResourceManager.GetString("CreditCardAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("Completed", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.. + /// Looks up a localized string similar to We have sent a confirmation link to your email address. + ///Please confirm your email by clicking on the link.. /// - public static string CustomValidationAttribute_Method_Must_Return_ValidationResult { + public static string ConfirmEmailMessage { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Must_Return_ValidationResult", resourceCulture); + return ResourceManager.GetString("ConfirmEmailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.. + /// Looks up a localized string similar to Confirm Your Email Address. /// - public static string CustomValidationAttribute_Method_Not_Found { + public static string ConfirmEmailTitle { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Not_Found", resourceCulture); + return ResourceManager.GetString("ConfirmEmailTitle", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute.Method was not specified.. + /// Looks up a localized string similar to Confirm New Password. /// - public static string CustomValidationAttribute_Method_Required { + public static string ConfirmNewPassword { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Required", resourceCulture); + return ResourceManager.GetString("ConfirmNewPassword", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional.. + /// Looks up a localized string similar to Request could not be processed because of conflict in the request. /// - public static string CustomValidationAttribute_Method_Signature { + public static string ConflicException { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Signature", resourceCulture); + return ResourceManager.GetString("ConflicException", resourceCulture); } } /// - /// Looks up a localized string similar to Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}.. + /// Looks up a localized string similar to Custom color. /// - public static string CustomValidationAttribute_Type_Conversion_Failed { + public static string CustomColor { get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Conversion_Failed", resourceCulture); + return ResourceManager.GetString("CustomColor", resourceCulture); } } /// - /// Looks up a localized string similar to The custom validation type '{0}' must be public.. + /// Looks up a localized string similar to Dashboard. /// - public static string CustomValidationAttribute_Type_Must_Be_Public { + public static string Dashboard { get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Must_Be_Public", resourceCulture); + return ResourceManager.GetString("Dashboard", resourceCulture); } } /// - /// Looks up a localized string similar to {0} is not valid.. + /// Looks up a localized string similar to Date. /// - public static string CustomValidationAttribute_ValidationError { + public static string Date { get { - return ResourceManager.GetString("CustomValidationAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("Date", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute.ValidatorType was not specified.. + /// Looks up a localized string similar to Default color picker. /// - public static string CustomValidationAttribute_ValidatorType_Required { + public static string DefaultColorPicker { get { - return ResourceManager.GetString("CustomValidationAttribute_ValidatorType_Required", resourceCulture); + return ResourceManager.GetString("DefaultColorPicker", resourceCulture); } } /// - /// Looks up a localized string similar to The custom DataType string cannot be null or empty.. + /// Looks up a localized string similar to Delete. /// - public static string DataTypeAttribute_EmptyDataTypeString { + public static string Delete { get { - return ResourceManager.GetString("DataTypeAttribute_EmptyDataTypeString", resourceCulture); + return ResourceManager.GetString("Delete", resourceCulture); } } /// - /// Looks up a localized string similar to Date. + /// Looks up a localized string similar to Delete Account. /// - public static string Date { + public static string DeleteAccount { get { - return ResourceManager.GetString("Date", resourceCulture); + return ResourceManager.GetString("DeleteAccount", resourceCulture); } } /// - /// Looks up a localized string similar to An unknown failure has occurred.. + /// Looks up a localized string similar to Are you sure you want to delete your account?. /// - public static string DefaultError { + public static string DeleteAccountPrompt { get { - return ResourceManager.GetString("DefaultError", resourceCulture); + return ResourceManager.GetString("DeleteAccountPrompt", resourceCulture); } } /// - /// Looks up a localized string similar to Delete Account. + /// Looks up a localized string similar to Delete category. /// - public static string DeleteAccount { + public static string DeleteCategory { get { - return ResourceManager.GetString("DeleteAccount", resourceCulture); + return ResourceManager.GetString("DeleteCategory", resourceCulture); } } /// - /// Looks up a localized string similar to Are you sure you want to delete your account?. + /// Looks up a localized string similar to Delete product. /// - public static string DeleteAccountPrompt { + public static string DeleteProduct { get { - return ResourceManager.GetString("DeleteAccountPrompt", resourceCulture); + return ResourceManager.GetString("DeleteProduct", resourceCulture); } } @@ -404,20 +404,11 @@ public static string DeleteTodoItem { } /// - /// Looks up a localized string similar to The {0} field equals one of the values specified in DeniedValuesAttribute.. - /// - public static string DeniedValuesAttribute_Invalid { - get { - return ResourceManager.GetString("DeniedValuesAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} property has not been set. Use the {1} method to get the value.. + /// Looks up a localized string similar to Description. /// - public static string DisplayAttribute_PropertyNotSet { + public static string Description { get { - return ResourceManager.GetString("DisplayAttribute_PropertyNotSet", resourceCulture); + return ResourceManager.GetString("Description", resourceCulture); } } @@ -440,29 +431,29 @@ public static string DuplicateEmail { } /// - /// Looks up a localized string similar to Role name '{0}' is already taken.. + /// Looks up a localized string similar to Edit. /// - public static string DuplicateRoleName { + public static string Edit { get { - return ResourceManager.GetString("DuplicateRoleName", resourceCulture); + return ResourceManager.GetString("Edit", resourceCulture); } } /// - /// Looks up a localized string similar to Username '{0}' is already taken.. + /// Looks up a localized string similar to Edit category. /// - public static string DuplicateUserName { + public static string EditCategory { get { - return ResourceManager.GetString("DuplicateUserName", resourceCulture); + return ResourceManager.GetString("EditCategory", resourceCulture); } } /// - /// Looks up a localized string similar to Edit. + /// Looks up a localized string similar to Edit product. /// - public static string Edit { + public static string EditProduct { get { - return ResourceManager.GetString("Edit", resourceCulture); + return ResourceManager.GetString("EditProduct", resourceCulture); } } @@ -530,29 +521,20 @@ public static string EmailConfirmedSuccessfullyMessage { } /// - /// Looks up a localized string similar to Email '{0}' is not confirmed.. - /// - public static string EmailNotConfirmed { - get { - return ResourceManager.GetString("EmailNotConfirmed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type provided for EnumDataTypeAttribute cannot be null.. + /// Looks up a localized string similar to Enter category name. /// - public static string EnumDataTypeAttribute_TypeCannotBeNull { + public static string EnterCategoryName { get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeCannotBeNull", resourceCulture); + return ResourceManager.GetString("EnterCategoryName", resourceCulture); } } /// - /// Looks up a localized string similar to The type '{0}' needs to represent an enumeration type.. + /// Looks up a localized string similar to Enter product name. /// - public static string EnumDataTypeAttribute_TypeNeedsToBeAnEnum { + public static string EnterProductName { get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeNeedsToBeAnEnum", resourceCulture); + return ResourceManager.GetString("EnterProductName", resourceCulture); } } @@ -565,24 +547,6 @@ public static string Error { } } - /// - /// Looks up a localized string similar to The {0} field only accepts files with the following extensions: {1}. - /// - public static string FileExtensionsAttribute_Invalid { - get { - return ResourceManager.GetString("FileExtensionsAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while removing file. - /// - public static string FileRemoveFailed { - get { - return ResourceManager.GetString("FileRemoveFailed", resourceCulture); - } - } - /// /// Looks up a localized string similar to An error occurred while uploading file. /// @@ -701,7 +665,7 @@ public static string Home { } /// - /// Looks up a localized string similar to Create your full featured Blazor app easily in the shortest time ever!. + /// Looks up a localized string similar to Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor app easily in the shortest time ever!. /// public static string HomeMessage { get { @@ -710,7 +674,7 @@ public static string HomeMessage { } /// - /// Looks up a localized string similar to TodoTemplate Home. + /// Looks up a localized string similar to BlazorWeb Home. /// public static string HomeTitle { get { @@ -719,709 +683,439 @@ public static string HomeTitle { } /// - /// Looks up a localized string similar to Looks like the confirmation link either is invalid or has expired.. + /// Looks up a localized string similar to Id. /// - public static string InvalidConfirmationLinkMessage { + public static string Id { get { - return ResourceManager.GetString("InvalidConfirmationLinkMessage", resourceCulture); + return ResourceManager.GetString("Id", resourceCulture); } } /// - /// Looks up a localized string similar to Email '{0}' is invalid.. + /// Looks up a localized string similar to Looks like the confirmation link either is invalid or has expired.. /// - public static string InvalidEmail { + public static string InvalidConfirmationLinkMessage { get { - return ResourceManager.GetString("InvalidEmail", resourceCulture); + return ResourceManager.GetString("InvalidConfirmationLinkMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Type {0} must derive from {1}<{2}>.. + /// Looks up a localized string similar to Invalid username or password. /// - public static string InvalidManagerType { + public static string InvalidUsernameOrPassword { get { - return ResourceManager.GetString("InvalidManagerType", resourceCulture); + return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture); } } /// - /// Looks up a localized string similar to The provided PasswordHasherCompatibilityMode is invalid.. + /// Looks up a localized string similar to Last 30 days category count. /// - public static string InvalidPasswordHasherCompatibilityMode { + public static string Last30DaysCategoryCount { get { - return ResourceManager.GetString("InvalidPasswordHasherCompatibilityMode", resourceCulture); + return ResourceManager.GetString("Last30DaysCategoryCount", resourceCulture); } } /// - /// Looks up a localized string similar to The iteration count must be a positive integer.. + /// Looks up a localized string similar to Last 30 days product count. /// - public static string InvalidPasswordHasherIterationCount { + public static string Last30DaysProductCount { get { - return ResourceManager.GetString("InvalidPasswordHasherIterationCount", resourceCulture); + return ResourceManager.GetString("Last30DaysProductCount", resourceCulture); } } /// - /// Looks up a localized string similar to Role name '{0}' is invalid.. + /// Looks up a localized string similar to MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.. /// - public static string InvalidRoleName { + public static string MaxLengthAttribute_InvalidMaxLength { get { - return ResourceManager.GetString("InvalidRoleName", resourceCulture); + return ResourceManager.GetString("MaxLengthAttribute_InvalidMaxLength", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid token.. + /// Looks up a localized string similar to The field {0} must be a string or array type with a minimum length of '{1}'.. /// - public static string InvalidToken { + public static string MinLengthAttribute_ValidationError { get { - return ResourceManager.GetString("InvalidToken", resourceCulture); + return ResourceManager.GetString("MinLengthAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to Username '{0}' is invalid, can only contain letters or digits.. + /// Looks up a localized string similar to Name. /// - public static string InvalidUserName { + public static string Name { get { - return ResourceManager.GetString("InvalidUserName", resourceCulture); + return ResourceManager.GetString("Name", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid username or password. + /// Looks up a localized string similar to New Password. /// - public static string InvalidUsernameOrPassword { + public static string NewPassword { get { - return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture); + return ResourceManager.GetString("NewPassword", resourceCulture); } } /// - /// Looks up a localized string similar to Do you accept terms?. + /// Looks up a localized string similar to No. /// - public static string IsTermsAccepted { + public static string No { get { - return ResourceManager.GetString("IsTermsAccepted", resourceCulture); + return ResourceManager.GetString("No", resourceCulture); } } /// - /// Looks up a localized string similar to Known error. + /// Looks up a localized string similar to No todos yet. /// - public static string KnownException { + public static string NoTodos { get { - return ResourceManager.GetString("KnownException", resourceCulture); + return ResourceManager.GetString("NoTodos", resourceCulture); } } /// - /// Looks up a localized string similar to LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength.. + /// Looks up a localized string similar to Haven’t you received the confirmation email?. /// - public static string LengthAttribute_InvalidMaxLength { + public static string NotReceivedConfirmationEmailMessage { get { - return ResourceManager.GetString("LengthAttribute_InvalidMaxLength", resourceCulture); + return ResourceManager.GetString("NotReceivedConfirmationEmailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to LengthAttribute must have a MinimumLength value that is zero or greater.. + /// Looks up a localized string similar to OR. /// - public static string LengthAttribute_InvalidMinLength { + public static string Or { get { - return ResourceManager.GetString("LengthAttribute_InvalidMinLength", resourceCulture); + return ResourceManager.GetString("Or", resourceCulture); } } /// - /// Looks up a localized string similar to The field of type {0} must be a string, array or ICollection type.. + /// Looks up a localized string similar to Password. /// - public static string LengthAttribute_InvalidValueType { + public static string Password { get { - return ResourceManager.GetString("LengthAttribute_InvalidValueType", resourceCulture); + return ResourceManager.GetString("Password", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'.. + /// Looks up a localized string similar to Your password changed successfully.. /// - public static string LengthAttribute_ValidationError { + public static string PasswordChangedSuccessfullyMessage { get { - return ResourceManager.GetString("LengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("PasswordChangedSuccessfullyMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'.. + /// Looks up a localized string similar to Price. /// - public static string LocalizableString_LocalizationFailed { + public static string Price { get { - return ResourceManager.GetString("LocalizableString_LocalizationFailed", resourceCulture); + return ResourceManager.GetString("Price", resourceCulture); } } /// - /// Looks up a localized string similar to A user with this login already exists.. + /// Looks up a localized string similar to Product category. /// - public static string LoginAlreadyAssociated { + public static string ProductCategory { get { - return ResourceManager.GetString("LoginAlreadyAssociated", resourceCulture); + return ResourceManager.GetString("ProductCategory", resourceCulture); } } /// - /// Looks up a localized string similar to MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.. + /// Looks up a localized string similar to Product entity could not be found. /// - public static string MaxLengthAttribute_InvalidMaxLength { + public static string ProductCouldNotBeFound { get { - return ResourceManager.GetString("MaxLengthAttribute_InvalidMaxLength", resourceCulture); + return ResourceManager.GetString("ProductCouldNotBeFound", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a maximum length of '{1}'.. + /// Looks up a localized string similar to Products. /// - public static string MaxLengthAttribute_ValidationError { + public static string Products { get { - return ResourceManager.GetString("MaxLengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("Products", resourceCulture); } } /// - /// Looks up a localized string similar to MetadataClassType cannot be null.. + /// Looks up a localized string similar to Product sales. /// - public static string MetadataTypeAttribute_TypeCannotBeNull { + public static string ProductSales { get { - return ResourceManager.GetString("MetadataTypeAttribute_TypeCannotBeNull", resourceCulture); + return ResourceManager.GetString("ProductSales", resourceCulture); } } /// - /// Looks up a localized string similar to MinLengthAttribute must have a Length value that is zero or greater.. + /// Looks up a localized string similar to This chart shows the sale number of each product.. /// - public static string MinLengthAttribute_InvalidMinLength { + public static string ProductSalesText { get { - return ResourceManager.GetString("MinLengthAttribute_InvalidMinLength", resourceCulture); + return ResourceManager.GetString("ProductSalesText", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a minimum length of '{1}'.. + /// Looks up a localized string similar to Products count per category chart. /// - public static string MinLengthAttribute_ValidationError { + public static string ProductsCountPerCategoryChart { get { - return ResourceManager.GetString("MinLengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("ProductsCountPerCategoryChart", resourceCulture); } } /// - /// Looks up a localized string similar to AddIdentity must be called on the service collection.. + /// Looks up a localized string similar to This chart shows the number of products in each category.. /// - public static string MustCallAddIdentity { + public static string ProductsCountPerCategoryChartText { get { - return ResourceManager.GetString("MustCallAddIdentity", resourceCulture); + return ResourceManager.GetString("ProductsCountPerCategoryChartText", resourceCulture); } } /// - /// Looks up a localized string similar to New Password. + /// Looks up a localized string similar to Products. /// - public static string NewPassword { + public static string ProductsPageTitle { get { - return ResourceManager.GetString("NewPassword", resourceCulture); + return ResourceManager.GetString("ProductsPageTitle", resourceCulture); } } /// - /// Looks up a localized string similar to No. + /// Looks up a localized string similar to Products percentage per category. /// - public static string No { + public static string ProductsPercentagePerCategory { get { - return ResourceManager.GetString("No", resourceCulture); + return ResourceManager.GetString("ProductsPercentagePerCategory", resourceCulture); } } /// - /// Looks up a localized string similar to No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true.. + /// Looks up a localized string similar to This chart shows the percentage of products in each category.. /// - public static string NoPersonalDataProtector { + public static string ProductsPercentagePerCategoryText { get { - return ResourceManager.GetString("NoPersonalDataProtector", resourceCulture); + return ResourceManager.GetString("ProductsPercentagePerCategoryText", resourceCulture); } } /// - /// Looks up a localized string similar to No RoleType was specified, try AddRoles<TRole>().. + /// Looks up a localized string similar to Profile Image. /// - public static string NoRoleType { + public static string ProfileImage { get { - return ResourceManager.GetString("NoRoleType", resourceCulture); + return ResourceManager.GetString("ProfileImage", resourceCulture); } } /// - /// Looks up a localized string similar to No todos yet. + /// Looks up a localized string similar to Profile updated successfully.. /// - public static string NoTodos { + public static string ProfileUpdatedSuccessfullyMessage { get { - return ResourceManager.GetString("NoTodos", resourceCulture); + return ResourceManager.GetString("ProfileUpdatedSuccessfullyMessage", resourceCulture); } } /// - /// Looks up a localized string similar to No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered.. + /// Looks up a localized string similar to The field {0} must be between {1} and {2}.. /// - public static string NoTokenProvider { + public static string RangeAttribute_ValidationError { get { - return ResourceManager.GetString("NoTokenProvider", resourceCulture); + return ResourceManager.GetString("RangeAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to Haven’t you received the confirmation email?. + /// Looks up a localized string similar to Remove. /// - public static string NotReceivedConfirmationEmailMessage { + public static string Remove { get { - return ResourceManager.GetString("NotReceivedConfirmationEmailMessage", resourceCulture); + return ResourceManager.GetString("Remove", resourceCulture); } } /// - /// Looks up a localized string similar to Haven’t you received the confirmation email?. + /// Looks up a localized string similar to The {0} field is required.. /// - public static string NotReceivedConfirmationEmailMessage1 { + public static string RequiredAttribute_ValidationError { get { - return ResourceManager.GetString("NotReceivedConfirmationEmailMessage1", resourceCulture); + return ResourceManager.GetString("RequiredAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to User security stamp cannot be null.. + /// Looks up a localized string similar to The confirmation link has been re-sent to your email address.. /// - public static string NullSecurityStamp { + public static string ResendConfirmationLinkMessage { get { - return ResourceManager.GetString("NullSecurityStamp", resourceCulture); + return ResourceManager.GetString("ResendConfirmationLinkMessage", resourceCulture); } } /// - /// Looks up a localized string similar to OR. + /// Looks up a localized string similar to Resend email. /// - public static string Or { + public static string ResendEmail { get { - return ResourceManager.GetString("Or", resourceCulture); + return ResourceManager.GetString("ResendEmail", resourceCulture); } } /// - /// Looks up a localized string similar to Password. + /// Looks up a localized string similar to Reset password. /// - public static string Password { + public static string ResetPassword { get { - return ResourceManager.GetString("Password", resourceCulture); + return ResourceManager.GetString("ResetPassword", resourceCulture); } } /// - /// Looks up a localized string similar to Your password changed successfully.. + /// Looks up a localized string similar to The reset password link has been sent to your email address.. /// - public static string PasswordChangedSuccessfullyMessage { + public static string ResetPasswordLinkSentMessage { get { - return ResourceManager.GetString("PasswordChangedSuccessfullyMessage", resourceCulture); + return ResourceManager.GetString("ResetPasswordLinkSentMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Incorrect password.. + /// Looks up a localized string similar to Reset password. /// - public static string PasswordMismatch { + public static string ResetPasswordTitle { get { - return ResourceManager.GetString("PasswordMismatch", resourceCulture); + return ResourceManager.GetString("ResetPasswordTitle", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one digit ('0'-'9').. + /// Looks up a localized string similar to Resource not found. /// - public static string PasswordRequiresDigit { + public static string ResourceNotFoundException { get { - return ResourceManager.GetString("PasswordRequiresDigit", resourceCulture); + return ResourceManager.GetString("ResourceNotFoundException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one lowercase ('a'-'z').. + /// Looks up a localized string similar to Request data is not valid. /// - public static string PasswordRequiresLower { + public static string ResourceValidationException { get { - return ResourceManager.GetString("PasswordRequiresLower", resourceCulture); + return ResourceManager.GetString("ResourceValidationException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one non alphanumeric character.. + /// Looks up a localized string similar to An error occurred while communicating with server. /// - public static string PasswordRequiresNonAlphanumeric { + public static string RestException { get { - return ResourceManager.GetString("PasswordRequiresNonAlphanumeric", resourceCulture); + return ResourceManager.GetString("RestException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must use at least {0} different characters.. + /// Looks up a localized string similar to Save. /// - public static string PasswordRequiresUniqueChars { + public static string Save { get { - return ResourceManager.GetString("PasswordRequiresUniqueChars", resourceCulture); + return ResourceManager.GetString("Save", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one uppercase ('A'-'Z').. + /// Looks up a localized string similar to Search on name. /// - public static string PasswordRequiresUpper { + public static string SearchOnName { get { - return ResourceManager.GetString("PasswordRequiresUpper", resourceCulture); + return ResourceManager.GetString("SearchOnName", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must be at least {0} characters.. + /// Looks up a localized string similar to Select your birth date. /// - public static string PasswordTooShort { + public static string SelectBirthDate { get { - return ResourceManager.GetString("PasswordTooShort", resourceCulture); + return ResourceManager.GetString("SelectBirthDate", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid phone number.. + /// Looks up a localized string similar to Select category. /// - public static string PhoneAttribute_Invalid { + public static string SelectCategory { get { - return ResourceManager.GetString("PhoneAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("SelectCategory", resourceCulture); } } /// - /// Looks up a localized string similar to I agree to the . + /// Looks up a localized string similar to Unable to connect to server.. /// - public static string PrivacyPolicyAgreementMessage { + public static string ServerConnectionException { get { - return ResourceManager.GetString("PrivacyPolicyAgreementMessage", resourceCulture); + return ResourceManager.GetString("ServerConnectionException", resourceCulture); } } /// - /// Looks up a localized string similar to Use this page to detail your site's privacy policy.. + /// Looks up a localized string similar to Sign in. /// - public static string PrivacyPolicyPageMessage { + public static string SignIn { get { - return ResourceManager.GetString("PrivacyPolicyPageMessage", resourceCulture); + return ResourceManager.GetString("SignIn", resourceCulture); } } /// - /// Looks up a localized string similar to Use this section to detail your site's privacy policy.. + /// Looks up a localized string similar to Sign in as different user. /// - public static string PrivacyPolicySectionMessage { + public static string SignInAsDifferentUser { get { - return ResourceManager.GetString("PrivacyPolicySectionMessage", resourceCulture); + return ResourceManager.GetString("SignInAsDifferentUser", resourceCulture); } } /// - /// Looks up a localized string similar to Privacy Policy. + /// Looks up a localized string similar to Sign in. /// - public static string PrivacyPolicyTitle { + public static string SignInTitle { get { - return ResourceManager.GetString("PrivacyPolicyTitle", resourceCulture); + return ResourceManager.GetString("SignInTitle", resourceCulture); } } /// - /// Looks up a localized string similar to Profile Image. + /// Looks up a localized string similar to Sign out. /// - public static string ProfileImage { + public static string SignOut { get { - return ResourceManager.GetString("ProfileImage", resourceCulture); + return ResourceManager.GetString("SignOut", resourceCulture); } } /// - /// Looks up a localized string similar to Profile updated successfully.. - /// - public static string ProfileUpdatedSuccessfullyMessage { - get { - return ResourceManager.GetString("ProfileUpdatedSuccessfullyMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type {0} must implement {1}.. - /// - public static string RangeAttribute_ArbitraryTypeNotIComparable { - get { - return ResourceManager.GetString("RangeAttribute_ArbitraryTypeNotIComparable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot use exclusive bounds when the maximum value is equal to the minimum value.. - /// - public static string RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual { - get { - return ResourceManager.GetString("RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.. - /// - public static string RangeAttribute_MinGreaterThanMax { - get { - return ResourceManager.GetString("RangeAttribute_MinGreaterThanMax", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The minimum and maximum values must be set.. - /// - public static string RangeAttribute_Must_Set_Min_And_Max { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Min_And_Max", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The OperandType must be set when strings are used for minimum and maximum values.. - /// - public static string RangeAttribute_Must_Set_Operand_Type { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Operand_Type", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2}.. - /// - public static string RangeAttribute_ValidationError { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2}.. - /// - public static string RangeAttribute_ValidationError_MinExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MinExclusive_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Recovery code redemption failed.. - /// - public static string RecoveryCodeRedemptionFailed { - get { - return ResourceManager.GetString("RecoveryCodeRedemptionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must match the regular expression '{1}'.. - /// - public static string RegexAttribute_ValidationError { - get { - return ResourceManager.GetString("RegexAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The pattern must be set to a valid regular expression.. - /// - public static string RegularExpressionAttribute_Empty_Pattern { - get { - return ResourceManager.GetString("RegularExpressionAttribute_Empty_Pattern", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove. - /// - public static string Remove { - get { - return ResourceManager.GetString("Remove", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is required.. - /// - public static string RequiredAttribute_ValidationError { - get { - return ResourceManager.GetString("RequiredAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The confirmation link has been re-sent to your email address.. - /// - public static string ResendConfirmationLinkMessage { - get { - return ResourceManager.GetString("ResendConfirmationLinkMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resend email. - /// - public static string ResendEmail { - get { - return ResourceManager.GetString("ResendEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPassword { - get { - return ResourceManager.GetString("ResetPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The reset password link has been sent to your email address.. - /// - public static string ResetPasswordLinkSentMessage { - get { - return ResourceManager.GetString("ResetPasswordLinkSentMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPasswordTitle { - get { - return ResourceManager.GetString("ResetPasswordTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resource not found. - /// - public static string ResourceNotFoundException { - get { - return ResourceManager.GetString("ResourceNotFoundException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Request data is not valid. - /// - public static string ResourceValidationException { - get { - return ResourceManager.GetString("ResourceValidationException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while communicating with server. - /// - public static string RestException { - get { - return ResourceManager.GetString("RestException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Role {0} does not exist.. - /// - public static string RoleNotFound { - get { - return ResourceManager.GetString("RoleNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save. - /// - public static string Save { - get { - return ResourceManager.GetString("Save", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select your birth date. - /// - public static string SelectBirthDate { - get { - return ResourceManager.GetString("SelectBirthDate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to connect to the server.. - /// - public static string ServerConnectionException { - get { - return ResourceManager.GetString("ServerConnectionException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignIn { - get { - return ResourceManager.GetString("SignIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignInTitle { - get { - return ResourceManager.GetString("SignInTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign out. - /// - public static string SignOut { - get { - return ResourceManager.GetString("SignOut", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to Sign out?. + /// Looks up a localized string similar to Are you sure you want to Sign out?. /// public static string SignOutPrompt { get { @@ -1448,209 +1142,29 @@ public static string SingUpTitle { } /// - /// Looks up a localized string similar to Sort by. - /// - public static string SortBy { - get { - return ResourceManager.GetString("SortBy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true.. - /// - public static string StoreNotIProtectedUserStore { - get { - return ResourceManager.GetString("StoreNotIProtectedUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableRoleStore<TRole>.. - /// - public static string StoreNotIQueryableRoleStore { - get { - return ResourceManager.GetString("StoreNotIQueryableRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableUserStore<TUser>.. - /// - public static string StoreNotIQueryableUserStore { - get { - return ResourceManager.GetString("StoreNotIQueryableUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IRoleClaimStore<TRole>.. - /// - public static string StoreNotIRoleClaimStore { - get { - return ResourceManager.GetString("StoreNotIRoleClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticationTokenStore<User>.. - /// - public static string StoreNotIUserAuthenticationTokenStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticationTokenStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticatorKeyStore<User>.. - /// - public static string StoreNotIUserAuthenticatorKeyStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticatorKeyStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserClaimStore<TUser>.. - /// - public static string StoreNotIUserClaimStore { - get { - return ResourceManager.GetString("StoreNotIUserClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserConfirmationStore<TUser>.. - /// - public static string StoreNotIUserConfirmationStore { - get { - return ResourceManager.GetString("StoreNotIUserConfirmationStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserEmailStore<TUser>.. - /// - public static string StoreNotIUserEmailStore { - get { - return ResourceManager.GetString("StoreNotIUserEmailStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLockoutStore<TUser>.. - /// - public static string StoreNotIUserLockoutStore { - get { - return ResourceManager.GetString("StoreNotIUserLockoutStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLoginStore<TUser>.. - /// - public static string StoreNotIUserLoginStore { - get { - return ResourceManager.GetString("StoreNotIUserLoginStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPasswordStore<TUser>.. - /// - public static string StoreNotIUserPasswordStore { - get { - return ResourceManager.GetString("StoreNotIUserPasswordStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPhoneNumberStore<TUser>.. - /// - public static string StoreNotIUserPhoneNumberStore { - get { - return ResourceManager.GetString("StoreNotIUserPhoneNumberStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserRoleStore<TUser>.. - /// - public static string StoreNotIUserRoleStore { - get { - return ResourceManager.GetString("StoreNotIUserRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserSecurityStampStore<TUser>.. - /// - public static string StoreNotIUserSecurityStampStore { - get { - return ResourceManager.GetString("StoreNotIUserSecurityStampStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorRecoveryCodeStore<User>.. - /// - public static string StoreNotIUserTwoFactorRecoveryCodeStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorRecoveryCodeStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorStore<TUser>.. - /// - public static string StoreNotIUserTwoFactorStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The maximum length must be a nonnegative integer.. - /// - public static string StringLengthAttribute_InvalidMaxLength { - get { - return ResourceManager.GetString("StringLengthAttribute_InvalidMaxLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a maximum length of {1}.. - /// - public static string StringLengthAttribute_ValidationError { - get { - return ResourceManager.GetString("StringLengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.. + /// Looks up a localized string similar to Submit. /// - public static string StringLengthAttribute_ValidationErrorIncludingMinimum { + public static string Submit { get { - return ResourceManager.GetString("StringLengthAttribute_ValidationErrorIncludingMinimum", resourceCulture); + return ResourceManager.GetString("Submit", resourceCulture); } } /// - /// Looks up a localized string similar to Submit. + /// Looks up a localized string similar to Term. /// - public static string Submit { + public static string Term { get { - return ResourceManager.GetString("Submit", resourceCulture); + return ResourceManager.GetString("Term", resourceCulture); } } /// - /// Looks up a localized string similar to Terms. + /// Looks up a localized string similar to Is accept terms?. /// - public static string Terms { + public static string TermsAccepted { get { - return ResourceManager.GetString("Terms", resourceCulture); + return ResourceManager.GetString("TermsAccepted", resourceCulture); } } @@ -1691,7 +1205,7 @@ public static string TodoAddPlaceholder { } /// - /// Looks up a localized string similar to To Do item could not be found. + /// Looks up a localized string similar to Todo item could not be found. /// public static string ToDoItemCouldNotBeFound { get { @@ -1727,38 +1241,20 @@ public static string TooManyRequestsExceptions { } /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.. - /// - public static string UIHintImplementation_ControlParameterKeyIsNotAString { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNotAString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} is null. Every key control parameter must be a string.. + /// Looks up a localized string similar to Total categories. /// - public static string UIHintImplementation_ControlParameterKeyIsNull { + public static string TotalCategories { get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNull", resourceCulture); + return ResourceManager.GetString("TotalCategories", resourceCulture); } } /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' occurs more than once.. + /// Looks up a localized string similar to Total products. /// - public static string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce { + public static string TotalProducts { get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyOccursMoreThanOnce", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The number of control parameters must be even.. - /// - public static string UIHintImplementation_NeedEvenNumberOfControlParameters { - get { - return ResourceManager.GetString("UIHintImplementation_NeedEvenNumberOfControlParameters", resourceCulture); + return ResourceManager.GetString("TotalProducts", resourceCulture); } } @@ -1780,15 +1276,6 @@ public static string UnknownException { } } - /// - /// Looks up a localized string similar to Update. - /// - public static string Update { - get { - return ResourceManager.GetString("Update", resourceCulture); - } - } - /// /// Looks up a localized string similar to The record was modified by another user after you got the original data. the operation was canceled.. /// @@ -1807,33 +1294,6 @@ public static string UploadNewProfileImage { } } - /// - /// Looks up a localized string similar to The {0} field is not a valid fully-qualified http, https, or ftp URL.. - /// - public static string UrlAttribute_Invalid { - get { - return ResourceManager.GetString("UrlAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already has a password set.. - /// - public static string UserAlreadyHasPassword { - get { - return ResourceManager.GetString("UserAlreadyHasPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already in role '{0}'.. - /// - public static string UserAlreadyInRole { - get { - return ResourceManager.GetString("UserAlreadyInRole", resourceCulture); - } - } - /// /// Looks up a localized string similar to User image could not be found. /// @@ -1852,24 +1312,6 @@ public static string UserLockedOut { } } - /// - /// Looks up a localized string similar to Lockout is not enabled for this user.. - /// - public static string UserLockoutNotEnabled { - get { - return ResourceManager.GetString("UserLockoutNotEnabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username. - /// - public static string UserName { - get { - return ResourceManager.GetString("UserName", resourceCulture); - } - } - /// /// Looks up a localized string similar to User {0} does not exist.. /// @@ -1879,87 +1321,6 @@ public static string UserNameNotFound { } } - /// - /// Looks up a localized string similar to User is not in role '{0}'.. - /// - public static string UserNotInRole { - get { - return ResourceManager.GetString("UserNotInRole", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.. - /// - public static string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource { - get { - return ResourceManager.GetString("ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context).. - /// - public static string ValidationAttribute_IsValid_NotImplemented { - get { - return ResourceManager.GetString("ValidationAttribute_IsValid_NotImplemented", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.. - /// - public static string ValidationAttribute_NeedBothResourceTypeAndResourceName { - get { - return ResourceManager.GetString("ValidationAttribute_NeedBothResourceTypeAndResourceName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property '{0}' on resource type '{1}' is not a string type.. - /// - public static string ValidationAttribute_ResourcePropertyNotStringType { - get { - return ResourceManager.GetString("ValidationAttribute_ResourcePropertyNotStringType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The resource type '{0}' does not have an accessible static property named '{1}'.. - /// - public static string ValidationAttribute_ResourceTypeDoesNotHaveProperty { - get { - return ResourceManager.GetString("ValidationAttribute_ResourceTypeDoesNotHaveProperty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} is invalid.. - /// - public static string ValidationAttribute_ValidationError { - get { - return ResourceManager.GetString("ValidationAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance provided must match the ObjectInstance on the ValidationContext supplied.. - /// - public static string Validator_InstanceMustMatchValidationContextInstance { - get { - return ResourceManager.GetString("Validator_InstanceMustMatchValidationContextInstance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value for property '{0}' must be of type '{1}'.. - /// - public static string Validator_Property_Value_Wrong_Type { - get { - return ResourceManager.GetString("Validator_Property_Value_Wrong_Type", resourceCulture); - } - } - /// /// Looks up a localized string similar to You have already requested the confirmation email. Try again in {0}. /// @@ -1987,6 +1348,15 @@ public static string Yes { } } + /// + /// Looks up a localized string similar to You're sign in as. + /// + public static string YouAreSignInAs { + get { + return ResourceManager.GetString("YouAreSignInAs", resourceCulture); + } + } + /// /// Looks up a localized string similar to You must agree to our terms.. /// diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.fr.resx b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.fr.resx index fd48b49e00..2486e7e928 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.fr.resx +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.fr.resx @@ -117,32 +117,56 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Le champ {0} est obligatoire. + + + « {0} » et « {1} » ne correspondent pas. + + + Le champ {0} n'est pas une adresse e-mail valide. + + + MaxLengthAttribute doit avoir une valeur de longueur supérieure à zéro. + + + Le champ {0} doit être de type chaîne ou tableau avec une longueur minimale de « {1} ». + + + Le champ {0} doit être compris entre {1} et {2}. + + + L'e-mail « {0} » est déjà pris. + + + L'utilisateur est verrouillé. + + + L'utilisateur {0} n'existe pas. + - Demande non valide + Requête invalide - La demande n’a pas pu être traitée en raison d’un conflit dans la demande + La demande n'a pas pu être traitée en raison d'un conflit dans la demande - L’accès à la ressource demandée est interdit + L'accès à la ressource demandée est interdit Les données de la demande ne sont pas valides - Une erreur s’est produite lors de la communication avec le serveur + Une erreur s'est produite lors de la communication avec le serveur - Votre demande ne contient pas d’informations d’authentification valides + Votre demande ne contient pas d'informations d'authentification valides - Une erreur inconnue s’est produite + Une erreur inconnue s'est produite - L’enregistrement a été modifié par un autre utilisateur après que vous ayez obtenu les données d’origine. L’opération a été annulée. - - - Erreur connue + L'enregistrement a été modifié par un autre utilisateur après avoir obtenu les données d'origine. Ressource introuvable @@ -150,620 +174,385 @@ Trop de demandes - - Une erreur s’est produite lors de la suppression du fichier - - - Une erreur s’est produite lors du téléchargement du fichier - - - L’élément À faire n’a pas pu être trouvé - - - L’image de l’utilisateur est introuvable - - - L’adresse e-mail '{0}' n’est pas confirmée. - - - Vous avez déjà demandé l’e-mail de confirmation. Réessayez dans {0} - - - Vous avez déjà demandé l’e-mail de réinitialisation du mot de passe. Réessayez dans {0} - - - Votre adresse e-mail est déjà confirmée. - - - Erreur + + Incapable de se connecter au serveur. Actif - - Ajouter - - Tout + Tous Alphabétique - - Vous avez déjà un compte ? - - - Annuler - - - Vérifiez votre courrier indésirable si vous ne le trouvez pas dans la boîte de réception. - - Terminé - - - Nous avons envoyé un lien de confirmation à votre adresse e-mail. -Veuillez confirmer votre adresse e-mail en cliquant sur le lien. - - - Confirmez votre adresse e-mail - - - Confirmer le nouveau mot de passe + Complété Date - - Vous n’avez pas de compte ? - - - Éditer - - Modifier le profil - - - Messagerie électronique - - - Échec de la confirmation par e-mail ! - - - Confirmation par e-mail - - - E-mail confirmé avec succès ! - - - Veuillez saisir l’adresse e-mail avec laquelle vous vous êtes inscrit afin que nous puissions vous envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. - - - Mot de passe oublié - - - Mot de passe oublié ? + Editer le profil - Nom complet - - - Autre - - - Femelle - - - Mâle - - - Référentiel GitHub - - - Il semble que le lien de confirmation ne soit pas valide ou qu’il ait expiré. - - - Nouveau mot de passe + Nom et prénom - - Pas encore de choses à faire + + Termes - - Vous n’avez pas reçu l’e-mail de confirmation ? + + Mise à jour du profil réussie. - - Vous n’avez pas reçu l’e-mail de confirmation ? + + Confirmer le nouveau mot de passe - - OU + + E-mail Mot de passe - Votre mot de passe a été modifié avec succès. - - - Je suis d’accord avec le - - - Petits caractères - - - Le profil a été mis à jour avec succès. - - - Enlever + Votre mot de passe a changé avec succès. Le lien de confirmation a été renvoyé à votre adresse e-mail. - - Renvoyer l’e-mail - - - Réinitialiser le mot de passe - Le lien de réinitialisation du mot de passe a été envoyé à votre adresse e-mail. - - Réinitialiser le mot de passe - - - Sauvegarder - - - Sélectionnez votre date de naissance - - - Connexion - - - Connexion - - - Se déconnecter - - - S’enregistrer - - - S’enregistrer - - - Trier par - - - Envoyer - - - Ajouter une tâche - - - Cherchez des choses à faire... + + L'image de l'utilisateur est introuvable - - Créez facilement votre application Blazor complète dans les plus brefs délais ! + + L'entité de catégorie est introuvable - - Page d’accueil de TodoTemplate + + L'entité du produit est introuvable - - À faire + + Cette catégorie contient certains produits, vous ne pouvez donc pas la supprimer - - Télécharger une nouvelle image de profil + + Erreur - - Acceptez-vous les conditions ? + + Vous avez déjà demandé l'e-mail de réinitialisation du mot de passe. - - Nom d’utilisateur + + Est-ce que j'accepte les conditions ? Vous devez accepter nos conditions. - - Aller à aujourd’hui - Genre - - Petits caractères - - - Êtes-vous sûr de vouloir vous déconnecter ? - - Naissance - - - Domicile - - - Image de profil - - - Titre - - - Vous devez être connecté pour continuer. - - - Nom d’utilisateur ou mot de passe non valide - - - Supprimer le compte - - - Non - - - Oui - - - Êtes-vous sûr de vouloir supprimer votre compte ? - - - Mettre à jour - - - Voulez-vous vraiment supprimer {0} - - - Supprimer l’élément de tâche - - - Le champ {0} n’est égal à aucune des valeurs spécifiées dans AllowedValuesAttribute. - - - Le type de métadonnées associé au type '{0}' contient les propriétés ou champs inconnus suivants : {1}. Assurez-vous que les noms de ces membres correspondent aux noms des propriétés du type principal. - - - Le type '{0}' ne contient pas de propriété publique nommée '{1}'. - - - Le champ {0} n’est pas un codage Base64 valide. - - - La propriété {0}. {1} n’a pas pu être trouvé. - - - '{0}' et '{1}' ne correspondent pas. - - - Impossible de trouver une propriété nommée {0}. - - - Le champ {0} n’est pas un numéro de carte de crédit valide. - - - La méthode CustomValidationAttribute '{0}' de type '{1}' doit retourner System.ComponentModel.DataAnnotations.ValidationResult. Utilisez System.ComponentModel.DataAnnotations.ValidationResult.Success pour représenter la réussite. - - - La méthode CustomValidationAttribute '{0}' n’existe pas dans le type '{1}' ou n’est pas publique et statique. - - - La méthode CustomValidationAttribute.Method n’a pas été spécifiée. - - - La méthode CustomValidationAttribute '{0}' de type '{1}' doit correspondre à la signature attendue : public static ValidationResult {0}(valeur d’objet, contexte ValidationContext). La valeur peut être fortement typée. Le paramètre ValidationContext est facultatif. - - - Impossible de convertir la valeur du type '{0}' en '{1}' comme prévu par la méthode {2}. {3}. - - - Le type de validation personnalisé '{0}' doit être public. - - - {0} n’est pas valide. - - - Le CustomValidationAttribute.ValidatorType n’a pas été spécifié. + Date de naissance - - La chaîne DataType personnalisée ne peut pas être nulle ou vide. + + Nom - - Le champ {0} est égal à l’une des valeurs spécifiées dans DeniedValuesAttribute. + + Catégorie - - La propriété {0} n’a pas été définie. Utilisez la méthode {1} pour obtenir la valeur. + + Description - - Le champ {0} n’est pas une adresse e-mail valide. + + Prix - - Le type fourni pour EnumDataTypeAttribute ne peut pas être null. + + Catégories - - Le type '{0}' doit représenter un type d’énumération. + + Catégorie de produit - - Le champ {0} n’accepte que les fichiers avec les extensions suivantes : {1} + + Des produits - - Impossible de récupérer la propriété '{0}' en raison de l’échec de la localisation. Le type '{1}' n’est pas public ou ne contient pas de propriété de chaîne statique publique portant le nom '{2}'. + + Etes-vous sûr de vouloir supprimer la catégorie {0} - - MaxLengthAttribute doit avoir une valeur Length supérieure à zéro. Utilisez MaxLength() sans paramètres pour indiquer que la chaîne ou le tableau peut avoir la longueur maximale autorisée. + + Êtes-vous sûr de vouloir supprimer le produit {0} - - Le champ {0} doit être de type chaîne ou tableau avec une longueur maximale de '{1}'. + + Supprimer la catégorie - - MetadataClassType ne peut pas être null. + + Supprimer le produit - - MinLengthAttribute doit avoir une valeur Length égale ou supérieure à zéro. + + Vous devez être connecté pour continuer. - - Le champ {0} doit être de type chaîne ou tableau avec une longueur minimale de '{1}'. + + Nom d'utilisateur ou mot de passe invalide - - LengthAttribute doit avoir une valeur MinimumLength égale ou supérieure à zéro. + + Vous avez déjà demandé l'e-mail de confirmation. - - LengthAttribute doit avoir une valeur MaximumLength supérieure ou égale à MinimumLength. + + Votre email est déjà confirmé. - - Le champ {0} doit être un type de chaîne ou de collection dont la longueur minimale est de « {1} » et la longueur maximale de « {2} ». + + Faire - - Le champ de type {0} doit être de type chaîne, tableau ou ICollection. + + Titre - - Le champ {0} n’est pas un numéro de téléphone valide. + + L'élément à faire est introuvable - - Le type {0} devez implémenter {1}. + + Etes-vous sûr de vouloir supprimer {0} - - La valeur maximale '{0}' doit être supérieure ou égale à la valeur minimale '{1}'. + + Supprimer l'élément à faire - - Impossible d’utiliser des limites exclusives lorsque la valeur maximale est égale à la valeur minimale. + + Maison - - Les valeurs minimale et maximale doivent être définies. + + Ajouter - - L’OperandType doit être défini lorsque des chaînes sont utilisées pour les valeurs minimale et maximale. + + Vous avez déjà un compte? - - Le champ {0} doit être compris entre {1} et {2}. + + Nous avons envoyé un lien de confirmation à votre adresse e-mail. - - Le champ {0} doit être compris entre {1} exclusif et {2}. + + confirmez votre adresse email - - Le champ {0} doit être compris entre {1} et {2} exclusif. + + Supprimer le compte - - Le champ {0} doit être compris entre {1} exclusif et {2} exclusif. + + Êtes-vous sûr de vouloir supprimer votre compte ? - - Le champ {0} doit correspondre à l’expression régulière '{1}'. + + Vous n'avez pas de compte ? - - Le modèle doit être défini sur une expression régulière valide. + + Modifier - - Le champ {0} est obligatoire. + + Échec de la confirmation par e-mail ! - - La longueur maximale doit être un entier non négatif. + + confirmation de l'émail - - Le champ {0} doit être une chaîne d’une longueur maximale de {1}. + + E-mail confirmé avec succès ! - - Le champ {0} doit être une chaîne d’une longueur minimale de {2} et d’une longueur maximale de {1}. + + Une erreur s'est produite lors du téléchargement du fichier - - Le paramètre clé à la position {0} avec la valeur '{1}' n’est pas une chaîne de caractères. Chaque paramètre de contrôle de clé doit être une chaîne de caractères. + + Veuillez saisir l'adresse e-mail avec laquelle vous avez été inscrit afin que nous puissions envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. - - Le paramètre clé à la position {0} est null. Chaque paramètre de contrôle de clé doit être une chaîne de caractères. + + Mot de passe oublié - - Le paramètre clé à la position {0} avec la valeur '{1}' apparaît plus d’une fois. + + Mâle - - Le nombre de paramètres de contrôle doit être pair. + + Autre - - Le champ {0} n’est pas une URL http, https ou ftp valide et complète. + + Dépôt GitHub - - ErrorMessageString ou ErrorMessageResourceName doivent être définis, mais pas les deux. + + Allez à aujourd'hui - - IsValid(valeur de l’objet) n’a pas été implémenté par cette classe. Le point d’entrée préféré est GetValidationResult() et les classes doivent remplacer IsValid(valeur de l’objet, contexte ValidationContext). + + Créez facilement votre application Blazor multimode (WASM, serveur, hybride, pré-rendu) dans les plus brefs délais ! - - ErrorMessageResourceType et ErrorMessageResourceName doivent tous deux être définis sur cet attribut. + + Accueil BlazorWeb - - La propriété '{0}' du type de ressource '{1}' n’est pas un type de chaîne. + + Il semble que le lien de confirmation soit invalide ou ait expiré. - - Le type de ressource '{0}' n’a pas de propriété statique accessible nommée '{1}'. + + nouveau mot de passe - - Le champ {0} n’est pas valide. + + Non - - L’instance fournie doit correspondre à l’ObjectInstance sur le ValidationContext fourni. + + Vous n'avez pas reçu l'e-mail de confirmation ? - - La valeur de la propriété '{0}' doit être de type '{1}'. + + OU - - Échec de la concurrence optimiste, l’objet a été modifié. + + Image de profil - - Une défaillance inconnue s’est produite. + + Retirer - - L’e-mail '{0}' est déjà pris. + + Ré-envoyer l'email - - Le nom de rôle '{0}' est déjà pris. + + Réinitialiser le mot de passe - - Le nom d’utilisateur '{0}' est déjà pris. + + Sauvegarder - - L’adresse e-mail « {0} » n’est pas valide. + + Se connecter - - Le type {0} doit dériver de {1}<{2}>. + + se déconnecter - - Le PasswordHasherCompatibilityMode fourni n’est pas valide. + + Êtes-vous certain de vouloir vous déconnecter? - - Le nombre d’itérations doit être un entier positif. + + S'inscrire - - Le nom de rôle « {0} » n’est pas valide. + + S'inscrire - - Jeton non valide. + + Soumettre - - Le nom d’utilisateur '{0}' n’est pas valide, ne peut contenir que des lettres ou des chiffres. + + Terme - - Un utilisateur avec cette connexion existe déjà. + + je suis d'accord avec le - - AddIdentity doit être appelé sur la collection de services. + + Téléchargez une nouvelle image de profil - - Aucun IUserTwoFactorTokenProvider<{0}> nommé '{1}' n’est enregistré. + + Oui - - Le tampon de sécurité de l’utilisateur ne peut pas être nul. + + Ajouter une tâche - - Mot de passe incorrect. + + Rechercher des choses à faire... - - Les mots de passe doivent comporter au moins un chiffre ('0'-'9'). + + Sélectionnez votre date de naissance - - Les mots de passe doivent comporter au moins une minuscule ('a'-'z'). + + Choisir une catégorie - - Les mots de passe doivent comporter au moins un caractère non alphanumérique. + + Catégories totales - - Les mots de passe doivent comporter au moins une majuscule ('A'-'Z'). + + Produits totaux - - Les mots de passe doivent comporter au moins {0} caractères. + + Modifier la catégorie - - Le rôle {0} n’existe pas. + + Nouvelle catégorie - - Store n’implémente pas IQueryableUserStore<TUser>.</TUser> + + Catégories - - Store n’implémente pas IRoleClaimStore<TRole>.</TRole> + + Entrez le nom de la catégorie - - Store n’implémente pas IUserAuthenticationTokenStore<User>.</User> + + Entrez le nom du produit - - Store n’implémente pas IUserClaimStore<TUser>.</TUser> + + Nombre de catégories des 30 derniers jours - - Store n’implémente pas IUserConfirmationStore<TUser>.</TUser> + + Ventes de produits - - Store n’implémente pas IUserEmailStore<TUser>.</TUser> + + Ce graphique montre le numéro de vente de chaque produit. - - Store n’implémente pas IUserLockoutStore<TUser>.</TUser> + + Rechercher sur le nom - - Store n’implémente pas IUserLoginStore<TUser>.</TUser> + + Tableau du nombre de produits par catégorie - - Store n’implémente pas IUserPasswordStore<TUser>.</TUser> + + Ce graphique montre le nombre de produits dans chaque catégorie. - - Store n’implémente pas IUserSecurityStampStore<TUser>.</TUser> + + Des produits - - Store n’implémente pas IUserAuthenticatorKeyStore<User>.</User> + + Pourcentage de produits par catégorie - - L’utilisation du code de récupération a échoué. + + Ce graphique montre le pourcentage de produits dans chaque catégorie. - - L’utilisateur dispose déjà d’un mot de passe défini. + + Se connecter - - Utilisateur déjà dans le rôle '{0}'. + + Connectez-vous en tant qu'utilisateur différent - - L’utilisateur est bloqué. + + Vous êtes connecté en tant que - - Le verrouillage n’est pas activé pour cet utilisateur. + + Réinitialiser le mot de passe - - Le {0} utilisateur n’existe pas. + + Aucune tâche pour l'instant - - L’utilisateur n’est pas dans le rôle '{0}'. + + Ajouter un produit - - Les mots de passe doivent comporter au moins {0} caractères différents. + + Action - - Aucun RoleType n’a été spécifié, essayez AddRoles<TRole>().</TRole> + + Dos - - Aucun service IPersonalDataProtector n’a été enregistré, cela est requis lorsque ProtectPersonalData = true. + + Annuler - - Store n’implémente pas IQueryableRoleStore<TRole>.</TRole> + + Vérifiez vos spams/indésirables si vous ne les trouvez pas dans la boîte de réception. - - Store n’implémente pas IUserPhoneNumberStore<TUser>.</TUser> + + Couleur - - Store n’implémente pas IUserRoleStore<TUser>.</TUser> + + Couleur personnalisée - - Store n’implémente pas IUserTwoFactorStore<TUser>.</TUser> + + Sélecteur de couleurs par défaut - - Store n’implémente pas IUserTwoFactorRecoveryCodeStore<User>.</User> + + Supprimer - - Store n’implémente pas IProtectedUserStore,<TUser> ce qui est requis lorsque ProtectPersonalData = true.</TUser> + + Identifiant - - Utilisez cette page pour détailler la politique de confidentialité de votre site. + + Mot de passe oublié? - - Je suis d’accord avec le + + Nombre de produits des 30 derniers jours - - Utilisez cette section pour détailler la politique de confidentialité de votre site. + + Femelle - - Politique de confidentialité + + Modifier le produit - - Incapable de se connecter au serveur. + + Tableau de bord \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.resx b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.resx index 7725156e71..62717d879c 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.resx +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/AppStrings.resx @@ -1,4 +1,5 @@  + - - The {0} field does not equal any of the values specified in AllowedValuesAttribute. - - - The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type. - - - The type '{0}' does not contain a public property named '{1}'. - - - The {0} field is not a valid Base64 encoding. - - - The property {0}.{1} could not be found. - '{0}' and '{1}' do not match. - - - Could not find a property named {0}. - - - The {0} field is not a valid credit card number. - - - The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success. - - - The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static. - - - The CustomValidationAttribute.Method was not specified. - - - The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional. - - - Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}. - - - The custom validation type '{0}' must be public. - - - {0} is not valid. - - - The CustomValidationAttribute.ValidatorType was not specified. - - - The custom DataType string cannot be null or empty. - - - The {0} field equals one of the values specified in DeniedValuesAttribute. - - - The {0} property has not been set. Use the {1} method to get the value. The {0} field is not a valid e-mail address. - - - The type provided for EnumDataTypeAttribute cannot be null. - - - The type '{0}' needs to represent an enumeration type. - - - The {0} field only accepts files with the following extensions: {1} - - - Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'. MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length. - - - The field {0} must be a string or array type with a maximum length of '{1}'. - - - MetadataClassType cannot be null. - - - MinLengthAttribute must have a Length value that is zero or greater. The field {0} must be a string or array type with a minimum length of '{1}'. - - - LengthAttribute must have a MinimumLength value that is zero or greater. - - - LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength. - - - The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'. - - - The field of type {0} must be a string, array or ICollection type. - - - The {0} field is not a valid phone number. - - - The type {0} must implement {1}. - - - The maximum value '{0}' must be greater than or equal to the minimum value '{1}'. - - - Cannot use exclusive bounds when the maximum value is equal to the minimum value. - - - The minimum and maximum values must be set. - - - The OperandType must be set when strings are used for minimum and maximum values. The field {0} must be between {1} and {2}. - - - The field {0} must be between {1} exclusive and {2}. - - - The field {0} must be between {1} and {2} exclusive. - - - The field {0} must be between {1} exclusive and {2} exclusive. - - - The field {0} must match the regular expression '{1}'. - - - The pattern must be set to a valid regular expression. The {0} field is required. - - - The maximum length must be a nonnegative integer. - - - The field {0} must be a string with a maximum length of {1}. - - - The field {0} must be a string with a minimum length of {2} and a maximum length of {1}. - - - The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string. - - - The key parameter at position {0} is null. Every key control parameter must be a string. - - - The key parameter at position {0} with value '{1}' occurs more than once. - - - The number of control parameters must be even. - - - The {0} field is not a valid fully-qualified http, https, or ftp URL. - - - Either ErrorMessageString or ErrorMessageResourceName must be set, but not both. - - - IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context). - - - Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute. - - - The property '{0}' on resource type '{1}' is not a string type. - - - The resource type '{0}' does not have an accessible static property named '{1}'. - - - The field {0} is invalid. - - - The instance provided must match the ObjectInstance on the ValidationContext supplied. - - - The value for property '{0}' must be of type '{1}'. - - - - Optimistic concurrency failure, object has been modified. - Error when optimistic concurrency fails - - - An unknown failure has occurred. - Default identity result error message - - - Email '{0}' is already taken. - Error for duplicate emails - - - Role name '{0}' is already taken. - Error for duplicate roles - - - Username '{0}' is already taken. - Error for duplicate user names - - - Email '{0}' is invalid. - Invalid email - - - Type {0} must derive from {1}<{2}>. - Error when the manager type is not derived correctly - - - The provided PasswordHasherCompatibilityMode is invalid. - Error when the password hasher doesn't understand the format it's being asked to produce. - - - The iteration count must be a positive integer. - Error when the iteration count is < 1. - - - Role name '{0}' is invalid. - Error for invalid role names - - - Invalid token. - Error when a token is not recognized - - - Username '{0}' is invalid, can only contain letters or digits. - User names can only contain letters or digits - - - A user with this login already exists. - Error when a login already linked - - - AddIdentity must be called on the service collection. - Error when AddIdentity is not called - - - No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered. - Error when there is no IUserTwoFactorTokenProvider - - - User security stamp cannot be null. - Error when a user's security stamp is null. - - - Incorrect password. - Error when a password doesn't match - - - Passwords must have at least one digit ('0'-'9'). - Error when passwords do not have a digit - - - Passwords must have at least one lowercase ('a'-'z'). - Error when passwords do not have a lowercase letter - - - Passwords must have at least one non alphanumeric character. - Error when password does not have enough non alphanumeric characters - - - Passwords must have at least one uppercase ('A'-'Z'). - Error when passwords do not have an uppercase letter - - - Passwords must be at least {0} characters. - Error message for passwords that are too short - - - Role {0} does not exist. - Error when a role does not exist - - - Store does not implement IQueryableRoleStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IQueryableUserStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IRoleClaimStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticationTokenStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserClaimStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserConfirmationStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserEmailStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLockoutStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLoginStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPasswordStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPhoneNumberStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserRoleStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserSecurityStampStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticatorKeyStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserTwoFactorStore<TUser>. - Error when the store does not implement this interface - - - Recovery code redemption failed. - Error when a recovery code is not redeemed. - - - User already has a password set. - Error when AddPasswordAsync called when a user already has a password - - - User already in role '{0}'. - Error when a user is already in a role - - - User is locked out. - Error when a user is locked out - - - Lockout is not enabled for this user. - Error when lockout is not enabled - - - User {0} does not exist. - Error when a user does not exist - - - User is not in role '{0}'. - Error when a user is not in the role - - - Store does not implement IUserTwoFactorRecoveryCodeStore<User>. - Error when the store does not implement this interface - - - Passwords must use at least {0} different characters. - Error message for passwords that are based on similar characters - - - No RoleType was specified, try AddRoles<TRole>(). - Error when the IdentityBuilder.RoleType was not specified - - - Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true. - Error when the store does not implement this interface - - - No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true. - Error when there is no IPersonalDataProtector @@ -529,9 +161,6 @@ The record was modified by another user after you got the original data. the operation was canceled. - - - Known error Resource not found @@ -540,60 +169,119 @@ Too many requests - Unable to connect to the server. + Unable to connect to server. - - An error occurred while removing file + + Active - - An error occurred while uploading file + + All - - To Do item could not be found + + Alphabetical + + + Completed + + + Date + + + Edit profile + + + FullName + + + Terms + + + Profile updated successfully. + + + Confirm New Password + + + Email + + + Password + + + Your password changed successfully. + + + The confirmation link has been re-sent to your email address. + + + The reset password link has been sent to your email address. User image could not be found - - Email '{0}' is not confirmed. - Error when a email is not confirmed by the confirmation link - - - You have already requested the confirmation email. Try again in {0} + + Error You have already requested the reset password email. Try again in {0} + + + Is accept terms? + + + You must agree to our terms. + + + Gender + + + Birthdate + + + Name + + + Description + + + Price + + + You must be signed in to continue. + + + Invalid username or password + + + You have already requested the confirmation email. Try again in {0} Your email is already confirmed. - - Error + + Title - - Active + + Are you sure you want to delete {0} + + + Home + + User is locked out. + + + User {0} does not exist. + + + Email '{0}' is already taken. + Add - - - All - - - Alphabetical Already have an account? - - - Cancel - - - Check your Spam/Junk, if you could not find it in the Inbox. - - - Completed We have sent a confirmation link to your email address. @@ -602,23 +290,17 @@ Please confirm your email by clicking on the link. Confirm Your Email Address - - Confirm New Password + + Delete Account - - Date + + Are you sure you want to delete your account? Don’t have an account? Edit - - - Edit profile - - - Email Email Confirmation Failed! @@ -628,6 +310,9 @@ Please confirm your email by clicking on the link. Email Confirmed Successfully! + + + An error occurred while uploading file Please enter the email address you have been signed up with so we can send a reset password link to your email address. @@ -635,23 +320,23 @@ Please confirm your email by clicking on the link. Forget password - - Forgot password? - - - FullName + + Male Other - - - Female - - - Male GitHub Repo + + + Go to today + + + Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor app easily in the shortest time ever! + + + BlazorWeb Home Looks like the confirmation link either is invalid or has expired. @@ -659,166 +344,223 @@ Please confirm your email by clicking on the link. New Password - - No todos yet + + No Haven’t you received the confirmation email? - - - Haven’t you received the confirmation email? OR - - Password - - - Your password changed successfully. - - - I agree to the - - - Terms - - - Profile updated successfully. + + Profile Image Remove - - - The confirmation link has been re-sent to your email address. Resend email - - - Reset password - - - The reset password link has been sent to your email address. Reset password Save - - - Select your birth date - - - Sign in Sign in Sign out + + + Are you sure you want to Sign out? Sign up Sign up - - - Sort by Submit + + Term + + + I agree to the + + + Upload a new profile image + + + Yes + + + Select your birth date + + + Reset password + + + Action + + + Back + + + Cancel + + + Check your Spam/Junk, if you could not find it in the Inbox. + + + Color + + + Custom color + + + Delete + + + Id + + + Sign in + + + Sign in as different user + + + You're sign in as + + + Forgot password? + + + Female + + Add a todo + + + No todos yet Search some todo... - - Create your full featured Blazor app easily in the shortest time ever! - - - TodoTemplate Home + + Todo item could not be found Todo - - Upload a new profile image + + Delete todo item - - Do you accept terms? + + + Last 30 days product count - - Username + + Add product - - You must agree to our terms. + + Select category - - Go to today + + Total categories - - Gender + + Total products - - Terms + + Edit category - - Are you sure you want to Sign out? + + New category - - Birthdate + + Categories - - Home + + Enter category name - - Profile Image + + Enter product name - - Title + + Last 30 days category count - - You must be signed in to continue. + + Product sales - - Invalid username or password + + This chart shows the sale number of each product. - - Delete Account + + Search on name - - No + + Products count per category chart - - Yes + + This chart shows the number of products in each category. - - Are you sure you want to delete your account? + + Products - - Update + + Products percentage per category - - Are you sure you want to delete {0} + + This chart shows the percentage of products in each category. - - Delete todo item + + Categories + + + Product category + + + Products + + + Product entity could not be found + + + This category contain some products, so you can't delete it + + + Are you sure you want to delete category {0} + + + Are you sure you want to delete product {0} + + + Delete category + + + Delete product + + + Category entity could not be found - - I agree to the + + Category - - Use this page to detail your site's privacy policy. + + Default color picker - - Use this section to detail your site's privacy policy. + + Edit product - - Privacy Policy + + Dashboard + \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.Designer.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.Designer.cs new file mode 100644 index 0000000000..a06c4d199d --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.Designer.cs @@ -0,0 +1,513 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace BlazorWeb.Shared.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class IdentityStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal IdentityStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BlazorWeb.Shared.Resources.IdentityStrings", typeof(IdentityStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Optimistic concurrency failure, object has been modified.. + /// + public static string ConcurrencyFailure { + get { + return ResourceManager.GetString("ConcurrencyFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unknown failure has occurred.. + /// + public static string DefaultError { + get { + return ResourceManager.GetString("DefaultError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email '{0}' is already taken.. + /// + public static string DuplicateEmail { + get { + return ResourceManager.GetString("DuplicateEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role name '{0}' is already taken.. + /// + public static string DuplicateRoleName { + get { + return ResourceManager.GetString("DuplicateRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username '{0}' is already taken.. + /// + public static string DuplicateUserName { + get { + return ResourceManager.GetString("DuplicateUserName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email '{0}' is invalid.. + /// + public static string InvalidEmail { + get { + return ResourceManager.GetString("InvalidEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type {0} must derive from {1}<{2}>.. + /// + public static string InvalidManagerType { + get { + return ResourceManager.GetString("InvalidManagerType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided PasswordHasherCompatibilityMode is invalid.. + /// + public static string InvalidPasswordHasherCompatibilityMode { + get { + return ResourceManager.GetString("InvalidPasswordHasherCompatibilityMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The iteration count must be a positive integer.. + /// + public static string InvalidPasswordHasherIterationCount { + get { + return ResourceManager.GetString("InvalidPasswordHasherIterationCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role name '{0}' is invalid.. + /// + public static string InvalidRoleName { + get { + return ResourceManager.GetString("InvalidRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid token.. + /// + public static string InvalidToken { + get { + return ResourceManager.GetString("InvalidToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username '{0}' is invalid, can only contain letters or digits.. + /// + public static string InvalidUserName { + get { + return ResourceManager.GetString("InvalidUserName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A user with this login already exists.. + /// + public static string LoginAlreadyAssociated { + get { + return ResourceManager.GetString("LoginAlreadyAssociated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AddIdentity must be called on the service collection.. + /// + public static string MustCallAddIdentity { + get { + return ResourceManager.GetString("MustCallAddIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true.. + /// + public static string NoPersonalDataProtector { + get { + return ResourceManager.GetString("NoPersonalDataProtector", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No RoleType was specified, try AddRoles<TRole>().. + /// + public static string NoRoleType { + get { + return ResourceManager.GetString("NoRoleType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered.. + /// + public static string NoTokenProvider { + get { + return ResourceManager.GetString("NoTokenProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User security stamp cannot be null.. + /// + public static string NullSecurityStamp { + get { + return ResourceManager.GetString("NullSecurityStamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect password.. + /// + public static string PasswordMismatch { + get { + return ResourceManager.GetString("PasswordMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one digit ('0'-'9').. + /// + public static string PasswordRequiresDigit { + get { + return ResourceManager.GetString("PasswordRequiresDigit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one lowercase ('a'-'z').. + /// + public static string PasswordRequiresLower { + get { + return ResourceManager.GetString("PasswordRequiresLower", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one non alphanumeric character.. + /// + public static string PasswordRequiresNonAlphanumeric { + get { + return ResourceManager.GetString("PasswordRequiresNonAlphanumeric", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must use at least {0} different characters.. + /// + public static string PasswordRequiresUniqueChars { + get { + return ResourceManager.GetString("PasswordRequiresUniqueChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one uppercase ('A'-'Z').. + /// + public static string PasswordRequiresUpper { + get { + return ResourceManager.GetString("PasswordRequiresUpper", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must be at least {0} characters.. + /// + public static string PasswordTooShort { + get { + return ResourceManager.GetString("PasswordTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Recovery code redemption failed.. + /// + public static string RecoveryCodeRedemptionFailed { + get { + return ResourceManager.GetString("RecoveryCodeRedemptionFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} does not exist.. + /// + public static string RoleNotFound { + get { + return ResourceManager.GetString("RoleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true.. + /// + public static string StoreNotIProtectedUserStore { + get { + return ResourceManager.GetString("StoreNotIProtectedUserStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IQueryableRoleStore<TRole>.. + /// + public static string StoreNotIQueryableRoleStore { + get { + return ResourceManager.GetString("StoreNotIQueryableRoleStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IQueryableUserStore<TUser>.. + /// + public static string StoreNotIQueryableUserStore { + get { + return ResourceManager.GetString("StoreNotIQueryableUserStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IRoleClaimStore<TRole>.. + /// + public static string StoreNotIRoleClaimStore { + get { + return ResourceManager.GetString("StoreNotIRoleClaimStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserAuthenticationTokenStore<User>.. + /// + public static string StoreNotIUserAuthenticationTokenStore { + get { + return ResourceManager.GetString("StoreNotIUserAuthenticationTokenStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserAuthenticatorKeyStore<User>.. + /// + public static string StoreNotIUserAuthenticatorKeyStore { + get { + return ResourceManager.GetString("StoreNotIUserAuthenticatorKeyStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserClaimStore<TUser>.. + /// + public static string StoreNotIUserClaimStore { + get { + return ResourceManager.GetString("StoreNotIUserClaimStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserConfirmationStore<TUser>.. + /// + public static string StoreNotIUserConfirmationStore { + get { + return ResourceManager.GetString("StoreNotIUserConfirmationStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserEmailStore<TUser>.. + /// + public static string StoreNotIUserEmailStore { + get { + return ResourceManager.GetString("StoreNotIUserEmailStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserLockoutStore<TUser>.. + /// + public static string StoreNotIUserLockoutStore { + get { + return ResourceManager.GetString("StoreNotIUserLockoutStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserLoginStore<TUser>.. + /// + public static string StoreNotIUserLoginStore { + get { + return ResourceManager.GetString("StoreNotIUserLoginStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserPasswordStore<TUser>.. + /// + public static string StoreNotIUserPasswordStore { + get { + return ResourceManager.GetString("StoreNotIUserPasswordStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserPhoneNumberStore<TUser>.. + /// + public static string StoreNotIUserPhoneNumberStore { + get { + return ResourceManager.GetString("StoreNotIUserPhoneNumberStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserRoleStore<TUser>.. + /// + public static string StoreNotIUserRoleStore { + get { + return ResourceManager.GetString("StoreNotIUserRoleStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserSecurityStampStore<TUser>.. + /// + public static string StoreNotIUserSecurityStampStore { + get { + return ResourceManager.GetString("StoreNotIUserSecurityStampStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserTwoFactorRecoveryCodeStore<User>.. + /// + public static string StoreNotIUserTwoFactorRecoveryCodeStore { + get { + return ResourceManager.GetString("StoreNotIUserTwoFactorRecoveryCodeStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserTwoFactorStore<TUser>.. + /// + public static string StoreNotIUserTwoFactorStore { + get { + return ResourceManager.GetString("StoreNotIUserTwoFactorStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User already has a password set.. + /// + public static string UserAlreadyHasPassword { + get { + return ResourceManager.GetString("UserAlreadyHasPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User already in role '{0}'.. + /// + public static string UserAlreadyInRole { + get { + return ResourceManager.GetString("UserAlreadyInRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User is locked out.. + /// + public static string UserLockedOut { + get { + return ResourceManager.GetString("UserLockedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lockout is not enabled for this user.. + /// + public static string UserLockoutNotEnabled { + get { + return ResourceManager.GetString("UserLockoutNotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User {0} does not exist.. + /// + public static string UserNameNotFound { + get { + return ResourceManager.GetString("UserNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User is not in role '{0}'.. + /// + public static string UserNotInRole { + get { + return ResourceManager.GetString("UserNotInRole", resourceCulture); + } + } + } +} diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.fr.resx b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.fr.resx new file mode 100644 index 0000000000..f8293653b4 --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.fr.resx @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Le nom de rôle « {0} » est déjà pris. + + + Échec de concurrence optimiste, l'objet a été modifié. + + + Une panne inconnue s'est produite. + + + L'e-mail « {0} » est déjà pris. + + + Le nom d'utilisateur '{0}' est déjà pris. + + + L'e-mail « {0} » n'est pas valide. + + + Le type {0} doit dériver de {1}<{2}>. + + + Le PasswordHasherCompatibilityMode fourni n’est pas valide. + + + Le nombre d'itérations doit être un entier positif. + + + Le nom de rôle « {0} » n'est pas valide. + + + Jeton invalide. + + + Le nom d'utilisateur '{0}' n'est pas valide et ne peut contenir que des lettres ou des chiffres. + + + Un utilisateur avec cette connexion existe déjà. + + + AddIdentity doit être appelé sur la collection de services. + + + Aucun IUserTwoFactorTokenProvider<{0}> nommé '{1}' n'est enregistré. + + + Le cachet de sécurité de l'utilisateur ne peut pas être nul. + + + Mot de passe incorrect. + + + Les mots de passe doivent comporter au moins un chiffre (« 0 » - « 9 »). + + + Les mots de passe doivent comporter au moins une minuscule (« a » - « z »). + + + Les mots de passe doivent comporter au moins un caractère non alphanumérique. + + + Les mots de passe doivent comporter au moins une majuscule (« A » - « Z »). + + + Les mots de passe doivent comporter au moins {0} caractères. + + + Le rôle {0} n'existe pas. + + + Store n’implémente pas IQueryableRoleStore<TRole>. + + + Store n’implémente pas IQueryableUserStore<TUser>. + + + Store n’implémente pas IRoleClaimStore<TRole>. + + + Store n’implémente pas IUserAuthenticationTokenStore<User>. + + + Store n’implémente pas IUserClaimStore<TUser>. + + + Store n’implémente pas IUserConfirmationStore<TUser>. + + + Store n’implémente pas IUserEmailStore<TUser>. + + + Store n’implémente pas IUserLockoutStore<TUser>. + + + Store n’implémente pas IUserLoginStore<TUser>. + + + Store n’implémente pas IUserPasswordStore<TUser>. + + + Store n’implémente pas IUserPhoneNumberStore<TUser>. + + + Store n’implémente pas IUserRoleStore<TUser>. + + + Store n’implémente pas IUserSecurityStampStore<TUser>. + + + Store n’implémente pas IUserAuthenticatorKeyStore<User>. + + + Store n’implémente pas IUserTwoFactorStore<TUser>. + + + L'utilisation du code de récupération a échoué. + + + L'utilisateur a déjà un mot de passe défini. + + + Utilisateur déjà dans le rôle « {0} ». + + + L'utilisateur est verrouillé. + + + Le verrouillage n'est pas activé pour cet utilisateur. + + + L'utilisateur {0} n'existe pas. + + + L'utilisateur n'a pas le rôle « {0} ». + + + Store n’implémente pas IUserTwoFactorRecoveryCodeStore<User>. + + + Les mots de passe doivent utiliser au moins {0} caractères différents. + + + Aucun RoleType n'a été spécifié, essayez AddRoles<TRole>(). + + + Store n’implémente pas IProtectedUserStore<TUser> qui est requis lorsque ProtectPersonalData = true. + + + Aucun service IPersonalDataProtector n'a été enregistré, cela est requis lorsque ProtectPersonalData = true. + + \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.resx b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.resx new file mode 100644 index 0000000000..b90af58bd7 --- /dev/null +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/IdentityStrings.resx @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Optimistic concurrency failure, object has been modified. + Error when optimistic concurrency fails + + + An unknown failure has occurred. + Default identity result error message + + + Email '{0}' is already taken. + Error for duplicate emails + + + Role name '{0}' is already taken. + Error for duplicate roles + + + Username '{0}' is already taken. + Error for duplicate user names + + + Email '{0}' is invalid. + Invalid email + + + Type {0} must derive from {1}<{2}>. + Error when the manager type is not derived correctly + + + The provided PasswordHasherCompatibilityMode is invalid. + Error when the password hasher doesn't understand the format it's being asked to produce. + + + The iteration count must be a positive integer. + Error when the iteration count is < 1. + + + Role name '{0}' is invalid. + Error for invalid role names + + + Invalid token. + Error when a token is not recognized + + + Username '{0}' is invalid, can only contain letters or digits. + User names can only contain letters or digits + + + A user with this login already exists. + Error when a login already linked + + + AddIdentity must be called on the service collection. + Error when AddIdentity is not called + + + No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered. + Error when there is no IUserTwoFactorTokenProvider + + + User security stamp cannot be null. + Error when a user's security stamp is null. + + + Incorrect password. + Error when a password doesn't match + + + Passwords must have at least one digit ('0'-'9'). + Error when passwords do not have a digit + + + Passwords must have at least one lowercase ('a'-'z'). + Error when passwords do not have a lowercase letter + + + Passwords must have at least one non alphanumeric character. + Error when password does not have enough non alphanumeric characters + + + Passwords must have at least one uppercase ('A'-'Z'). + Error when passwords do not have an uppercase letter + + + Passwords must be at least {0} characters. + Error message for passwords that are too short + + + Role {0} does not exist. + Error when a role does not exist + + + Store does not implement IQueryableRoleStore<TRole>. + Error when the store does not implement this interface + + + Store does not implement IQueryableUserStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IRoleClaimStore<TRole>. + Error when the store does not implement this interface + + + Store does not implement IUserAuthenticationTokenStore<User>. + Error when the store does not implement this interface + + + Store does not implement IUserClaimStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserConfirmationStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserEmailStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserLockoutStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserLoginStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserPasswordStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserPhoneNumberStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserRoleStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserSecurityStampStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserAuthenticatorKeyStore<User>. + Error when the store does not implement this interface + + + Store does not implement IUserTwoFactorStore<TUser>. + Error when the store does not implement this interface + + + Recovery code redemption failed. + Error when a recovery code is not redeemed. + + + User already has a password set. + Error when AddPasswordAsync called when a user already has a password + + + User already in role '{0}'. + Error when a user is already in a role + + + User is locked out. + Error when a user is locked out + + + Lockout is not enabled for this user. + Error when lockout is not enabled + + + User {0} does not exist. + Error when a user does not exist + + + User is not in role '{0}'. + Error when a user is not in the role + + + Store does not implement IUserTwoFactorRecoveryCodeStore<User>. + Error when the store does not implement this interface + + + Passwords must use at least {0} different characters. + Error message for passwords that are based on similar characters + + + No RoleType was specified, try AddRoles<TRole>(). + Error when the IdentityBuilder.RoleType was not specified + + + Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true. + Error when the store does not implement this interface + + + No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true. + Error when there is no IPersonalDataProtector + + \ No newline at end of file diff --git a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/StringLocalizerProvider.cs b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/StringLocalizerProvider.cs index 6cb4b743d2..20ad84b646 100644 --- a/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/StringLocalizerProvider.cs +++ b/src/Templates/BlazorWeb/Bit.BlazorWeb/src/BlazorWeb.Shared/Resources/StringLocalizerProvider.cs @@ -1,7 +1,6 @@ using System.Reflection; namespace BlazorWeb.Shared.Resources; - public static class StringLocalizerProvider { public static IStringLocalizer ProvideLocalizer(Type dtoType, IStringLocalizerFactory factory) diff --git a/src/Templates/AdminPanel/Bit.AdminPanel.ProjectTemplate.csproj b/src/Templates/Boilerplate/Bit.Boilerplate.ProjectTemplate.csproj similarity index 66% rename from src/Templates/AdminPanel/Bit.AdminPanel.ProjectTemplate.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate.ProjectTemplate.csproj index de4f3de9fa..eac636eb7a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel.ProjectTemplate.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate.ProjectTemplate.csproj @@ -10,29 +10,26 @@ true - Bit.AdminPanel + Bit.Boilerplate Template - bit AdminPanel - A template for creating a AdminPanel app base on the Bit-Platform - Bit;c#;asp.net;core;template;web;blazor + bit Boilerplate + A template for creating a full featured app base on the bit platform + bit;c#;asp;template;web;blazor;ef;api;rest;maui; Copyright © bit platform 2023 bit-icon-512.png - + - + True \ - - - True \ diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/cd.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/cd.yml rename to src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml index a8819a9119..d108da98fb 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/cd.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/cd.yml @@ -5,11 +5,11 @@ trigger: variables: WEB_APP_DEPLOYMENT_TYPE: 'Spa' - APP_SERVICE_NAME: 'app-service-ad-test' - AZURE_SUBSCRIPTION: 'ad-test-service-connection' # https://learn.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#azure-resource-manager-service-connection + APP_SERVICE_NAME: 'app-service-bp-test' + AZURE_SUBSCRIPTION: 'bp-test-service-connection' # https://learn.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#azure-resource-manager-service-connection ConnectionStrings.SqlServerConnectionString: $(DB_CONNECTION_STRING) AppSettings.JwtSettings.IdentityCertificatePassword: $(API_IDENTITY_CERTIFICATE_PASSWORD) - ApiServerAddress: 'https://adminpanel.bitplatform.dev/api/' + ApiServerAddress: 'https://bp.bitplatform.dev/api/' jobs: @@ -35,7 +35,7 @@ jobs: displayName: 'Switch to blazor web assembly' inputs: targetType: 'inline' - script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/AdminPanel.Client.Web.csproj + script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Boilerplate.Client.Web.csproj - task: Bash@3 displayName: 'Install wasm' @@ -55,13 +55,13 @@ jobs: displayName: 'Generate CSS/JS files' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore' + script: 'dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - task: Bash@3 displayName: 'Publish' inputs: targetType: 'inline' - script: 'dotnet publish src/Server/Api/AdminPanel.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o api-web' + script: 'dotnet publish src/Server/Api/Boilerplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o api-web' - task: PublishPipelineArtifact@1 displayName: Upload api-web artifact @@ -74,7 +74,7 @@ jobs: displayName: 'Build migrations bundle' inputs: targetType: 'inline' - script: 'cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project AdminPanel.Server.Api.csproj' + script: 'cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project Boilerplate.Server.Api.csproj' - task: PublishPipelineArtifact@1 displayName: Upload ef migrations bundle @@ -177,13 +177,13 @@ jobs: displayName: 'Generate CSS/JS files' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore' + script: 'dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - task: Bash@3 displayName: 'Build exe' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0' - task: PublishPipelineArtifact@1 displayName: Upload artifact @@ -217,13 +217,13 @@ jobs: script: cd src && dotnet workload install maui-android - task: DownloadSecureFile@1 - displayName: Download AdminPanel keystore file + displayName: Download Boilerplate keystore file name: AndroidKeyStore inputs: - secureFile: 'AdminPanel.keystore' + secureFile: 'Boilerplate.keystore' - script: | - cp $(AndroidKeyStore.secureFilePath) src/Client/App/AdminPanel.keystore + cp $(AndroidKeyStore.secureFilePath) src/Client/App/Boilerplate.keystore failOnStderr: true displayName: Copy keystore to app project folder @@ -238,19 +238,19 @@ jobs: displayName: 'Generate CSS/JS files' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore' + script: 'dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - task: Bash@3 displayName: 'Build aab' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=AdminPanel -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Boilerplate.keystore" -p:AndroidSigningKeyAlias=Boilerplate -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' - task: Bash@3 displayName: 'Build apk' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=AdminPanel -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Boilerplate.keystore" -p:AndroidSigningKeyAlias=Boilerplate -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' - script: | mkdir drop @@ -300,13 +300,13 @@ jobs: displayName: 'Generate CSS/JS files' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore' + script: 'dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - task: Bash@3 displayName: 'Build pkg' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst' - script: | mkdir drop diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/ci.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/ci.yml similarity index 77% rename from src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/ci.yml rename to src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/ci.yml index 7cd14bb79d..c2320b9666 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.azure-devops/workflows/ci.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.azure-devops/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Client/Web/AdminPanel.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' + script: 'dotnet build src/Client/Web/Boilerplate.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' - job: build_blazor_hybrid_android displayName: 'build blazor hybrid (android)' @@ -59,7 +59,7 @@ jobs: displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android' - job: build_blazor_hybrid_windows displayName: 'build blazor hybrid (windows)' @@ -89,7 +89,7 @@ jobs: displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0' - job: build_blazor_hybrid_iOS displayName: 'build blazor hybrid (iOS)' @@ -119,7 +119,7 @@ jobs: displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios' - job: build_blazor_hybrid_maccatalyst displayName: 'build blazor hybrid (maccatalyst)' @@ -149,7 +149,7 @@ jobs: displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst' + script: 'dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst' - job: build_blazor_api_wasm displayName: 'build blazor api + web assembly' @@ -179,10 +179,10 @@ jobs: displayName: 'Switch to blazor web assembly' inputs: targetType: 'inline' - script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/AdminPanel.Client.Web.csproj + script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Boilerplate.Client.Web.csproj - task: Bash@3 displayName: 'Build' inputs: targetType: 'inline' - script: 'dotnet build src/Server/Api/AdminPanel.Server.Api.csproj -p:Configuration=Release -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' \ No newline at end of file + script: 'dotnet build src/Server/Api/Boilerplate.Server.Api.csproj -p:Configuration=Release -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.editorconfig b/src/Templates/Boilerplate/Bit.Boilerplate/.editorconfig similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/.editorconfig rename to src/Templates/Boilerplate/Bit.Boilerplate/.editorconfig diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/cd.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/cd.yml rename to src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml index ced86ac91c..a31752aede 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/cd.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/cd.yml @@ -1,12 +1,12 @@ -name: AdminPanel CD +name: Boilerplate CD # https://bitplatform.dev/templates/dev-ops env: WEB_APP_DEPLOYMENT_TYPE: 'Spa' - API_SERVER_ADDRESS: 'https://adminpanel.bitplatform.dev/api/' - APP_SERVICE_NAME: 'app-service-ad-test' - IOS_CODE_SIGN_PROVISION: 'AdminPanel' + API_SERVER_ADDRESS: 'https://bp.bitplatform.dev/api/' + APP_SERVICE_NAME: 'app-service-bp-test' + IOS_CODE_SIGN_PROVISION: 'Boilerplate' on: workflow_dispatch: @@ -37,20 +37,20 @@ jobs: node-version: 18 - name: Switch to blazor web assembly - run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/AdminPanel.Client.Web.csproj + run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Boilerplate.Client.Web.csproj - name: Install wasm run: cd src && dotnet workload install wasm-tools wasm-experimental - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Publish - run: dotnet publish src/Server/Api/AdminPanel.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web + run: dotnet publish src/Server/Api/Boilerplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web - name: Build migrations bundle run: | - cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project AdminPanel.Server.Api.csproj + cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project Boilerplate.Server.Api.csproj - name: Upload ef migrations bundle uses: actions/upload-artifact@v3 @@ -147,10 +147,10 @@ jobs: run: cd src && dotnet workload install maui - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build exe - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - name: Upload artifact uses: actions/upload-artifact@v2 @@ -180,7 +180,7 @@ jobs: uses: timheuer/base64-to-file@v1 with: fileDir: './src/Client/App/' - fileName: 'AdminPanel.keystore' + fileName: 'Boilerplate.keystore' encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} - name: Update appsettings.json api server address @@ -194,13 +194,13 @@ jobs: run: cd src && dotnet workload install maui-android - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build aab - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=AdminPanel -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Boilerplate.keystore" -p:AndroidSigningKeyAlias=Boilerplate -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android - name: Build apk - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="AdminPanel.keystore" -p:AndroidSigningKeyAlias=AdminPanel -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="Boilerplate.keystore" -p:AndroidSigningKeyAlias=Boilerplate -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android - name: Upload artifact uses: actions/upload-artifact@v2 @@ -237,10 +237,10 @@ jobs: run: cd src && dotnet workload install maui - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build pkg - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst - name: Upload artifact uses: actions/upload-artifact@v2 @@ -296,16 +296,16 @@ jobs: - name: Download Apple Provisioning Profiles uses: Apple-Actions/download-provisioning-profiles@v1 with: - bundle-id: 'com.bitplatform.AdminPanel.Template' + bundle-id: 'com.bitplatform.BP.Template' issuer-id: ${{ secrets.APPSTORE_API_KEY_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY }} - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Build ipa - run: dotnet publish src/Client/App/AdminPanel.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios + run: dotnet publish src/Client/App/Boilerplate.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios - name: Upload artifact uses: actions/upload-artifact@v2 @@ -347,10 +347,10 @@ jobs: run: awk '//{sub(">.*BlazorElectron temp.xml && mv temp.xml src/Directory.Build.props - name: Generate CSS/JS files - run: dotnet build src/Client/Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore + run: dotnet build src/Client/Core/Boilerplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - name: Restore electron .net - run: dotnet build src/Client/Web/AdminPanel.Client.Web.csproj -t:BeforeBuildTasks + run: dotnet build src/Client/Web/Boilerplate.Client.Web.csproj -t:BeforeBuildTasks - name: Build app image run: cd src/Client/Web/ && dotnet electronize build /target linux diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/ci.yml b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/ci.yml similarity index 74% rename from src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/ci.yml rename to src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/ci.yml index 9493d28b17..178e376c58 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.github/workflows/ci.yml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: AdminPanel CI +name: Boilerplate CI # https://bitplatform.dev/templates/dev-ops @@ -31,7 +31,7 @@ jobs: node-version: 18 - name: Build - run: dotnet build src/Client/Web/AdminPanel.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" + run: dotnet build src/Client/Web/Boilerplate.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" build-blazor-hybrid-android: name: build blazor hybrid (android) @@ -55,7 +55,7 @@ jobs: run: cd src && dotnet workload install maui-android - name: Build - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android build-blazor-hybrid-windows: name: build blazor hybrid (windows) @@ -79,7 +79,7 @@ jobs: run: cd src && dotnet workload install maui - name: Build - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0 + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0 build-blazor-hybrid-iOS: name: build blazor hybrid (iOS) @@ -103,7 +103,7 @@ jobs: run: cd src && dotnet workload install maui - name: Build - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios build-blazor-hybrid-maccatalyst: name: build blazor hybrid (maccatalyst) @@ -127,7 +127,7 @@ jobs: run: cd src && dotnet workload install maui - name: Build - run: dotnet build src/Client/App/AdminPanel.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst + run: dotnet build src/Client/App/Boilerplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst build-blazor-api-wasm: name: build blazor api + web assembly @@ -148,10 +148,10 @@ jobs: node-version: 18 - name: Switch to blazor wasm - run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/AdminPanel.Client.Web.csproj + run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/Boilerplate.Client.Web.csproj - name: Install wasm run: cd src && dotnet workload install wasm-tools wasm-experimental - name: Build - run: dotnet build src/Server/Api/AdminPanel.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" \ No newline at end of file + run: dotnet build src/Server/Api/Boilerplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.gitignore b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/.gitignore rename to src/Templates/Boilerplate/Bit.Boilerplate/.gitignore index 9f87eed23e..cbe3a54d57 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.gitignore +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore @@ -221,7 +221,7 @@ ModelManifest.xml profile.arm.json -# AdminPanel +# Boilerplate *.map *Resource.designer.cs /**/*.css @@ -231,4 +231,4 @@ custom.aprof /src/Client/Core/wwwroot/scripts/app*.js -/src/Server/Api/AdminPanelDb.db* \ No newline at end of file +/src/Server/Api/BoilerplateDb.db* \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/.template.config/template.json b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json similarity index 64% rename from src/Templates/AdminPanel/Bit.AdminPanel/.template.config/template.json rename to src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json index 8fe79e0e62..a580ced5ed 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/.template.config/template.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json @@ -10,10 +10,10 @@ "language": "C#", "type": "solution" }, - "identity": "Bit.AdminPanel", - "name": "bit AdminPanel", - "shortName": "bit-admin", - "sourceName": "AdminPanel", + "identity": "Bit.Boilerplate", + "name": "bit Boilerplate", + "shortName": "bit-bp", + "sourceName": "Boilerplate", "preferNameDirectory": true, "symbols": { //Guid generator for App Id @@ -77,6 +77,26 @@ "description": "Other" } ] + }, + "sample": { + "displayName": "Sample", + "type": "parameter", + "datatype": "choice", + "defaultValue": "AdminPanel", + "choices": [ + { + "choice": "AdminPanel", + "description": "AdminPanel" + }, + { + "choice": "Todo", + "description": "Todo app" + }, + { + "choice": "None", + "description": "None" + } + ] } }, "postActions": [], @@ -111,6 +131,31 @@ { "condition": "(pipeline != Azure)", "exclude": [ ".azure-devops/**" ] + }, + { + "condition": "(sample != AdminPanel)", + "exclude": [ "src/Shared/Dtos/Categories/**", + "src/Shared/Dtos/Dashboard/**", + "src/Shared/Dtos/Products/**", + "src/Server/Api/Controllers/Categories/**", + "src/Server/Api/Controllers/Products/**", + "src/Server/Api/Data/Configurations/Category/**", + "src/Server/Api/Data/Configurations/Product/**", + "src/Server/Api/Mappers/CategoriesMapper.cs", + "src/Server/Api/Mappers/ProductsMapper.cs", + "src/Server/Api/Models/Categories/**", + "src/Server/Api/Models/Products/**", + "src/Client/Core/Pages/Categories/**", + "src/Client/Core/Pages/Dashboard/**", + "src/Client/Core/Pages/Products/**"] + }, + { + "condition": "(sample != Todo)", + "exclude": [ "src/Shared/Dtos/Todo/**", + "src/Server/Api/Controllers/Todo/**", + "src/Server/Api/Mappers/TodoMapper.cs", + "src/Server/Api/Models/Todo/**", + "src/Client/Core/Pages/Todo/**"] } ] } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/AdminPanel.sln b/src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.sln similarity index 85% rename from src/Templates/AdminPanel/Bit.AdminPanel/AdminPanel.sln rename to src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.sln index 99fa9063b7..a463a27e53 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/AdminPanel.sln +++ b/src/Templates/Boilerplate/Bit.Boilerplate/Boilerplate.sln @@ -19,17 +19,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A97138 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infra", "Infra", "{6271885D-B26B-49D2-AFC5-010A53B9D7BE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Shared", "src\Shared\AdminPanel.Shared.csproj", "{26430D8C-32CB-4142-AC1A-33486A58DA01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Shared", "src\Shared\Boilerplate.Shared.csproj", "{26430D8C-32CB-4142-AC1A-33486A58DA01}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Iac", "src\Infra\Iac\AdminPanel.Iac.csproj", "{E409C340-6F88-414A-A956-29D46B7C71C8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Iac", "src\Infra\Iac\Boilerplate.Iac.csproj", "{E409C340-6F88-414A-A956-29D46B7C71C8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Server.Api", "src\Server\Api\AdminPanel.Server.Api.csproj", "{8CC3E410-B716-4F4D-89C7-3392CA624439}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Server.Api", "src\Server\Api\Boilerplate.Server.Api.csproj", "{8CC3E410-B716-4F4D-89C7-3392CA624439}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.Core", "src\Client\Core\AdminPanel.Client.Core.csproj", "{FC60C68D-8E8D-494B-8D60-0C8D83A472E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.Core", "src\Client\Core\Boilerplate.Client.Core.csproj", "{FC60C68D-8E8D-494B-8D60-0C8D83A472E7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.Web", "src\Client\Web\AdminPanel.Client.Web.csproj", "{13D6A40B-8B8B-41F0-AB62-3F5F1CB58A1B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.Web", "src\Client\Web\Boilerplate.Client.Web.csproj", "{13D6A40B-8B8B-41F0-AB62-3F5F1CB58A1B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminPanel.Client.App", "src\Client\App\AdminPanel.Client.App.csproj", "{22816913-64D5-4AE8-9B34-6F188B71FAD1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Boilerplate.Client.App", "src\Client\App\Boilerplate.Client.App.csproj", "{22816913-64D5-4AE8-9B34-6F188B71FAD1}" EndProject #if (pipeline == "Azure") Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-devops", ".azure-devops", "{AEE266C3-9E0B-4C41-A491-54D339708C06}" diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/Clean.bat b/src/Templates/Boilerplate/Bit.Boilerplate/Clean.bat similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/Clean.bat rename to src/Templates/Boilerplate/Bit.Boilerplate/Clean.bat diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/Clean.sh b/src/Templates/Boilerplate/Bit.Boilerplate/Clean.sh similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/Clean.sh rename to src/Templates/Boilerplate/Bit.Boilerplate/Clean.sh diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/global.json b/src/Templates/Boilerplate/Bit.Boilerplate/global.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/global.json rename to src/Templates/Boilerplate/Bit.Boilerplate/global.json diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml index 459abe02a0..b5a927b0ad 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml @@ -1,9 +1,9 @@  diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml.cs similarity index 86% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml.cs index cbb6c6469b..9449e9d6e4 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/App.xaml.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/App.xaml.cs @@ -1,6 +1,6 @@ [assembly: XamlCompilation(XamlCompilationOptions.Compile)] -namespace AdminPanel.Client.App; +namespace Boilerplate.Client.App; public partial class App { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/AdminPanel.Client.App.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Boilerplate.Client.App.csproj similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/AdminPanel.Client.App.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Boilerplate.Client.App.csproj index e04804b4ee..14fa74e1fd 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/AdminPanel.Client.App.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Boilerplate.Client.App.csproj @@ -12,10 +12,10 @@ false - AdminPanel + Boilerplate - com.bitplatform.AdminPanel.Template + com.bitplatform.BP.Template AC87AA5B-4B37-4E52-8468-2D5DF24AF256 @@ -40,7 +40,9 @@ true True - all + + all + @@ -55,9 +57,9 @@ - - - + + + @@ -70,7 +72,7 @@ - + @@ -98,7 +100,7 @@ - + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs index 8c47f821a9..f87f6fdda2 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs @@ -1,6 +1,6 @@ //-:cnd:noEmit -using AdminPanel.Client.App; -using AdminPanel.Client.App.Services; +using Boilerplate.Client.App; +using Boilerplate.Client.App.Services; namespace Microsoft.Extensions.DependencyInjection; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/MainPage.xaml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/MainPage.xaml similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/MainPage.xaml rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/MainPage.xaml index 8d8525b3c2..920dd6c93b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/MainPage.xaml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/MainPage.xaml @@ -1,9 +1,9 @@ - + - - + + appicon.xhigh.png diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml similarity index 77% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml index e2d14b3386..4d88a395f9 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml @@ -1,5 +1,5 @@  diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml.cs similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml.cs index 6d799376c1..339c21d897 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/App.xaml.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/App.xaml.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.App.Platforms.Windows; +namespace Boilerplate.Client.App.Platforms.Windows; public partial class App { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/Package.appxmanifest b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/Package.appxmanifest similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/Package.appxmanifest rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/Package.appxmanifest diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/app.manifest b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/app.manifest similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/app.manifest rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/app.manifest index 774ef2733e..0d6d9e150d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/Windows/app.manifest +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/Windows/app.manifest @@ -1,6 +1,6 @@ - + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/AppDelegate.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/AppDelegate.cs similarity index 79% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/AppDelegate.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/AppDelegate.cs index 4eaf2ad218..ad896c1514 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/AppDelegate.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/AppDelegate.cs @@ -1,6 +1,6 @@ using Foundation; -namespace AdminPanel.Client.App.Platforms.iOS; +namespace Boilerplate.Client.App.Platforms.iOS; [Register(nameof(AppDelegate))] public class AppDelegate : MauiUIApplicationDelegate diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Info.plist b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Info.plist similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Info.plist rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Info.plist diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Program.cs similarity index 76% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Program.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Program.cs index 9b87b7aff8..04fd1a413f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Platforms/iOS/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Platforms/iOS/Program.cs @@ -1,6 +1,6 @@ using UIKit; -namespace AdminPanel.Client.App.Platforms.iOS; +namespace Boilerplate.Client.App.Platforms.iOS; public class Program { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Properties/launchSettings.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Properties/launchSettings.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Properties/launchSettings.json diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/AppIcon/appicon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/AppIcon/appicon.svg new file mode 100644 index 0000000000..cef77f749f --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/AppIcon/appicon.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/Raw/AboutAssets.txt b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/Raw/AboutAssets.txt similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Resources/Raw/AboutAssets.txt rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/Raw/AboutAssets.txt diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/Splash/splash.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/Splash/splash.svg new file mode 100644 index 0000000000..1b166f3917 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Resources/Splash/splash.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppDeviceCoordinator.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppDeviceCoordinator.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppDeviceCoordinator.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppDeviceCoordinator.cs index bff1bc079d..c5a6f9d026 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppDeviceCoordinator.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppDeviceCoordinator.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Client.App.Services; +namespace Boilerplate.Client.App.Services; /// /// More info at diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppExceptionHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppExceptionHandler.cs similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppExceptionHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppExceptionHandler.cs index 608a969b5c..6ccfc72f06 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/Services/AppExceptionHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/Services/AppExceptionHandler.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.App.Services; +namespace Boilerplate.Client.App.Services; /// /// You can easily install AppCenter, Firebase Crashlytics, and other exception tracking libraries in your Client.App project. diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/wwwroot/index.html similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/wwwroot/index.html rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/wwwroot/index.html index b876e0c810..043b10126a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/App/wwwroot/index.html +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/App/wwwroot/index.html @@ -16,9 +16,11 @@ + - - + + + @@ -68,7 +70,7 @@ - + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs similarity index 72% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs index 9623fd7dc6..ae16f51062 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs @@ -6,7 +6,7 @@ public static class IConfigurationBuilderExtensions { public static void AddClientConfigurations(this IConfigurationBuilder builder) { - var assembly = Assembly.Load("AdminPanel.Client.Core"); - builder.AddJsonStream(assembly.GetManifestResourceStream("AdminPanel.Client.Core.appsettings.json")!); + var assembly = Assembly.Load("Boilerplate.Client.Core"); + builder.AddJsonStream(assembly.GetManifestResourceStream("Boilerplate.Client.Core.appsettings.json")!); } } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IConfigurationExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IConfigurationExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Extensions/IConfigurationExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IConfigurationExtensions.cs diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IListExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IListExtensions.cs new file mode 100644 index 0000000000..8f50eb4679 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IListExtensions.cs @@ -0,0 +1,23 @@ +namespace System.Collections.Generic; + +public static class IListExtensions +{ + // Basically a Polyfill since we now expose IList instead of List + // which is better but IList doesn't have AddRange + public static void AddRange(this IList list, IEnumerable items) + { + ArgumentNullException.ThrowIfNull(list); + ArgumentNullException.ThrowIfNull(items); + + if (list is List asList) + { + asList.AddRange(items); + return; + } + + foreach (T item in items) + { + list.Add(item); + } + } +} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs similarity index 95% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs index 0616499d86..6440cd658c 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/IServiceCollectionExtensions.cs @@ -1,5 +1,6 @@ //-:cnd:noEmit -using TodoTemplate.Client.Core.Services.HttpMessageHandlers; + +using Boilerplate.Client.Core.Services.HttpMessageHandlers; namespace Microsoft.Extensions.DependencyInjection; diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/JsRuntimeExtension.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/JsRuntimeExtension.cs similarity index 95% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/JsRuntimeExtension.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/JsRuntimeExtension.cs index 7c8acd4e15..a279c37811 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/JsRuntimeExtension.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Extensions/JsRuntimeExtension.cs @@ -1,6 +1,6 @@ namespace Microsoft.JSInterop; -public static class JsRuntimeExtension +public static class JSRuntimeExtension { /// /// To disable the scrollbar of the body when showing the modal, so the modal can be always shown in the viewport without being scrolled out. diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor new file mode 100644 index 0000000000..da726dec3f --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor @@ -0,0 +1,94 @@ +@page "/add-edit-category/{Id:int?}" + +@inherits AppComponentBase + + + @if (_category.Id == 0) + { + @Localizer[nameof(AppStrings.AddCategory)] + } + else + { + @Localizer[nameof(AppStrings.EditCategory)] + } + + +
+ + + + + @if (_isLoading) + { +
+ +
+ } + + @if (string.IsNullOrEmpty(_saveMessage) is false) + { + @_saveMessage + } + +
+ + +
+ +
+ @Localizer[nameof(AppStrings.Color)] +
+ @foreach (var color in new[] { "#FFCD56", "#FF6384", "#4BC0C0", "#FF9124", "#2B88D8", "#C7E0F4" }) + { +
+ @if (_isColorPickerOpen) + { +
+ + @Localizer[nameof(AppStrings.DefaultColorPicker)] + +
+ } + +
+ + + @Localizer[nameof(AppStrings.Save)] + + +
+
+ diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs new file mode 100644 index 0000000000..4c4cbb4f3a --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.cs @@ -0,0 +1,83 @@ +using Boilerplate.Shared.Dtos.Categories; + +namespace Boilerplate.Client.Core.Pages.Categories; + +[Authorize] +public partial class AddOrEditCategoryPage +{ + [Parameter] public int? Id { get; set; } + + private bool _isLoading; + private bool _isSaving; + private string? _saveMessage; + private bool _isColorPickerOpen; + private BitMessageBarType _saveMessageType; + private CategoryDto _category = new(); + + protected override async Task OnInitAsync() + { + await LoadCategory(); + } + + private async Task LoadCategory() + { + if (Id is null) return; + + _isLoading = true; + + try + { + _category = await HttpClient.GetFromJsonAsync($"Category/Get/{Id}", AppJsonContext.Default.CategoryDto) ?? new(); + } + finally + { + _isLoading = false; + } + } + + private void SetCategoryColor(string color) + { + _category.Color = color; + } + + private void ToggleColorPicker() + { + _isColorPickerOpen = !_isColorPickerOpen; + } + + private async Task Save() + { + if (_isSaving) return; + + _isSaving = true; + + try + { + if (_category.Id == 0) + { + await HttpClient.PostAsJsonAsync("Category/Create", _category, AppJsonContext.Default.CategoryDto); + } + else + { + await HttpClient.PutAsJsonAsync("Category/Update", _category, AppJsonContext.Default.CategoryDto); + } + + NavigationManager.NavigateTo("categories"); + } + catch (ResourceValidationException e) + { + _saveMessageType = BitMessageBarType.Error; + + _saveMessage = string.Join(Environment.NewLine, e.Payload.Details.SelectMany(d => d.Errors).Select(e => e.Message)); + } + catch (KnownException e) + { + _saveMessage = e.Message; + _saveMessageType = BitMessageBarType.Error; + } + finally + { + _isSaving = false; + } + } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.scss similarity index 56% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.scss index b7bdbadc6f..5525116163 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/AddOrEditCategoryPage.razor.scss @@ -29,6 +29,10 @@ justify-content: center; } +::deep .back-btn { + margin-right: rem2(12px); +} + .page-title { margin: 0; font-weight: 700; @@ -50,56 +54,54 @@ .form-input-container { width: 100%; - max-width: rem2(388px); - margin-bottom: rem2(30px); -} - -.form-message-bar { - top: 0; - left: 0; - position: absolute; - border-radius: rem2(4px) rem2(4px) 0 0; + margin-bottom: rem2(24px); } -.form-profile-container { - width: 100%; +.color-container { display: flex; + flex-flow: row wrap; align-items: center; - flex-flow: row nowrap; - margin-bottom: rem2(33px); justify-content: flex-start; } -.form-input-error { - font-size: rem2(12px); - line-height: rem2(16px); - color: $bit-color-state-error; -} - -.form-choice-container { - width: 100%; - max-width: rem2(340px); - margin-bottom: rem2(19px); - - @include md { - margin-bottom: rem2(25px); - } +.color-btn { + border: none; + outline: none; + cursor: pointer; + width: rem2(32px); + height: rem2(32px); + margin-right: rem2(12px); + border-radius: rem2(2px); @include sm { - max-width: 100%; + width: rem2(28px); + height: rem2(28px); + margin-right: rem2(8px); + margin-bottom: rem2(8px); } } -::deep { - form { - width: 100%; - } +.color-btn--active { + background-size: rem2(20px); + background-position: center; + background-repeat: no-repeat; + background-image: url('images/icons/checkmark-icon.svg'); +} - .back-btn { - margin-right: rem2(10px); - } +.color-square { + width: rem2(24px); + height: rem2(24px); + display: inline-block; + margin-right: rem2(8px); + border-radius: rem2(2px); +} - .validation-message { - color: $bit-color-state-error; - } +.custom-color-container { + display: flex; + align-items: center; + justify-content: flex-start; +} + +::deep .validation-message { + color: $bit-color-state-error; } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor new file mode 100644 index 0000000000..414540bed5 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor @@ -0,0 +1,45 @@ +@page "/categories" +@using Boilerplate.Shared.Dtos.Categories +@inherits AppComponentBase + +@Localizer[nameof(AppStrings.CategoriesPageTitle)] + +
+ @if (_isLoading) + { +
+ +
+ } + +
+

@Localizer[nameof(AppStrings.Categories)]

+ @Localizer[nameof(AppStrings.AddCategory)] +
+ +
+ + + + + + + + + + + + + + + + +
+
+ + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs new file mode 100644 index 0000000000..29a474d22b --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.cs @@ -0,0 +1,109 @@ +//-:cnd:noEmit +using Boilerplate.Shared.Dtos.Categories; + +namespace Boilerplate.Client.Core.Pages.Categories; + +[Authorize] +public partial class CategoriesPage +{ + private bool _isLoading; + private string _categoryNameFilter = string.Empty; + + private ConfirmMessageBox _confirmMessageBox = default!; + private BitDataGrid? _dataGrid; + private BitDataGridItemsProvider _categoriesProvider = default!; + private BitDataGridPaginationState _pagination = new() { ItemsPerPage = 10 }; + + private string CategoryNameFilter + { + get => _categoryNameFilter; + set + { + _categoryNameFilter = value; + _ = RefreshData(); + } + } + + protected override async Task OnInitAsync() + { + PrepareGridDataProvider(); + + await base.OnInitAsync(); + } + + private void PrepareGridDataProvider() + { + _categoriesProvider = async req => + { + _isLoading = true; + + try + { + // https://docs.microsoft.com/en-us/odata/concepts/queryoptions-overview + var query = new Dictionary() + { + { "$top", req.Count ?? 10 }, + { "$skip", req.StartIndex } + }; + + if (string.IsNullOrEmpty(_categoryNameFilter) is false) + { + query.Add("$filter", $"contains(Name,'{_categoryNameFilter}')"); + } + + if (req.GetSortByProperties().Any()) + { + query.Add("$orderby", string.Join(", ", req.GetSortByProperties().Select(p => $"{p.PropertyName} {(p.Direction == BitDataGridSortDirection.Ascending ? "asc" : "desc")}"))); + } + + var url = NavigationManager.GetUriWithQueryParameters("Category/GetCategories", query); + + var data = await HttpClient.GetFromJsonAsync(url, AppJsonContext.Default.PagedResultCategoryDto) ?? new(); + + return BitDataGridItemsProviderResult.From(data.Items!, (int)data.TotalCount); + } + catch + { + return BitDataGridItemsProviderResult.From(new List { }, 0); + } + finally + { + _isLoading = false; + + StateHasChanged(); + } + }; + } + + private async Task RefreshData() + { + await _dataGrid!.RefreshDataAsync(); + } + + private void CreateCategory() + { + NavigationManager.NavigateTo("add-edit-category"); + } + + private void EditCategory(CategoryDto category) + { + NavigationManager.NavigateTo($"add-edit-category/{category.Id}"); + } + + private async Task DeleteCategory(CategoryDto category) + { + var confirmed = await _confirmMessageBox.Show(Localizer.GetString(nameof(AppStrings.AreYouSureWannaDeleteCategory), category.Name ?? string.Empty), + Localizer[nameof(AppStrings.DeleteCategory)]); + + if (confirmed) + { + await HttpClient.DeleteAsync($"Category/Delete/{category.Id}"); + + await RefreshData(); + } + } +} + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.scss new file mode 100644 index 0000000000..a7df945825 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Categories/CategoriesPage.razor.scss @@ -0,0 +1,140 @@ +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; +@import '../../Styles/abstracts/_bit-css-variables.scss'; + +.page-container { + width: 100%; + height: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + justify-content: flex-start; +} + +.loading-contianer { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.page-row { + width: 100%; + display: flex; + align-items: center; + flex-flow: row nowrap; + margin-bottom: rem2(24px); + justify-content: space-between; +} + +.page-title { + margin: 0; + font-weight: 600; + font-size: rem2(20px); + line-height: rem2(28px); + + @include sm { + font-size: rem2(18px); + line-height: rem2(24px); + } +} + +.grid { + width: 100%; + overflow: auto; + display: inline-flex; + flex-direction: column; + border-radius: rem2(2px); + border: rem2(1px) solid $bit-color-border-secondary; + + ::deep { + .id-col { + width: 90px; + } + + .bitdatagrid th .col-options-button { + cursor: help; + } + } +} + +::deep table { + min-width: 100%; + border-spacing: 0; +} + +::deep thead { + height: rem2(43px); + background-color: $bit-color-background-primary; +} + +::deep tr { + height: rem2(43px); +} + +::deep th { + font-weight: 600; + padding: 0 rem2(12px); + font-size: rem2(14px); + line-height: rem2(20px); +} + +::deep td { + font-weight: 400; + font-size: rem2(12px); + line-height: rem2(16px); + border-top: rem2(1px) solid $bit-color-border-secondary; +} + +::deep tr td:first-child { + font-size: rem2(14px); + line-height: rem2(20px); + padding-left: rem2(12px); +} + +::deep .col-options-button { + &:hover { + background-color: transparent; + } +} + +::deep .col-title { + &:hover { + background-color: transparent !important; + } +} + +::deep .category-search-box { + width: 100%; + max-width: rem2(300px); + margin-bottom: rem2(24px); +} + +::deep th:nth-child(2) .col-options-button { + cursor: pointer; + background-image: none; + + &:before { + content: "\E721"; + font-style: normal; + font-weight: normal; + display: inline-block; + font-family: 'Fabric MDL2'; + } +} + +::deep .bitdatagrid-paginator { + margin-top: 0; + height: rem2(43px); + padding: 0 rem2(12px); + font-size: rem2(14px); + border-top: rem2(1px) solid $bit-color-border-secondary; +} + +.color-box { + display: block; + width: rem2(24px); + height: rem2(24px); + border-radius: rem2(2px); +} \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor new file mode 100644 index 0000000000..6f30d8fc5a --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor @@ -0,0 +1,15 @@ +@page "/dashboard" +@inherits AppComponentBase + +
+ + +
+ + +
+ +
+ +
+
\ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.cs new file mode 100644 index 0000000000..42e6a2ef8e --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.cs @@ -0,0 +1,6 @@ +namespace Boilerplate.Client.Core.Pages.Dashboard; + +[Authorize] +public partial class DashboardPage +{ +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.scss new file mode 100644 index 0000000000..99d089f16c --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/DashboardPage.razor.scss @@ -0,0 +1,17 @@ +@import '../../Styles/abstracts/_functions.scss'; + +.page-container { + width: 100%; + height: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + justify-content: flex-start; +} + +.page-row { + width: 100%; + display: flex; + gap: rem2(24px); + flex-flow: row wrap; +} \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor new file mode 100644 index 0000000000..220ee30d2d --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor @@ -0,0 +1,56 @@ +@inherits AppComponentBase + +
+
+
+ @if (_isLoading) + { + + } + else + { + @_data.Last30DaysProductCount + } +
+
@Localizer[nameof(AppStrings.Last30DaysProductCount)]
+
+
+
+ @if (_isLoading) + { + + } + else + { + @_data.TotalProducts + } +
+
@Localizer[nameof(AppStrings.TotalProducts)]
+
+
+
+ @if (_isLoading) + { + + } + else + { + @_data.TotalCategories + } +
+
@Localizer[nameof(AppStrings.Last30DaysCategoryCount)]
+
+
+
+ @if (_isLoading) + { + + } + else + { + @_data.TotalCategories + } +
+
@Localizer[nameof(AppStrings.TotalCategories)]
+
+
\ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.cs new file mode 100644 index 0000000000..c9bda58b03 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.cs @@ -0,0 +1,30 @@ +using Boilerplate.Shared.Dtos.Dashboard; + +namespace Boilerplate.Client.Core.Pages.Dashboard; + +public partial class OverallStatsWidget +{ + private bool _isLoading; + private OverallAnalyticsStatsDataDto _data = new(); + + protected override async Task OnInitAsync() + { + await GetData(); + } + + private async Task GetData() + { + _isLoading = true; + + try + { + _data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(OverallStatsWidget)}", + async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetOverallAnalyticsStatsData", + AppJsonContext.Default.OverallAnalyticsStatsDataDto)) ?? new(); + } + finally + { + _isLoading = false; + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.scss new file mode 100644 index 0000000000..454f435783 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/OverallStatsWidget.razor.scss @@ -0,0 +1,117 @@ +@import "../../Styles/abstracts/_functions.scss"; +@import "../../Styles/abstracts/_media-queries.scss"; +@import "../../Styles/abstracts/_bit-css-variables.scss"; + +.card-container { + width: 100%; + display: flex; + gap: rem2(24px); + flex-flow: row wrap; + align-items: flex-start; + margin-bottom: rem2(56px); + justify-content: space-between; + + @include md { + margin-bottom: rem2(40px); + } + + @include sm { + gap: rem2(16px); + margin-bottom: rem2(24px); + } +} + +.card { + height: 100%; + display: flex; + padding: rem2(24px); + min-height: rem2(168px); + width: calc(25% - 18px); + align-items: flex-start; + border-radius: rem2(8px); + flex-flow: column nowrap; + transition: 0.3s all linear; + justify-content: flex-start; + background-repeat: no-repeat; + background-size: rem2(84px) 100%; + background-position: center right; + background-image: url('images/stat-card-bg.svg'); + background-color: $bit-color-background-primary; + border: rem2(1px) solid $bit-color-border-secondary; + + @include sm { + height: 204px; + } + + .card-num { + font-weight: 600; + font-size: rem2(32px); + line-height: rem2(40px); + margin-bottom: rem2(24px); + color: $bit-color-primary-main; + + @include md { + font-size: rem2(28px); + line-height: rem2(36px); + } + + @include sm { + font-size: rem2(28px); + line-height: rem2(36px); + } + } + + .no-border { + border-bottom: none; + } + + .card-title { + font-weight: 400; + font-size: rem2(20px); + line-height: rem2(28px); + + @include md { + font-size: rem2(18px); + line-height: rem2(24px); + } + + @include sm { + font-size: rem2(16px); + line-height: rem2(22px); + } + } + + &:hover { + background-size: rem2(128px) 100%; + background-color: $bit-color-primary-main; + background-image: url('images/stat-card-bg-hover.svg'); + + .card-num { + color: $bit-color-secondary-main; + } + + .card-title { + color: $bit-color-secondary-main; + } + } + + @include md { + min-height: rem2(160px); + padding: rem2(24px) rem2(16px); + background-position: center right rem2(-3px); + + &:hover { + background-position: center right rem2(-10px); + } + } + + @include sm { + width: calc(50% - 8px); + min-height: rem2(144px); + background-position: center right rem2(-7px); + + &:hover { + background-position: center right rem2(-10px); + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor new file mode 100644 index 0000000000..295675cba4 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor @@ -0,0 +1,20 @@ +@inherits AppComponentBase + +
+
+
@Localizer[nameof(AppStrings.ProductsCountPerCategoryChart)]
+
@Localizer[nameof(AppStrings.ProductsCountPerCategoryChartText)]
+
+
+ @if (_isLoading) + { + + } + else + { + + } +
+
+ + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs new file mode 100644 index 0000000000..99b93911d4 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.cs @@ -0,0 +1,48 @@ +namespace Boilerplate.Client.Core.Pages.Dashboard; + +public partial class ProductsCountPerCategotyWidget +{ + + private bool _isLoading; + private BitChart? _chart; + private BitChartBarConfig _config = default!; + + protected override async Task OnInitAsync() + { + _config = new BitChartBarConfig + { + Options = new BitChartBarOptions + { + Responsive = true, + Legend = new BitChartLegend() + { + Display = false, + }, + } + }; + + await GetData(); + } + + private async Task GetData() + { + try + { + _isLoading = true; + + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsCountPerCategotyWidget)}", + async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsCountPerCategotyStats", + AppJsonContext.Default.ListProductsCountPerCategoryDto)) ?? []; + + BitChartBarDataset chartDataSet = [.. data.Select(d => d.ProductCount)]; + chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); + _config.Data.Datasets.Add(chartDataSet); + _config.Data.Labels.AddRange(data.Select(d => d.CategoryName ?? string.Empty)); + } + finally + { + _isLoading = false; + } + } + +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss new file mode 100644 index 0000000000..b6b7bddbfc --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss @@ -0,0 +1,90 @@ +@import "../../Styles/abstracts/_functions.scss"; +@import "../../Styles/abstracts/_media-queries.scss"; +@import "../../Styles/abstracts/_bit-css-variables.scss"; + +.card { + display: flex; + min-height: rem2(376px); + width: calc(50% - 12px); + align-items: flex-start; + border-radius: rem2(2px); + flex-flow: column nowrap; + margin-bottom: rem2(24px); + justify-content: flex-start; + padding: rem2(24px) rem2(16px) rem2(58px); + background-color: $bit-color-background-primary; + border: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding: rem2(24px) rem2(16px) rem2(36px); + } + + @include sm { + width: 100%; + margin-bottom: rem2(16px); + padding: rem2(24px) rem2(8px) rem2(32px); + } +} + +.card-header { + width: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + padding-bottom: rem2(16px); + justify-content: flex-start; + border-bottom: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding-bottom: rem2(12px); + } +} + +.title { + font-weight: 600; + font-size: rem2(18px); + line-height: rem2(24px); + margin-bottom: rem2(4px); + + @include md { + font-size: rem2(16px); + line-height: rem2(22px); + } + + @include sm { + font-size: rem2(14px); + line-height: rem2(20px); + } +} + +.subtitle { + font-weight: 400; + font-size: rem2(14px); + line-height: rem2(20px); + + @include md { + font-size: rem2(12px); + line-height: rem2(16px); + } + + @include sm { + font-size: rem2(10px); + line-height: rem2(12px); + } +} + +.card-body { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: flex-start; + padding: rem2(32px) rem2(16px) 0; + + @include md { + padding: rem2(32px) rem2(8px) 0; + } + + @include sm { + padding: rem2(32px) rem2(8px) 0; + } +} \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor new file mode 100644 index 0000000000..311a812935 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor @@ -0,0 +1,20 @@ +@inherits AppComponentBase + +
+
+
+ @Localizer[nameof(AppStrings.ProductsPercentagePerCategory)] +
+
@Localizer[nameof(AppStrings.ProductsPercentagePerCategoryText)]
+
+
+ @if (_isLoading) + { + + } + else + { + + } +
+
\ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.cs new file mode 100644 index 0000000000..34deb4b3b2 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.cs @@ -0,0 +1,41 @@ +namespace Boilerplate.Client.Core.Pages.Dashboard; + +public partial class ProductsPercentageWidget +{ + private bool _isLoading; + private BitChartPieConfig _config = default!; + + protected override async Task OnInitAsync() + { + _config = new BitChartPieConfig + { + Options = new BitChartPieOptions + { + Responsive = true, + } + }; + + await GetData(); + } + + private async Task GetData() + { + _isLoading = true; + + try + { + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsPercentageWidget)}", + async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsPercentagePerCategoryStats", + AppJsonContext.Default.ListProductPercentagePerCategoryDto)) ?? []; + + BitChartPieDataset chartDataSet = [.. data!.Select(d => d.ProductPercentage)]; + chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); + _config.Data.Datasets.Add(chartDataSet); + _config.Data.Labels.AddRange(data.Select(d => d.CategoryName ?? string.Empty)); + } + finally + { + _isLoading = false; + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.scss new file mode 100644 index 0000000000..c0c0a2a8a3 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsPercentageWidget.razor.scss @@ -0,0 +1,90 @@ +@import "../../Styles/abstracts/_functions.scss"; +@import "../../Styles/abstracts/_media-queries.scss"; +@import "../../Styles/abstracts/_bit-css-variables.scss"; + +.card { + display: flex; + min-height: rem2(376px); + width: calc(50% - 12px); + align-items: flex-start; + border-radius: rem2(2px); + flex-flow: column nowrap; + margin-bottom: rem2(24px); + justify-content: flex-start; + padding: rem2(24px) rem2(16px) rem2(58px); + background-color: $bit-color-background-primary; + border: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding: rem2(24px) rem2(16px) rem2(36px); + } + + @include sm { + width: 100%; + margin-bottom: rem2(16px); + padding: rem2(24px) rem2(8px) rem2(32px); + } +} + +.card-header { + width: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + padding-bottom: rem2(16px); + justify-content: flex-start; + border-bottom: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding-bottom: rem2(12px); + } +} + +.title { + font-weight: 600; + font-size: rem2(18px); + line-height: rem2(24px); + margin-bottom: rem2(4px); + + @include md { + font-size: rem2(16px); + line-height: rem2(22px); + } + + @include sm { + font-size: rem2(14px); + line-height: rem2(20px); + } +} + +.subtitle { + font-weight: 400; + font-size: rem2(14px); + line-height: rem2(20px); + + @include md { + font-size: rem2(12px); + line-height: rem2(16px); + } + + @include sm { + font-size: rem2(10px); + line-height: rem2(12px); + } +} + +.card-body { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: flex-start; + padding: rem2(32px) rem2(16px) 0; + + @include md { + padding: rem2(32px) rem2(8px) 0; + } + + @include sm { + padding: rem2(32px) rem2(8px) 0; + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor new file mode 100644 index 0000000000..1569b47a7d --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor @@ -0,0 +1,22 @@ +@inherits AppComponentBase + +
+
+
+ @Localizer[nameof(AppStrings.ProductSales)] +
+
@Localizer[nameof(AppStrings.ProductSalesText)]
+
+
+ @if (_isLoading) + { + + } + else + { + + } +
+
+ + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.cs new file mode 100644 index 0000000000..8b6d55c8c0 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.cs @@ -0,0 +1,46 @@ +namespace Boilerplate.Client.Core.Pages.Dashboard; + +public partial class ProductsSalesWidget +{ + private bool _isLoading; + private BitChart? _chart; + private BitChartBarConfig _config = default!; + + protected override async Task OnInitAsync() + { + _config = new BitChartBarConfig + { + Options = new BitChartBarOptions + { + Responsive = true, + Legend = new BitChartLegend() + { + Display = false, + }, + } + }; + + await GetData(); + } + + private async Task GetData() + { + try + { + _isLoading = true; + + var data = await PrerenderStateService.GetValue($"{nameof(DashboardPage)}-{nameof(ProductsSalesWidget)}", + async () => await HttpClient.GetFromJsonAsync($"Dashboard/GetProductsSalesStats", + AppJsonContext.Default.ListProductSaleStatDto)) ?? []; + + BitChartBarDataset chartDataSet = [.. data.Select(d => d.SaleAmount)]; + chartDataSet.BackgroundColor = data.Select(d => d.CategoryColor ?? string.Empty).ToArray(); + _config.Data.Datasets.Add(chartDataSet); + _config.Data.Labels.AddRange(data.Select(d => d.ProductName ?? string.Empty)); + } + finally + { + _isLoading = false; + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.scss new file mode 100644 index 0000000000..a8bd3761cf --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Dashboard/ProductsSalesWidget.razor.scss @@ -0,0 +1,90 @@ +@import "../../Styles/abstracts/_functions.scss"; +@import "../../Styles/abstracts/_media-queries.scss"; +@import "../../Styles/abstracts/_bit-css-variables.scss"; + +.card { + width: 100%; + display: flex; + min-height: rem2(376px); + align-items: flex-start; + border-radius: rem2(2px); + flex-flow: column nowrap; + margin-bottom: rem2(24px); + justify-content: flex-start; + padding: rem2(24px) rem2(16px) rem2(58px); + background-color: $bit-color-background-primary; + border: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding: rem2(24px) rem2(16px) rem2(36px); + } + + @include sm { + width: 100%; + margin-bottom: rem2(16px); + padding: rem2(24px) rem2(8px) rem2(32px); + } +} + +.card-header { + width: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + padding-bottom: rem2(16px); + justify-content: flex-start; + border-bottom: rem2(1px) solid $bit-color-border-secondary; + + @include md { + padding-bottom: rem2(12px); + } +} + +.title { + font-weight: 600; + font-size: rem2(18px); + line-height: rem2(24px); + margin-bottom: rem2(4px); + + @include md { + font-size: rem2(16px); + line-height: rem2(22px); + } + + @include sm { + font-size: rem2(14px); + line-height: rem2(20px); + } +} + +.subtitle { + font-weight: 400; + font-size: rem2(14px); + line-height: rem2(20px); + + @include md { + font-size: rem2(12px); + line-height: rem2(16px); + } + + @include sm { + font-size: rem2(10px); + line-height: rem2(12px); + } +} + +.card-body { + width: 100%; + display: flex; + align-items: flex-start; + justify-content: flex-start; + padding: rem2(32px) rem2(16px) 0; + + @include md { + padding: rem2(32px) rem2(8px) 0; + } + + @include sm { + padding: rem2(32px) rem2(8px) 0; + } +} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/HomePage.razor similarity index 94% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/HomePage.razor index 10dd4e21b3..df73f0e7df 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/HomePage.razor @@ -9,7 +9,7 @@
@Localizer[nameof(AppStrings.HomeMessage)]
- @Localizer[nameof(AppStrings.EditProfileTitle)] -
-
- @if (string.IsNullOrEmpty(_editProfileMessage) is false) +
+
+ @if (string.IsNullOrEmpty(_editProfileMessage) is false) { @Localizer[nameof(AppStrings.ProfileImage)] - -
@_profileImageError
+ +
@_profileImageError
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs similarity index 97% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs index 4efb72a69f..4e3587c50e 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit -using TodoTemplate.Shared.Dtos.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace TodoTemplate.Client.Core.Pages.Identity; +namespace Boilerplate.Client.Core.Pages.Identity; [Authorize] public partial class EditProfilePage @@ -123,4 +123,3 @@ private async Task RemoveProfileImage() } } } - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss similarity index 99% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss index 40506980cf..9357be9421 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EditProfilePage.razor.scss @@ -137,4 +137,3 @@ flex-flow: column nowrap; justify-content: flex-start; } - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor similarity index 93% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor index 0851881d9e..e942ee887d 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor @@ -3,9 +3,9 @@ @Localizer[nameof(AppStrings.EmailConfirmationTitle)] -
-
- @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) +
+
+ @if (string.IsNullOrEmpty(_emailConfirmationMessage) is false) { @Localizer[nameof(AppStrings.ForgetPasswordTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) + @if (string.IsNullOrEmpty(_forgotPasswordMessage) is false) { @Localizer[nameof(AppStrings.ResetPasswordTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) + @if (string.IsNullOrEmpty(_resetPasswordMessage) is false) { @Localizer[nameof(AppStrings.SignInTitle)] + +
+ + + + @if (string.IsNullOrEmpty(_signInMessage) is false) + { + + @_signInMessage + + } + +

@Localizer[nameof(AppStrings.SignInTitle)]

+ +
+ + +
+ +
+ + +
+ + + @Localizer[nameof(AppStrings.SignIn)] + + +
+ @Localizer[nameof(AppStrings.ForgotPasswordLink)] +
+ +
+ @Localizer[nameof(AppStrings.DontHaveAccountMessage)] @Localizer[nameof(AppStrings.SignUp)] +
+
+
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs similarity index 86% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs index 1be38414e1..fca7543151 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignInPage.razor.cs @@ -1,6 +1,6 @@ -using TodoTemplate.Shared.Dtos.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace TodoTemplate.Client.Core.Pages.Identity; +namespace Boilerplate.Client.Core.Pages.Identity; public partial class SignInPage { @@ -13,7 +13,7 @@ public partial class SignInPage [SupplyParameterFromQuery] public string? RedirectUrl { get; set; } - protected async override Task OnAfterFirstRenderAsync() + protected override async Task OnAfterFirstRenderAsync() { await base.OnAfterFirstRenderAsync(); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignInPage.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignInPage.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor similarity index 89% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor index 6f20107a3c..b40cd9fee4 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor @@ -3,11 +3,11 @@ @Localizer[nameof(AppStrings.SingUpTitle)] -
- - +
+ + - @if (string.IsNullOrEmpty(_signUpMessage) is false) + @if (string.IsNullOrEmpty(_signUpMessage) is false) {
@Localizer[nameof(AppStrings.SignIn)] -
+
} else { @@ -76,10 +76,10 @@ @Localizer[nameof(AppStrings.TermsMessage)] @Localizer[nameof(AppStrings.TermsTitle)] - - - -
+ + + +
@Localizer[nameof(AppStrings.AlreadyHaveAccountMessage)] @Localizer[nameof(AppStrings.SignIn)] -
+
}
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs similarity index 95% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs index e066746fbc..6c6ae2003b 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor.cs @@ -1,6 +1,6 @@ -using TodoTemplate.Shared.Dtos.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace TodoTemplate.Client.Core.Pages.Identity; +namespace Boilerplate.Client.Core.Pages.Identity; public partial class SignUpPage { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignUpPage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Identity/SignUpPage.razor.scss diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor new file mode 100644 index 0000000000..94c3d51440 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor @@ -0,0 +1,61 @@ +@inherits AppComponentBase + + +
+
+ + @if (_product.Id != 0) + { + @Localizer[nameof(AppStrings.EditProduct)] + } + else + { + @Localizer[nameof(AppStrings.AddProduct)] + } + + +
+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + @Localizer[nameof(AppStrings.Save)] + +
+
+
\ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs new file mode 100644 index 0000000000..05b0df4461 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.cs @@ -0,0 +1,94 @@ +using Boilerplate.Shared.Dtos.Products; + +namespace Boilerplate.Client.Core.Pages.Products; + +public partial class AddOrEditProductModal +{ + + private bool _isOpen; + private bool _isLoading; + private bool _isSaving; + private ProductDto _product = new(); + private List> _allCategoryList = []; + private string _selectedCategoyId = string.Empty; + + [Parameter] public EventCallback OnSave { get; set; } + + protected override async Task OnInitAsync() + { + await LoadAllCategoriesAsync(); + } + + public async Task ShowModal(ProductDto product) + { + await InvokeAsync(() => + { + _ = JSRuntime.SetBodyOverflow(true); + + _isOpen = true; + _product = product; + _selectedCategoyId = (_product.CategoryId ?? 0).ToString(); + + StateHasChanged(); + }); + } + + private async Task LoadAllCategoriesAsync() + { + _isLoading = true; + + try + { + var categoryList = await PrerenderStateService.GetValue($"{nameof(ProductsPage)}-AllCategoryList", + async () => await HttpClient.GetFromJsonAsync("Category/Get", + AppJsonContext.Default.ListCategoryDto)) ?? []; + + _allCategoryList = categoryList.Select(c => new BitDropdownItem() + { + ItemType = BitDropdownItemType.Normal, + Text = c.Name ?? string.Empty, + Value = c.Id.ToString() + }).ToList(); + } + finally + { + _isLoading = false; + } + } + + private async Task Save() + { + if (_isLoading) return; + + _isSaving = true; + + try + { + if (_product.Id == 0) + { + await HttpClient.PostAsJsonAsync("Product/Create", _product, AppJsonContext.Default.ProductDto); + } + else + { + await HttpClient.PutAsJsonAsync("Product/Update", _product, AppJsonContext.Default.ProductDto); + } + + _isOpen = false; + + await JSRuntime.SetBodyOverflow(false); + } + finally + { + _isSaving = false; + + await OnSave.InvokeAsync(); + } + } + + private async Task OnCloseClick() + { + _isOpen = false; + + await JSRuntime.SetBodyOverflow(false); + } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.scss similarity index 69% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.scss index 1e93438ad9..a14bef4193 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/Identity/DeleteAccountConfirmModal.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/AddOrEditProductModal.razor.scss @@ -6,11 +6,17 @@ display: flex; width: rem2(560px); align-items: center; - flex-flow: column nowrap; + flex-direction: column; + min-height: rem2(378px); + border-radius: rem2(2px); justify-content: flex-start; padding: rem2(16px) rem2(24px); background-color: $bit-color-background-primary; + .bit-ios & { + padding: rem2(16px) rem2(24px) calc(rem2(16px) + env(safe-area-inset-bottom)); + } + @include sm { left: 0; bottom: 0; @@ -25,29 +31,21 @@ display: flex; align-items: center; flex-flow: row nowrap; - margin-bottom: rem2(20px); + margin-bottom: rem2(24px); justify-content: space-between; } .title { - color: #dc0000; font-weight: 600; font-size: rem2(20px); line-height: rem2(28px); } -.body { +.form-input-container { width: 100%; - font-weight: 400; - font-size: rem2(14px); - line-height: rem2(20px); - margin-bottom: rem2(16px); + margin-bottom: rem2(24px); } -.btn-group { - width: 100%; - display: flex; - align-items: center; - flex-flow: row nowrap; - justify-content: flex-end; +::deep .validation-message { + color: $bit-color-state-error; } \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor new file mode 100644 index 0000000000..e807f28468 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor @@ -0,0 +1,43 @@ +@page "/products" +@using Boilerplate.Shared.Dtos.Products +@inherits AppComponentBase + +@Localizer[nameof(AppStrings.ProductsPageTitle)] + +
+ @if (_isLoading) + { +
+ +
+ } + +
+

@Localizer[nameof(AppStrings.Products)]

+ @Localizer[nameof(AppStrings.AddProduct)] +
+ +
+ + + + + + + + + + + + + + + +
+
+ + + \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.cs new file mode 100644 index 0000000000..1d5b305d4b --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.cs @@ -0,0 +1,110 @@ +//-:cnd:noEmit +using Boilerplate.Shared.Dtos.Products; + +namespace Boilerplate.Client.Core.Pages.Products; + +[Authorize] +public partial class ProductsPage +{ + private bool _isLoading; + private AddOrEditProductModal? _modal; + private string _productNameFilter = string.Empty; + + private ConfirmMessageBox _confirmMessageBox = default!; + private BitDataGrid? _dataGrid; + private BitDataGridItemsProvider _productsProvider = default!; + private BitDataGridPaginationState _pagination = new() { ItemsPerPage = 10 }; + + string ProductNameFilter + { + get => _productNameFilter; + set + { + _productNameFilter = value; + _ = RefreshData(); + } + } + + protected override async Task OnInitAsync() + { + PrepareGridDataProvider(); + + await base.OnInitAsync(); + } + + private void PrepareGridDataProvider() + { + _productsProvider = async req => + { + _isLoading = true; + + try + { + // https://docs.microsoft.com/en-us/odata/concepts/queryoptions-overview + var query = new Dictionary() + { + { "$top", req.Count ?? 10 }, + { "$skip", req.StartIndex } + }; + + if (string.IsNullOrEmpty(_productNameFilter) is false) + { + query.Add("$filter", $"contains(Name,'{_productNameFilter}')"); + } + + if (req.GetSortByProperties().Any()) + { + query.Add("$orderby", string.Join(", ", req.GetSortByProperties().Select(p => $"{p.PropertyName} {(p.Direction == BitDataGridSortDirection.Ascending ? "asc" : "desc")}"))); + } + + var url = NavigationManager.GetUriWithQueryParameters("Product/GetProducts", query); + + var data = await HttpClient.GetFromJsonAsync(url, AppJsonContext.Default.PagedResultProductDto); + + return BitDataGridItemsProviderResult.From(data!.Items!, (int)data!.TotalCount); + } + catch + { + return BitDataGridItemsProviderResult.From(new List { }, 0); + } + finally + { + _isLoading = false; + + StateHasChanged(); + } + }; + } + + private async Task RefreshData() + { + await _dataGrid!.RefreshDataAsync(); + } + + private async Task CreateProduct() + { + await _modal!.ShowModal(new ProductDto()); + } + + private async Task EditProduct(ProductDto product) + { + await _modal!.ShowModal(product); + } + + private async Task DeleteProduct(ProductDto product) + { + var confirmed = await _confirmMessageBox.Show(Localizer.GetString(nameof(AppStrings.AreYouSureWannaDeleteProduct), product.Name ?? string.Empty), + Localizer[nameof(AppStrings.DeleteProduct)]); + + if (confirmed) + { + await HttpClient.DeleteAsync($"Product/Delete/{product.Id}"); + + await RefreshData(); + } + } +} + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.scss new file mode 100644 index 0000000000..5bb49bdaed --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Products/ProductsPage.razor.scss @@ -0,0 +1,133 @@ +@import '../../Styles/abstracts/_functions.scss'; +@import '../../Styles/abstracts/_media-queries.scss'; +@import '../../Styles/abstracts/_bit-css-variables.scss'; + +.page-container { + width: 100%; + height: 100%; + display: flex; + align-items: flex-start; + flex-flow: column nowrap; + justify-content: flex-start; +} + +.loading-contianer { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.page-row { + width: 100%; + display: flex; + align-items: center; + flex-flow: row nowrap; + margin-bottom: rem2(24px); + justify-content: space-between; +} + +.page-title { + margin: 0; + font-weight: 600; + font-size: rem2(20px); + line-height: rem2(28px); + + @include sm { + font-size: rem2(18px); + line-height: rem2(24px); + } +} + +.grid { + width: 100%; + overflow: auto; + display: inline-flex; + flex-direction: column; + border-radius: rem2(2px); + border: rem2(1px) solid $bit-color-border-secondary; + + ::deep { + .id-col { + width: 90px; + } + + .bitdatagrid th .col-options-button { + cursor: help; + } + } +} + +::deep table { + min-width: 100%; + border-spacing: 0; +} + +::deep thead { + height: rem2(43px); + background-color: $bit-color-background-primary; +} + +::deep tr { + height: rem2(43px); +} + +::deep th { + font-weight: 600; + padding: 0 rem2(12px); + font-size: rem2(14px); + line-height: rem2(20px); +} + +::deep td { + font-weight: 400; + font-size: rem2(12px); + line-height: rem2(16px); + border-top: rem2(1px) solid $bit-color-border-secondary; +} + +::deep tr td:first-child { + font-size: rem2(14px); + line-height: rem2(20px); + padding-left: rem2(12px); +} + +::deep .col-options-button { + &:hover { + background-color: transparent; + } +} + +::deep .col-title { + &:hover { + background-color: transparent !important; + } +} + +::deep .product-search-box { + width: 100%; + max-width: rem2(300px); + margin-bottom: rem2(24px); +} + +::deep th:nth-child(2) .col-options-button { + cursor: pointer; + background-image: none; + + &:before { + content: "\E721"; + font-style: normal; + font-weight: normal; + display: inline-block; + font-family: 'Fabric MDL2'; + } +} + +::deep .bitdatagrid-paginator { + margin-top: 0; + height: rem2(43px); + padding: 0 rem2(12px); + font-size: rem2(14px); + border-top: rem2(1px) solid $bit-color-border-secondary; +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor similarity index 68% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor index 4392e12a7f..66dae592db 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor @@ -7,18 +7,18 @@
-

AdminPanel license

+

Boilerplate license

- This EULA and Privacy Policy are written for individuals who use the AdminPanel Demo Version through the adminpanel.bitplatform.dev website, or the published version of this app on the bit platform's Google Play, Apple Store, and Microsoft Store accounts. + This EULA and Privacy Policy are written for individuals who use the Boilerplate Demo Version through the todo.bitplatform.dev website, or the published version of this app on the bit platform's Google Play, Apple Store, and Microsoft Store accounts.
If you want to build your own project based on this Project Template, please refer to the License and create your own project, publish it with the relevant EULA and Privacy Policy for your business.s
-

End-User License Agreement (EULA) for AdminPanel Demo Version

+

End-User License Agreement (EULA) for Boilerplate Demo Version

- This End-User License Agreement (EULA) is a legal agreement between you (the "user") and bit platform, located at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands, with phone number +31684207362, for the use of AdminPanel Demo Version (the "Software"). + This End-User License Agreement (EULA) is a legal agreement between you (the "user") and bit platform, located at Sixmastraat 15, 8932 PA Leeuwarden, Netherlands, with phone number +31684207362, for the use of Boilerplate Demo Version (the "Software").
By using the Software, you agree to be bound by the terms and conditions of this agreement.
@@ -27,7 +27,7 @@

License Grant

- bit platform hereby grants the user a non-exclusive, non-transferable license to use the Software, solely for the purpose of evaluating and testing the features of the AdminPanel Demo Version during the term of this EULA. + bit platform hereby grants the user a non-exclusive, non-transferable license to use the Software, solely for the purpose of evaluating and testing the features of the Boilerplate Demo Version during the term of this EULA.
@@ -41,7 +41,7 @@

User Data

- bit platform may collect user data, including name, surname, photo, date of birth, and gender. Providing this information is optional, and bit platform will only use it for the purposes of the AdminPanel Demo Version. If the user requests, bit platform will delete this data within one day, using one of the contact methods provided at the end of this EULA. In addition, the user is required to provide an email address for account verification purposes, but bit platform will not use this email for any other purposes. + bit platform may collect user data, including name, surname, photo, date of birth, and gender. Providing this information is optional, and bit platform will only use it for the purposes of the Boilerplate Demo Version. If the user requests, bit platform will delete this data within one day, using one of the contact methods provided at the end of this EULA. In addition, the user is required to provide an email address for account verification purposes, but bit platform will not use this email for any other purposes.
@@ -92,11 +92,11 @@

Privacy Policy

    -
  • bit platform is committed to protecting the privacy of user data.
  • -
  • We will only use the data collected from the user for the purposes of the AdminPanel Demo Version and will delete this data upon user request, using one of the contact methods provided above.
  • -
  • We do not share user data with any third parties and do not allow users to share data with anyone in any way.
  • -
  • We do not collect any information on user's usage in the AdminPanel Demo Version.
  • -
  • We do not display any Third-Party content, advertisements, or any purchases in the AdminPanel Demo Version.
  • +
  • bit platform is committed to protecting the privacy of the user data.
  • +
  • We will only use the data collected from the user for the purposes of the Boilerplate Demo Version and will delete this data upon user request, using one of the contact methods provided above.
  • +
  • We do not share the user data with any third parties and do not allow users to share data with anyone in any way.
  • +
  • We do not collect any information on user's usage in the Boilerplate Demo Version.
  • +
  • We do not display any Third-Party content, advertisements, or any purchases in the Boilerplate Demo Version.
  • This Privacy Policy is effective until 2025-12-31 and is subject to change without notice.
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.cs new file mode 100644 index 0000000000..14d9cabde6 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.cs @@ -0,0 +1,5 @@ +namespace Boilerplate.Client.Core.Pages; + +public partial class TermsPage +{ +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.scss similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.scss index 4c44e006fb..07be99b33f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Pages/TermsPage.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/TermsPage.razor.scss @@ -1,6 +1,5 @@ @import '../Styles/abstracts/_functions.scss'; @import '../Styles/abstracts/_media-queries.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; .page-container { width: 100%; diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor similarity index 98% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor index 7dfffb7225..34976c0b87 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor @@ -59,7 +59,7 @@ if (_viewTodoItems?.Any() is false or null) {
- + @Localizer[nameof(AppStrings.NoTodos)]
} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs similarity index 95% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs index 9a7d09d38c..c4d2688148 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor.cs @@ -1,6 +1,6 @@ -using TodoTemplate.Shared.Dtos.Todo; +using Boilerplate.Shared.Dtos.Todo; -namespace TodoTemplate.Client.Core.Pages.Todo; +namespace Boilerplate.Client.Core.Pages.Todo; [Authorize] public partial class TodoPage @@ -15,18 +15,18 @@ public partial class TodoPage private ConfirmMessageBox _confirmMessageBox = default!; private IList _allTodoItems = default!; private IList _viewTodoItems = default!; - private List> _sortItems = new(); + private List> _sortItems = []; protected override async Task OnInitAsync() { _selectedFilter = nameof(AppStrings.All); _selectedSort = nameof(AppStrings.Alphabetical); - _sortItems = new() - { + _sortItems = + [ new BitDropdownItem { Text = Localizer[nameof(AppStrings.Alphabetical)], Value = nameof(AppStrings.Alphabetical) }, new BitDropdownItem { Text = Localizer[nameof(AppStrings.Date)], Value = nameof(AppStrings.Date) } - }; + ]; await LoadTodoItems(); @@ -40,7 +40,7 @@ private async Task LoadTodoItems() try { _allTodoItems = await PrerenderStateService.GetValue($"{nameof(TodoPage)}-allTodoItems", - async () => await HttpClient.GetFromJsonAsync("TodoItem/Get", AppJsonContext.Default.ListTodoItemDto)) ?? new(); + async () => await HttpClient.GetFromJsonAsync("TodoItem/Get", AppJsonContext.Default.ListTodoItemDto)) ?? []; FilterViewTodoItems(); } diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Todo/TodoPage.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Pages/Todo/TodoPage.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Scripts/app.ts b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Scripts/app.ts similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Scripts/app.ts rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Scripts/app.ts diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AppAuthenticationStateProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AppAuthenticationStateProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs index bc5d5786c9..46c1cbcb0f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AppAuthenticationStateProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs @@ -1,7 +1,7 @@ using System.Text; using System.Text.Json; -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public partial class AppAuthenticationStateProvider : AuthenticationStateProvider { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AuthenticationService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AuthenticationService.cs similarity index 93% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AuthenticationService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AuthenticationService.cs index c1269d0ece..a4c0cfcdd8 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/AuthenticationService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/AuthenticationService.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public partial class AuthenticationService : IAuthenticationService { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ClientSideAuthTokenProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ClientSideAuthTokenProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs index 2dbb385ff9..5567f0ca9a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ClientSideAuthTokenProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public partial class ClientSideAuthTokenProvider : IAuthTokenProvider { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IAuthenticationService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs similarity index 52% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IAuthenticationService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs index 421a6e982c..0a27ec5358 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IAuthenticationService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs @@ -1,6 +1,6 @@ -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace AdminPanel.Client.Core.Services.Contracts; +namespace Boilerplate.Client.Core.Services.Contracts; public interface IAuthenticationService { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs similarity index 81% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs index 6688477826..c10fb5895d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services.Contracts; +namespace Boilerplate.Client.Core.Services.Contracts; /// /// This service performs device-specific tasks, such as setting the theme. diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IExceptionHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs similarity index 69% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IExceptionHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs index b978b528e4..0ae5ef549b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IExceptionHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services.Contracts; +namespace Boilerplate.Client.Core.Services.Contracts; public interface IExceptionHandler { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPrerenderStateService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPrerenderStateService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs index 303a4ad4b2..4ef4bca93d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPrerenderStateService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services.Contracts; +namespace Boilerplate.Client.Core.Services.Contracts; /// /// This service simplifies the process of persisting application state in Pre-Rendering mode diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPubSubService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPubSubService.cs similarity index 79% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPubSubService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPubSubService.cs index cf661c7682..4e962858b6 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/Contracts/IPubSubService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/Contracts/IPubSubService.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services.Contracts; +namespace Boilerplate.Client.Core.Services.Contracts; /// /// Contract for Publish/Subscribe pattern. diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ExceptionHandlerBase.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ExceptionHandlerBase.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ExceptionHandlerBase.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ExceptionHandlerBase.cs index fbb4cfd2eb..fbb4084ca0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/ExceptionHandlerBase.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/ExceptionHandlerBase.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit using System.Diagnostics; -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public abstract partial class ExceptionHandlerBase : IExceptionHandler { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs index c056509708..6fe70a4ed3 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs @@ -1,6 +1,6 @@ using System.Net.Http.Headers; -namespace AdminPanel.Client.Core.Services.HttpMessageHandlers; +namespace Boilerplate.Client.Core.Services.HttpMessageHandlers; public class AuthDelegatingHandler : DelegatingHandler diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs index 99bc37233c..4088ea3434 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Client.Core.Services.HttpMessageHandlers; +namespace Boilerplate.Client.Core.Services.HttpMessageHandlers; public class ExceptionDelegatingHandler : DelegatingHandler diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs index 935d35a42e..f0879e3521 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs @@ -1,6 +1,6 @@ using System.Net.Http.Headers; -namespace AdminPanel.Client.Core.Services.HttpMessageHandlers; +namespace Boilerplate.Client.Core.Services.HttpMessageHandlers; public class LocalizationDelegatingHandler : DelegatingHandler diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs index 75fb1bffd0..025466b17d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services.HttpMessageHandlers; +namespace Boilerplate.Client.Core.Services.HttpMessageHandlers; public class RetryDelegatingHandler : DelegatingHandler diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/MessageBoxService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/MessageBoxService.cs similarity index 87% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/MessageBoxService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/MessageBoxService.cs index 9de6863aa2..35bca27dc4 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/MessageBoxService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/MessageBoxService.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public partial class MessageBoxService { [AutoInject] IPubSubService _pubSubService = default!; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PrerenderStateService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PrerenderStateService.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PrerenderStateService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PrerenderStateService.cs index 683695bb86..ebedde74cb 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PrerenderStateService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PrerenderStateService.cs @@ -1,6 +1,6 @@ //-:cnd:noEmit -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; /// /// For more information docs. diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubMessages.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubMessages.cs similarity index 76% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubMessages.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubMessages.cs index b3ee52e827..6a1c75da8d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubMessages.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubMessages.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; public static class PubSubMessages { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubService.cs similarity index 84% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubService.cs index ac286b0bca..b0ff463240 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Services/PubSubService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Services/PubSubService.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Services; +namespace Boilerplate.Client.Core.Services; /// /// For more information docs. @@ -19,7 +19,7 @@ public Action Subscribe(string message, Action handler) { var handlers = _handlers.ContainsKey(message) ? _handlers[message] - : _handlers[message] = new List>(); + : _handlers[message] = []; handlers.Add(handler); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppComponentBase.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppComponentBase.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppComponentBase.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppComponentBase.cs index 782e3242d0..2d65b5c24f 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppComponentBase.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppComponentBase.cs @@ -1,8 +1,8 @@ -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class AppComponentBase : ComponentBase { - [AutoInject] protected IJSRuntime JsRuntime = default!; + [AutoInject] protected IJSRuntime JSRuntime = default!; [AutoInject] protected HttpClient HttpClient = default!; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppDataAnnotationsValidator.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppDataAnnotationsValidator.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs index 816d71358e..6fa4323d43 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppDataAnnotationsValidator.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs @@ -1,10 +1,10 @@ using System.Reflection; using System.Runtime.InteropServices; -using AdminPanel.Shared.Attributes; -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Shared.Attributes; +using Boilerplate.Shared.Dtos.Identity; using Microsoft.AspNetCore.Components.Forms; -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; /// /// To implement forms where each error is displayed according to the language chosen by the user, you can use the diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor index fa90d08ddd..34b6df0d9c 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor @@ -11,7 +11,7 @@ else if (ErrorContent is null)
- +

Oops, something went wrong...

@if (_showException) diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs index be9060b845..b1b8efeb40 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/AppErrorBoundary.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs @@ -1,6 +1,6 @@ //-:cnd:noEmit -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; /// /// https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/handle-errors @@ -20,11 +20,9 @@ protected override void OnInitialized() } #endif - protected override Task OnErrorAsync(Exception exception) + protected override async Task OnErrorAsync(Exception exception) { _exceptionHandler.Handle(exception); - - return Task.CompletedTask; } private void Refresh() diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/AppErrorBoundary.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs index db4c24860e..2ba55c805d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; /// /// This component is used during prerendering to determine the value of the StatusCode parameter for the returned HTTP response. diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/ConfirmMessageBox.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs similarity index 94% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs index 3ceadcc8db..71bcb8f8dc 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class ConfirmMessageBox { @@ -36,4 +36,3 @@ public async Task Confirm(bool value) _tsc?.SetResult(value); } } - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/ConfirmMessageBox.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor.cs similarity index 94% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor.cs index 7121d1a3bb..14f5756a2a 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class Footer { @@ -18,7 +18,7 @@ protected override Task OnInitAsync() #if MultilingualEnabled - protected async override Task OnAfterFirstRenderAsync() + protected override async Task OnAfterFirstRenderAsync() { #if BlazorHybrid var preferredCultureCookie = Preferences.Get(".AspNetCore.Culture", null); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Footer.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Footer.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor similarity index 95% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor index ae1ec8aa74..8e3c764b0d 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor @@ -11,7 +11,7 @@
@if (!_isUserAuthenticated) { - @Localizer[nameof(AppStrings.Terms)] + @Localizer[nameof(AppStrings.Term)] @Localizer[nameof(AppStrings.SignUp)] @Localizer[nameof(AppStrings.SignIn)] } diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor.cs similarity index 96% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor.cs index 78d56249f1..3b0fa1a1d8 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class Header : IDisposable { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/Header.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/Header.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/LoadingComponent.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/LoadingComponent.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/LoadingComponent.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/LoadingComponent.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/LoadingComponent.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/LoadingComponent.razor.cs similarity index 70% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/LoadingComponent.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/LoadingComponent.razor.cs index 381f9a4df3..39b6456770 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/LoadingComponent.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/LoadingComponent.razor.cs @@ -1,7 +1,6 @@ -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class LoadingComponent { [Parameter] public string Color { get; set; } = "#123456"; } - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor similarity index 89% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor index cbb96b8737..2b7c6da522 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor @@ -1,6 +1,6 @@ @inherits LayoutComponentBase -
TodoTemplate
+
Boilerplate
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor.cs similarity index 97% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor.cs index a746eab5dc..43e8aa6045 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Components.Web; -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class MainLayout : IDisposable { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MainLayout.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MainLayout.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor.cs similarity index 97% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor.cs index 60308393fb..1bcbbdabda 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class MessageBox : IDisposable { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/MessageBox.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/MessageBox.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor.cs similarity index 73% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor.cs index 37a3464252..8dbd07c0fc 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor.cs @@ -1,7 +1,7 @@ -//-:cnd:noEmit -using TodoTemplate.Shared.Dtos.Identity; +//+:cnd:noEmit +using Boilerplate.Shared.Dtos.Identity; -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class NavMenu : IDisposable { @@ -10,7 +10,7 @@ public partial class NavMenu : IDisposable private string? _profileImageUrl; private string? _profileImageUrlBase; private UserDto _user = new(); - private List _navItems = new(); + private List _navItems = []; private Action _unsubscribe = default!; [AutoInject] private NavigationManager _navManager { get; set; } = default!; @@ -21,20 +21,44 @@ public partial class NavMenu : IDisposable protected override async Task OnInitAsync() { - _navItems = new() - { + _navItems = + [ new BitNavItem { Text = Localizer[nameof(AppStrings.Home)], IconName = BitIconName.Home, Url = "/", }, + //#if (sample == "AdminPanel") + new BitNavItem + { + Text = Localizer[nameof(AppStrings.ProductCategory)], + IconName = BitIconName.Product, + IsExpanded = true, + ChildItems = + [ + new() { + Text = Localizer[nameof(AppStrings.Dashboard)], + Url = "/dashboard", + }, + new() { + Text = Localizer[nameof(AppStrings.Products)], + Url = "/products", + }, + new() { + Text = Localizer[nameof(AppStrings.Categories)], + Url = "/categories", + }, + ] + }, + //#elif (sample == "Todo") new BitNavItem { Text = Localizer[nameof(AppStrings.TodoTitle)], IconName = BitIconName.ToDoLogoOutline, Url = "/todo", }, + //#endif new BitNavItem { Text = Localizer[nameof(AppStrings.EditProfileTitle)], @@ -47,7 +71,7 @@ protected override async Task OnInitAsync() IconName = BitIconName.EntityExtraction, Url = "/terms", } - }; + ]; _unsubscribe = PubSubService.Subscribe(PubSubMessages.PROFILE_UPDATED, payload => { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NavMenu.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NavMenu.razor.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor similarity index 84% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor index 97ee0ec76e..f377abf385 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor @@ -4,7 +4,7 @@
-
+

@Localizer[nameof(AppStrings.ForbiddenException)]

@Localizer[nameof(AppStrings.YouAreSignInAs)] @_user.GetUserName()

diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs index 4d42f75a63..67701f75f1 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class NotAuthorizedComponent { @@ -6,7 +6,7 @@ public partial class NotAuthorizedComponent [CascadingParameter] public Task AuthenticationState { get; set; } = default!; - protected async override Task OnParamsSetAsync() + protected override async Task OnParamsSetAsync() { _user = (await AuthenticationState).User; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/PageNotFound.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/PageNotFound.razor similarity index 65% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/PageNotFound.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/PageNotFound.razor index 5a5b7eec4b..7fb5199185 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/PageNotFound.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/PageNotFound.razor @@ -4,5 +4,5 @@

404

-
There is nothing here.
+
@Localizer[nameof(AppStrings.ResourceNotFoundException)]
\ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/PageNotFound.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/PageNotFound.razor.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/PageNotFound.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/PageNotFound.razor.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs similarity index 90% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs index 22e4048184..c9d6141f9a 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Client.Core.Shared; +namespace Boilerplate.Client.Core.Shared; public partial class SignOutConfirmModal { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss similarity index 96% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss index 6bf92e55cd..69a89d32a3 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Shared/SignOutConfirmModal.razor.scss @@ -9,7 +9,7 @@ flex-flow: column nowrap; padding: rem2(28px) rem2(110px); - @include lt-lg{ + @include lt-lg { padding: rem2(28px) rem2(47px); } } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_bit-css-variables.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_bit-css-variables.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_bit-css-variables.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_bit-css-variables.scss diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_colors.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_colors.scss new file mode 100644 index 0000000000..194cabaf34 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_colors.scss @@ -0,0 +1,71 @@ +$PrimaryColor: #0078D4; +$SecondaryColor: #002A66; +$S1Color: #183977; +$S2Color: #204383; +$S3Color: #7186B4; +$S4Color: #C1CADF; + +$Black: #201F1E; +$Black3: #323130; +$Red: #A4262C; +$Green: #27cb3c; +$Blue: #0078D4; +$Purple: #b200ff; +$Pink: #ff00dc; +$Orange: #ff6a00; +$Yellow: #ffd800; + +$Gray1: #8A8886; +$Gray2: #A19F9D; +$Gray3: #DDDDDD; +$Gray4: #EDEBE9; +$Gray5: #F2F2F2; +$Gray6: #FCFCFC; +/////////////////////////////////////// +$Blue1: #002A66; +$Blue2: #003681; +$BackgroundColor: #FBFCFF; + +$TypePrimaryColor: #323130; +$TypeSecondaryColor: #605E5C; +$TypeDisabledColor: #A19F9D; + +$BodyDividerColor: #EDEBE9; +$InputBorderColor: #8A8886; +$InputBorderHoverColor: #323130; + +$ThemePrimaryColor: #0078D4; +$ThemeLighterAltColor: #EFF6FC; +$ThemeLighterColor: #DEECF9; +$ThemeLightColor: #C7E0F4; +$ThemeTertiaryColor: #2B88D8; +$ThemeDarkerAltColor: #106EBE; +$ThemeDarkerColor: #004578; +$ThemeDarkColor: #005A9E; + +$ErrorBackgroundFillColor: #FDE7E9; +$SuccessBackgroundFillColor: #DFF6DD; +$SevereWarningBackgroundFillColor: #FED9CC; +$WarningBackgroundFillColor: #FFF4CE; + +$StatusErrorColor: #A80000; +$StatusSuccessColor: #107C10; +$StatusSevereWarningColor: #D83B01; +$StatusWarningColor: #797775; + +$OverlayLightColor: rgba(255, 255, 255, 0.4); +$OverlayDarkColor: rgba(0, 0, 0, 0.4); + +$White: #FFFFFF; +$Gray10: #FAF9F8; +$Gray20: #F3F2F1; +$Gray30: #EDEBE9; +$Gray40: #E1DFDD; +$Gray50: #D2D0CE; +$Gray60: #C8C6C4; +$Gray90: #A19F9D; +$Gray110: #8A8886; +$Gray130: #605E5C; +$Gray150: #3B3A39; +$Gray160: #323130; +$Gray190: #201F1E; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_functions.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_functions.scss similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/Styles/abstracts/_functions.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_functions.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_media-queries.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_media-queries.scss similarity index 99% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_media-queries.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_media-queries.scss index e5074723d1..9662a3bb91 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_media-queries.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_media-queries.scss @@ -75,4 +75,4 @@ $screen-sm-max: rem2(360px); @media screen and (min-width: #{$screen-xl-min}) { @content; } -} \ No newline at end of file +} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_vars.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_vars.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_vars.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/abstracts/_vars.scss diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/app.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/app.scss similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/app.scss rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/Styles/app.scss diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/_Imports.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/_Imports.razor similarity index 67% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/_Imports.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/_Imports.razor index 182af7889f..5341d33ee9 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/_Imports.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/_Imports.razor @@ -11,10 +11,10 @@ @using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.Web.Virtualization @using Bit.BlazorUI -@using AdminPanel -@using AdminPanel.Shared.Enums -@using AdminPanel.Client.Core -@using AdminPanel.Client.Core.Shared -@using AdminPanel.Client.Core.Pages -@using AdminPanel.Client.Core.Services.Contracts -@using AdminPanel.Client.Core.Services \ No newline at end of file +@using Boilerplate +@using Boilerplate.Shared.Enums +@using Boilerplate.Client.Core +@using Boilerplate.Client.Core.Shared +@using Boilerplate.Client.Core.Pages +@using Boilerplate.Client.Core.Services.Contracts +@using Boilerplate.Client.Core.Services \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/appsettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/appsettings.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/appsettings.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/appsettings.json diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/compilerconfig.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/compilerconfig.json similarity index 82% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/compilerconfig.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/compilerconfig.json index 7b83d3582e..7b3e085b6d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/compilerconfig.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/compilerconfig.json @@ -1,7 +1,8 @@ -[ +//+:cnd:noEmit +[ { - "outputFile": "Shared/ConfirmMessageBox.razor.css", - "inputFile": "Shared/ConfirmMessageBox.razor.scss", + "outputFile": "Shared/MainLayout.razor.css", + "inputFile": "Shared/MainLayout.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, @@ -12,26 +13,26 @@ "options": { "sourceMap": false } }, { - "outputFile": "Shared/Footer.razor.css", - "inputFile": "Shared/Footer.razor.scss", + "outputFile": "Shared/ConfirmMessageBox.razor.css", + "inputFile": "Shared/ConfirmMessageBox.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Shared/Header.razor.css", - "inputFile": "Shared/Header.razor.scss", + "outputFile": "Shared/MessageBox.razor.css", + "inputFile": "Shared/MessageBox.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Shared/MainLayout.razor.css", - "inputFile": "Shared/MainLayout.razor.scss", + "outputFile": "Shared/Header.razor.css", + "inputFile": "Shared/Header.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Shared/MessageBox.razor.css", - "inputFile": "Shared/MessageBox.razor.scss", + "outputFile": "Shared/Footer.razor.css", + "inputFile": "Shared/Footer.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, @@ -47,6 +48,12 @@ "minify": { "enabled": false }, "options": { "sourceMap": false } }, + { + "outputFile": "Shared/SignOutConfirmModal.razor.css", + "inputFile": "Shared/SignOutConfirmModal.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, { "outputFile": "Shared/PageNotFound.razor.css", "inputFile": "Shared/PageNotFound.razor.scss", @@ -54,117 +61,126 @@ "options": { "sourceMap": false } }, { - "outputFile": "Shared/SignOutConfirmModal.razor.css", - "inputFile": "Shared/SignOutConfirmModal.razor.scss", + "outputFile": "Pages/HomePage.razor.css", + "inputFile": "Pages/HomePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Categories/AddOrEditCategoryPage.razor.css", - "inputFile": "Pages/Categories/AddOrEditCategoryPage.razor.scss", + "outputFile": "Pages/TermsPage.razor.css", + "inputFile": "Pages/TermsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Categories/CategoriesPage.razor.css", - "inputFile": "Pages/Categories/CategoriesPage.razor.scss", + "outputFile": "Pages/Identity/SignUpPage.razor.css", + "inputFile": "Pages/Identity/SignUpPage.razor.scss", + "minify": { "enabled": false }, + "options": { "sourceMap": false } + }, + { + "outputFile": "Pages/Identity/SignInPage.razor.css", + "inputFile": "Pages/Identity/SignInPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Home/HomePage.razor.css", - "inputFile": "Pages/Home/HomePage.razor.scss", + "outputFile": "Pages/Identity/EmailConfirmationPage.razor.css", + "inputFile": "Pages/Identity/EmailConfirmationPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Home/OverallStatsWidget.razor.css", - "inputFile": "Pages/Home/OverallStatsWidget.razor.scss", + "outputFile": "Pages/Identity/ForgotPasswordPage.razor.css", + "inputFile": "Pages/Identity/ForgotPasswordPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Home/ProductsCountPerCategotyWidget.razor.css", - "inputFile": "Pages/Home/ProductsCountPerCategotyWidget.razor.scss", + "outputFile": "Pages/Identity/ResetPasswordPage.razor.css", + "inputFile": "Pages/Identity/ResetPasswordPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Home/ProductsPercentageWidget.razor.css", - "inputFile": "Pages/Home/ProductsPercentageWidget.razor.scss", + "outputFile": "Pages/Identity/EditProfilePage.razor.css", + "inputFile": "Pages/Identity/EditProfilePage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Home/ProductsSalesWidget.razor.css", - "inputFile": "Pages/Home/ProductsSalesWidget.razor.scss", + "outputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.css", + "inputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Products/AddOrEditProductModal.razor.css", - "inputFile": "Pages/Products/AddOrEditProductModal.razor.scss", + "outputFile": "wwwroot/styles/app.css", + "inputFile": "Styles/app.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, + //#if (sample == "Todo") { - "outputFile": "Pages/Products/ProductsPage.razor.css", - "inputFile": "Pages/Products/ProductsPage.razor.scss", + "outputFile": "Pages/TodoPage.razor.css", + "inputFile": "Pages/TodoPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, + //#elif (sample == "AdminPanel") { - "outputFile": "Pages/Identity/EditProfilePage.razor.css", - "inputFile": "Pages/Identity/EditProfilePage.razor.scss", + "outputFile": "Pages/Categories/AddOrEditCategoryPage.razor.css", + "inputFile": "Pages/Categories/AddOrEditCategoryPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.css", - "inputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.scss", + "outputFile": "Pages/Categories/CategoriesPage.razor.css", + "inputFile": "Pages/Categories/CategoriesPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/EmailConfirmationPage.razor.css", - "inputFile": "Pages/Identity/EmailConfirmationPage.razor.scss", + "outputFile": "Pages/Dashboard/DashboardPage.razor.css", + "inputFile": "Pages/Dashboard/DashboardPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/ForgotPasswordPage.razor.css", - "inputFile": "Pages/Identity/ForgotPasswordPage.razor.scss", + "outputFile": "Pages/Dashboard/OverallStatsWidget.razor.css", + "inputFile": "Pages/Dashboard/OverallStatsWidget.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/ResetPasswordPage.razor.css", - "inputFile": "Pages/Identity/ResetPasswordPage.razor.scss", + "outputFile": "Pages/Dashboard/ProductsCountPerCategotyWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsCountPerCategotyWidget.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/SignInPage.razor.css", - "inputFile": "Pages/Identity/SignInPage.razor.scss", + "outputFile": "Pages/Dashboard/ProductsPercentageWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsPercentageWidget.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/Identity/SignUpPage.razor.css", - "inputFile": "Pages/Identity/SignUpPage.razor.scss", + "outputFile": "Pages/Dashboard/ProductsSalesWidget.razor.css", + "inputFile": "Pages/Dashboard/ProductsSalesWidget.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "Pages/TermsPage.razor.css", - "inputFile": "Pages/TermsPage.razor.scss", + "outputFile": "Pages/Products/AddOrEditProductModal.razor.css", + "inputFile": "Pages/Products/AddOrEditProductModal.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } }, { - "outputFile": "wwwroot/styles/app.css", - "inputFile": "Styles/app.scss", + "outputFile": "Pages/Products/ProductsPage.razor.css", + "inputFile": "Pages/Products/ProductsPage.razor.scss", "minify": { "enabled": false }, "options": { "sourceMap": false } } + //#endif ] \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/tsconfig.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/tsconfig.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/tsconfig.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/tsconfig.json diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/backgrounds/empty-todo-list-bg.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/backgrounds/empty-todo-list-bg.svg similarity index 100% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/backgrounds/empty-todo-list-bg.svg rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/backgrounds/empty-todo-list-bg.svg diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-logo.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-logo.svg new file mode 100644 index 0000000000..731f817a0b --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-white-logo.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-white-logo.svg new file mode 100644 index 0000000000..7fd6d5fdec --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/bit-white-logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/checkmark-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/checkmark-icon.svg new file mode 100644 index 0000000000..c947578bfd --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/checkmark-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/chevron-bottom-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/chevron-bottom-icon.svg new file mode 100644 index 0000000000..acaac8a1ce --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/chevron-bottom-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/error-triangle.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/error-triangle.svg similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Core/wwwroot/images/icons/error-triangle.svg rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/error-triangle.svg diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/github-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/github-icon.svg new file mode 100644 index 0000000000..017e500b46 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/github-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/linkedin-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/linkedin-icon.svg new file mode 100644 index 0000000000..46dbbae496 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/linkedin-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/twitter-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/twitter-icon.svg new file mode 100644 index 0000000000..27f2d6111b --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/twitter-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/youtube-icon.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/youtube-icon.svg new file mode 100644 index 0000000000..7e4cbaa633 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/icons/youtube-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/menu-banner.webp b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/menu-banner.webp new file mode 100644 index 0000000000..0df2ac5d82 Binary files /dev/null and b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/menu-banner.webp differ diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/sign-in-up-bg.webp b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/sign-in-up-bg.webp new file mode 100644 index 0000000000..ce8e620a5e Binary files /dev/null and b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/sign-in-up-bg.webp differ diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg-hover.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg-hover.svg new file mode 100644 index 0000000000..d2f96f2b68 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg-hover.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg.svg b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg.svg new file mode 100644 index 0000000000..bf5709716f --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Core/wwwroot/images/stat-card-bg.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/.config/dotnet-tools.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/.config/dotnet-tools.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/.config/dotnet-tools.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/.config/dotnet-tools.json diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/AdminPanel.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Boilerplate.Client.Web.csproj similarity index 86% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/AdminPanel.Client.Web.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Boilerplate.Client.Web.csproj index 27b3d7397e..74b67563db 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/AdminPanel.Client.Web.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Boilerplate.Client.Web.csproj @@ -56,19 +56,21 @@ - + - - - + + + - + + + @@ -87,8 +89,8 @@ - - + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Extensions/HttpRequestExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Extensions/HttpRequestExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Extensions/HttpRequestExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Extensions/HttpRequestExtensions.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs similarity index 92% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs index ee64f1421a..cfa1f63049 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs @@ -1,4 +1,4 @@ -using AdminPanel.Client.Web.Services; +using Boilerplate.Client.Web.Services; namespace Microsoft.Extensions.DependencyInjection; diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/AppBswupProgressBar.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/AppBswupProgressBar.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/AppBswupProgressBar.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/AppBswupProgressBar.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/AppBupProgressBar.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/AppBupProgressBar.razor similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/AppBupProgressBar.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/AppBupProgressBar.razor diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Host.cshtml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Host.cshtml similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Host.cshtml rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Host.cshtml index 857ecb203d..d5946dadf8 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Host.cshtml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Host.cshtml @@ -1,7 +1,7 @@ @page "/" -@using AdminPanel.Client.Core -@using AdminPanel.Shared.Infra; -@namespace AdminPanel.Client.Web.Pages +@using Boilerplate.Client.Core +@using Boilerplate.Shared.Infra; +@namespace Boilerplate.Client.Web.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @{ diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Layout.cshtml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Layout.cshtml similarity index 84% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Layout.cshtml rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Layout.cshtml index a998d555df..76455248a7 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Pages/_Layout.cshtml +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Pages/_Layout.cshtml @@ -1,9 +1,10 @@ -@using Bit.BlazorUI -@using AdminPanel.Shared.Infra +@*+:cnd:noEmit*@ +@using Bit.BlazorUI +@using Boilerplate.Shared.Infra @using Microsoft.AspNetCore.Components.Web @using RenderMode = Microsoft.AspNetCore.Mvc.Rendering.RenderMode -@namespace AdminPanel.Client.Web.Pages +@namespace Boilerplate.Client.Web.Pages @inject IHttpContextAccessor ContextAccessor @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @@ -49,7 +50,7 @@ - + @@ -62,15 +63,17 @@
@if (isSpa || isPwa || noPrerender) { - + } - - + + @RenderBody() + @*#if (sample == "AdminPanel")*@ + @*#endif*@
@if (isPrerenderedOnly is false) @@ -121,10 +124,12 @@ } + @*#if (sample == "AdminPanel")*@ + @*#endif*@ } - + @if ((isSpaPrerendered || isPwaPrerendered) && !noPrerender) { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorElectron.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorElectron.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorElectron.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorElectron.cs index 10d4f0301d..2afd4a901a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorElectron.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorElectron.cs @@ -4,7 +4,7 @@ using ElectronNET.API.Entities; #endif -namespace AdminPanel.Client.Web; +namespace Boilerplate.Client.Web; public partial class Program { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorServer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorServer.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorServer.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorServer.cs index debcee9a15..2b9ddf1416 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorServer.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorServer.cs @@ -1,6 +1,6 @@ //-:cnd:noEmit -namespace AdminPanel.Client.Web; +namespace Boilerplate.Client.Web; public partial class Program { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorWebAssembly.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorWebAssembly.cs similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorWebAssembly.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorWebAssembly.cs index dc2c0cc172..c6ee280df7 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.BlazorWebAssembly.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.BlazorWebAssembly.cs @@ -1,11 +1,11 @@ //-:cnd:noEmit #if BlazorWebAssembly -using AdminPanel.Client.Core.Services.HttpMessageHandlers; +using Boilerplate.Client.Core.Services.HttpMessageHandlers; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.AspNetCore.Components.WebAssembly.Services; #endif -namespace AdminPanel.Client.Web; +namespace Boilerplate.Client.Web; public partial class Program { @@ -33,6 +33,7 @@ public static WebAssemblyHost CreateHostBuilder(string[] args) return httpClient; }); builder.Services.AddScoped(); + builder.Services.AddScoped(); builder.Services.AddTransient(); builder.Services.AddSharedServices(); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.cs similarity index 92% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.cs index 3d6b30e90b..b4fd88b5d1 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Program.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Client.Web; +namespace Boilerplate.Client.Web; public partial class Program { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Properties/launchSettings.json similarity index 86% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Properties/launchSettings.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Properties/launchSettings.json index 7cc97840f3..c9e8f55c94 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Properties/launchSettings.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "AdminPanel.Client.Web": { + "Boilerplate.Client.Web": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, @@ -9,7 +9,7 @@ }, "applicationUrl": "https://localhost:4031;http://localhost:4030" }, - "AdminPanel.Client.Web.Electron": { + "Boilerplate.Client.Web.Electron": { "commandName": "Executable", "executablePath": "dotnet", "commandLineArgs": "electronize start", diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs similarity index 89% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs index d6fe109f13..eb0a119e28 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/ServerSideAuthTokenProvider.cs @@ -3,7 +3,7 @@ using System.Reflection; #endif -namespace TodoTemplate.Client.Web.Services; +namespace Boilerplate.Client.Web.Services; /// /// The reads the token from the cookie, @@ -42,9 +42,9 @@ public ServerSideAuthTokenProvider(IHttpContextAccessor httpContextAccessor) _httpContextAccessor = httpContextAccessor; } - public Task GetAccessTokenAsync() + public async Task GetAccessTokenAsync() { - return Task.FromResult(_httpContextAccessor.HttpContext?.Request.Cookies["access_token"]); + return _httpContextAccessor.HttpContext?.Request.Cookies["access_token"]; } } #endif diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebDeviceCoordinator.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebDeviceCoordinator.cs similarity index 57% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebDeviceCoordinator.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebDeviceCoordinator.cs index 2c652df435..3f660034ee 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebDeviceCoordinator.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebDeviceCoordinator.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Web.Services; +namespace Boilerplate.Client.Web.Services; public class WebDeviceCoordinator : IBitDeviceCoordinator { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebExceptionHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebExceptionHandler.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebExceptionHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebExceptionHandler.cs index efa363d5b9..5704acdd5d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Services/WebExceptionHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Services/WebExceptionHandler.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Client.Web.Services; +namespace Boilerplate.Client.Web.Services; public partial class WebExceptionHandler : ExceptionHandlerBase { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Middlewares.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Middlewares.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Middlewares.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Middlewares.cs index 99186a054c..5c85553409 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Middlewares.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Middlewares.cs @@ -1,7 +1,7 @@ //-:cnd:noEmit #if BlazorServer -namespace AdminPanel.Client.Web.Startup; +namespace Boilerplate.Client.Web.Startup; public class Middlewares { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Services.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Services.cs similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Services.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Services.cs index b5bafcb54c..cd2aeba301 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/Startup/Services.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/Startup/Services.cs @@ -1,11 +1,11 @@ //-:cnd:noEmit #if BlazorServer using System.IO.Compression; -using AdminPanel.Client.Core.Services.HttpMessageHandlers; -using AdminPanel.Client.Web.Services; +using Boilerplate.Client.Core.Services.HttpMessageHandlers; +using Boilerplate.Client.Web.Services; using Microsoft.AspNetCore.ResponseCompression; -namespace AdminPanel.Client.Web.Startup; +namespace Boilerplate.Client.Web.Startup; public static class Services { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/electron.manifest.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/electron.manifest.json similarity index 79% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/electron.manifest.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/electron.manifest.json index c463a99468..f5dbfa4496 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/electron.manifest.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/electron.manifest.json @@ -1,15 +1,15 @@ { - "executable": "AdminPanel.Client.Web", + "executable": "Boilerplate.Client.Web", "splashscreen": { "imageFile": "" }, - "name": "AdminPanel", + "name": "Boilerplate", "author": "", "singleInstance": true, "environment": "Production", "build": { - "appId": "com.AdminPanel.Client.Web.app", - "productName": "AdminPanel.Client.Web", + "appId": "com.Boilerplate.Client.Web.app", + "productName": "Boilerplate.Client.Web", "copyright": "Copyright © 2023", "buildVersion": "1.0.0", "compression": "maximum", diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/favicon.ico b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/favicon.ico similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/favicon.ico rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/favicon.ico diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/images/icons/bit-icon-512.png b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/images/icons/bit-icon-512.png similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/images/icons/bit-icon-512.png rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/images/icons/bit-icon-512.png diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/manifest.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/manifest.json similarity index 71% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/manifest.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/manifest.json index 1c8d1c3563..6d49b782c8 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/manifest.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/manifest.json @@ -4,16 +4,16 @@ "scope": "/", "start_url": "/", "orientation": "any", - "id": "bitAdminPanel", + "id": "bitBoilerplate", "display": "standalone", "theme_color": "#2EA3FF", "related_applications": [], - "name": "bit AdminPanel", + "name": "bit Boilerplate", "background_color": "#0D1117", - "short_name": "bit AdminPanel", + "short_name": "bit Boilerplate", "prefer_related_applications": false, "display_override": [ "window-controls-overlay" ], - "description": "bit AdminPanel is a project template that includes all the necessary parts to create a fully-featured admin/management website.", + "description": "bit Boilerplate is a project template that includes all the necessary parts to create a fully-featured web app.", "features": [ "Cross Platform", "fast", @@ -34,6 +34,12 @@ "name": "Terms", "url": "/terms" }, + //#if (sample == "Todo") + { + "name": "Todo", + "url": "/todo" + }, + //#elif (sample == "AdminPanel") { "name": "Categories", "url": "/categories" @@ -42,6 +48,7 @@ "name": "Products", "url": "/products" }, + //#endif { "name": "EditProfile", "url": "/edit-profile" diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/service-worker.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/service-worker.js similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/service-worker.js rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/service-worker.js diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/service-worker.published.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/service-worker.published.js similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Client/Web/wwwroot/service-worker.published.js rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Web/wwwroot/service-worker.published.js diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Directory.Build.props b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Directory.Build.props rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props index dbb14c60b8..3babd6b311 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Directory.Build.props +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props @@ -1,4 +1,4 @@ - + @@ -59,13 +59,13 @@ - - - - - - - + + + + + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdminPanel.Iac.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Boilerplate.Iac.csproj similarity index 84% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdminPanel.Iac.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Boilerplate.Iac.csproj index 55641b6830..407dcb746b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdminPanel.Iac.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Boilerplate.Iac.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdStack.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/BpStack.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdStack.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/BpStack.cs index 072599c93a..12b842ee1b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Infra/Iac/AdStack.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/BpStack.cs @@ -18,18 +18,18 @@ using VaultSkuName = Pulumi.AzureNative.KeyVault.SkuName; using WebAppManagedServiceIdentityArgs = Pulumi.AzureNative.Web.Inputs.ManagedServiceIdentityArgs; -namespace AdminPanel.Iac; +namespace Boilerplate.Iac; -public class AdStack : Stack +public class BpStack : Stack { - public AdStack() + public BpStack() { string stackName = Pulumi.Deployment.Instance.StackName; Config pulumiConfig = new(); - var sqlDatabaseDbAdminId = pulumiConfig.Require("sql-server-ad-db-admin-id"); - var sqlDatabaseDbAdminPassword = pulumiConfig.RequireSecret("sql-server-ad-db-admin-password"); + var sqlDatabaseDbAdminId = pulumiConfig.Require("sql-server-bp-db-admin-id"); + var sqlDatabaseDbAdminPassword = pulumiConfig.RequireSecret("sql-server-bp-db-admin-password"); var defaultEmailFrom = pulumiConfig.Require("default-email-from"); var emailServerHost = pulumiConfig.Require("email-server-host"); @@ -39,22 +39,22 @@ public AdStack() var identityCertificatePassword = pulumiConfig.RequireSecret("identity-certificate-password"); - ResourceGroup resourceGroup = new($"ad-{stackName}", new ResourceGroupArgs + ResourceGroup resourceGroup = new($"bp-{stackName}", new ResourceGroupArgs { - ResourceGroupName = $"ad-{stackName}" - }, options: new() { ImportId = $"/subscriptions/{GetClientConfig.InvokeAsync().GetAwaiter().GetResult().SubscriptionId}/resourceGroups/ad-prod" }); + ResourceGroupName = $"bp-{stackName}" + }, options: new() { ImportId = $"/subscriptions/{GetClientConfig.InvokeAsync().GetAwaiter().GetResult().SubscriptionId}/resourceGroups/bp-prod" }); - Workspace appInsightsWorkspace = new($"insights-wkspc-ad-{stackName}", new() + Workspace appInsightsWorkspace = new($"insights-wkspc-bp-{stackName}", new() { - WorkspaceName = $"insights-wkspc-ad-{stackName}", + WorkspaceName = $"insights-wkspc-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, RetentionInDays = 30 }); - AppInsights appInsights = new($"app-insights-ad-{stackName}", new() + AppInsights appInsights = new($"app-insights-bp-{stackName}", new() { - ResourceName = $"app-insights-ad-{stackName}", + ResourceName = $"app-insights-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ApplicationType = AppInsightsWebApplicationType.Web, @@ -68,18 +68,18 @@ public AdStack() }).Apply(workspace => workspace.Id) }); - SqlServer sqlServer = new($"sql-server-ad-{stackName}", new() + SqlServer sqlServer = new($"sql-server-bp-{stackName}", new() { - ServerName = $"sql-server-ad-{stackName}", + ServerName = $"sql-server-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, AdministratorLogin = sqlDatabaseDbAdminId, AdministratorLoginPassword = sqlDatabaseDbAdminPassword }); - SqlDatabase sqlDatabase = new($"sql-database-ad-{stackName}", new() + SqlDatabase sqlDatabase = new($"sql-database-bp-{stackName}", new() { - DatabaseName = $"sql-database-ad-{stackName}", + DatabaseName = $"sql-database-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ServerName = sqlServer.Name, @@ -91,9 +91,9 @@ public AdStack() } }); - AppServicePlan appServicePlan = new($"app-plan-ad-{stackName}", new() + AppServicePlan appServicePlan = new($"app-plan-bp-{stackName}", new() { - Name = $"app-plan-ad-{stackName}", + Name = $"app-plan-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, Kind = "Linux", @@ -108,14 +108,14 @@ public AdStack() } }); - string vaultName = $"vault-ad-{stackName}"; + string vaultName = $"vault-bp-{stackName}"; string sqlDatabaseConnectionStringSecretName = $"sql-connection-secret"; string emailServerPasswordSecretName = "email-server-password-secret"; string identityCertificatePasswordSecretName = "identity-certificate-password-secret"; - WebApp webApp = new($"app-service-ad-{stackName}", new() + WebApp webApp = new($"app-service-bp-{stackName}", new() { - Name = $"app-service-ad-{stackName}", + Name = $"app-service-bp-{stackName}", ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, ServerFarmId = appServicePlan.Id, @@ -131,9 +131,9 @@ public AdStack() NetFrameworkVersion = "v8.0", FtpsState = FtpsState.Disabled, LinuxFxVersion = "DOTNETCORE|8.0", - AppCommandLine = "dotnet AdminPanel.Server.Api.dll", - AppSettings = new() - { + AppCommandLine = "dotnet Boilerplate.Server.Api.dll", + AppSettings = + [ new NameValuePairArgs { Name = "ApplicationInsights__InstrumentationKey", Value = appInsights.InstrumentationKey }, new NameValuePairArgs { Name = "APPINSIGHTS_INSTRUMENTATIONKEY", Value = appInsights.InstrumentationKey }, new NameValuePairArgs { Name = "ASPNETCORE_ENVIRONMENT", Value = stackName == "test" ? "Test" : "Production" }, @@ -160,16 +160,16 @@ public AdStack() Name = "AppSettings__JwtSettings__IdentityCertificatePassword", Value = $"@Microsoft.KeyVault(VaultName={vaultName};SecretName={identityCertificatePasswordSecretName})" }, - }, - ConnectionStrings = new() - { + ], + ConnectionStrings = + [ new ConnStringInfoArgs { Name = "SqlServerConnectionString", Type = ConnectionStringType.SQLAzure, ConnectionString = $"@Microsoft.KeyVault(VaultName={vaultName};SecretName={sqlDatabaseConnectionStringSecretName})" } - } + ] } }); @@ -201,7 +201,7 @@ public AdStack() return string.Empty; }); - Vault vault = new Vault($"vault-ad-{stackName}", new() + Vault vault = new Vault($"vault-bp-{stackName}", new() { ResourceGroupName = resourceGroup.Name, Location = resourceGroup.Location, @@ -216,8 +216,7 @@ public AdStack() EnableSoftDelete = false, AccessPolicies = new List { - new AccessPolicyEntryArgs - { + new() { TenantId = Output.Create(GetClientConfig.InvokeAsync()).Apply(clientConfig => clientConfig.TenantId), ObjectId = Output.Tuple(resourceGroup.Name, webApp.Name).Apply(t => { @@ -268,7 +267,7 @@ public AdStack() Value = Output.Tuple(sqlServer.Name, sqlDatabase.Name, sqlDatabaseDbAdminPassword).Apply(t => { (string _sqlServer, string _sqlDatabase, string _sqlDatabasePassword) = t; - return $"Data Source=tcp:{_sqlServer}.database.windows.net;Initial Catalog={_sqlDatabase};User ID={sqlDatabaseDbAdminId};Password={_sqlDatabasePassword};Application Name=AdminPanel;Encrypt=True;"; + return $"Data Source=tcp:{_sqlServer}.database.windows.net;Initial Catalog={_sqlDatabase};User ID={sqlDatabaseDbAdminId};Password={_sqlDatabasePassword};Application Name=Boilerplate;Encrypt=True;"; }) } }); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Program.cs new file mode 100644 index 0000000000..0d0c361e44 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Program.cs @@ -0,0 +1,7 @@ +using Boilerplate.Iac; +using Pulumi; + +public class Program +{ + static Task Main() => Deployment.RunAsync(); +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Pulumi.yaml b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Pulumi.yaml new file mode 100644 index 0000000000..384774b675 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Pulumi.yaml @@ -0,0 +1,3 @@ +name: Boilerplate.Iac +runtime: dotnet +description: Boilerplate infrastructure as a code diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Readme.md b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Readme.md similarity index 73% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Readme.md rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Readme.md index 14526bb575..069762e644 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Readme.md +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Infra/Iac/Readme.md @@ -25,26 +25,26 @@ az provider register --namespace 'Microsoft.KeyVault' ``` -2- Create td-prod resource group +2- Create bp-prod resource group ``` -az group create --name td-prod --location eastus +az group create --name bp-prod --location eastus ``` Notes: -* `td` is an abbreviation for Todo, use the acronym of your choice and replace td with that (for example abc) using exact match - case sensitive find and replace in this file and TdStack.cs. +* `bp` is an abbreviation for Boilerplate, use the acronym of your choice and replace bp with that (for example abc) using exact match - case sensitive find and replace in this file and AdStack.cs. * You can use any location supported by azure cloud (run `az account list-locations -o table` to see full list of locations) 3- Create [service principals](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals) for prod using followings: ``` -az ad sp create-for-rbac -n "td-prod" --role Contributor --scopes /subscriptions/{subscriptionId}/resourceGroups/td-prod +az bp sp create-for-rbac -n "bp-prod" --role Contributor --scopes /subscriptions/{subscriptionId}/resourceGroups/bp-prod ``` Notes: * Replace `{subscriptionId}` with [your own subscription id](https://docs.microsoft.com/en-us/azure/media-services/latest/setup-azure-subscription-how-to) -* Running `az ad sp` will return a json like response that contains `appId`l, `password` and `tenant`. Store them somewhere safe. +* Running `az bp sp` will return a json like response that contains `appId`l, `password` and `tenant`. Store them somewhere safe. 4- Create the stacks folder first, then create `prod` folder in the `stacks` folder. @@ -86,18 +86,18 @@ pulumi config set azure-native:tenantId pulumi config set azure-native:subscriptionId # Provide SQL server's admin user/pass -pulumi config set TodoTemplate.Iac:sql-server-td-db-admin-id -pulumi config set TodoTemplate.Iac:sql-server-td-db-admin-password --secret +pulumi config set Boilerplate.Iac:sql-server-bp-db-admin-id +pulumi config set Boilerplate.Iac:sql-server-bp-db-admin-password --secret # Provide SMTP server's host, port, user, pass and default email sender. -pulumi config set TodoTemplate.Iac:default-email-from -pulumi config set TodoTemplate.Iac:email-server-host -pulumi config set TodoTemplate.Iac:email-server-port -pulumi config set TodoTemplate.Iac:email-server-userName -pulumi config set TodoTemplate.Iac:email-server-password --secret +pulumi config set Boilerplate.Iac:default-email-from +pulumi config set Boilerplate.Iac:email-server-host +pulumi config set Boilerplate.Iac:email-server-port +pulumi config set Boilerplate.Iac:email-server-userName +pulumi config set Boilerplate.Iac:email-server-password --secret # Create and provide an identity certificate password -pulumi config set TodoTemplate.Iac:identity-certificate-password --secret +pulumi config set Boilerplate.Iac:identity-certificate-password --secret ``` 9- Create azure resources using: diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/.config/dotnet-tools.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/.config/dotnet-tools.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/.config/dotnet-tools.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/.config/dotnet-tools.json diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AppSettings.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/AppSettings.cs similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AppSettings.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/AppSettings.cs index 7e18beb96e..caf9a84962 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/AppSettings.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/AppSettings.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api; +namespace Boilerplate.Server.Api; public class AppSettings { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/TodoTemplate.Server.Api.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Boilerplate.Server.Api.csproj similarity index 92% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/TodoTemplate.Server.Api.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Boilerplate.Server.Api.csproj index 803fef4cb4..55efb82e38 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/TodoTemplate.Server.Api.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Boilerplate.Server.Api.csproj @@ -12,7 +12,7 @@ - + @@ -58,27 +58,22 @@ - + - - - + + + + - - - - - - Always - + @@ -94,4 +89,10 @@ + + + Always + + + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AppControllerBase.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AppControllerBase.cs similarity index 87% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AppControllerBase.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AppControllerBase.cs index 48bfeaef9c..dbd3020a72 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AppControllerBase.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AppControllerBase.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Controllers; +namespace Boilerplate.Server.Api.Controllers; public partial class AppControllerBase : ControllerBase { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AttachmentController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AttachmentController.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AttachmentController.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AttachmentController.cs index 0ff49642db..dc9eecace9 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/AttachmentController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/AttachmentController.cs @@ -1,9 +1,9 @@ -using AdminPanel.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Models.Identity; using ImageMagick; using MimeTypes; using SystemFile = System.IO.File; -namespace AdminPanel.Server.Api.Controllers; +namespace Boilerplate.Server.Api.Controllers; [Route("api/[controller]/[action]")] [ApiController] diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Categories/CategoryController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Categories/CategoryController.cs new file mode 100644 index 0000000000..0c5d2a070e --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Categories/CategoryController.cs @@ -0,0 +1,89 @@ +using Boilerplate.Server.Api.Models.Categories; +using Boilerplate.Shared.Dtos.Categories; + +namespace Boilerplate.Server.Api.Controllers; + +[Route("api/[controller]/[action]")] +[ApiController] +public partial class CategoryController : AppControllerBase +{ + [HttpGet, EnableQuery] + public IQueryable Get() + { + return DbContext.Categories + .Project(); + } + + [HttpGet("{id:int}")] + public async Task Get(int id, CancellationToken cancellationToken) + { + var category = await Get().FirstOrDefaultAsync(t => t.Id == id, cancellationToken); + + if (category is null) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.CategoryCouldNotBeFound)]); + + return category; + } + + [HttpGet] + public async Task> GetCategories(ODataQueryOptions odataQuery, CancellationToken cancellationToken) + { + var query = (IQueryable)odataQuery.ApplyTo(Get(), ignoreQueryOptions: AllowedQueryOptions.Top | AllowedQueryOptions.Skip); + + var totalCount = await query.LongCountAsync(cancellationToken); + + if (odataQuery.Skip is not null) + query = query.Skip(odataQuery.Skip.Value); + + if (odataQuery.Top is not null) + query = query.Take(odataQuery.Top.Value); + + return new PagedResult(await query.ToListAsync(cancellationToken), totalCount); + } + + [HttpPost] + public async Task Create(CategoryDto dto, CancellationToken cancellationToken) + { + var categoryToAdd = dto.Map(); + + await DbContext.Categories.AddAsync(categoryToAdd, cancellationToken); + + await DbContext.SaveChangesAsync(cancellationToken); + + return categoryToAdd.Map(); + } + + [HttpPut] + public async Task Update(CategoryDto dto, CancellationToken cancellationToken) + { + var categoryToUpdate = await DbContext.Categories.FirstOrDefaultAsync(t => t.Id == dto.Id, cancellationToken); + + if (categoryToUpdate is null) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.ProductCouldNotBeFound)]); + + dto.Patch(categoryToUpdate); + + await DbContext.SaveChangesAsync(cancellationToken); + + categoryToUpdate.Patch(dto); + + return dto; + } + + [HttpDelete("{id:int}")] + public async Task Delete(int id, CancellationToken cancellationToken) + { + if (await DbContext.Products.AnyAsync(p => p.CategoryId == id)) + { + throw new BadRequestException(Localizer[nameof(AppStrings.CategoryNotEmpty)]); + } + + DbContext.Remove(new Category { Id = id }); + + var affectedRows = await DbContext.SaveChangesAsync(cancellationToken); + + if (affectedRows < 1) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.CategoryCouldNotBeFound)]); + } +} + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/AuthController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/AuthController.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/AuthController.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/AuthController.cs index d23a0aa4a8..cb32eb61d1 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/AuthController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/AuthController.cs @@ -1,14 +1,14 @@ //-:cnd:noEmit using System.Web; -using AdminPanel.Server.Api.Models.Emailing; -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Server.Api.Resources; -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Server.Api.Models.Emailing; +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Resources; +using Boilerplate.Shared.Dtos.Identity; using FluentEmail.Core; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; -namespace AdminPanel.Server.Api.Controllers; +namespace Boilerplate.Server.Api.Controllers.Identity; [Microsoft.AspNetCore.Mvc.Route("api/[controller]/[action]")] [ApiController, AllowAnonymous] @@ -26,6 +26,8 @@ public partial class AuthController : AppControllerBase [AutoInject] private HtmlRenderer _htmlRenderer = default!; + [AutoInject] protected IStringLocalizer IdentityLocalizer = default!; + /// /// By leveraging summary tags in your controller's actions and DTO properties you can make your codes much easier to maintain. /// These comments will also be used in swagger docs and ui. @@ -54,7 +56,7 @@ public async Task SignUp(SignUpRequestDto signUpRequest, CancellationToken cance if (result.Succeeded is false) { - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, signUpRequest.Email!)).ToArray()); + throw new ResourceValidationException(result.Errors.Select(e => IdentityLocalizer.GetString(e.Code, signUpRequest.Email!)).ToArray()); } await SendConfirmationEmail(new() { Email = userToAdd.Email }, userToAdd, cancellationToken); @@ -206,7 +208,7 @@ public async Task ResetPassword(ResetPasswordRequestDto resetPasswordRequest) var result = await _userManager.ResetPasswordAsync(user, resetPasswordRequest.Token!, resetPasswordRequest.Password!); if (!result.Succeeded) - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, resetPasswordRequest.Email!)).ToArray()); + throw new ResourceValidationException(result.Errors.Select(e => IdentityLocalizer.GetString(e.Code, resetPasswordRequest.Email!)).ToArray()); } [HttpPost] diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/UserController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/UserController.cs similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/UserController.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/UserController.cs index eb75ff8787..e72638f6b8 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Controllers/Identity/UserController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Identity/UserController.cs @@ -1,7 +1,7 @@ -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Shared.Dtos.Identity; -namespace AdminPanel.Server.Api.Controllers.Identity; +namespace Boilerplate.Server.Api.Controllers.Identity; [Route("api/[controller]/[action]")] [ApiController] diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/DashboardController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/DashboardController.cs new file mode 100644 index 0000000000..7f8572807c --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/DashboardController.cs @@ -0,0 +1,67 @@ +using Boilerplate.Shared.Dtos.Dashboard; + +namespace Boilerplate.Server.Api.Controllers; + +[Route("api/[controller]/[action]")] +[ApiController] +public partial class DashboardController : AppControllerBase +{ + [HttpGet] + public async Task GetOverallAnalyticsStatsData() + { + var result = new OverallAnalyticsStatsDataDto(); + + var last30DaysDate = DateTimeOffset.UtcNow.AddDays(-30); + + result.TotalProducts = await DbContext.Products.CountAsync(); + result.Last30DaysProductCount = await DbContext.Products.CountAsync(p => p.CreatedOn > last30DaysDate); + result.TotalCategories = await DbContext.Categories.CountAsync(); + + return result; + } + + [HttpGet] + public async Task> GetProductsCountPerCategotyStats() + { + return await DbContext.Categories + .Select(c => new ProductsCountPerCategoryDto() + { + CategoryName = c.Name, + CategoryColor = c.Color, + ProductCount = c.Products!.Count() + }).ToListAsync(); + } + + [HttpGet] + public async Task> GetProductsSalesStats() + { + Random rand = new Random(); + return await DbContext.Products.Include(p => p.Category) + .Select(p => new ProductSaleStatDto() + { + ProductName = p.Name, + CategoryColor = p.Category!.Color, + SaleAmount = rand.Next(1, 10) * p.Price + }).ToListAsync(); + } + + + [HttpGet] + public async Task> GetProductsPercentagePerCategoryStats() + { + var productsTotalCount = await DbContext.Products.CountAsync(); + + if (productsTotalCount == 0) + { + return []; + } + + return await DbContext.Categories + .Select(c => new ProductPercentagePerCategoryDto() + { + CategoryName = c!.Name, + CategoryColor = c.Color, + ProductPercentage = (float)decimal.Divide(c.Products!.Count(), productsTotalCount) * 100 + }).ToListAsync(); + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/ProductController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/ProductController.cs new file mode 100644 index 0000000000..842ee7bad8 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Products/ProductController.cs @@ -0,0 +1,84 @@ +using Boilerplate.Server.Api.Models.Products; +using Boilerplate.Shared.Dtos.Products; + +namespace Boilerplate.Server.Api.Controllers; + +[Route("api/[controller]/[action]")] +[ApiController] +public partial class ProductController : AppControllerBase +{ + [HttpGet, EnableQuery] + public IQueryable Get() + { + return DbContext.Products + .Project(); + } + + [HttpGet("{id:int}")] + public async Task Get(int id, CancellationToken cancellationToken) + { + var product = await Get().FirstOrDefaultAsync(t => t.Id == id, cancellationToken); + + if (product is null) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.ProductCouldNotBeFound)]); + + return product; + } + + [HttpGet] + public async Task> GetProducts(ODataQueryOptions odataQuery, CancellationToken cancellationToken) + { + var query = (IQueryable)odataQuery.ApplyTo(Get(), ignoreQueryOptions: AllowedQueryOptions.Top | AllowedQueryOptions.Skip); + + var totalCount = await query.LongCountAsync(cancellationToken); + + if (odataQuery.Skip is not null) + query = query.Skip(odataQuery.Skip.Value); + + if (odataQuery.Top is not null) + query = query.Take(odataQuery.Top.Value); + + return new PagedResult(await query.ToListAsync(cancellationToken), totalCount); + } + + [HttpPost] + public async Task Create(ProductDto dto, CancellationToken cancellationToken) + { + var productToAdd = dto.Map(); + + await DbContext.Products.AddAsync(productToAdd, cancellationToken); + + await DbContext.SaveChangesAsync(cancellationToken); + + return productToAdd.Map(); + } + + [HttpPut] + public async Task Update(ProductDto dto, CancellationToken cancellationToken) + { + var productToUpdate = await DbContext.Products.FirstOrDefaultAsync(t => t.Id == dto.Id, cancellationToken); + + if (productToUpdate is null) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.ProductCouldNotBeFound)]); + + dto.Patch(productToUpdate); + + await DbContext.SaveChangesAsync(cancellationToken); + + productToUpdate.Patch(dto); + + return dto; + } + + [HttpDelete("{id:int}")] + public async Task Delete(int id, CancellationToken cancellationToken) + { + DbContext.Remove(new Product { Id = id }); + + var affectedRows = await DbContext.SaveChangesAsync(cancellationToken); + + if (affectedRows < 1) + throw new ResourceNotFoundException(Localizer[nameof(AppStrings.ProductCouldNotBeFound)]); + } +} + diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Todo/TodoItemController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Todo/TodoItemController.cs similarity index 72% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Todo/TodoItemController.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Todo/TodoItemController.cs index dfda14165b..4d1878595a 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Todo/TodoItemController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Controllers/Todo/TodoItemController.cs @@ -1,7 +1,7 @@ -using TodoTemplate.Server.Api.Models.Todo; -using TodoTemplate.Shared.Dtos.Todo; +using Boilerplate.Server.Api.Models.Todo; +using Boilerplate.Shared.Dtos.Todo; -namespace TodoTemplate.Server.Api.Controllers.Todo; +namespace Boilerplate.Server.Api.Controllers.Todo; [Route("api/[controller]/[action]")] [ApiController] @@ -28,6 +28,22 @@ public async Task Get(int id, CancellationToken cancellationToken) return todoItem; } + [HttpGet] + public async Task> GetTodoItems(ODataQueryOptions odataQuery, CancellationToken cancellationToken) + { + var query = (IQueryable)odataQuery.ApplyTo(Get(), ignoreQueryOptions: AllowedQueryOptions.Top | AllowedQueryOptions.Skip); + + var totalCount = await query.LongCountAsync(cancellationToken); + + if (odataQuery.Skip is not null) + query = query.Skip(odataQuery.Skip.Value); + + if (odataQuery.Top is not null) + query = query.Take(odataQuery.Top.Value); + + return new PagedResult(await query.ToListAsync(cancellationToken), totalCount); + } + [HttpPost] public async Task Create(TodoItemDto dto, CancellationToken cancellationToken) { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/AppDbContext.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/AppDbContext.cs similarity index 81% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/AppDbContext.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/AppDbContext.cs index 3e77f34e03..9b91b909c6 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/AppDbContext.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/AppDbContext.cs @@ -1,20 +1,25 @@ //+:cnd:noEmit -using AdminPanel.Server.Api.Models.Categories; -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Server.Api.Models.Products; +using Boilerplate.Server.Api.Models.Identity; +//#if (sample == "Todo") +using Boilerplate.Server.Api.Models.Todo; +//#elif (sample == "AdminPanel") +using Boilerplate.Server.Api.Models.Categories; +using Boilerplate.Server.Api.Models.Products; +//#endif using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace AdminPanel.Server.Api.Data; +namespace Boilerplate.Server.Api.Data; -public class AppDbContext : IdentityDbContext +public class AppDbContext(DbContextOptions options) + : IdentityDbContext(options) { - public AppDbContext(DbContextOptions options) - : base(options) - { - } + //#if (sample == "Todo") + public DbSet TodoItems { get; set; } + //#elif (sample == "AdminPanel") public DbSet Categories { get; set; } public DbSet Products { get; set; } + //#endif protected override void OnModelCreating(ModelBuilder builder) { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs new file mode 100644 index 0000000000..2b4fd700b0 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Category/CategoryConfiguration.cs @@ -0,0 +1,17 @@ +using Boilerplate.Server.Api.Models.Categories; + +namespace Boilerplate.Server.Api.Data.Configurations.Identity; + +public class CategoryConfiguration : IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + builder.HasData( + new Category() { Id = 1, Name = "Ford", Color = "#FFCD56" }, + new Category() { Id = 2, Name = "Nissan", Color = "#FF6384" }, + new Category() { Id = 3, Name = "Benz", Color = "#4BC0C0" }, + new Category() { Id = 4, Name = "BMW", Color = "#FF9124" }, + new Category() { Id = 5, Name = "Tesla", Color = "#2B88D8" }); + } +} + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs similarity index 64% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs index 758127f277..0b9daf017b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs @@ -1,6 +1,6 @@ -using AdminPanel.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Models.Identity; -namespace AdminPanel.Server.Api.Data.Configurations.Identity; +namespace Boilerplate.Server.Api.Data.Configurations.Identity; public class RoleConfiguration : IEntityTypeConfiguration { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs similarity index 82% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs index a37bb09315..c20556ec32 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs @@ -1,6 +1,6 @@ -using AdminPanel.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Models.Identity; -namespace AdminPanel.Server.Api.Data.Configurations.Identity; +namespace Boilerplate.Server.Api.Data.Configurations.Identity; public class UserConfiguration : IEntityTypeConfiguration { @@ -14,7 +14,7 @@ public void Configure(EntityTypeBuilder builder) EmailConfirmed = true, Gender = Gender.Other, BirthDate = new DateTime(2023, 1, 1), - FullName = "AdminPanel test account", + FullName = "Boilerplate test account", UserName = userName, Email = userName, NormalizedUserName = userName.ToUpperInvariant(), diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs new file mode 100644 index 0000000000..8121ccb574 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Configurations/Product/ProductConfiguration.cs @@ -0,0 +1,42 @@ +using Boilerplate.Server.Api.Models.Products; + +namespace Boilerplate.Server.Api.Data.Configurations.Identity; + +public class ProductConfiguration : IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + DateTime baseDate = DateTime.Parse("2022-07-12"); + + builder.HasData( + new Product() { Id = 1, Name = "Mustang", Price = 27155, Description = "The Ford Mustang is ranked #1 in Sports Cars", CreatedOn = baseDate.AddDays(-10), CategoryId = 1 }, + new Product() { Id = 2, Name = "GT", Price = 500000, Description = "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", CreatedOn = baseDate.AddDays(-15), CategoryId = 1 }, + new Product() { Id = 3, Name = "Ranger", Price = 25000, Description = "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", CreatedOn = baseDate.AddDays(-25), CategoryId = 1 }, + new Product() { Id = 4, Name = "Raptor", Price = 53205, Description = "Raptor is a SCORE off-road trophy truck living in a asphalt world", CreatedOn = baseDate.AddDays(-30), CategoryId = 1 }, + new Product() { Id = 5, Name = "Maverick", Price = 22470, Description = "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", CreatedOn = baseDate.AddDays(-35), CategoryId = 1 }, + + new Product() { Id = 6, Name = "Roadster", Price = 42800, Description = "A powerful convertible sports car", CreatedOn = baseDate.AddDays(-10), CategoryId = 2 }, + new Product() { Id = 7, Name = "Altima", Price = 24550, Description = "A perfectly adequate family sedan with sharp looks", CreatedOn = baseDate.AddDays(-15), CategoryId = 2 }, + new Product() { Id = 8, Name = "GT-R", Price = 113540, Description = "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", CreatedOn = baseDate.AddDays(-25), CategoryId = 2 }, + new Product() { Id = 9, Name = "Juke", Price = 28100, Description = "A new smart SUV", CreatedOn = baseDate.AddDays(-35), CategoryId = 2 }, + + new Product() { Id = 10, Name = "H247", Price = 54950, Description = "", CreatedOn = baseDate.AddDays(-10), CategoryId = 3 }, + new Product() { Id = 11, Name = "V297", Price = 103360, Description = "", CreatedOn = baseDate.AddDays(-15), CategoryId = 3 }, + new Product() { Id = 12, Name = "R50", Price = 2000000, Description = "", CreatedOn = baseDate.AddDays(-35), CategoryId = 3 }, + + new Product() { Id = 13, Name = "M550i", Price = 77790, Description = "", CreatedOn = baseDate.AddDays(-10), CategoryId = 4 }, + new Product() { Id = 14, Name = "540i", Price = 60945, Description = "", CreatedOn = baseDate.AddDays(-15), CategoryId = 4 }, + new Product() { Id = 15, Name = "530e", Price = 56545, Description = "", CreatedOn = baseDate.AddDays(-20), CategoryId = 4 }, + new Product() { Id = 16, Name = "530i", Price = 55195, Description = "", CreatedOn = baseDate.AddDays(-25), CategoryId = 4 }, + new Product() { Id = 17, Name = "M850i", Price = 100045, Description = "", CreatedOn = baseDate.AddDays(-30), CategoryId = 4 }, + new Product() { Id = 18, Name = "X7", Price = 77980, Description = "", CreatedOn = baseDate.AddDays(-35), CategoryId = 4 }, + new Product() { Id = 19, Name = "IX", Price = 87000, Description = "", CreatedOn = baseDate.AddDays(-40), CategoryId = 4 }, + + new Product() { Id = 20, Name = "Model 3", Price = 61990, Description = "rapid acceleration and dynamic handling", CreatedOn = baseDate.AddDays(-10), CategoryId = 5 }, + new Product() { Id = 21, Name = "Model S", Price = 135000, Description = "finishes near the top of our luxury electric car rankings.", CreatedOn = baseDate.AddDays(-15), CategoryId = 5 }, + new Product() { Id = 22, Name = "Model X", Price = 138890, Description = "Heart-pumping acceleration, long drive range", CreatedOn = baseDate.AddDays(-20), CategoryId = 5 }, + new Product() { Id = 23, Name = "Model Y", Price = 67790, Description = "extensive driving range, lots of standard safety features", CreatedOn = baseDate.AddDays(-35), CategoryId = 5 } + ); + } +} + diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.Designer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.Designer.cs new file mode 100644 index 0000000000..289e13c105 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.Designer.cs @@ -0,0 +1,670 @@ +// +using System; +using Boilerplate.Server.Api.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Boilerplate.Server.Api.Data.Migrations +{ + [DbContext(typeof(AppDbContext))] + [Migration("20231113190400_InitialMigration")] + partial class InitialMigration + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.ToTable("Categories"); + + b.HasData( + new + { + Id = 1, + Color = "#FFCD56", + Name = "Ford" + }, + new + { + Id = 2, + Color = "#FF6384", + Name = "Nissan" + }, + new + { + Id = 3, + Color = "#4BC0C0", + Name = "Benz" + }, + new + { + Id = 4, + Color = "#FF9124", + Name = "BMW" + }, + new + { + Id = 5, + Color = "#2B88D8", + Name = "Tesla" + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Identity.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("Roles", (string)null); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Identity.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetimeoffset"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("ConfirmationEmailRequestedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("FullName") + .HasColumnType("nvarchar(max)"); + + b.Property("Gender") + .HasColumnType("int"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("ProfileImageName") + .HasColumnType("nvarchar(max)"); + + b.Property("ResetPasswordEmailRequestedOn") + .HasColumnType("datetimeoffset"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("Users", (string)null); + + b.HasData( + new + { + Id = 1, + AccessFailedCount = 0, + BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), + ConcurrencyStamp = "abc2cc9f-82d8-4d0f-8b30-bdf46771be8a", + Email = "test@bitplatform.dev", + EmailConfirmed = true, + FullName = "Boilerplate test account", + Gender = 2, + LockoutEnabled = false, + NormalizedEmail = "TEST@BITPLATFORM.DEV", + NormalizedUserName = "TEST@BITPLATFORM.DEV", + PasswordHash = "AQAAAAIAAYagAAAAEPoTVhWmCK6tZktIeSD0sVticLeZ1o2EVYZ9tUbY+PPr3tnJ/ZbSn7ZTBq6N+vl7UQ==", + PhoneNumberConfirmed = false, + SecurityStamp = "bf6a9576-4c37-40bc-a4c2-7b42f3ec10cf", + TwoFactorEnabled = false, + UserName = "test@bitplatform.dev" + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Price") + .HasColumnType("money"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Products"); + + b.HasData( + new + { + Id = 1, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford Mustang is ranked #1 in Sports Cars", + Name = "Mustang", + Price = 27155m + }, + new + { + Id = 2, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", + Name = "GT", + Price = 500000m + }, + new + { + Id = 3, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", + Name = "Ranger", + Price = 25000m + }, + new + { + Id = 4, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Raptor is a SCORE off-road trophy truck living in a asphalt world", + Name = "Raptor", + Price = 53205m + }, + new + { + Id = 5, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", + Name = "Maverick", + Price = 22470m + }, + new + { + Id = 6, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A powerful convertible sports car", + Name = "Roadster", + Price = 42800m + }, + new + { + Id = 7, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A perfectly adequate family sedan with sharp looks", + Name = "Altima", + Price = 24550m + }, + new + { + Id = 8, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", + Name = "GT-R", + Price = 113540m + }, + new + { + Id = 9, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A new smart SUV", + Name = "Juke", + Price = 28100m + }, + new + { + Id = 10, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "H247", + Price = 54950m + }, + new + { + Id = 11, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "V297", + Price = 103360m + }, + new + { + Id = 12, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "R50", + Price = 2000000m + }, + new + { + Id = 13, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "M550i", + Price = 77790m + }, + new + { + Id = 14, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "540i", + Price = 60945m + }, + new + { + Id = 15, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "530e", + Price = 56545m + }, + new + { + Id = 16, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "530i", + Price = 55195m + }, + new + { + Id = 17, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "M850i", + Price = 100045m + }, + new + { + Id = 18, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "X7", + Price = 77980m + }, + new + { + Id = 19, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "IX", + Price = 87000m + }, + new + { + Id = 20, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "rapid acceleration and dynamic handling", + Name = "Model 3", + Price = 61990m + }, + new + { + Id = 21, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "finishes near the top of our luxury electric car rankings.", + Name = "Model S", + Price = 135000m + }, + new + { + Id = 22, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Heart-pumping acceleration, long drive range", + Name = "Model X", + Price = 138890m + }, + new + { + Id = 23, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "extensive driving range, lots of standard safety features", + Name = "Model Y", + Price = 67790m + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Todo.TodoItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Date") + .HasColumnType("datetimeoffset"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("TodoItems"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("RoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("UserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("UserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("UserTokens", (string)null); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Products.Product", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Categories.Category", "Category") + .WithMany("Products") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Todo.TodoItem", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.Role", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.Role", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Categories.Category", b => + { + b.Navigation("Products"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.cs new file mode 100644 index 0000000000..2e5a276d20 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/20231113190400_InitialMigration.cs @@ -0,0 +1,355 @@ +#nullable disable + +#pragma warning disable DateTimeOffsetInsteadOfDateTimeAnalyzer + +namespace Boilerplate.Server.Api.Data.Migrations; + +/// +public partial class InitialMigration : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Categories", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Color = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Categories", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Roles", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Roles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Users", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + FullName = table.Column(type: "nvarchar(max)", nullable: true), + Gender = table.Column(type: "int", nullable: true), + BirthDate = table.Column(type: "datetimeoffset", nullable: true), + ProfileImageName = table.Column(type: "nvarchar(max)", nullable: true), + ConfirmationEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), + ResetPasswordEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), + SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + LockoutEnabled = table.Column(type: "bit", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Users", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Products", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + Price = table.Column(type: "money", nullable: false), + Description = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), + CreatedOn = table.Column(type: "datetimeoffset", nullable: false), + CategoryId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Products", x => x.Id); + table.ForeignKey( + name: "FK_Products_Categories_CategoryId", + column: x => x.CategoryId, + principalTable: "Categories", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RoleClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + RoleId = table.Column(type: "int", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_RoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_RoleClaims_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "TodoItems", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + Title = table.Column(type: "nvarchar(max)", nullable: true), + Date = table.Column(type: "datetimeoffset", nullable: false), + IsDone = table.Column(type: "bit", nullable: false), + UserId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_TodoItems", x => x.Id); + table.ForeignKey( + name: "FK_TodoItems_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserClaims", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:Identity", "1, 1"), + UserId = table.Column(type: "int", nullable: false), + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserClaims", x => x.Id); + table.ForeignKey( + name: "FK_UserClaims_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserLogins", + columns: table => new + { + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_UserLogins_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserRoles", + columns: table => new + { + UserId = table.Column(type: "int", nullable: false), + RoleId = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_UserRoles_Roles_RoleId", + column: x => x.RoleId, + principalTable: "Roles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_UserRoles_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "UserTokens", + columns: table => new + { + UserId = table.Column(type: "int", nullable: false), + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_UserTokens_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Categories", + columns: new[] { "Id", "Color", "Name" }, + values: new object[,] + { + { 1, "#FFCD56", "Ford" }, + { 2, "#FF6384", "Nissan" }, + { 3, "#4BC0C0", "Benz" }, + { 4, "#FF9124", "BMW" }, + { 5, "#2B88D8", "Tesla" } + }); + + migrationBuilder.InsertData( + table: "Users", + columns: new[] { "Id", "AccessFailedCount", "BirthDate", "ConcurrencyStamp", "ConfirmationEmailRequestedOn", "Email", "EmailConfirmed", "FullName", "Gender", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "ProfileImageName", "ResetPasswordEmailRequestedOn", "SecurityStamp", "TwoFactorEnabled", "UserName" }, + values: new object[] { 1, 0, new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), "abc2cc9f-82d8-4d0f-8b30-bdf46771be8a", null, "test@bitplatform.dev", true, "Boilerplate test account", 2, false, null, "TEST@BITPLATFORM.DEV", "TEST@BITPLATFORM.DEV", "AQAAAAIAAYagAAAAEPoTVhWmCK6tZktIeSD0sVticLeZ1o2EVYZ9tUbY+PPr3tnJ/ZbSn7ZTBq6N+vl7UQ==", null, false, null, null, "bf6a9576-4c37-40bc-a4c2-7b42f3ec10cf", false, "test@bitplatform.dev" }); + + migrationBuilder.InsertData( + table: "Products", + columns: new[] { "Id", "CategoryId", "CreatedOn", "Description", "Name", "Price" }, + values: new object[,] + { + { 1, 1, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Mustang is ranked #1 in Sports Cars", "Mustang", 27155m }, + { 2, 1, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", "GT", 500000m }, + { 3, 1, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", "Ranger", 25000m }, + { 4, 1, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Raptor is a SCORE off-road trophy truck living in a asphalt world", "Raptor", 53205m }, + { 5, 1, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", "Maverick", 22470m }, + { 6, 2, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A powerful convertible sports car", "Roadster", 42800m }, + { 7, 2, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A perfectly adequate family sedan with sharp looks", "Altima", 24550m }, + { 8, 2, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", "GT-R", 113540m }, + { 9, 2, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "A new smart SUV", "Juke", 28100m }, + { 10, 3, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "H247", 54950m }, + { 11, 3, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "V297", 103360m }, + { 12, 3, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "R50", 2000000m }, + { 13, 4, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M550i", 77790m }, + { 14, 4, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "540i", 60945m }, + { 15, 4, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530e", 56545m }, + { 16, 4, new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "530i", 55195m }, + { 17, 4, new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "M850i", 100045m }, + { 18, 4, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "X7", 77980m }, + { 19, 4, new DateTimeOffset(new DateTime(2022, 6, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "", "IX", 87000m }, + { 20, 5, new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "rapid acceleration and dynamic handling", "Model 3", 61990m }, + { 21, 5, new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "finishes near the top of our luxury electric car rankings.", "Model S", 135000m }, + { 22, 5, new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "Heart-pumping acceleration, long drive range", "Model X", 138890m }, + { 23, 5, new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), "extensive driving range, lots of standard safety features", "Model Y", 67790m } + }); + + migrationBuilder.CreateIndex( + name: "IX_Products_CategoryId", + table: "Products", + column: "CategoryId"); + + migrationBuilder.CreateIndex( + name: "IX_RoleClaims_RoleId", + table: "RoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "Roles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_TodoItems_UserId", + table: "TodoItems", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserClaims_UserId", + table: "UserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserLogins_UserId", + table: "UserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_UserRoles_RoleId", + table: "UserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "Users", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "Users", + column: "NormalizedUserName", + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Products"); + + migrationBuilder.DropTable( + name: "RoleClaims"); + + migrationBuilder.DropTable( + name: "TodoItems"); + + migrationBuilder.DropTable( + name: "UserClaims"); + + migrationBuilder.DropTable( + name: "UserLogins"); + + migrationBuilder.DropTable( + name: "UserRoles"); + + migrationBuilder.DropTable( + name: "UserTokens"); + + migrationBuilder.DropTable( + name: "Categories"); + + migrationBuilder.DropTable( + name: "Roles"); + + migrationBuilder.DropTable( + name: "Users"); + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/AppDbContextModelSnapshot.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/AppDbContextModelSnapshot.cs new file mode 100644 index 0000000000..3b72f33044 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Data/Migrations/AppDbContextModelSnapshot.cs @@ -0,0 +1,667 @@ +// +using System; +using Boilerplate.Server.Api.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Boilerplate.Server.Api.Data.Migrations +{ + [DbContext(typeof(AppDbContext))] + partial class AppDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0-rc.2.23480.1") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Categories.Category", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.HasKey("Id"); + + b.ToTable("Categories"); + + b.HasData( + new + { + Id = 1, + Color = "#FFCD56", + Name = "Ford" + }, + new + { + Id = 2, + Color = "#FF6384", + Name = "Nissan" + }, + new + { + Id = 3, + Color = "#4BC0C0", + Name = "Benz" + }, + new + { + Id = 4, + Color = "#FF9124", + Name = "BMW" + }, + new + { + Id = 5, + Color = "#2B88D8", + Name = "Tesla" + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Identity.Role", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("Roles", (string)null); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Identity.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("BirthDate") + .HasColumnType("datetimeoffset"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("ConfirmationEmailRequestedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("bit"); + + b.Property("FullName") + .HasColumnType("nvarchar(max)"); + + b.Property("Gender") + .HasColumnType("int"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property("ProfileImageName") + .HasColumnType("nvarchar(max)"); + + b.Property("ResetPasswordEmailRequestedOn") + .HasColumnType("datetimeoffset"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("Users", (string)null); + + b.HasData( + new + { + Id = 1, + AccessFailedCount = 0, + BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), + ConcurrencyStamp = "abc2cc9f-82d8-4d0f-8b30-bdf46771be8a", + Email = "test@bitplatform.dev", + EmailConfirmed = true, + FullName = "Boilerplate test account", + Gender = 2, + LockoutEnabled = false, + NormalizedEmail = "TEST@BITPLATFORM.DEV", + NormalizedUserName = "TEST@BITPLATFORM.DEV", + PasswordHash = "AQAAAAIAAYagAAAAEPoTVhWmCK6tZktIeSD0sVticLeZ1o2EVYZ9tUbY+PPr3tnJ/ZbSn7ZTBq6N+vl7UQ==", + PhoneNumberConfirmed = false, + SecurityStamp = "bf6a9576-4c37-40bc-a4c2-7b42f3ec10cf", + TwoFactorEnabled = false, + UserName = "test@bitplatform.dev" + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Products.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("CreatedOn") + .HasColumnType("datetimeoffset"); + + b.Property("Description") + .HasMaxLength(512) + .HasColumnType("nvarchar(512)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Price") + .HasColumnType("money"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Products"); + + b.HasData( + new + { + Id = 1, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford Mustang is ranked #1 in Sports Cars", + Name = "Mustang", + Price = 27155m + }, + new + { + Id = 2, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford GT is a mid-engine two-seater sports car manufactured and marketed by American automobile manufacturer", + Name = "GT", + Price = 500000m + }, + new + { + Id = 3, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Ford Ranger is a nameplate that has been used on multiple model lines of pickup trucks sold by Ford worldwide.", + Name = "Ranger", + Price = 25000m + }, + new + { + Id = 4, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Raptor is a SCORE off-road trophy truck living in a asphalt world", + Name = "Raptor", + Price = 53205m + }, + new + { + Id = 5, + CategoryId = 1, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "The Ford Maverick is a compact pickup truck produced by Ford Motor Company.", + Name = "Maverick", + Price = 22470m + }, + new + { + Id = 6, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A powerful convertible sports car", + Name = "Roadster", + Price = 42800m + }, + new + { + Id = 7, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A perfectly adequate family sedan with sharp looks", + Name = "Altima", + Price = 24550m + }, + new + { + Id = 8, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Legendary supercar with AWD, 4 seats, a powerful V6 engine and the latest tech", + Name = "GT-R", + Price = 113540m + }, + new + { + Id = 9, + CategoryId = 2, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "A new smart SUV", + Name = "Juke", + Price = 28100m + }, + new + { + Id = 10, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "H247", + Price = 54950m + }, + new + { + Id = 11, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "V297", + Price = 103360m + }, + new + { + Id = 12, + CategoryId = 3, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "R50", + Price = 2000000m + }, + new + { + Id = 13, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "M550i", + Price = 77790m + }, + new + { + Id = 14, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "540i", + Price = 60945m + }, + new + { + Id = 15, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "530e", + Price = 56545m + }, + new + { + Id = 16, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 17, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "530i", + Price = 55195m + }, + new + { + Id = 17, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 12, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "M850i", + Price = 100045m + }, + new + { + Id = 18, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "X7", + Price = 77980m + }, + new + { + Id = 19, + CategoryId = 4, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "", + Name = "IX", + Price = 87000m + }, + new + { + Id = 20, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 7, 2, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "rapid acceleration and dynamic handling", + Name = "Model 3", + Price = 61990m + }, + new + { + Id = 21, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 27, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "finishes near the top of our luxury electric car rankings.", + Name = "Model S", + Price = 135000m + }, + new + { + Id = 22, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 22, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "Heart-pumping acceleration, long drive range", + Name = "Model X", + Price = 138890m + }, + new + { + Id = 23, + CategoryId = 5, + CreatedOn = new DateTimeOffset(new DateTime(2022, 6, 7, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 2, 0, 0, 0)), + Description = "extensive driving range, lots of standard safety features", + Name = "Model Y", + Price = 67790m + }); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Todo.TodoItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Date") + .HasColumnType("datetimeoffset"); + + b.Property("IsDone") + .HasColumnType("bit"); + + b.Property("Title") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("TodoItems"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("RoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("UserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("RoleId") + .HasColumnType("int"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("UserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("int"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("UserTokens", (string)null); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Products.Product", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Categories.Category", "Category") + .WithMany("Products") + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Category"); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Todo.TodoItem", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.Role", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.Role", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Boilerplate.Server.Api.Models.Identity.User", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Boilerplate.Server.Api.Models.Categories.Category", b => + { + b.Navigation("Products"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs similarity index 93% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs index 615b51e50f..3c7cf815c7 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs @@ -1,9 +1,9 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using AdminPanel.Server.Api; -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Server.Api.Services; +using Boilerplate.Server.Api; +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Services; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.IdentityModel.Tokens; using Microsoft.OpenApi.Models; @@ -49,7 +49,7 @@ public static IServiceCollection AddJwt(this IServiceCollection services, IConfi options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; - }).AddJwtBearer(async options => + }).AddJwtBearer(options => { var certificatePath = Path.Combine(Directory.GetCurrentDirectory(), "IdentityCertificate.pfx"); RSA? rsaPrivateKey; @@ -78,7 +78,7 @@ public static IServiceCollection AddJwt(this IServiceCollection services, IConfi options.Events = new JwtBearerEvents { - OnMessageReceived = context => + OnMessageReceived = async context => { // The server accepts the access_token from either the authorization header, the cookie, or the request URL query string @@ -90,8 +90,6 @@ public static IServiceCollection AddJwt(this IServiceCollection services, IConfi } context.Token = access_token; - - return Task.CompletedTask; } }; @@ -108,8 +106,8 @@ public static IServiceCollection AddSwaggerGen(this IServiceCollection services) { services.AddSwaggerGen(options => { - options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "AdminPanel.Server.Api.xml")); - options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "AdminPanel.Shared.xml")); + options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Boilerplate.Server.Api.xml")); + options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Boilerplate.Shared.xml")); options.OperationFilter(); @@ -153,7 +151,7 @@ public static IServiceCollection AddHealthChecks(this IServiceCollection service services.AddHealthChecksUI(setupSettings: setup => { - setup.AddHealthCheckEndpoint("AdminPanelHealthChecks", env.IsDevelopment() ? "https://localhost:5031/healthz" : "/healthz"); + setup.AddHealthCheckEndpoint("BPHealthChecks", env.IsDevelopment() ? "https://localhost:5031/healthz" : "/healthz"); }).AddInMemoryStorage(); var healthChecksBuilder = services.AddHealthChecks() diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Extensions/ODataOperationFilter.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Extensions/ODataOperationFilter.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Extensions/ODataOperationFilter.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Extensions/ODataOperationFilter.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/IdentityCertificate.pfx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/IdentityCertificate.pfx similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/IdentityCertificate.pfx rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/IdentityCertificate.pfx diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/CategoriesMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/CategoriesMapper.cs new file mode 100644 index 0000000000..dfc085d14f --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/CategoriesMapper.cs @@ -0,0 +1,18 @@ +using Boilerplate.Server.Api.Models.Categories; +using Boilerplate.Shared.Dtos.Categories; +using Riok.Mapperly.Abstractions; + +namespace Boilerplate.Server.Api.Mappers; + +/// +/// More info at Server/Api/Mappers/README.md +/// +[Mapper(UseDeepCloning = true)] +public static partial class CategoriesMapper +{ + public static partial IQueryable Project(this IQueryable query); + public static partial CategoryDto Map(this Category source); + public static partial Category Map(this CategoryDto source); + public static partial void Patch(this CategoryDto source, Category destination); + public static partial void Patch(this Category source, CategoryDto destination); +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/IdentityMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/IdentityMapper.cs similarity index 82% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/IdentityMapper.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/IdentityMapper.cs index e9f3af0717..c356a88689 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/IdentityMapper.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/IdentityMapper.cs @@ -1,8 +1,8 @@ -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Shared.Dtos.Identity; using Riok.Mapperly.Abstractions; -namespace AdminPanel.Server.Api.Mappers; +namespace Boilerplate.Server.Api.Mappers; /// /// More info at Server/Api/Mappers/README.md diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/ProductsMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/ProductsMapper.cs new file mode 100644 index 0000000000..22ac8aff29 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/ProductsMapper.cs @@ -0,0 +1,19 @@ +using Boilerplate.Server.Api.Models.Products; +using Boilerplate.Shared.Dtos.Products; +using Riok.Mapperly.Abstractions; + +namespace Boilerplate.Server.Api.Mappers; + +/// +/// More info at Server/Api/Mappers/README.md +/// +[Mapper(UseDeepCloning = true)] +public static partial class ProductsMapper +{ + public static partial IQueryable Project(this IQueryable query); + public static partial ProductDto Map(this Product source); + public static partial Product Map(this ProductDto source); + public static partial void Patch(this ProductDto source, Product destination); + [MapperIgnoreSource(nameof(Product.Category))] + public static partial void Patch(this Product source, ProductDto destination); +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/Readme.md b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/Readme.md similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Mappers/Readme.md rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/Readme.md diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/TodoMapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/TodoMapper.cs similarity index 80% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/TodoMapper.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/TodoMapper.cs index 4f7b9a7338..820575b062 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/TodoMapper.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Mappers/TodoMapper.cs @@ -1,8 +1,8 @@ using Riok.Mapperly.Abstractions; -using TodoTemplate.Server.Api.Models.Todo; -using TodoTemplate.Shared.Dtos.Todo; +using Boilerplate.Server.Api.Models.Todo; +using Boilerplate.Shared.Dtos.Todo; -namespace TodoTemplate.Server.Api.Mappers; +namespace Boilerplate.Server.Api.Mappers; /// /// More info at Server/Api/Mappers/README.md diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Categories/Category.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Categories/Category.cs new file mode 100644 index 0000000000..08e56da1c9 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Categories/Category.cs @@ -0,0 +1,15 @@ +using Boilerplate.Server.Api.Models.Products; + +namespace Boilerplate.Server.Api.Models.Categories; + +public class Category +{ + public int Id { get; set; } + + [Required, MaxLength(64)] + public string? Name { get; set; } + + public string? Color { get; set; } + + public IList? Products { get; set; } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs similarity index 71% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs index 82faa2302e..aba4e9dc21 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Models.Emailing; +namespace Boilerplate.Server.Api.Models.Emailing; public class EmailConfirmationModel { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/ResetPasswordModel.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs similarity index 76% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/ResetPasswordModel.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs index e5145ebf84..aea116fd53 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Emailing/ResetPasswordModel.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Models.Emailing; +namespace Boilerplate.Server.Api.Models.Emailing; public class ResetPasswordModel { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/Role.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/Role.cs new file mode 100644 index 0000000000..df7728c28d --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/Role.cs @@ -0,0 +1,6 @@ +namespace Boilerplate.Server.Api.Models.Identity; + +public class Role : IdentityRole +{ +} + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/User.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/User.cs similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/User.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/User.cs index 0ed0586206..d8bb93a1b0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Models/Identity/User.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Identity/User.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Models.Identity; +namespace Boilerplate.Server.Api.Models.Identity; public class User : IdentityUser { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Products/Product.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Products/Product.cs new file mode 100644 index 0000000000..18d86edf42 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Products/Product.cs @@ -0,0 +1,27 @@ +using System.Diagnostics.CodeAnalysis; +using Boilerplate.Server.Api.Models.Categories; + +namespace Boilerplate.Server.Api.Models.Products; + +public class Product +{ + public int Id { get; set; } + + [Required, MaxLength(64)] + public string? Name { get; set; } + + [Column(TypeName = "money")] + [Range(0, double.MaxValue)] + public decimal Price { get; set; } + + [MaxLength(512)] + public string? Description { get; set; } + + [NotNull] + public DateTimeOffset CreatedOn { get; set; } = DateTimeOffset.UtcNow; + + [ForeignKey(nameof(CategoryId))] + public Category? Category { get; set; } + + public int CategoryId { get; set; } +} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Todo/TodoItem.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Todo/TodoItem.cs similarity index 74% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Todo/TodoItem.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Todo/TodoItem.cs index 4175ca337b..ae7da6bcb8 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Todo/TodoItem.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Models/Todo/TodoItem.cs @@ -1,6 +1,6 @@ -using TodoTemplate.Server.Api.Models.Identity; +using Boilerplate.Server.Api.Models.Identity; -namespace TodoTemplate.Server.Api.Models.Todo; +namespace Boilerplate.Server.Api.Models.Todo; public class TodoItem { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Program.cs similarity index 74% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Program.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Program.cs index bb21b9f744..9ef401bf4d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Program.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Program.cs @@ -17,10 +17,10 @@ } #endif -AdminPanel.Server.Api.Startup.Services.Add(builder.Services, builder.Environment, builder.Configuration); +Boilerplate.Server.Api.Startup.Services.Add(builder.Services, builder.Environment, builder.Configuration); var app = builder.Build(); -AdminPanel.Server.Api.Startup.Middlewares.Use(app, builder.Environment, builder.Configuration); +Boilerplate.Server.Api.Startup.Middlewares.Use(app, builder.Environment, builder.Configuration); app.Run(); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Properties/launchSettings.json similarity index 89% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Properties/launchSettings.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Properties/launchSettings.json index 8599c09be3..ac1874a75b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Properties/launchSettings.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "AdminPanel.Server.Api-Swagger": { + "Boilerplate.Server.Api-Swagger": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, @@ -11,7 +11,7 @@ } }, // This configuration allows debugging the Blazor Web Assembly - "AdminPanel.Server.Api-BlazorWebAssembly": { + "Boilerplate.Server.Api-BlazorWebAssembly": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor similarity index 96% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor index 0b8ff7597d..6254ff7452 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailConfirmationTemplate.razor @@ -1,6 +1,6 @@ -@using TodoTemplate.Server.Api.Models.Emailing +@using Boilerplate.Server.Api.Models.Emailing @using System -@using TodoTemplate.Server.Api.Resources +@using Boilerplate.Server.Api.Resources @using Microsoft.Extensions.Localization @code { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.Designer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.Designer.cs similarity index 92% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.Designer.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.Designer.cs index 88185366fe..034d18fcea 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.Designer.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace AdminPanel.Server.Api.Resources { +namespace Boilerplate.Server.Api.Resources { using System; @@ -39,7 +39,7 @@ internal EmailStrings() { public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AdminPanel.Server.Api.Resources.EmailStrings", typeof(EmailStrings).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Boilerplate.Server.Api.Resources.EmailStrings", typeof(EmailStrings).Assembly); resourceMan = temp; } return resourceMan; @@ -61,7 +61,7 @@ internal EmailStrings() { } /// - /// Looks up a localized string similar to AdminPanel. + /// Looks up a localized string similar to Boilerplate. /// public static string AppName { get { @@ -70,7 +70,7 @@ public static string AppName { } /// - /// Looks up a localized string similar to AdminPanel - Confirm your email address. + /// Looks up a localized string similar to Boilerplate - Confirm your email address. /// public static string ConfirmationEmailSubject { get { @@ -97,7 +97,7 @@ public static string CopyLink { } /// - /// Looks up a localized string similar to You're receiving this message because recently you have signed up for a AdminPanel account. + /// Looks up a localized string similar to You're receiving this message because recently you have signed up for a Boilerplate account. /// Confirm your email address by clicking the button below.. /// public static string EmailConfirmationMessageBody { @@ -107,7 +107,7 @@ public static string EmailConfirmationMessageBody { } /// - /// Looks up a localized string similar to AdminPanel - Reset your password. + /// Looks up a localized string similar to Boilerplate - Reset your password. /// public static string ResetPasswordEmailSubject { get { @@ -152,7 +152,7 @@ public static string ResetYourPassword { } /// - /// Looks up a localized string similar to Welcome to AdminPanel!. + /// Looks up a localized string similar to Welcome to Boilerplate!. /// public static string WelcomeToApp { get { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.fr.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.fr.resx similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.fr.resx rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.fr.resx index 1dcc205b7a..1a21b3e268 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.fr.resx +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.fr.resx @@ -121,7 +121,7 @@ Panneau d'administration - AdminPanel - Confirmez votre adresse e-mail + Boilerplate - Confirmez votre adresse e-mail Confirmez votre email @@ -130,11 +130,11 @@ Ou copiez le lien ci-dessous dans la barre d'adresse de votre navigateur : - Vous recevez ce message car vous vous êtes récemment inscrit pour un compte AdminPanel. + Vous recevez ce message car vous vous êtes récemment inscrit pour un compte Boilerplate. Confirmez votre adresse e-mail en cliquant sur le bouton ci-dessous. - AdminPanel - Réinitialisez votre mot de passe + Boilerplate - Réinitialisez votre mot de passe Bonjour {0} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.resx similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.resx rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.resx index 939307b38d..40116efcc9 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Resources/EmailStrings.resx +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/EmailStrings.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - AdminPanel - Confirm your email address + Boilerplate - Confirm your email address Confirm email @@ -127,11 +127,11 @@ Or, copy the link below to your browser address bar: - You're receiving this message because recently you have signed up for a AdminPanel account. + You're receiving this message because recently you have signed up for a Boilerplate account. Confirm your email address by clicking the button below. - AdminPanel - Reset your password + Boilerplate - Reset your password Hello {0} @@ -146,9 +146,9 @@ Reset your password - AdminPanel + Boilerplate - Welcome to AdminPanel! + Welcome to Boilerplate! \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/ResetPasswordTemplate.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/ResetPasswordTemplate.razor similarity index 97% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/ResetPasswordTemplate.razor rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/ResetPasswordTemplate.razor index ac7d51fc71..9c886a2fa8 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/ResetPasswordTemplate.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Resources/ResetPasswordTemplate.razor @@ -1,6 +1,6 @@ -@using TodoTemplate.Server.Api.Models.Emailing +@using Boilerplate.Server.Api.Models.Emailing @using System -@using TodoTemplate.Server.Api.Resources +@using Boilerplate.Server.Api.Resources @using Microsoft.Extensions.Localization @code { @@ -75,4 +75,4 @@ - \ No newline at end of file + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/ApiExceptionHandler.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/ApiExceptionHandler.cs similarity index 98% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/ApiExceptionHandler.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/ApiExceptionHandler.cs index df747e6523..6213c5e17c 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/ApiExceptionHandler.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/ApiExceptionHandler.cs @@ -2,7 +2,7 @@ using System.Reflection; using Microsoft.AspNetCore.Diagnostics; -namespace AdminPanel.Server.Api.Services; +namespace Boilerplate.Server.Api.Services; public partial class ApiExceptionHandler : IExceptionHandler { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IJwtService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IJwtService.cs new file mode 100644 index 0000000000..89971f513e --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IJwtService.cs @@ -0,0 +1,9 @@ +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Shared.Dtos.Identity; + +namespace Boilerplate.Server.Api.Services.Contracts; + +public interface IJwtService +{ + Task GenerateToken(User user); +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IUserInformationProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs similarity index 78% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IUserInformationProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs index 82a49fb292..09ef7d363b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/Contracts/IUserInformationProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Services.Contracts; +namespace Boilerplate.Server.Api.Services.Contracts; public interface IUserInformationProvider { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/JwtService.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/JwtService.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/JwtService.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/JwtService.cs index 75d4478e24..d8a4707717 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/JwtService.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/JwtService.cs @@ -1,11 +1,11 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using AdminPanel.Server.Api.Models.Identity; -using AdminPanel.Shared.Dtos.Identity; +using Boilerplate.Server.Api.Models.Identity; +using Boilerplate.Shared.Dtos.Identity; using Microsoft.IdentityModel.Tokens; -namespace AdminPanel.Server.Api.Services; +namespace Boilerplate.Server.Api.Services; public partial class JwtService : IJwtService { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/UserInformationProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/UserInformationProvider.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/UserInformationProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/UserInformationProvider.cs index ffb5a103b2..9dad970c27 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Services/UserInformationProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Services/UserInformationProvider.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Server.Api.Services; +namespace Boilerplate.Server.Api.Services; public partial class UserInformationProvider : IUserInformationProvider { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Middlewares.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Middlewares.cs similarity index 96% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Middlewares.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Middlewares.cs index 1ae3472d69..666297d030 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Middlewares.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Middlewares.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.Net.Http.Headers; -namespace TodoTemplate.Server.Api.Startup; +namespace Boilerplate.Server.Api.Startup; public class Middlewares { @@ -43,7 +43,7 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration } }); - app.UseCors(options => options.WithOrigins("https://localhost:4041" /*BlazorServer*/, "http://localhost:8001" /*BlazorElectron*/, "https://0.0.0.0" /*BlazorHybrid*/, "app://0.0.0.0" /*BlazorHybrid*/) + app.UseCors(options => options.WithOrigins("https://localhost:4031" /*BlazorServer*/, "http://localhost:8001" /*BlazorElectron*/, "https://0.0.0.0" /*BlazorHybrid*/, "app://0.0.0.0" /*BlazorHybrid*/) .AllowAnyHeader().AllowAnyMethod()); app.UseResponseCaching(); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Services.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Services.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Services.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Services.cs index ec7fd65793..8da1c962f5 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/Startup/Services.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/Startup/Services.cs @@ -2,20 +2,20 @@ using System.IO.Compression; using System.Net; using System.Net.Mail; -using AdminPanel.Server.Api.Services; +using Boilerplate.Server.Api.Services; using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.OData; using Microsoft.AspNetCore.ResponseCompression; #if BlazorWebAssembly -using AdminPanel.Client.Core.Services.HttpMessageHandlers; -using AdminPanel.Client.Web.Services; -using AdminPanel.Client.Core.Services; +using Boilerplate.Client.Core.Services.HttpMessageHandlers; +using Boilerplate.Client.Web.Services; +using Boilerplate.Client.Core.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; #endif -namespace AdminPanel.Server.Api.Startup; +namespace Boilerplate.Server.Api.Startup; public static class Services { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/appsettings.Development.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/appsettings.Development.json similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/appsettings.Development.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/appsettings.Development.json diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/appsettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/appsettings.json similarity index 80% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/appsettings.json rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/appsettings.json index 7819892133..7395ca1fbe 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/appsettings.json +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/appsettings.json @@ -1,9 +1,9 @@ { "ConnectionStrings": { //#if (database == "SqlServer") - "SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=AdminPanelDb;Integrated Security=true;Application Name=AdminPanel;TrustServerCertificate=True;", + "SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=BoilerplateDb;Integrated Security=true;Application Name=Boilerplate;TrustServerCertificate=True;", //#elif (database == "Sqlite") - "SqliteConnectionString": "Data Source=AdminPanelDb.db;" + "SqliteConnectionString": "Data Source=BoilerplateDb.db;" //#endif }, "Logging": { @@ -16,8 +16,8 @@ "AppSettings": { "JwtSettings": { "IdentityCertificatePassword": "P@ssw0rdP@ssw0rd", - "Issuer": "AdminPanel", - "Audience": "AdminPanel", + "Issuer": "Boilerplate", + "Audience": "Boilerplate", "NotBeforeMinutes": "0", "ExpirationMinutes": "1440" }, @@ -34,8 +34,8 @@ "EmailSettings": { "Host": "LocalFolder", // Local folder means storing emails as .eml file in bin/Debug/net8.0/sent-emails folder (Recommended for testing purposes only) instead of sending them using smtp server. "Port": "25", - "DefaultFromEmail": "info@adminpanel.com", - "DefaultFromName": "AdminPanel", + "DefaultFromEmail": "info@Boilerplate.com", + "DefaultFromName": "Boilerplate", "UserName": null, "Password": null }, diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/wwwroot/images/icon.png b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/wwwroot/images/icon.png similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/wwwroot/images/icon.png rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/wwwroot/images/icon.png diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/wwwroot/swagger/swagger-utils.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/wwwroot/swagger/swagger-utils.js similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Server/Api/wwwroot/swagger/swagger-utils.js rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Api/wwwroot/swagger/swagger-utils.js diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Attributes/AutoInjectAttribute.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Attributes/AutoInjectAttribute.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Attributes/AutoInjectAttribute.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Attributes/AutoInjectAttribute.cs diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs new file mode 100644 index 0000000000..155c49c989 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs @@ -0,0 +1,10 @@ +namespace Boilerplate.Shared.Attributes; + +/// +/// Gets or sets the resource type to use for error message and localizations lookups. +/// +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] +public class DtoResourceTypeAttribute(Type resourceType) : Attribute +{ + public Type ResourceType { get; } = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/AdminPanel.Shared.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Boilerplate.Shared.csproj similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/AdminPanel.Shared.csproj rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Boilerplate.Shared.csproj index b1bfe7b3b5..5b36de93a0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/AdminPanel.Shared.csproj +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Boilerplate.Shared.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/AppJsonContext.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/AppJsonContext.cs similarity index 74% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/AppJsonContext.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/AppJsonContext.cs index 450e3b2ac1..c6cfc31a45 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/AppJsonContext.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/AppJsonContext.cs @@ -1,9 +1,13 @@ -using AdminPanel.Shared.Dtos.Categories; -using AdminPanel.Shared.Dtos.Dashboard; -using AdminPanel.Shared.Dtos.Identity; -using AdminPanel.Shared.Dtos.Products; +//#if (sample == "Todo") +using Boilerplate.Shared.Dtos.Todo; +//#elif (sample == "AdminPanel") +using Boilerplate.Shared.Dtos.Categories; +using Boilerplate.Shared.Dtos.Dashboard; +using Boilerplate.Shared.Dtos.Products; +//#endif +using Boilerplate.Shared.Dtos.Identity; -namespace AdminPanel.Shared.Dtos; +namespace Boilerplate.Shared.Dtos; /// /// https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/ @@ -12,6 +16,10 @@ namespace AdminPanel.Shared.Dtos; [JsonSerializable(typeof(Dictionary))] [JsonSerializable(typeof(UserDto))] [JsonSerializable(typeof(List))] +//#if (sample == "Todo") +[JsonSerializable(typeof(TodoItemDto))] +[JsonSerializable(typeof(List))] +//#elif (sample == "AdminPanel") [JsonSerializable(typeof(OverallAnalyticsStatsDataDto))] [JsonSerializable(typeof(List))] [JsonSerializable(typeof(List))] @@ -22,6 +30,7 @@ namespace AdminPanel.Shared.Dtos; [JsonSerializable(typeof(CategoryDto))] [JsonSerializable(typeof(List))] [JsonSerializable(typeof(PagedResult))] +//#endif [JsonSerializable(typeof(SignInRequestDto))] [JsonSerializable(typeof(SignInResponseDto))] [JsonSerializable(typeof(SignUpRequestDto))] diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Categories/CategoryDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Categories/CategoryDto.cs new file mode 100644 index 0000000000..3919499199 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Categories/CategoryDto.cs @@ -0,0 +1,14 @@ +namespace Boilerplate.Shared.Dtos.Categories; + +[DtoResourceType(typeof(AppStrings))] +public class CategoryDto +{ + public int Id { get; set; } + + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [Display(Name = nameof(AppStrings.Name))] + [MaxLength(64, ErrorMessage = nameof(AppStrings.MaxLengthAttribute_InvalidMaxLength))] + public string? Name { get; set; } + + public string? Color { get; set; } = "#FFFFFF"; +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs new file mode 100644 index 0000000000..4791fc9e1d --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/OverallAnalyticsStatsDataDto.cs @@ -0,0 +1,12 @@ +namespace Boilerplate.Shared.Dtos.Dashboard; + +public class OverallAnalyticsStatsDataDto +{ + public int Last30DaysProductCount { get; set; } + + public int Last30DaysCategoryCount { get; set; } + + public int TotalProducts { get; set; } + + public int TotalCategories { get; set; } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs new file mode 100644 index 0000000000..682c4f581b --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductPercentagePerCategoryDto.cs @@ -0,0 +1,10 @@ +namespace Boilerplate.Shared.Dtos.Dashboard; + +public class ProductPercentagePerCategoryDto +{ + public string? CategoryName { get; set; } + + public string? CategoryColor { get; set; } + + public float ProductPercentage { get; set; } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs new file mode 100644 index 0000000000..8811b6cc1d --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductSaleStatDto.cs @@ -0,0 +1,9 @@ +namespace Boilerplate.Shared.Dtos.Dashboard; +public class ProductSaleStatDto +{ + public string? ProductName { get; set; } + + public string? CategoryColor { get; set; } + + public decimal SaleAmount { get; set; } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs new file mode 100644 index 0000000000..0a664e8dec --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Dashboard/ProductsCountPerCategoryDto.cs @@ -0,0 +1,10 @@ +namespace Boilerplate.Shared.Dtos.Dashboard; + +public class ProductsCountPerCategoryDto +{ + public string? CategoryName { get; set; } + + public string? CategoryColor { get; set; } + + public int ProductCount { get; set; } +} diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EditUserDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EditUserDto.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EditUserDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EditUserDto.cs index e8ada407a0..a23399bb85 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EditUserDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EditUserDto.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class EditUserDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs index 3b37fcf76a..ce429ac2e4 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class EmailConfirmedRequestDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs similarity index 95% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs index ab5bcc5754..e1780abf3d 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class ResetPasswordRequestDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/RoleDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/RoleDto.cs similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/RoleDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/RoleDto.cs index d9b12f9b86..e0c50f67cc 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/RoleDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/RoleDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class RoleDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs index 7f19a62f09..a2c1e0afc6 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SendConfirmationEmailRequestDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs index ea19c99b7b..397a319804 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SendResetPasswordEmailRequestDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInRequestDto.cs similarity index 93% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInRequestDto.cs index 699e9e0aae..7e76709465 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInRequestDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SignInRequestDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInResponseDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInResponseDto.cs similarity index 78% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInResponseDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInResponseDto.cs index 29f94cc04c..82f2cf24ac 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/SignInResponseDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignInResponseDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SignInResponseDto diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs similarity index 88% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs index 42854462f5..af334c276d 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/SignUpRequestDto.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class SignUpRequestDto @@ -16,10 +16,10 @@ public class SignUpRequestDto [MinLength(6, ErrorMessage = nameof(AppStrings.MinLengthAttribute_ValidationError))] [Display(Name = nameof(AppStrings.Password))] public string? Password { get; set; } - + /// true [NotMapped] [Range(typeof(bool), "true", "true", ErrorMessage = nameof(AppStrings.YouHaveToAcceptTerms))] - [Display(Name = nameof(AppStrings.IsTermsAccepted))] + [Display(Name = nameof(AppStrings.TermsAccepted))] public bool TermsAccepted { get; set; } } diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/UserDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/UserDto.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/UserDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/UserDto.cs index c1390d2dfe..600c8fcb1a 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Dtos/Identity/UserDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Identity/UserDto.cs @@ -1,5 +1,5 @@  -namespace AdminPanel.Shared.Dtos.Identity; +namespace Boilerplate.Shared.Dtos.Identity; [DtoResourceType(typeof(AppStrings))] public class UserDto diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/PagedResultDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/PagedResultDto.cs new file mode 100644 index 0000000000..d4706179ce --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/PagedResultDto.cs @@ -0,0 +1,19 @@ +namespace Boilerplate.Shared.Dtos; + +public class PagedResult +{ + public IList? Items { get; set; } + + public long TotalCount { get; set; } + + public PagedResult(IList items, long totalCount) + { + Items = items; + TotalCount = totalCount; + } + + public PagedResult() + { + + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Products/ProductDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Products/ProductDto.cs new file mode 100644 index 0000000000..5ea0e8f074 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Products/ProductDto.cs @@ -0,0 +1,28 @@ +namespace Boilerplate.Shared.Dtos.Products; + +[DtoResourceType(typeof(AppStrings))] +public class ProductDto +{ + public int Id { get; set; } + + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [MaxLength(64, ErrorMessage = nameof(AppStrings.MaxLengthAttribute_InvalidMaxLength))] + [Display(Name = nameof(AppStrings.Name))] + public string? Name { get; set; } + + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [Range(0, double.MaxValue, ErrorMessage = nameof(AppStrings.RangeAttribute_ValidationError))] + [Display(Name = nameof(AppStrings.Price))] + public decimal Price { get; set; } + + [MaxLength(512, ErrorMessage = nameof(AppStrings.MaxLengthAttribute_InvalidMaxLength))] + [Display(Name = nameof(AppStrings.Description))] + public string? Description { get; set; } + + [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] + [Display(Name = nameof(AppStrings.Category))] + public int? CategoryId { get; set; } + + [Display(Name = nameof(AppStrings.Category))] + public string? CategoryName { get; set; } +} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Todo/TodoItemDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Todo/TodoItemDto.cs similarity index 90% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Todo/TodoItemDto.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Todo/TodoItemDto.cs index ef0dd40f3e..2add0900d6 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Todo/TodoItemDto.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Todo/TodoItemDto.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Shared.Dtos.Todo; +namespace Boilerplate.Shared.Dtos.Todo; [DtoResourceType(typeof(AppStrings))] public class TodoItemDto diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/EmailTemplate.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/EmailTemplate.cs similarity index 77% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/EmailTemplate.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/EmailTemplate.cs index 1b23292959..5de06da3b0 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/EmailTemplate.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/EmailTemplate.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Enums; +namespace Boilerplate.Shared.Enums; [JsonConverter(typeof(JsonStringEnumConverter))] public enum EmailTemplate diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/Gender.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/Gender.cs similarity index 74% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/Gender.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/Gender.cs index f77fd46ce5..8f43dcb1bb 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Enums/Gender.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Enums/Gender.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Enums; +namespace Boilerplate.Shared.Enums; [JsonConverter(typeof(JsonStringEnumConverter))] public enum Gender diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/BadRequestException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/BadRequestException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/BadRequestException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/BadRequestException.cs index f7625671e1..42e71122ff 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/BadRequestException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/BadRequestException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class BadRequestException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ConflictException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ConflictException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ConflictException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ConflictException.cs index 32ff1cdea6..a4e4239163 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ConflictException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ConflictException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ConflictException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/DomainLogicException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/DomainLogicException.cs similarity index 91% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/DomainLogicException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/DomainLogicException.cs index 178650dfbd..9e50aee1ae 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/DomainLogicException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/DomainLogicException.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class DomainLogicException : KnownException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ErrorResourcePayload.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ErrorResourcePayload.cs similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ErrorResourcePayload.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ErrorResourcePayload.cs index 95509cb46c..6806514b21 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ErrorResourcePayload.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ErrorResourcePayload.cs @@ -1,17 +1,17 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ErrorResourcePayload { public string? ResourceTypeName { get; set; } = "*"; - public List Details { get; set; } = new(); + public List Details { get; set; } = []; } public class PropertyErrorResourceCollection { public string? Name { get; set; } = "*"; - public List Errors { get; set; } = new(); + public List Errors { get; set; } = []; } public class ErrorResource diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ForbiddenException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ForbiddenException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ForbiddenException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ForbiddenException.cs index 342cf2f7e3..7d1a5d1063 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ForbiddenException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ForbiddenException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ForbiddenException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/KnownException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/KnownException.cs similarity index 93% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/KnownException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/KnownException.cs index 5af61b0307..9830413e59 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/KnownException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/KnownException.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public abstract class KnownException : Exception { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceNotFoundException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceNotFoundException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceNotFoundException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceNotFoundException.cs index b48de57a3e..e23373ed7b 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceNotFoundException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceNotFoundException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ResourceNotFoundException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceValidationException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceValidationException.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceValidationException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceValidationException.cs index 68a748ca5e..822e449420 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ResourceValidationException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ResourceValidationException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ResourceValidationException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestErrorInfo.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestErrorInfo.cs similarity index 83% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestErrorInfo.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestErrorInfo.cs index 9e8594b636..90216aa959 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestErrorInfo.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestErrorInfo.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class RestErrorInfo { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestException.cs index bac0811cd4..35b8537736 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/RestException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/RestException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class RestException : KnownException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ServerConnectionException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ServerConnectionException.cs similarity index 90% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ServerConnectionException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ServerConnectionException.cs index 37f06898f0..b5d2fe1ba6 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/ServerConnectionException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/ServerConnectionException.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class ServerConnectionException : UnknownException { public ServerConnectionException() diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/TooManyRequestsExceptions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/TooManyRequestsExceptions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs index 053d3e2e06..c9d2fdc2b1 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/TooManyRequestsExceptions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class TooManyRequestsExceptions : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnauthorizedException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnauthorizedException.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnauthorizedException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnauthorizedException.cs index f0d5a7937e..cd3e687a21 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnauthorizedException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnauthorizedException.cs @@ -1,6 +1,6 @@ using System.Net; -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class UnauthorizedException : RestException { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnknownException.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnknownException.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnknownException.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnknownException.cs index c33fe6954d..d56c660860 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Exceptions/UnknownException.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Exceptions/UnknownException.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Exceptions; +namespace Boilerplate.Shared.Exceptions; public class UnknownException : Exception { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/ClaimsPrincipalExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/ClaimsPrincipalExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/ClaimsPrincipalExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/ClaimsPrincipalExtensions.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/IServiceCollectionExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/IServiceCollectionExtensions.cs similarity index 82% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/IServiceCollectionExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/IServiceCollectionExtensions.cs index 9f9eb43852..8cd50b98de 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/IServiceCollectionExtensions.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/IServiceCollectionExtensions.cs @@ -1,4 +1,4 @@ -using AdminPanel.Shared.Services; +using Boilerplate.Shared.Services; namespace Microsoft.Extensions.DependencyInjection; @@ -6,7 +6,7 @@ public static class IServiceCollectionExtensions { public static IServiceCollection AddSharedServices(this IServiceCollection services) { - // Services being registered here can get injected everywhere (Api, Web, Android, iOS, Windows, and Mac) + // Services being registered here can get injected everywhere (Api, Web, Android, iOS, Windows, macOS and Linux) services.AddSingleton(); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/LinqExtensions.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/LinqExtensions.cs similarity index 100% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Extensions/LinqExtensions.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Extensions/LinqExtensions.cs diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorMode.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorMode.cs similarity index 84% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorMode.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorMode.cs index fafde7ce17..5a689ea3ef 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorMode.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorMode.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; public enum BlazorMode { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorModeDetector.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorModeDetector.cs similarity index 96% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorModeDetector.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorModeDetector.cs index 72e0710c83..b720e13601 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BlazorModeDetector.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BlazorModeDetector.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; /// /// https://bitplatform.dev/templates/hosting-models diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationMode.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationMode.cs similarity index 61% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationMode.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationMode.cs index 1166d5d56d..c6f8ff4739 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationMode.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationMode.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; public enum BuildConfigurationMode { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationModeDetector.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationModeDetector.cs similarity index 94% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationModeDetector.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationModeDetector.cs index 54db8c4a71..c56df19474 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/BuildConfigurationModeDetector.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/BuildConfigurationModeDetector.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; public class BuildConfigurationModeDetector { diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/CultureInfoManager.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/CultureInfoManager.cs similarity index 98% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/CultureInfoManager.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/CultureInfoManager.cs index c165fecf6f..9d78c2ebcc 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/CultureInfoManager.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/CultureInfoManager.cs @@ -1,4 +1,4 @@ -namespace TodoTemplate.Shared.Infra; +namespace Boilerplate.Shared.Infra; public class CultureInfoManager { public static (string name, string code) DefaultCulture { get; } = ("English", "en-US"); diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentType.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentType.cs similarity index 75% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentType.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentType.cs index dc8a8446cd..c60895df97 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentType.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentType.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; public enum WebAppDeploymentType { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentTypeDetector.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs similarity index 97% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentTypeDetector.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs index 4430d7a8b7..64b601c6f2 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Infra/WebAppDeploymentTypeDetector.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs @@ -1,5 +1,5 @@ //-:cnd:noEmit -namespace AdminPanel.Shared.Infra; +namespace Boilerplate.Shared.Infra; /// /// https://bitplatform.dev/templates/hosting-models diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Mapper.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Mapper.cs similarity index 69% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Mapper.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Mapper.cs index a54ccf7e09..9fa99de911 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Mapper.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Mapper.cs @@ -1,9 +1,14 @@ -using AdminPanel.Shared.Dtos.Categories; -using AdminPanel.Shared.Dtos.Identity; -using AdminPanel.Shared.Dtos.Products; +//+:cnd:noEmit +using Boilerplate.Shared.Dtos.Identity; +//#if (sample == "Todo") +using Boilerplate.Shared.Dtos.Todo; +//#elif (sample == "AdminPanel") +using Boilerplate.Shared.Dtos.Categories; +using Boilerplate.Shared.Dtos.Products; +//#endif using Riok.Mapperly.Abstractions; -namespace AdminPanel.Shared; +namespace Boilerplate.Shared; /// /// Patching methods help you patch the DTO you have received from the server (for example, after calling an Update api) @@ -17,7 +22,11 @@ namespace AdminPanel.Shared; [Mapper(UseDeepCloning = true)] public static partial class Mapper { + //#if (sample == "Todo") + public static partial void Patch(this TodoItemDto source, TodoItemDto destination); + //#elif (sample == "AdminPanel") public static partial void Patch(this CategoryDto source, CategoryDto destination); public static partial void Patch(this ProductDto source, ProductDto destination); + //#endif public static partial void Patch(this UserDto source, UserDto destination); } diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.Designer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.Designer.cs similarity index 50% rename from src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.Designer.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.Designer.cs index bedb8bdbe1..ab53c3d15e 100644 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.Designer.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace TodoTemplate.Shared.Resources { +namespace Boilerplate.Shared.Resources { using System; @@ -39,7 +39,7 @@ internal AppStrings() { public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TodoTemplate.Shared.Resources.AppStrings", typeof(AppStrings).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Boilerplate.Shared.Resources.AppStrings", typeof(AppStrings).Assembly); resourceMan = temp; } return resourceMan; @@ -60,6 +60,15 @@ internal AppStrings() { } } + /// + /// Looks up a localized string similar to Action. + /// + public static string Action { + get { + return ResourceManager.GetString("Action", resourceCulture); + } + } + /// /// Looks up a localized string similar to Active. /// @@ -79,20 +88,29 @@ public static string Add { } /// - /// Looks up a localized string similar to All. + /// Looks up a localized string similar to New category. /// - public static string All { + public static string AddCategory { get { - return ResourceManager.GetString("All", resourceCulture); + return ResourceManager.GetString("AddCategory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add product. + /// + public static string AddProduct { + get { + return ResourceManager.GetString("AddProduct", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field does not equal any of the values specified in AllowedValuesAttribute.. + /// Looks up a localized string similar to All. /// - public static string AllowedValuesAttribute_Invalid { + public static string All { get { - return ResourceManager.GetString("AllowedValuesAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("All", resourceCulture); } } @@ -124,38 +142,38 @@ public static string AreYouSureWannaDelete { } /// - /// Looks up a localized string similar to The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type.. + /// Looks up a localized string similar to Are you sure you want to delete category {0}. /// - public static string AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties { + public static string AreYouSureWannaDeleteCategory { get { - return ResourceManager.GetString("AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties", resourceCulture); + return ResourceManager.GetString("AreYouSureWannaDeleteCategory", resourceCulture); } } /// - /// Looks up a localized string similar to The type '{0}' does not contain a public property named '{1}'.. + /// Looks up a localized string similar to Are you sure you want to delete product {0}. /// - public static string AttributeStore_Unknown_Property { + public static string AreYouSureWannaDeleteProduct { get { - return ResourceManager.GetString("AttributeStore_Unknown_Property", resourceCulture); + return ResourceManager.GetString("AreYouSureWannaDeleteProduct", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid request. + /// Looks up a localized string similar to Back. /// - public static string BadRequestException { + public static string Back { get { - return ResourceManager.GetString("BadRequestException", resourceCulture); + return ResourceManager.GetString("Back", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid Base64 encoding.. + /// Looks up a localized string similar to Invalid request. /// - public static string Base64StringAttribute_Invalid { + public static string BadRequestException { get { - return ResourceManager.GetString("Base64StringAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("BadRequestException", resourceCulture); } } @@ -178,219 +196,201 @@ public static string Cancel { } /// - /// Looks up a localized string similar to Check your Spam/Junk, if you could not find it in the Inbox.. - /// - public static string CheckSpamMailMessage { - get { - return ResourceManager.GetString("CheckSpamMailMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property {0}.{1} could not be found.. - /// - public static string Common_PropertyNotFound { - get { - return ResourceManager.GetString("Common_PropertyNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not find a property named {0}.. + /// Looks up a localized string similar to Categories. /// - public static string CompareAttribute_UnknownProperty { + public static string Categories { get { - return ResourceManager.GetString("CompareAttribute_UnknownProperty", resourceCulture); + return ResourceManager.GetString("Categories", resourceCulture); } } /// - /// Looks up a localized string similar to '{0}' and '{1}' do not match.. + /// Looks up a localized string similar to Categories. /// - public static string CompareAttribute_ValidationError { + public static string CategoriesPageTitle { get { - return ResourceManager.GetString("CompareAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("CategoriesPageTitle", resourceCulture); } } /// - /// Looks up a localized string similar to Completed. + /// Looks up a localized string similar to Category. /// - public static string Completed { + public static string Category { get { - return ResourceManager.GetString("Completed", resourceCulture); + return ResourceManager.GetString("Category", resourceCulture); } } /// - /// Looks up a localized string similar to Optimistic concurrency failure, object has been modified.. + /// Looks up a localized string similar to Category entity could not be found. /// - public static string ConcurrencyFailure { + public static string CategoryCouldNotBeFound { get { - return ResourceManager.GetString("ConcurrencyFailure", resourceCulture); + return ResourceManager.GetString("CategoryCouldNotBeFound", resourceCulture); } } /// - /// Looks up a localized string similar to We have sent a confirmation link to your email address. - ///Please confirm your email by clicking on the link.. + /// Looks up a localized string similar to This category contain some products, so you can't delete it. /// - public static string ConfirmEmailMessage { + public static string CategoryNotEmpty { get { - return ResourceManager.GetString("ConfirmEmailMessage", resourceCulture); + return ResourceManager.GetString("CategoryNotEmpty", resourceCulture); } } /// - /// Looks up a localized string similar to Confirm Your Email Address. + /// Looks up a localized string similar to Check your Spam/Junk, if you could not find it in the Inbox.. /// - public static string ConfirmEmailTitle { + public static string CheckSpamMailMessage { get { - return ResourceManager.GetString("ConfirmEmailTitle", resourceCulture); + return ResourceManager.GetString("CheckSpamMailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Confirm New Password. + /// Looks up a localized string similar to Color. /// - public static string ConfirmNewPassword { + public static string Color { get { - return ResourceManager.GetString("ConfirmNewPassword", resourceCulture); + return ResourceManager.GetString("Color", resourceCulture); } } /// - /// Looks up a localized string similar to Request could not be processed because of conflict in the request. + /// Looks up a localized string similar to '{0}' and '{1}' do not match.. /// - public static string ConflicException { + public static string CompareAttribute_ValidationError { get { - return ResourceManager.GetString("ConflicException", resourceCulture); + return ResourceManager.GetString("CompareAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid credit card number.. + /// Looks up a localized string similar to Completed. /// - public static string CreditCardAttribute_Invalid { + public static string Completed { get { - return ResourceManager.GetString("CreditCardAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("Completed", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success.. + /// Looks up a localized string similar to We have sent a confirmation link to your email address. + ///Please confirm your email by clicking on the link.. /// - public static string CustomValidationAttribute_Method_Must_Return_ValidationResult { + public static string ConfirmEmailMessage { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Must_Return_ValidationResult", resourceCulture); + return ResourceManager.GetString("ConfirmEmailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static.. + /// Looks up a localized string similar to Confirm Your Email Address. /// - public static string CustomValidationAttribute_Method_Not_Found { + public static string ConfirmEmailTitle { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Not_Found", resourceCulture); + return ResourceManager.GetString("ConfirmEmailTitle", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute.Method was not specified.. + /// Looks up a localized string similar to Confirm New Password. /// - public static string CustomValidationAttribute_Method_Required { + public static string ConfirmNewPassword { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Required", resourceCulture); + return ResourceManager.GetString("ConfirmNewPassword", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional.. + /// Looks up a localized string similar to Request could not be processed because of conflict in the request. /// - public static string CustomValidationAttribute_Method_Signature { + public static string ConflicException { get { - return ResourceManager.GetString("CustomValidationAttribute_Method_Signature", resourceCulture); + return ResourceManager.GetString("ConflicException", resourceCulture); } } /// - /// Looks up a localized string similar to Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}.. + /// Looks up a localized string similar to Custom color. /// - public static string CustomValidationAttribute_Type_Conversion_Failed { + public static string CustomColor { get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Conversion_Failed", resourceCulture); + return ResourceManager.GetString("CustomColor", resourceCulture); } } /// - /// Looks up a localized string similar to The custom validation type '{0}' must be public.. + /// Looks up a localized string similar to Dashboard. /// - public static string CustomValidationAttribute_Type_Must_Be_Public { + public static string Dashboard { get { - return ResourceManager.GetString("CustomValidationAttribute_Type_Must_Be_Public", resourceCulture); + return ResourceManager.GetString("Dashboard", resourceCulture); } } /// - /// Looks up a localized string similar to {0} is not valid.. + /// Looks up a localized string similar to Date. /// - public static string CustomValidationAttribute_ValidationError { + public static string Date { get { - return ResourceManager.GetString("CustomValidationAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("Date", resourceCulture); } } /// - /// Looks up a localized string similar to The CustomValidationAttribute.ValidatorType was not specified.. + /// Looks up a localized string similar to Default color picker. /// - public static string CustomValidationAttribute_ValidatorType_Required { + public static string DefaultColorPicker { get { - return ResourceManager.GetString("CustomValidationAttribute_ValidatorType_Required", resourceCulture); + return ResourceManager.GetString("DefaultColorPicker", resourceCulture); } } /// - /// Looks up a localized string similar to The custom DataType string cannot be null or empty.. + /// Looks up a localized string similar to Delete. /// - public static string DataTypeAttribute_EmptyDataTypeString { + public static string Delete { get { - return ResourceManager.GetString("DataTypeAttribute_EmptyDataTypeString", resourceCulture); + return ResourceManager.GetString("Delete", resourceCulture); } } /// - /// Looks up a localized string similar to Date. + /// Looks up a localized string similar to Delete Account. /// - public static string Date { + public static string DeleteAccount { get { - return ResourceManager.GetString("Date", resourceCulture); + return ResourceManager.GetString("DeleteAccount", resourceCulture); } } /// - /// Looks up a localized string similar to An unknown failure has occurred.. + /// Looks up a localized string similar to Are you sure you want to delete your account?. /// - public static string DefaultError { + public static string DeleteAccountPrompt { get { - return ResourceManager.GetString("DefaultError", resourceCulture); + return ResourceManager.GetString("DeleteAccountPrompt", resourceCulture); } } /// - /// Looks up a localized string similar to Delete Account. + /// Looks up a localized string similar to Delete category. /// - public static string DeleteAccount { + public static string DeleteCategory { get { - return ResourceManager.GetString("DeleteAccount", resourceCulture); + return ResourceManager.GetString("DeleteCategory", resourceCulture); } } /// - /// Looks up a localized string similar to Are you sure you want to delete your account?. + /// Looks up a localized string similar to Delete product. /// - public static string DeleteAccountPrompt { + public static string DeleteProduct { get { - return ResourceManager.GetString("DeleteAccountPrompt", resourceCulture); + return ResourceManager.GetString("DeleteProduct", resourceCulture); } } @@ -404,20 +404,11 @@ public static string DeleteTodoItem { } /// - /// Looks up a localized string similar to The {0} field equals one of the values specified in DeniedValuesAttribute.. - /// - public static string DeniedValuesAttribute_Invalid { - get { - return ResourceManager.GetString("DeniedValuesAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} property has not been set. Use the {1} method to get the value.. + /// Looks up a localized string similar to Description. /// - public static string DisplayAttribute_PropertyNotSet { + public static string Description { get { - return ResourceManager.GetString("DisplayAttribute_PropertyNotSet", resourceCulture); + return ResourceManager.GetString("Description", resourceCulture); } } @@ -440,29 +431,29 @@ public static string DuplicateEmail { } /// - /// Looks up a localized string similar to Role name '{0}' is already taken.. + /// Looks up a localized string similar to Edit. /// - public static string DuplicateRoleName { + public static string Edit { get { - return ResourceManager.GetString("DuplicateRoleName", resourceCulture); + return ResourceManager.GetString("Edit", resourceCulture); } } /// - /// Looks up a localized string similar to Username '{0}' is already taken.. + /// Looks up a localized string similar to Edit category. /// - public static string DuplicateUserName { + public static string EditCategory { get { - return ResourceManager.GetString("DuplicateUserName", resourceCulture); + return ResourceManager.GetString("EditCategory", resourceCulture); } } /// - /// Looks up a localized string similar to Edit. + /// Looks up a localized string similar to Edit product. /// - public static string Edit { + public static string EditProduct { get { - return ResourceManager.GetString("Edit", resourceCulture); + return ResourceManager.GetString("EditProduct", resourceCulture); } } @@ -530,29 +521,20 @@ public static string EmailConfirmedSuccessfullyMessage { } /// - /// Looks up a localized string similar to Email '{0}' is not confirmed.. - /// - public static string EmailNotConfirmed { - get { - return ResourceManager.GetString("EmailNotConfirmed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The type provided for EnumDataTypeAttribute cannot be null.. + /// Looks up a localized string similar to Enter category name. /// - public static string EnumDataTypeAttribute_TypeCannotBeNull { + public static string EnterCategoryName { get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeCannotBeNull", resourceCulture); + return ResourceManager.GetString("EnterCategoryName", resourceCulture); } } /// - /// Looks up a localized string similar to The type '{0}' needs to represent an enumeration type.. + /// Looks up a localized string similar to Enter product name. /// - public static string EnumDataTypeAttribute_TypeNeedsToBeAnEnum { + public static string EnterProductName { get { - return ResourceManager.GetString("EnumDataTypeAttribute_TypeNeedsToBeAnEnum", resourceCulture); + return ResourceManager.GetString("EnterProductName", resourceCulture); } } @@ -565,24 +547,6 @@ public static string Error { } } - /// - /// Looks up a localized string similar to The {0} field only accepts files with the following extensions: {1}. - /// - public static string FileExtensionsAttribute_Invalid { - get { - return ResourceManager.GetString("FileExtensionsAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while removing file. - /// - public static string FileRemoveFailed { - get { - return ResourceManager.GetString("FileRemoveFailed", resourceCulture); - } - } - /// /// Looks up a localized string similar to An error occurred while uploading file. /// @@ -710,7 +674,7 @@ public static string HomeMessage { } /// - /// Looks up a localized string similar to TodoTemplate Home. + /// Looks up a localized string similar to Boilerplate Home. /// public static string HomeTitle { get { @@ -719,664 +683,430 @@ public static string HomeTitle { } /// - /// Looks up a localized string similar to Looks like the confirmation link either is invalid or has expired.. + /// Looks up a localized string similar to Id. /// - public static string InvalidConfirmationLinkMessage { + public static string Id { get { - return ResourceManager.GetString("InvalidConfirmationLinkMessage", resourceCulture); + return ResourceManager.GetString("Id", resourceCulture); } } /// - /// Looks up a localized string similar to Email '{0}' is invalid.. + /// Looks up a localized string similar to Looks like the confirmation link either is invalid or has expired.. /// - public static string InvalidEmail { + public static string InvalidConfirmationLinkMessage { get { - return ResourceManager.GetString("InvalidEmail", resourceCulture); + return ResourceManager.GetString("InvalidConfirmationLinkMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Type {0} must derive from {1}<{2}>.. + /// Looks up a localized string similar to Invalid username or password. /// - public static string InvalidManagerType { + public static string InvalidUsernameOrPassword { get { - return ResourceManager.GetString("InvalidManagerType", resourceCulture); + return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture); } } /// - /// Looks up a localized string similar to The provided PasswordHasherCompatibilityMode is invalid.. + /// Looks up a localized string similar to Last 30 days category count. /// - public static string InvalidPasswordHasherCompatibilityMode { + public static string Last30DaysCategoryCount { get { - return ResourceManager.GetString("InvalidPasswordHasherCompatibilityMode", resourceCulture); + return ResourceManager.GetString("Last30DaysCategoryCount", resourceCulture); } } /// - /// Looks up a localized string similar to The iteration count must be a positive integer.. + /// Looks up a localized string similar to Last 30 days product count. /// - public static string InvalidPasswordHasherIterationCount { + public static string Last30DaysProductCount { get { - return ResourceManager.GetString("InvalidPasswordHasherIterationCount", resourceCulture); + return ResourceManager.GetString("Last30DaysProductCount", resourceCulture); } } /// - /// Looks up a localized string similar to Role name '{0}' is invalid.. + /// Looks up a localized string similar to MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.. /// - public static string InvalidRoleName { + public static string MaxLengthAttribute_InvalidMaxLength { get { - return ResourceManager.GetString("InvalidRoleName", resourceCulture); + return ResourceManager.GetString("MaxLengthAttribute_InvalidMaxLength", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid token.. + /// Looks up a localized string similar to The field {0} must be a string or array type with a minimum length of '{1}'.. /// - public static string InvalidToken { + public static string MinLengthAttribute_ValidationError { get { - return ResourceManager.GetString("InvalidToken", resourceCulture); + return ResourceManager.GetString("MinLengthAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to Username '{0}' is invalid, can only contain letters or digits.. + /// Looks up a localized string similar to Name. /// - public static string InvalidUserName { + public static string Name { get { - return ResourceManager.GetString("InvalidUserName", resourceCulture); + return ResourceManager.GetString("Name", resourceCulture); } } /// - /// Looks up a localized string similar to Invalid username or password. + /// Looks up a localized string similar to New Password. /// - public static string InvalidUsernameOrPassword { + public static string NewPassword { get { - return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture); + return ResourceManager.GetString("NewPassword", resourceCulture); } } /// - /// Looks up a localized string similar to Do you accept terms?. + /// Looks up a localized string similar to No. /// - public static string IsTermsAccepted { + public static string No { get { - return ResourceManager.GetString("IsTermsAccepted", resourceCulture); + return ResourceManager.GetString("No", resourceCulture); } } /// - /// Looks up a localized string similar to Known error. + /// Looks up a localized string similar to No todos yet. /// - public static string KnownException { + public static string NoTodos { get { - return ResourceManager.GetString("KnownException", resourceCulture); + return ResourceManager.GetString("NoTodos", resourceCulture); } } /// - /// Looks up a localized string similar to LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength.. + /// Looks up a localized string similar to Haven’t you received the confirmation email?. /// - public static string LengthAttribute_InvalidMaxLength { + public static string NotReceivedConfirmationEmailMessage { get { - return ResourceManager.GetString("LengthAttribute_InvalidMaxLength", resourceCulture); + return ResourceManager.GetString("NotReceivedConfirmationEmailMessage", resourceCulture); } } /// - /// Looks up a localized string similar to LengthAttribute must have a MinimumLength value that is zero or greater.. + /// Looks up a localized string similar to OR. /// - public static string LengthAttribute_InvalidMinLength { + public static string Or { get { - return ResourceManager.GetString("LengthAttribute_InvalidMinLength", resourceCulture); + return ResourceManager.GetString("Or", resourceCulture); } } /// - /// Looks up a localized string similar to The field of type {0} must be a string, array or ICollection type.. + /// Looks up a localized string similar to Password. /// - public static string LengthAttribute_InvalidValueType { + public static string Password { get { - return ResourceManager.GetString("LengthAttribute_InvalidValueType", resourceCulture); + return ResourceManager.GetString("Password", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'.. + /// Looks up a localized string similar to Your password changed successfully.. /// - public static string LengthAttribute_ValidationError { + public static string PasswordChangedSuccessfullyMessage { get { - return ResourceManager.GetString("LengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("PasswordChangedSuccessfullyMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'.. + /// Looks up a localized string similar to Price. /// - public static string LocalizableString_LocalizationFailed { + public static string Price { get { - return ResourceManager.GetString("LocalizableString_LocalizationFailed", resourceCulture); + return ResourceManager.GetString("Price", resourceCulture); } } /// - /// Looks up a localized string similar to A user with this login already exists.. + /// Looks up a localized string similar to Product category. /// - public static string LoginAlreadyAssociated { + public static string ProductCategory { get { - return ResourceManager.GetString("LoginAlreadyAssociated", resourceCulture); + return ResourceManager.GetString("ProductCategory", resourceCulture); } } /// - /// Looks up a localized string similar to MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.. + /// Looks up a localized string similar to Product entity could not be found. /// - public static string MaxLengthAttribute_InvalidMaxLength { + public static string ProductCouldNotBeFound { get { - return ResourceManager.GetString("MaxLengthAttribute_InvalidMaxLength", resourceCulture); + return ResourceManager.GetString("ProductCouldNotBeFound", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a maximum length of '{1}'.. + /// Looks up a localized string similar to Products. /// - public static string MaxLengthAttribute_ValidationError { + public static string Products { get { - return ResourceManager.GetString("MaxLengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("Products", resourceCulture); } } /// - /// Looks up a localized string similar to MetadataClassType cannot be null.. + /// Looks up a localized string similar to Product sales. /// - public static string MetadataTypeAttribute_TypeCannotBeNull { + public static string ProductSales { get { - return ResourceManager.GetString("MetadataTypeAttribute_TypeCannotBeNull", resourceCulture); + return ResourceManager.GetString("ProductSales", resourceCulture); } } /// - /// Looks up a localized string similar to MinLengthAttribute must have a Length value that is zero or greater.. + /// Looks up a localized string similar to This chart shows the sale number of each product.. /// - public static string MinLengthAttribute_InvalidMinLength { + public static string ProductSalesText { get { - return ResourceManager.GetString("MinLengthAttribute_InvalidMinLength", resourceCulture); + return ResourceManager.GetString("ProductSalesText", resourceCulture); } } /// - /// Looks up a localized string similar to The field {0} must be a string or array type with a minimum length of '{1}'.. + /// Looks up a localized string similar to Products count per category chart. /// - public static string MinLengthAttribute_ValidationError { + public static string ProductsCountPerCategoryChart { get { - return ResourceManager.GetString("MinLengthAttribute_ValidationError", resourceCulture); + return ResourceManager.GetString("ProductsCountPerCategoryChart", resourceCulture); } } /// - /// Looks up a localized string similar to AddIdentity must be called on the service collection.. + /// Looks up a localized string similar to This chart shows the number of products in each category.. /// - public static string MustCallAddIdentity { + public static string ProductsCountPerCategoryChartText { get { - return ResourceManager.GetString("MustCallAddIdentity", resourceCulture); + return ResourceManager.GetString("ProductsCountPerCategoryChartText", resourceCulture); } } /// - /// Looks up a localized string similar to New Password. + /// Looks up a localized string similar to Products. /// - public static string NewPassword { + public static string ProductsPageTitle { get { - return ResourceManager.GetString("NewPassword", resourceCulture); + return ResourceManager.GetString("ProductsPageTitle", resourceCulture); } } /// - /// Looks up a localized string similar to No. + /// Looks up a localized string similar to Products percentage per category. /// - public static string No { + public static string ProductsPercentagePerCategory { get { - return ResourceManager.GetString("No", resourceCulture); + return ResourceManager.GetString("ProductsPercentagePerCategory", resourceCulture); } } /// - /// Looks up a localized string similar to No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true.. + /// Looks up a localized string similar to This chart shows the percentage of products in each category.. /// - public static string NoPersonalDataProtector { + public static string ProductsPercentagePerCategoryText { get { - return ResourceManager.GetString("NoPersonalDataProtector", resourceCulture); + return ResourceManager.GetString("ProductsPercentagePerCategoryText", resourceCulture); } } /// - /// Looks up a localized string similar to No RoleType was specified, try AddRoles<TRole>().. + /// Looks up a localized string similar to Profile Image. /// - public static string NoRoleType { + public static string ProfileImage { get { - return ResourceManager.GetString("NoRoleType", resourceCulture); + return ResourceManager.GetString("ProfileImage", resourceCulture); } } /// - /// Looks up a localized string similar to No todos yet. + /// Looks up a localized string similar to Profile updated successfully.. /// - public static string NoTodos { + public static string ProfileUpdatedSuccessfullyMessage { get { - return ResourceManager.GetString("NoTodos", resourceCulture); + return ResourceManager.GetString("ProfileUpdatedSuccessfullyMessage", resourceCulture); } } /// - /// Looks up a localized string similar to No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered.. + /// Looks up a localized string similar to The field {0} must be between {1} and {2}.. /// - public static string NoTokenProvider { + public static string RangeAttribute_ValidationError { get { - return ResourceManager.GetString("NoTokenProvider", resourceCulture); + return ResourceManager.GetString("RangeAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to Haven’t you received the confirmation email?. + /// Looks up a localized string similar to Remove. /// - public static string NotReceivedConfirmationEmailMessage { + public static string Remove { get { - return ResourceManager.GetString("NotReceivedConfirmationEmailMessage", resourceCulture); + return ResourceManager.GetString("Remove", resourceCulture); } } /// - /// Looks up a localized string similar to Haven’t you received the confirmation email?. + /// Looks up a localized string similar to The {0} field is required.. /// - public static string NotReceivedConfirmationEmailMessage1 { + public static string RequiredAttribute_ValidationError { get { - return ResourceManager.GetString("NotReceivedConfirmationEmailMessage1", resourceCulture); + return ResourceManager.GetString("RequiredAttribute_ValidationError", resourceCulture); } } /// - /// Looks up a localized string similar to User security stamp cannot be null.. + /// Looks up a localized string similar to The confirmation link has been re-sent to your email address.. /// - public static string NullSecurityStamp { + public static string ResendConfirmationLinkMessage { get { - return ResourceManager.GetString("NullSecurityStamp", resourceCulture); + return ResourceManager.GetString("ResendConfirmationLinkMessage", resourceCulture); } } /// - /// Looks up a localized string similar to OR. + /// Looks up a localized string similar to Resend email. /// - public static string Or { + public static string ResendEmail { get { - return ResourceManager.GetString("Or", resourceCulture); + return ResourceManager.GetString("ResendEmail", resourceCulture); } } /// - /// Looks up a localized string similar to Password. + /// Looks up a localized string similar to Reset password. /// - public static string Password { + public static string ResetPassword { get { - return ResourceManager.GetString("Password", resourceCulture); + return ResourceManager.GetString("ResetPassword", resourceCulture); } } /// - /// Looks up a localized string similar to Your password changed successfully.. + /// Looks up a localized string similar to The reset password link has been sent to your email address.. /// - public static string PasswordChangedSuccessfullyMessage { + public static string ResetPasswordLinkSentMessage { get { - return ResourceManager.GetString("PasswordChangedSuccessfullyMessage", resourceCulture); + return ResourceManager.GetString("ResetPasswordLinkSentMessage", resourceCulture); } } /// - /// Looks up a localized string similar to Incorrect password.. + /// Looks up a localized string similar to Reset password. /// - public static string PasswordMismatch { + public static string ResetPasswordTitle { get { - return ResourceManager.GetString("PasswordMismatch", resourceCulture); + return ResourceManager.GetString("ResetPasswordTitle", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one digit ('0'-'9').. + /// Looks up a localized string similar to Resource not found. /// - public static string PasswordRequiresDigit { + public static string ResourceNotFoundException { get { - return ResourceManager.GetString("PasswordRequiresDigit", resourceCulture); + return ResourceManager.GetString("ResourceNotFoundException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one lowercase ('a'-'z').. + /// Looks up a localized string similar to Request data is not valid. /// - public static string PasswordRequiresLower { + public static string ResourceValidationException { get { - return ResourceManager.GetString("PasswordRequiresLower", resourceCulture); + return ResourceManager.GetString("ResourceValidationException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one non alphanumeric character.. + /// Looks up a localized string similar to An error occurred while communicating with server. /// - public static string PasswordRequiresNonAlphanumeric { + public static string RestException { get { - return ResourceManager.GetString("PasswordRequiresNonAlphanumeric", resourceCulture); + return ResourceManager.GetString("RestException", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must use at least {0} different characters.. + /// Looks up a localized string similar to Save. /// - public static string PasswordRequiresUniqueChars { + public static string Save { get { - return ResourceManager.GetString("PasswordRequiresUniqueChars", resourceCulture); + return ResourceManager.GetString("Save", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must have at least one uppercase ('A'-'Z').. + /// Looks up a localized string similar to Search on name. /// - public static string PasswordRequiresUpper { + public static string SearchOnName { get { - return ResourceManager.GetString("PasswordRequiresUpper", resourceCulture); + return ResourceManager.GetString("SearchOnName", resourceCulture); } } /// - /// Looks up a localized string similar to Passwords must be at least {0} characters.. + /// Looks up a localized string similar to Select your birth date. /// - public static string PasswordTooShort { + public static string SelectBirthDate { get { - return ResourceManager.GetString("PasswordTooShort", resourceCulture); + return ResourceManager.GetString("SelectBirthDate", resourceCulture); } } /// - /// Looks up a localized string similar to The {0} field is not a valid phone number.. + /// Looks up a localized string similar to Select category. /// - public static string PhoneAttribute_Invalid { + public static string SelectCategory { get { - return ResourceManager.GetString("PhoneAttribute_Invalid", resourceCulture); + return ResourceManager.GetString("SelectCategory", resourceCulture); } } /// - /// Looks up a localized string similar to Profile Image. + /// Looks up a localized string similar to Unable to connect to server.. /// - public static string ProfileImage { + public static string ServerConnectionException { get { - return ResourceManager.GetString("ProfileImage", resourceCulture); + return ResourceManager.GetString("ServerConnectionException", resourceCulture); } } /// - /// Looks up a localized string similar to Profile updated successfully.. + /// Looks up a localized string similar to Sign in. /// - public static string ProfileUpdatedSuccessfullyMessage { + public static string SignIn { get { - return ResourceManager.GetString("ProfileUpdatedSuccessfullyMessage", resourceCulture); + return ResourceManager.GetString("SignIn", resourceCulture); } } /// - /// Looks up a localized string similar to The type {0} must implement {1}.. + /// Looks up a localized string similar to Sign in as different user. /// - public static string RangeAttribute_ArbitraryTypeNotIComparable { + public static string SignInAsDifferentUser { get { - return ResourceManager.GetString("RangeAttribute_ArbitraryTypeNotIComparable", resourceCulture); + return ResourceManager.GetString("SignInAsDifferentUser", resourceCulture); } } /// - /// Looks up a localized string similar to Cannot use exclusive bounds when the maximum value is equal to the minimum value.. + /// Looks up a localized string similar to Sign in. /// - public static string RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual { + public static string SignInTitle { get { - return ResourceManager.GetString("RangeAttribute_CannotUseExclusiveBoundsWhenTheyAreEqual", resourceCulture); + return ResourceManager.GetString("SignInTitle", resourceCulture); } } /// - /// Looks up a localized string similar to The maximum value '{0}' must be greater than or equal to the minimum value '{1}'.. - /// - public static string RangeAttribute_MinGreaterThanMax { - get { - return ResourceManager.GetString("RangeAttribute_MinGreaterThanMax", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The minimum and maximum values must be set.. - /// - public static string RangeAttribute_Must_Set_Min_And_Max { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Min_And_Max", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The OperandType must be set when strings are used for minimum and maximum values.. - /// - public static string RangeAttribute_Must_Set_Operand_Type { - get { - return ResourceManager.GetString("RangeAttribute_Must_Set_Operand_Type", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2}.. - /// - public static string RangeAttribute_ValidationError { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2}.. - /// - public static string RangeAttribute_ValidationError_MinExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be between {1} exclusive and {2} exclusive.. - /// - public static string RangeAttribute_ValidationError_MinExclusive_MaxExclusive { - get { - return ResourceManager.GetString("RangeAttribute_ValidationError_MinExclusive_MaxExclusive", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Recovery code redemption failed.. - /// - public static string RecoveryCodeRedemptionFailed { - get { - return ResourceManager.GetString("RecoveryCodeRedemptionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must match the regular expression '{1}'.. - /// - public static string RegexAttribute_ValidationError { - get { - return ResourceManager.GetString("RegexAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The pattern must be set to a valid regular expression.. - /// - public static string RegularExpressionAttribute_Empty_Pattern { - get { - return ResourceManager.GetString("RegularExpressionAttribute_Empty_Pattern", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove. - /// - public static string Remove { - get { - return ResourceManager.GetString("Remove", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The {0} field is required.. - /// - public static string RequiredAttribute_ValidationError { - get { - return ResourceManager.GetString("RequiredAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The confirmation link has been re-sent to your email address.. - /// - public static string ResendConfirmationLinkMessage { - get { - return ResourceManager.GetString("ResendConfirmationLinkMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resend email. - /// - public static string ResendEmail { - get { - return ResourceManager.GetString("ResendEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPassword { - get { - return ResourceManager.GetString("ResetPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The reset password link has been sent to your email address.. - /// - public static string ResetPasswordLinkSentMessage { - get { - return ResourceManager.GetString("ResetPasswordLinkSentMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset password. - /// - public static string ResetPasswordTitle { - get { - return ResourceManager.GetString("ResetPasswordTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resource not found. - /// - public static string ResourceNotFoundException { - get { - return ResourceManager.GetString("ResourceNotFoundException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Request data is not valid. - /// - public static string ResourceValidationException { - get { - return ResourceManager.GetString("ResourceValidationException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while communicating with server. - /// - public static string RestException { - get { - return ResourceManager.GetString("RestException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Role {0} does not exist.. - /// - public static string RoleNotFound { - get { - return ResourceManager.GetString("RoleNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save. - /// - public static string Save { - get { - return ResourceManager.GetString("Save", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select your birth date. - /// - public static string SelectBirthDate { - get { - return ResourceManager.GetString("SelectBirthDate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unable to connect to server.. - /// - public static string ServerConnectionException { - get { - return ResourceManager.GetString("ServerConnectionException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignIn { - get { - return ResourceManager.GetString("SignIn", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign in. - /// - public static string SignInTitle { - get { - return ResourceManager.GetString("SignInTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sign out. + /// Looks up a localized string similar to Sign out. /// public static string SignOut { get { @@ -1412,209 +1142,29 @@ public static string SingUpTitle { } /// - /// Looks up a localized string similar to Sort by. - /// - public static string SortBy { - get { - return ResourceManager.GetString("SortBy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true.. - /// - public static string StoreNotIProtectedUserStore { - get { - return ResourceManager.GetString("StoreNotIProtectedUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableRoleStore<TRole>.. - /// - public static string StoreNotIQueryableRoleStore { - get { - return ResourceManager.GetString("StoreNotIQueryableRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IQueryableUserStore<TUser>.. - /// - public static string StoreNotIQueryableUserStore { - get { - return ResourceManager.GetString("StoreNotIQueryableUserStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IRoleClaimStore<TRole>.. - /// - public static string StoreNotIRoleClaimStore { - get { - return ResourceManager.GetString("StoreNotIRoleClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticationTokenStore<User>.. - /// - public static string StoreNotIUserAuthenticationTokenStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticationTokenStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserAuthenticatorKeyStore<User>.. - /// - public static string StoreNotIUserAuthenticatorKeyStore { - get { - return ResourceManager.GetString("StoreNotIUserAuthenticatorKeyStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserClaimStore<TUser>.. - /// - public static string StoreNotIUserClaimStore { - get { - return ResourceManager.GetString("StoreNotIUserClaimStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserConfirmationStore<TUser>.. - /// - public static string StoreNotIUserConfirmationStore { - get { - return ResourceManager.GetString("StoreNotIUserConfirmationStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserEmailStore<TUser>.. - /// - public static string StoreNotIUserEmailStore { - get { - return ResourceManager.GetString("StoreNotIUserEmailStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLockoutStore<TUser>.. - /// - public static string StoreNotIUserLockoutStore { - get { - return ResourceManager.GetString("StoreNotIUserLockoutStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserLoginStore<TUser>.. - /// - public static string StoreNotIUserLoginStore { - get { - return ResourceManager.GetString("StoreNotIUserLoginStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPasswordStore<TUser>.. - /// - public static string StoreNotIUserPasswordStore { - get { - return ResourceManager.GetString("StoreNotIUserPasswordStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserPhoneNumberStore<TUser>.. - /// - public static string StoreNotIUserPhoneNumberStore { - get { - return ResourceManager.GetString("StoreNotIUserPhoneNumberStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserRoleStore<TUser>.. - /// - public static string StoreNotIUserRoleStore { - get { - return ResourceManager.GetString("StoreNotIUserRoleStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserSecurityStampStore<TUser>.. - /// - public static string StoreNotIUserSecurityStampStore { - get { - return ResourceManager.GetString("StoreNotIUserSecurityStampStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorRecoveryCodeStore<User>.. - /// - public static string StoreNotIUserTwoFactorRecoveryCodeStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorRecoveryCodeStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Store does not implement IUserTwoFactorStore<TUser>.. - /// - public static string StoreNotIUserTwoFactorStore { - get { - return ResourceManager.GetString("StoreNotIUserTwoFactorStore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The maximum length must be a nonnegative integer.. - /// - public static string StringLengthAttribute_InvalidMaxLength { - get { - return ResourceManager.GetString("StringLengthAttribute_InvalidMaxLength", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a maximum length of {1}.. - /// - public static string StringLengthAttribute_ValidationError { - get { - return ResourceManager.GetString("StringLengthAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.. + /// Looks up a localized string similar to Submit. /// - public static string StringLengthAttribute_ValidationErrorIncludingMinimum { + public static string Submit { get { - return ResourceManager.GetString("StringLengthAttribute_ValidationErrorIncludingMinimum", resourceCulture); + return ResourceManager.GetString("Submit", resourceCulture); } } /// - /// Looks up a localized string similar to Submit. + /// Looks up a localized string similar to Term. /// - public static string Submit { + public static string Term { get { - return ResourceManager.GetString("Submit", resourceCulture); + return ResourceManager.GetString("Term", resourceCulture); } } /// - /// Looks up a localized string similar to Terms. + /// Looks up a localized string similar to Is accept terms?. /// - public static string Terms { + public static string TermsAccepted { get { - return ResourceManager.GetString("Terms", resourceCulture); + return ResourceManager.GetString("TermsAccepted", resourceCulture); } } @@ -1655,7 +1205,7 @@ public static string TodoAddPlaceholder { } /// - /// Looks up a localized string similar to To Do item could not be found. + /// Looks up a localized string similar to Todo item could not be found. /// public static string ToDoItemCouldNotBeFound { get { @@ -1691,38 +1241,20 @@ public static string TooManyRequestsExceptions { } /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string.. - /// - public static string UIHintImplementation_ControlParameterKeyIsNotAString { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNotAString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} is null. Every key control parameter must be a string.. - /// - public static string UIHintImplementation_ControlParameterKeyIsNull { - get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyIsNull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The key parameter at position {0} with value '{1}' occurs more than once.. + /// Looks up a localized string similar to Total categories. /// - public static string UIHintImplementation_ControlParameterKeyOccursMoreThanOnce { + public static string TotalCategories { get { - return ResourceManager.GetString("UIHintImplementation_ControlParameterKeyOccursMoreThanOnce", resourceCulture); + return ResourceManager.GetString("TotalCategories", resourceCulture); } } /// - /// Looks up a localized string similar to The number of control parameters must be even.. + /// Looks up a localized string similar to Total products. /// - public static string UIHintImplementation_NeedEvenNumberOfControlParameters { + public static string TotalProducts { get { - return ResourceManager.GetString("UIHintImplementation_NeedEvenNumberOfControlParameters", resourceCulture); + return ResourceManager.GetString("TotalProducts", resourceCulture); } } @@ -1744,15 +1276,6 @@ public static string UnknownException { } } - /// - /// Looks up a localized string similar to Update. - /// - public static string Update { - get { - return ResourceManager.GetString("Update", resourceCulture); - } - } - /// /// Looks up a localized string similar to The record was modified by another user after you got the original data. the operation was canceled.. /// @@ -1771,33 +1294,6 @@ public static string UploadNewProfileImage { } } - /// - /// Looks up a localized string similar to The {0} field is not a valid fully-qualified http, https, or ftp URL.. - /// - public static string UrlAttribute_Invalid { - get { - return ResourceManager.GetString("UrlAttribute_Invalid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already has a password set.. - /// - public static string UserAlreadyHasPassword { - get { - return ResourceManager.GetString("UserAlreadyHasPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User already in role '{0}'.. - /// - public static string UserAlreadyInRole { - get { - return ResourceManager.GetString("UserAlreadyInRole", resourceCulture); - } - } - /// /// Looks up a localized string similar to User image could not be found. /// @@ -1816,24 +1312,6 @@ public static string UserLockedOut { } } - /// - /// Looks up a localized string similar to Lockout is not enabled for this user.. - /// - public static string UserLockoutNotEnabled { - get { - return ResourceManager.GetString("UserLockoutNotEnabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username. - /// - public static string UserName { - get { - return ResourceManager.GetString("UserName", resourceCulture); - } - } - /// /// Looks up a localized string similar to User {0} does not exist.. /// @@ -1843,87 +1321,6 @@ public static string UserNameNotFound { } } - /// - /// Looks up a localized string similar to User is not in role '{0}'.. - /// - public static string UserNotInRole { - get { - return ResourceManager.GetString("UserNotInRole", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Either ErrorMessageString or ErrorMessageResourceName must be set, but not both.. - /// - public static string ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource { - get { - return ResourceManager.GetString("ValidationAttribute_Cannot_Set_ErrorMessage_And_Resource", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context).. - /// - public static string ValidationAttribute_IsValid_NotImplemented { - get { - return ResourceManager.GetString("ValidationAttribute_IsValid_NotImplemented", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute.. - /// - public static string ValidationAttribute_NeedBothResourceTypeAndResourceName { - get { - return ResourceManager.GetString("ValidationAttribute_NeedBothResourceTypeAndResourceName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The property '{0}' on resource type '{1}' is not a string type.. - /// - public static string ValidationAttribute_ResourcePropertyNotStringType { - get { - return ResourceManager.GetString("ValidationAttribute_ResourcePropertyNotStringType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The resource type '{0}' does not have an accessible static property named '{1}'.. - /// - public static string ValidationAttribute_ResourceTypeDoesNotHaveProperty { - get { - return ResourceManager.GetString("ValidationAttribute_ResourceTypeDoesNotHaveProperty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The field {0} is invalid.. - /// - public static string ValidationAttribute_ValidationError { - get { - return ResourceManager.GetString("ValidationAttribute_ValidationError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The instance provided must match the ObjectInstance on the ValidationContext supplied.. - /// - public static string Validator_InstanceMustMatchValidationContextInstance { - get { - return ResourceManager.GetString("Validator_InstanceMustMatchValidationContextInstance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The value for property '{0}' must be of type '{1}'.. - /// - public static string Validator_Property_Value_Wrong_Type { - get { - return ResourceManager.GetString("Validator_Property_Value_Wrong_Type", resourceCulture); - } - } - /// /// Looks up a localized string similar to You have already requested the confirmation email. Try again in {0}. /// @@ -1951,6 +1348,15 @@ public static string Yes { } } + /// + /// Looks up a localized string similar to You're sign in as. + /// + public static string YouAreSignInAs { + get { + return ResourceManager.GetString("YouAreSignInAs", resourceCulture); + } + } + /// /// Looks up a localized string similar to You must agree to our terms.. /// diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.fr.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.fr.resx new file mode 100644 index 0000000000..dc01dce20e --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.fr.resx @@ -0,0 +1,558 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Le champ {0} est obligatoire. + + + « {0} » et « {1} » ne correspondent pas. + + + Le champ {0} n'est pas une adresse e-mail valide. + + + MaxLengthAttribute doit avoir une valeur de longueur supérieure à zéro. + + + Le champ {0} doit être de type chaîne ou tableau avec une longueur minimale de « {1} ». + + + Le champ {0} doit être compris entre {1} et {2}. + + + L'e-mail « {0} » est déjà pris. + + + L'utilisateur est verrouillé. + + + L'utilisateur {0} n'existe pas. + + + Requête invalide + + + La demande n'a pas pu être traitée en raison d'un conflit dans la demande + + + L'accès à la ressource demandée est interdit + + + Les données de la demande ne sont pas valides + + + Une erreur s'est produite lors de la communication avec le serveur + + + Votre demande ne contient pas d'informations d'authentification valides + + + Une erreur inconnue s'est produite + + + L'enregistrement a été modifié par un autre utilisateur après avoir obtenu les données d'origine. + + + Ressource introuvable + + + Trop de demandes + + + Incapable de se connecter au serveur. + + + Actif + + + Tous + + + Alphabétique + + + Complété + + + Date + + + Editer le profil + + + Nom et prénom + + + Termes + + + Mise à jour du profil réussie. + + + Confirmer le nouveau mot de passe + + + E-mail + + + Mot de passe + + + Votre mot de passe a changé avec succès. + + + Le lien de confirmation a été renvoyé à votre adresse e-mail. + + + Le lien de réinitialisation du mot de passe a été envoyé à votre adresse e-mail. + + + L'image de l'utilisateur est introuvable + + + L'entité de catégorie est introuvable + + + L'entité du produit est introuvable + + + Cette catégorie contient certains produits, vous ne pouvez donc pas la supprimer + + + Erreur + + + Vous avez déjà demandé l'e-mail de réinitialisation du mot de passe. + + + Est-ce que j'accepte les conditions ? + + + Vous devez accepter nos conditions. + + + Genre + + + Date de naissance + + + Nom + + + Catégorie + + + Description + + + Prix + + + Catégories + + + Catégorie de produit + + + Des produits + + + Etes-vous sûr de vouloir supprimer la catégorie {0} + + + Êtes-vous sûr de vouloir supprimer le produit {0} + + + Supprimer la catégorie + + + Supprimer le produit + + + Vous devez être connecté pour continuer. + + + Nom d'utilisateur ou mot de passe invalide + + + Vous avez déjà demandé l'e-mail de confirmation. + + + Votre email est déjà confirmé. + + + Faire + + + Titre + + + L'élément à faire est introuvable + + + Etes-vous sûr de vouloir supprimer {0} + + + Supprimer l'élément à faire + + + Maison + + + Ajouter + + + Vous avez déjà un compte? + + + Nous avons envoyé un lien de confirmation à votre adresse e-mail. + + + confirmez votre adresse email + + + Supprimer le compte + + + Êtes-vous sûr de vouloir supprimer votre compte ? + + + Vous n'avez pas de compte ? + + + Modifier + + + Échec de la confirmation par e-mail ! + + + confirmation de l'émail + + + E-mail confirmé avec succès ! + + + Une erreur s'est produite lors du téléchargement du fichier + + + Veuillez saisir l'adresse e-mail avec laquelle vous avez été inscrit afin que nous puissions envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. + + + Mot de passe oublié + + + Mâle + + + Autre + + + Dépôt GitHub + + + Allez à aujourd'hui + + + Créez facilement votre application Blazor multimode (WASM, serveur, hybride, pré-rendu) dans les plus brefs délais ! + + + Accueil Boilerplate + + + Il semble que le lien de confirmation soit invalide ou ait expiré. + + + nouveau mot de passe + + + Non + + + Vous n'avez pas reçu l'e-mail de confirmation ? + + + OU + + + Image de profil + + + Retirer + + + Ré-envoyer l'email + + + Réinitialiser le mot de passe + + + Sauvegarder + + + Se connecter + + + se déconnecter + + + Êtes-vous certain de vouloir vous déconnecter? + + + S'inscrire + + + S'inscrire + + + Soumettre + + + Terme + + + je suis d'accord avec le + + + Téléchargez une nouvelle image de profil + + + Oui + + + Ajouter une tâche + + + Rechercher des choses à faire... + + + Sélectionnez votre date de naissance + + + Choisir une catégorie + + + Catégories totales + + + Produits totaux + + + Modifier la catégorie + + + Nouvelle catégorie + + + Catégories + + + Entrez le nom de la catégorie + + + Entrez le nom du produit + + + Nombre de catégories des 30 derniers jours + + + Ventes de produits + + + Ce graphique montre le numéro de vente de chaque produit. + + + Rechercher sur le nom + + + Tableau du nombre de produits par catégorie + + + Ce graphique montre le nombre de produits dans chaque catégorie. + + + Des produits + + + Pourcentage de produits par catégorie + + + Ce graphique montre le pourcentage de produits dans chaque catégorie. + + + Se connecter + + + Connectez-vous en tant qu'utilisateur différent + + + Vous êtes connecté en tant que + + + Réinitialiser le mot de passe + + + Aucune tâche pour l'instant + + + Ajouter un produit + + + Action + + + Dos + + + Annuler + + + Vérifiez vos spams/indésirables si vous ne les trouvez pas dans la boîte de réception. + + + Couleur + + + Couleur personnalisée + + + Sélecteur de couleurs par défaut + + + Supprimer + + + Identifiant + + + Mot de passe oublié? + + + Nombre de produits des 30 derniers jours + + + Femelle + + + Modifier le produit + + + Tableau de bord + + \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.resx new file mode 100644 index 0000000000..320971d835 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/AppStrings.resx @@ -0,0 +1,566 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + '{0}' and '{1}' do not match. + + + The {0} field is not a valid e-mail address. + + + MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length. + + + The field {0} must be a string or array type with a minimum length of '{1}'. + + + The field {0} must be between {1} and {2}. + + + The {0} field is required. + + + + Invalid request + + + Request could not be processed because of conflict in the request + + + Access to the requested resource is forbidden + + + Request data is not valid + + + An error occurred while communicating with server + + + Your request lacks valid authentication credentials + + + Unknown error has occurred + + + The record was modified by another user after you got the original data. the operation was canceled. + + + Resource not found + + + Too many requests + + + Unable to connect to server. + + + + Active + + + All + + + Alphabetical + + + Completed + + + Date + + + Edit profile + + + FullName + + + Terms + + + Profile updated successfully. + + + Confirm New Password + + + Email + + + Password + + + Your password changed successfully. + + + The confirmation link has been re-sent to your email address. + + + The reset password link has been sent to your email address. + + + User image could not be found + + + Error + + + You have already requested the reset password email. Try again in {0} + + + Is accept terms? + + + You must agree to our terms. + + + Gender + + + Birthdate + + + Name + + + Description + + + Price + + + You must be signed in to continue. + + + Invalid username or password + + + You have already requested the confirmation email. Try again in {0} + + + Your email is already confirmed. + + + Title + + + Are you sure you want to delete {0} + + + Home + + + User is locked out. + + + User {0} does not exist. + + + Email '{0}' is already taken. + + + Add + + + Already have an account? + + + We have sent a confirmation link to your email address. +Please confirm your email by clicking on the link. + + + Confirm Your Email Address + + + Delete Account + + + Are you sure you want to delete your account? + + + Don’t have an account? + + + Edit + + + Email Confirmation Failed! + + + Email Confirmation + + + Email Confirmed Successfully! + + + An error occurred while uploading file + + + Please enter the email address you have been signed up with so we can send a reset password link to your email address. + + + Forget password + + + Male + + + Other + + + GitHub Repo + + + Go to today + + + Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor app easily in the shortest time ever! + + + Boilerplate Home + + + Looks like the confirmation link either is invalid or has expired. + + + New Password + + + No + + + Haven’t you received the confirmation email? + + + OR + + + Profile Image + + + Remove + + + Resend email + + + Reset password + + + Save + + + Sign in + + + Sign out + + + Are you sure you want to Sign out? + + + Sign up + + + Sign up + + + Submit + + + Term + + + I agree to the + + + Upload a new profile image + + + Yes + + + Select your birth date + + + Reset password + + + Action + + + Back + + + Cancel + + + Check your Spam/Junk, if you could not find it in the Inbox. + + + Color + + + Custom color + + + Delete + + + Id + + + Sign in + + + Sign in as different user + + + You're sign in as + + + Forgot password? + + + Female + + + + Add a todo + + + No todos yet + + + Search some todo... + + + Todo item could not be found + + + Todo + + + Delete todo item + + + + Last 30 days product count + + + Add product + + + Select category + + + Total categories + + + Total products + + + Edit category + + + New category + + + Categories + + + Enter category name + + + Enter product name + + + Last 30 days category count + + + Product sales + + + This chart shows the sale number of each product. + + + Search on name + + + Products count per category chart + + + This chart shows the number of products in each category. + + + Products + + + Products percentage per category + + + This chart shows the percentage of products in each category. + + + Categories + + + Product category + + + Products + + + Product entity could not be found + + + This category contain some products, so you can't delete it + + + Are you sure you want to delete category {0} + + + Are you sure you want to delete product {0} + + + Delete category + + + Delete product + + + Category entity could not be found + + + Category + + + Default color picker + + + Edit product + + + Dashboard + + + \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.Designer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.Designer.cs new file mode 100644 index 0000000000..af4d15eb78 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.Designer.cs @@ -0,0 +1,513 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Boilerplate.Shared.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class IdentityStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal IdentityStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Boilerplate.Shared.Resources.IdentityStrings", typeof(IdentityStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Optimistic concurrency failure, object has been modified.. + /// + public static string ConcurrencyFailure { + get { + return ResourceManager.GetString("ConcurrencyFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to An unknown failure has occurred.. + /// + public static string DefaultError { + get { + return ResourceManager.GetString("DefaultError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email '{0}' is already taken.. + /// + public static string DuplicateEmail { + get { + return ResourceManager.GetString("DuplicateEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role name '{0}' is already taken.. + /// + public static string DuplicateRoleName { + get { + return ResourceManager.GetString("DuplicateRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username '{0}' is already taken.. + /// + public static string DuplicateUserName { + get { + return ResourceManager.GetString("DuplicateUserName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Email '{0}' is invalid.. + /// + public static string InvalidEmail { + get { + return ResourceManager.GetString("InvalidEmail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type {0} must derive from {1}<{2}>.. + /// + public static string InvalidManagerType { + get { + return ResourceManager.GetString("InvalidManagerType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided PasswordHasherCompatibilityMode is invalid.. + /// + public static string InvalidPasswordHasherCompatibilityMode { + get { + return ResourceManager.GetString("InvalidPasswordHasherCompatibilityMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The iteration count must be a positive integer.. + /// + public static string InvalidPasswordHasherIterationCount { + get { + return ResourceManager.GetString("InvalidPasswordHasherIterationCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role name '{0}' is invalid.. + /// + public static string InvalidRoleName { + get { + return ResourceManager.GetString("InvalidRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid token.. + /// + public static string InvalidToken { + get { + return ResourceManager.GetString("InvalidToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username '{0}' is invalid, can only contain letters or digits.. + /// + public static string InvalidUserName { + get { + return ResourceManager.GetString("InvalidUserName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A user with this login already exists.. + /// + public static string LoginAlreadyAssociated { + get { + return ResourceManager.GetString("LoginAlreadyAssociated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AddIdentity must be called on the service collection.. + /// + public static string MustCallAddIdentity { + get { + return ResourceManager.GetString("MustCallAddIdentity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true.. + /// + public static string NoPersonalDataProtector { + get { + return ResourceManager.GetString("NoPersonalDataProtector", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No RoleType was specified, try AddRoles<TRole>().. + /// + public static string NoRoleType { + get { + return ResourceManager.GetString("NoRoleType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered.. + /// + public static string NoTokenProvider { + get { + return ResourceManager.GetString("NoTokenProvider", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User security stamp cannot be null.. + /// + public static string NullSecurityStamp { + get { + return ResourceManager.GetString("NullSecurityStamp", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Incorrect password.. + /// + public static string PasswordMismatch { + get { + return ResourceManager.GetString("PasswordMismatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one digit ('0'-'9').. + /// + public static string PasswordRequiresDigit { + get { + return ResourceManager.GetString("PasswordRequiresDigit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one lowercase ('a'-'z').. + /// + public static string PasswordRequiresLower { + get { + return ResourceManager.GetString("PasswordRequiresLower", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one non alphanumeric character.. + /// + public static string PasswordRequiresNonAlphanumeric { + get { + return ResourceManager.GetString("PasswordRequiresNonAlphanumeric", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must use at least {0} different characters.. + /// + public static string PasswordRequiresUniqueChars { + get { + return ResourceManager.GetString("PasswordRequiresUniqueChars", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must have at least one uppercase ('A'-'Z').. + /// + public static string PasswordRequiresUpper { + get { + return ResourceManager.GetString("PasswordRequiresUpper", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Passwords must be at least {0} characters.. + /// + public static string PasswordTooShort { + get { + return ResourceManager.GetString("PasswordTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Recovery code redemption failed.. + /// + public static string RecoveryCodeRedemptionFailed { + get { + return ResourceManager.GetString("RecoveryCodeRedemptionFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} does not exist.. + /// + public static string RoleNotFound { + get { + return ResourceManager.GetString("RoleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true.. + /// + public static string StoreNotIProtectedUserStore { + get { + return ResourceManager.GetString("StoreNotIProtectedUserStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IQueryableRoleStore<TRole>.. + /// + public static string StoreNotIQueryableRoleStore { + get { + return ResourceManager.GetString("StoreNotIQueryableRoleStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IQueryableUserStore<TUser>.. + /// + public static string StoreNotIQueryableUserStore { + get { + return ResourceManager.GetString("StoreNotIQueryableUserStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IRoleClaimStore<TRole>.. + /// + public static string StoreNotIRoleClaimStore { + get { + return ResourceManager.GetString("StoreNotIRoleClaimStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserAuthenticationTokenStore<User>.. + /// + public static string StoreNotIUserAuthenticationTokenStore { + get { + return ResourceManager.GetString("StoreNotIUserAuthenticationTokenStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserAuthenticatorKeyStore<User>.. + /// + public static string StoreNotIUserAuthenticatorKeyStore { + get { + return ResourceManager.GetString("StoreNotIUserAuthenticatorKeyStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserClaimStore<TUser>.. + /// + public static string StoreNotIUserClaimStore { + get { + return ResourceManager.GetString("StoreNotIUserClaimStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserConfirmationStore<TUser>.. + /// + public static string StoreNotIUserConfirmationStore { + get { + return ResourceManager.GetString("StoreNotIUserConfirmationStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserEmailStore<TUser>.. + /// + public static string StoreNotIUserEmailStore { + get { + return ResourceManager.GetString("StoreNotIUserEmailStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserLockoutStore<TUser>.. + /// + public static string StoreNotIUserLockoutStore { + get { + return ResourceManager.GetString("StoreNotIUserLockoutStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserLoginStore<TUser>.. + /// + public static string StoreNotIUserLoginStore { + get { + return ResourceManager.GetString("StoreNotIUserLoginStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserPasswordStore<TUser>.. + /// + public static string StoreNotIUserPasswordStore { + get { + return ResourceManager.GetString("StoreNotIUserPasswordStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserPhoneNumberStore<TUser>.. + /// + public static string StoreNotIUserPhoneNumberStore { + get { + return ResourceManager.GetString("StoreNotIUserPhoneNumberStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserRoleStore<TUser>.. + /// + public static string StoreNotIUserRoleStore { + get { + return ResourceManager.GetString("StoreNotIUserRoleStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserSecurityStampStore<TUser>.. + /// + public static string StoreNotIUserSecurityStampStore { + get { + return ResourceManager.GetString("StoreNotIUserSecurityStampStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserTwoFactorRecoveryCodeStore<User>.. + /// + public static string StoreNotIUserTwoFactorRecoveryCodeStore { + get { + return ResourceManager.GetString("StoreNotIUserTwoFactorRecoveryCodeStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store does not implement IUserTwoFactorStore<TUser>.. + /// + public static string StoreNotIUserTwoFactorStore { + get { + return ResourceManager.GetString("StoreNotIUserTwoFactorStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User already has a password set.. + /// + public static string UserAlreadyHasPassword { + get { + return ResourceManager.GetString("UserAlreadyHasPassword", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User already in role '{0}'.. + /// + public static string UserAlreadyInRole { + get { + return ResourceManager.GetString("UserAlreadyInRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User is locked out.. + /// + public static string UserLockedOut { + get { + return ResourceManager.GetString("UserLockedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lockout is not enabled for this user.. + /// + public static string UserLockoutNotEnabled { + get { + return ResourceManager.GetString("UserLockoutNotEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User {0} does not exist.. + /// + public static string UserNameNotFound { + get { + return ResourceManager.GetString("UserNameNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User is not in role '{0}'.. + /// + public static string UserNotInRole { + get { + return ResourceManager.GetString("UserNotInRole", resourceCulture); + } + } + } +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.fr.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.fr.resx new file mode 100644 index 0000000000..f8293653b4 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.fr.resx @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Le nom de rôle « {0} » est déjà pris. + + + Échec de concurrence optimiste, l'objet a été modifié. + + + Une panne inconnue s'est produite. + + + L'e-mail « {0} » est déjà pris. + + + Le nom d'utilisateur '{0}' est déjà pris. + + + L'e-mail « {0} » n'est pas valide. + + + Le type {0} doit dériver de {1}<{2}>. + + + Le PasswordHasherCompatibilityMode fourni n’est pas valide. + + + Le nombre d'itérations doit être un entier positif. + + + Le nom de rôle « {0} » n'est pas valide. + + + Jeton invalide. + + + Le nom d'utilisateur '{0}' n'est pas valide et ne peut contenir que des lettres ou des chiffres. + + + Un utilisateur avec cette connexion existe déjà. + + + AddIdentity doit être appelé sur la collection de services. + + + Aucun IUserTwoFactorTokenProvider<{0}> nommé '{1}' n'est enregistré. + + + Le cachet de sécurité de l'utilisateur ne peut pas être nul. + + + Mot de passe incorrect. + + + Les mots de passe doivent comporter au moins un chiffre (« 0 » - « 9 »). + + + Les mots de passe doivent comporter au moins une minuscule (« a » - « z »). + + + Les mots de passe doivent comporter au moins un caractère non alphanumérique. + + + Les mots de passe doivent comporter au moins une majuscule (« A » - « Z »). + + + Les mots de passe doivent comporter au moins {0} caractères. + + + Le rôle {0} n'existe pas. + + + Store n’implémente pas IQueryableRoleStore<TRole>. + + + Store n’implémente pas IQueryableUserStore<TUser>. + + + Store n’implémente pas IRoleClaimStore<TRole>. + + + Store n’implémente pas IUserAuthenticationTokenStore<User>. + + + Store n’implémente pas IUserClaimStore<TUser>. + + + Store n’implémente pas IUserConfirmationStore<TUser>. + + + Store n’implémente pas IUserEmailStore<TUser>. + + + Store n’implémente pas IUserLockoutStore<TUser>. + + + Store n’implémente pas IUserLoginStore<TUser>. + + + Store n’implémente pas IUserPasswordStore<TUser>. + + + Store n’implémente pas IUserPhoneNumberStore<TUser>. + + + Store n’implémente pas IUserRoleStore<TUser>. + + + Store n’implémente pas IUserSecurityStampStore<TUser>. + + + Store n’implémente pas IUserAuthenticatorKeyStore<User>. + + + Store n’implémente pas IUserTwoFactorStore<TUser>. + + + L'utilisation du code de récupération a échoué. + + + L'utilisateur a déjà un mot de passe défini. + + + Utilisateur déjà dans le rôle « {0} ». + + + L'utilisateur est verrouillé. + + + Le verrouillage n'est pas activé pour cet utilisateur. + + + L'utilisateur {0} n'existe pas. + + + L'utilisateur n'a pas le rôle « {0} ». + + + Store n’implémente pas IUserTwoFactorRecoveryCodeStore<User>. + + + Les mots de passe doivent utiliser au moins {0} caractères différents. + + + Aucun RoleType n'a été spécifié, essayez AddRoles<TRole>(). + + + Store n’implémente pas IProtectedUserStore<TUser> qui est requis lorsque ProtectPersonalData = true. + + + Aucun service IPersonalDataProtector n'a été enregistré, cela est requis lorsque ProtectPersonalData = true. + + \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.resx new file mode 100644 index 0000000000..b90af58bd7 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/IdentityStrings.resx @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Optimistic concurrency failure, object has been modified. + Error when optimistic concurrency fails + + + An unknown failure has occurred. + Default identity result error message + + + Email '{0}' is already taken. + Error for duplicate emails + + + Role name '{0}' is already taken. + Error for duplicate roles + + + Username '{0}' is already taken. + Error for duplicate user names + + + Email '{0}' is invalid. + Invalid email + + + Type {0} must derive from {1}<{2}>. + Error when the manager type is not derived correctly + + + The provided PasswordHasherCompatibilityMode is invalid. + Error when the password hasher doesn't understand the format it's being asked to produce. + + + The iteration count must be a positive integer. + Error when the iteration count is < 1. + + + Role name '{0}' is invalid. + Error for invalid role names + + + Invalid token. + Error when a token is not recognized + + + Username '{0}' is invalid, can only contain letters or digits. + User names can only contain letters or digits + + + A user with this login already exists. + Error when a login already linked + + + AddIdentity must be called on the service collection. + Error when AddIdentity is not called + + + No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered. + Error when there is no IUserTwoFactorTokenProvider + + + User security stamp cannot be null. + Error when a user's security stamp is null. + + + Incorrect password. + Error when a password doesn't match + + + Passwords must have at least one digit ('0'-'9'). + Error when passwords do not have a digit + + + Passwords must have at least one lowercase ('a'-'z'). + Error when passwords do not have a lowercase letter + + + Passwords must have at least one non alphanumeric character. + Error when password does not have enough non alphanumeric characters + + + Passwords must have at least one uppercase ('A'-'Z'). + Error when passwords do not have an uppercase letter + + + Passwords must be at least {0} characters. + Error message for passwords that are too short + + + Role {0} does not exist. + Error when a role does not exist + + + Store does not implement IQueryableRoleStore<TRole>. + Error when the store does not implement this interface + + + Store does not implement IQueryableUserStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IRoleClaimStore<TRole>. + Error when the store does not implement this interface + + + Store does not implement IUserAuthenticationTokenStore<User>. + Error when the store does not implement this interface + + + Store does not implement IUserClaimStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserConfirmationStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserEmailStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserLockoutStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserLoginStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserPasswordStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserPhoneNumberStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserRoleStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserSecurityStampStore<TUser>. + Error when the store does not implement this interface + + + Store does not implement IUserAuthenticatorKeyStore<User>. + Error when the store does not implement this interface + + + Store does not implement IUserTwoFactorStore<TUser>. + Error when the store does not implement this interface + + + Recovery code redemption failed. + Error when a recovery code is not redeemed. + + + User already has a password set. + Error when AddPasswordAsync called when a user already has a password + + + User already in role '{0}'. + Error when a user is already in a role + + + User is locked out. + Error when a user is locked out + + + Lockout is not enabled for this user. + Error when lockout is not enabled + + + User {0} does not exist. + Error when a user does not exist + + + User is not in role '{0}'. + Error when a user is not in the role + + + Store does not implement IUserTwoFactorRecoveryCodeStore<User>. + Error when the store does not implement this interface + + + Passwords must use at least {0} different characters. + Error message for passwords that are based on similar characters + + + No RoleType was specified, try AddRoles<TRole>(). + Error when the IdentityBuilder.RoleType was not specified + + + Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true. + Error when the store does not implement this interface + + + No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true. + Error when there is no IPersonalDataProtector + + \ No newline at end of file diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/StringLocalizerProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/StringLocalizerProvider.cs similarity index 88% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/StringLocalizerProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/StringLocalizerProvider.cs index 45fbdd8eb2..a332f08549 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Resources/StringLocalizerProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Resources/StringLocalizerProvider.cs @@ -1,6 +1,6 @@ using System.Reflection; -namespace AdminPanel.Shared.Resources; +namespace Boilerplate.Shared.Resources; public static class StringLocalizerProvider { public static IStringLocalizer ProvideLocalizer(Type dtoType, IStringLocalizerFactory factory) diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IAuthTokenProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs similarity index 61% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IAuthTokenProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs index 2fc4261bb7..6f57285c1e 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IAuthTokenProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Services.Contracts; +namespace Boilerplate.Shared.Services.Contracts; public interface IAuthTokenProvider { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IDateTimeProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IDateTimeProvider.cs similarity index 60% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IDateTimeProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IDateTimeProvider.cs index a3fbe309c9..858af08ebc 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/Contracts/IDateTimeProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/Contracts/IDateTimeProvider.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Services.Contracts; +namespace Boilerplate.Shared.Services.Contracts; public interface IDateTimeProvider { diff --git a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/DateTimeProvider.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/DateTimeProvider.cs similarity index 78% rename from src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/DateTimeProvider.cs rename to src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/DateTimeProvider.cs index 2137eda9dd..cc4fef79de 100644 --- a/src/Templates/AdminPanel/Bit.AdminPanel/src/Shared/Services/DateTimeProvider.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Services/DateTimeProvider.cs @@ -1,4 +1,4 @@ -namespace AdminPanel.Shared.Services; +namespace Boilerplate.Shared.Services; public class DateTimeProvider : IDateTimeProvider { diff --git a/src/Templates/TodoTemplate/Readme.md b/src/Templates/Boilerplate/Readme.md similarity index 74% rename from src/Templates/TodoTemplate/Readme.md rename to src/Templates/Boilerplate/Readme.md index 5b2f1b223c..14d348049a 100644 --- a/src/Templates/TodoTemplate/Readme.md +++ b/src/Templates/Boilerplate/Readme.md @@ -1,3 +1,3 @@ -# bit TodoTemplate +# bit Boilerplate More info at https://bitplatform.dev/templates/overview \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate.ProjectTemplate.csproj b/src/Templates/TodoTemplate/Bit.TodoTemplate.ProjectTemplate.csproj deleted file mode 100644 index 426a9978d6..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate.ProjectTemplate.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - net8.0 - false - content - false - true - - - Bit.TodoTemplate - Template - bit TodoTemplate - A template for creating a Todo app base on the Bit-Platform - Bit;c#;asp.net;core;template;web;blazor - Copyright © bit platform 2022 - bit-icon-512.png - - - - - - - - - - - True - \ - - - True - \ - - - True - \ - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/cd.yml b/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/cd.yml deleted file mode 100644 index cc9f73affe..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/cd.yml +++ /dev/null @@ -1,322 +0,0 @@ -trigger: -- main - -# https://bitplatform.dev/templates/devops - -variables: - WEB_APP_DEPLOYMENT_TYPE: 'Spa' - APP_SERVICE_NAME: 'app-service-td-test' - AZURE_SUBSCRIPTION: 'td-test-service-connection' # https://learn.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#azure-resource-manager-service-connection - ConnectionStrings.SqlServerConnectionString: $(DB_CONNECTION_STRING) - AppSettings.JwtSettings.IdentityCertificatePassword: $(API_IDENTITY_CERTIFICATE_PASSWORD) - ApiServerAddress: 'https://todo.bitplatform.dev/api/' - -jobs: - -- job: build_blazor_api_wasm - displayName: 'build blazor api + web assembly' - - pool: - vmImage: 'ubuntu-22.04' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Switch to blazor web assembly' - inputs: - targetType: 'inline' - script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/TodoTemplate.Client.Web.csproj - - - task: Bash@3 - displayName: 'Install wasm' - inputs: - targetType: 'inline' - script: | - 'cd src && dotnet workload install wasm-tools wasm-experimental' - - - task: FileTransform@1 - displayName: Update appsettings.json - inputs: - fileType: 'json' - folderPath: './' - targetFiles: 'src/Client/Core/appsettings.json' - - - task: Bash@3 - displayName: 'Generate CSS/JS files' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - - - task: Bash@3 - displayName: 'Publish' - inputs: - targetType: 'inline' - script: 'dotnet publish src/Server/Api/TodoTemplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o api-web' - - - task: PublishPipelineArtifact@1 - displayName: Upload api-web artifact - inputs: - targetPath: 'api-web' - artifact: 'api-web-bundle' - publishLocation: 'pipeline' - - - task: Bash@3 - displayName: 'Build migrations bundle' - inputs: - targetType: 'inline' - script: 'cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project TodoTemplate.Server.Api.csproj' - - - task: PublishPipelineArtifact@1 - displayName: Upload ef migrations bundle - inputs: - targetPath: 'src/Server/Api/efbundle' - artifact: 'migrations-bundle' - publishLocation: 'pipeline' - -- job: deploy_blazor_api_wasm - dependsOn: build_blazor_api_wasm - displayName: 'deploy blazor api + web assembly' - - pool: - vmImage: 'ubuntu-22.04' - - steps: - - - task: DownloadPipelineArtifact@2 - displayName: Retrieve api-web bundle - inputs: - artifact: 'api-web-bundle' - path: ./ - - - task: DownloadPipelineArtifact@2 - displayName: Retrieve migrations bundle - inputs: - artifact: 'migrations-bundle' - path: ./ - - - task: FileTransform@1 - displayName: Update appsettings.json - inputs: - fileType: 'json' - folderPath: './' - targetFiles: 'appsettings.json' - - - task: DownloadSecureFile@1 - displayName: Download .pfx file - name: IdentityCertificate - inputs: - secureFile: 'IdentityCertificate.pfx' - - - script: | - rm IdentityCertificate.pfx - cp "$(IdentityCertificate.secureFilePath)" "IdentityCertificate.pfx" - failOnStderr: true - displayName: Copy .pfx file - - - task: Bash@3 - displayName: 'Run migrations' - inputs: - targetType: 'inline' - script: | - chmod +x efbundle - ./efbundle - rm efbundle - failOnStderr: true - - - task: AzureRmWebAppDeployment@4 - displayName: 'Deploy to App Service' - inputs: - ConnectionType: 'AzureRM' - azureSubscription: '$(AZURE_SUBSCRIPTION)' - appType: 'webAppLinux' - WebAppName: '$(APP_SERVICE_NAME)' - packageForLinux: '.' - -- job: build_blazor_hybrid_windows - displayName: 'build blazor hybrid (windows)' - - pool: - vmImage: 'windows-2022' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: FileTransform@1 - displayName: Update appsettings.json - inputs: - fileType: 'json' - folderPath: './' - targetFiles: 'src/Client/Core/appsettings.json' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Generate CSS/JS files' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - - - task: Bash@3 - displayName: 'Build exe' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0' - - - task: PublishPipelineArtifact@1 - displayName: Upload artifact - inputs: - targetPath: 'src/Client/App/bin/release/net8.0-windows10.0.19041.0/win10-x86' - artifact: 'win-exe-bundle' - publishLocation: 'pipeline' - -- job: build_blazor_hybrid_android - displayName: 'build blazor hybrid (android)' - - pool: - vmImage: 'ubuntu-22.04' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui-android - - - task: DownloadSecureFile@1 - displayName: Download TodoTemplate keystore file - name: AndroidKeyStore - inputs: - secureFile: 'TodoTemplate.keystore' - - - script: | - cp $(AndroidKeyStore.secureFilePath) src/Client/App/TodoTemplate.keystore - failOnStderr: true - displayName: Copy keystore to app project folder - - - task: FileTransform@1 - displayName: Update appsettings.json - inputs: - fileType: 'json' - folderPath: './' - targetFiles: 'src/Client/Core/appsettings.json' - - - task: Bash@3 - displayName: 'Generate CSS/JS files' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - - - task: Bash@3 - displayName: 'Build aab' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=TodoTemplate -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' - - - task: Bash@3 - displayName: 'Build apk' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=TodoTemplate -p:AndroidSigningKeyPass="$(ANDROID_RELEASE_KEYSTORE_PASSWORD)" -p:AndroidSigningStorePass="$(ANDROID_RELEASE_SIGNING_PASSWORD)" -f net8.0-android' - - - script: | - mkdir drop - cp ./src/Client/App/bin/Release/net8.0-android/*-Signed.* drop/ - failOnStderr: true - displayName: Copy apk/aab files to drop folder - - - task: PublishPipelineArtifact@1 - displayName: Upload artifact - inputs: - targetPath: 'drop/' - artifact: 'android-bundle' - publishLocation: 'pipeline' - -- job: build_blazor_hybrid_maccatalyst - displayName: 'build blazor hybrid (maccatalyst)' - - pool: - vmImage: 'macos-13' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: FileTransform@1 - displayName: Update appsettings.json - inputs: - fileType: 'json' - folderPath: './' - targetFiles: 'src/Client/Core/appsettings.json' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Generate CSS/JS files' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore' - - - task: Bash@3 - displayName: 'Build pkg' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst' - - - script: | - mkdir drop - cp ./src/Client/App/bin/Release/net8.0-maccatalyst/*.pkg drop/ - failOnStderr: true - displayName: Copy pkg file to drop folder - - - task: PublishPipelineArtifact@1 - displayName: Upload artifact - inputs: - targetPath: 'drop/' - artifact: 'mac-pkg-bundle' - publishLocation: 'pipeline' \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/ci.yml b/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/ci.yml deleted file mode 100644 index 6045438b5d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.azure-devops/workflows/ci.yml +++ /dev/null @@ -1,188 +0,0 @@ -trigger: -- develop - -# https://bitplatform.dev/templates/devops - -variables: - WEB_APP_DEPLOYMENT_TYPE: 'Spa' - -jobs: -- job: build_blazor_server - displayName: 'build blazor server' - - pool: - vmImage: 'ubuntu-22.04' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/Web/TodoTemplate.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' - -- job: build_blazor_hybrid_android - displayName: 'build blazor hybrid (android)' - - pool: - vmImage: 'windows-2022' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android' - -- job: build_blazor_hybrid_windows - displayName: 'build blazor hybrid (windows)' - - pool: - vmImage: 'windows-2022' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0' - -- job: build_blazor_hybrid_iOS - displayName: 'build blazor hybrid (iOS)' - - pool: - vmImage: 'macos-13' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios' - -- job: build_blazor_hybrid_maccatalyst - displayName: 'build blazor hybrid (maccatalyst)' - - pool: - vmImage: 'macos-13' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install maui' - inputs: - targetType: 'inline' - script: cd src && dotnet workload install maui - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst' - -- job: build_blazor_api_wasm - displayName: 'build blazor api + web assembly' - - pool: - vmImage: 'ubuntu-22.04' - - steps: - - task: UseDotNet@2 - displayName: 'Setup .NET' - inputs: - useGlobalJson: true - workingDirectory: 'src' - - - task: NodeTool@0 - inputs: - versionSpec: '18.x' - displayName: 'Install Node.js' - - - task: Bash@3 - displayName: 'Install wasm' - inputs: - targetType: 'inline' - script: 'cd src && dotnet workload install wasm-tools wasm-experimental' - - - task: Bash@3 - displayName: 'Switch to blazor web assembly' - inputs: - targetType: 'inline' - script: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/TodoTemplate.Client.Web.csproj - - - task: Bash@3 - displayName: 'Build' - inputs: - targetType: 'inline' - script: 'dotnet build src/Server/Api/TodoTemplate.Server.Api.csproj -p:Configuration=Release -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ variables.WEB_APP_DEPLOYMENT_TYPE }}"' \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.editorconfig b/src/Templates/TodoTemplate/Bit.TodoTemplate/.editorconfig deleted file mode 100644 index 064635785b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.editorconfig +++ /dev/null @@ -1,124 +0,0 @@ -# To learn more about .editorconfig see https://aka.ms/editorconfigdocs -############################### -# Core EditorConfig Options # -############################### -# All files -[*] -indent_style = space -indent_size = 4 -# Code files -[*.{cs,csx,vb,vbx}] -insert_final_newline = true -charset = utf-8-bom -############################### -# .NET Coding Conventions # -############################### -[*.{cs,vb}] -# Organize usings -dotnet_sort_system_directives_first = true -# this. preferences -dotnet_style_qualification_for_field = false:silent -dotnet_style_qualification_for_property = false:silent -dotnet_style_qualification_for_method = false:silent -dotnet_style_qualification_for_event = false:silent -# Language keywords vs BCL types preferences -dotnet_style_predefined_type_for_locals_parameters_members = true:silent -dotnet_style_predefined_type_for_member_access = true:silent -# Parentheses preferences -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent -# Modifier preferences -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent -dotnet_style_readonly_field = true:suggestion -# Expression-level preferences -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_explicit_tuple_names = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion -dotnet_style_prefer_auto_properties = true:silent -dotnet_style_prefer_conditional_expression_over_assignment = true:silent -dotnet_style_prefer_conditional_expression_over_return = true:silent -############################### -# Naming Conventions # -############################### -# Style Definitions -dotnet_naming_style.pascal_case_style.capitalization = pascal_case -# Use PascalCase for constant fields -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion -dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields -dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style -dotnet_naming_symbols.constant_fields.applicable_kinds = field -dotnet_naming_symbols.constant_fields.applicable_accessibilities = * -dotnet_naming_symbols.constant_fields.required_modifiers = const -############################### -# C# Coding Conventions # -############################### -[*.cs] -# var preferences -csharp_style_namespace_declarations = file_scoped:warning -csharp_style_var_for_built_in_types = true:silent -csharp_style_var_when_type_is_apparent = true:silent -csharp_style_var_elsewhere = true:silent -# Expression-bodied members -csharp_style_expression_bodied_methods = false:silent -csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = true:silent -csharp_style_expression_bodied_indexers = true:silent -csharp_style_expression_bodied_accessors = true:silent -# Pattern matching preferences -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion -# Null-checking preferences -csharp_style_throw_expression = true:suggestion -csharp_style_conditional_delegate_call = true:suggestion -# Modifier preferences -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion -# Expression-level preferences -csharp_prefer_braces = true:silent -csharp_style_deconstructed_variable_declaration = true:suggestion -csharp_prefer_simple_default_expression = true:suggestion -csharp_style_pattern_local_over_anonymous_function = true:suggestion -csharp_style_inlined_variable_declaration = true:suggestion -############################### -# C# Formatting Rules # -############################### -# New line preferences -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true -# Indentation preferences -csharp_indent_case_contents = true -csharp_indent_switch_labels = true -csharp_indent_labels = flush_left -# Space preferences -csharp_space_after_cast = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false -# Wrapping preferences -csharp_preserve_single_line_statements = true -csharp_preserve_single_line_blocks = true -############################### -# VB Coding Conventions # -############################### -[*.vb] -# Modifier preferences -visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/cd.yml b/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/cd.yml deleted file mode 100644 index a8002a08da..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/cd.yml +++ /dev/null @@ -1,362 +0,0 @@ -name: TodoTemplate CD - -# https://bitplatform.dev/templates/dev-ops - -env: - WEB_APP_DEPLOYMENT_TYPE: 'Spa' - API_SERVER_ADDRESS: 'https://todo.bitplatform.dev/api/' - APP_SERVICE_NAME: 'app-service-td-test' - IOS_CODE_SIGN_PROVISION: 'TodoTemplate' - -on: - workflow_dispatch: - push: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - - build_blazor_api_wasm: - name: build blazor api + web assembly - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Switch to blazor web assembly - run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/TodoTemplate.Client.Web.csproj - - - name: Install wasm - run: cd src && dotnet workload install wasm-tools wasm-experimental - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Publish - run: dotnet publish src/Server/Api/TodoTemplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" -p:Configuration=Release --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/api-web - - - name: Build migrations bundle - run: | - cd src/Server/Api/ && dotnet tool restore && dotnet ef migrations bundle --self-contained -r linux-x64 --project TodoTemplate.Server.Api.csproj - - - name: Upload ef migrations bundle - uses: actions/upload-artifact@v3 - with: - name: migrations-bundle - path: src/Server/Api/efbundle - - - name: Upload api-web artifact - uses: actions/upload-artifact@v3 - with: - name: api-web-bundle - path: ${{env.DOTNET_ROOT}}/api-web - - deploy_blazor_api_wasm: - name: deploy blazor api + web assembly - needs: build_blazor_api_wasm - runs-on: ubuntu-22.04 - environment: - name: 'production' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - - steps: - - - name: Retrieve api-web bundle - uses: actions/download-artifact@v2 - with: - name: api-web-bundle - - - name: Retrieve migrations bundle - uses: actions/download-artifact@v2 - with: - name: migrations-bundle - - - name: Update appsettings.json - uses: microsoft/variable-substitution@v1 - with: - files: 'appsettings.json' - env: - ConnectionStrings.SqlServerConnectionString: ${{ secrets.DB_CONNECTION_STRING }} - AppSettings.JwtSettings.IdentityCertificatePassword: ${{ secrets.API_IDENTITY_CERTIFICATE_PASSWORD }} - - - name: Delete IdentityCertificate.pfx - run: | - rm IdentityCertificate.pfx - - - name: Extract identity certificate from env - uses: timheuer/base64-to-file@v1 - with: - fileDir: './' - fileName: 'IdentityCertificate.pfx' - encodedString: ${{ secrets.API_IDENTITY_CERTIFICATE_FILE_BASE64 }} - - - name: Run migrations - run: | - chmod +x efbundle - ./efbundle - rm efbundle - - - name: Deploy to Azure Web App - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: ${{ env.APP_SERVICE_NAME }} - slot-name: 'production' - publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE }} - package: . - - build_blazor_hybrid_windows: - name: build blazor hybrid (windows) - runs-on: windows-2022 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Update appsettings.json api server address - uses: microsoft/variable-substitution@v1 - with: - files: 'src/Client/Core/appsettings.json' - env: - ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Build exe - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:WindowsPackageType=None -p:SelfContained=true -p:WindowsAppSDKSelfContained=true -p:GenerateAppxPackageOnBuild=false -p:RuntimeIdentifier=win10-x86 -p:UseRidGraph=true -f net8.0-windows10.0.19041.0 - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: win-exe-bundle - path: src/Client/App/bin/release/net8.0-windows10.0.19041.0/win10-x86 - - build_blazor_hybrid_android: - name: build blazor hybrid (android) - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Extract Android signing key from env - uses: timheuer/base64-to-file@v1 - with: - fileDir: './src/Client/App/' - fileName: 'TodoTemplate.keystore' - encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} - - - name: Update appsettings.json api server address - uses: microsoft/variable-substitution@v1 - with: - files: 'src/Client/Core/appsettings.json' - env: - ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - - - name: Install maui - run: cd src && dotnet workload install maui-android - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Build aab - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidPackageFormat=aab -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=TodoTemplate -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android - - - name: Build apk - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="TodoTemplate.keystore" -p:AndroidSigningKeyAlias=TodoTemplate -p:AndroidSigningKeyPass="${{ secrets.ANDROID_RELEASE_KEYSTORE_PASSWORD }}" -p:AndroidSigningStorePass="${{ secrets.ANDROID_RELEASE_SIGNING_PASSWORD }}" -f net8.0-android - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: android-bundle - path: src/Client/App/bin/Release/net8.0-android/*-Signed.* - - build_blazor_hybrid_maccatalyst: - name: build blazor hybrid (maccatalyst) - runs-on: macos-13 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Update appsettings.json api server address - uses: microsoft/variable-substitution@v1 - with: - files: 'src/Client/Core/appsettings.json' - env: - ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Build pkg - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:CreatePackage=true -f net8.0-maccatalyst - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: mac-pkg-bundle - path: src/Client/App/bin/release/net8.0-maccatalyst/*.pkg - - build_blazor_hybrid_iOS: - name: build blazor hybrid (iOS) - runs-on: macos-13 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '15' - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Update appsettings.json api server address - uses: microsoft/variable-substitution@v1 - with: - files: 'src/Client/Core/appsettings.json' - env: - ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Extract iOS code signing certificate from env - uses: timheuer/base64-to-file@v1 - with: - fileDir: './' - fileName: 'DistributionCert.p12' - encodedString: ${{ secrets.APPSTORE_CODE_SIGNING_CERTIFICATE_FILE_BASE64 }} - - - name: Import Code-Signing Certificates - uses: Apple-Actions/import-codesign-certs@v1 - with: - p12-filepath: './DistributionCert.p12' - p12-password: ${{ secrets.APPSTORE_CODE_SIGNING_CERTIFICATE_FILE_PASSWORD }} - - - name: Download Apple Provisioning Profiles - uses: Apple-Actions/download-provisioning-profiles@v1 - with: - bundle-id: 'com.bitplatform.Todo.Template' - issuer-id: ${{ secrets.APPSTORE_API_KEY_ISSUER_ID }} - api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} - api-private-key: ${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY }} - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Build ipa - run: dotnet publish src/Client/App/TodoTemplate.Client.App.csproj -p:RuntimeIdentifier=ios-arm64 -p:BlazorMode=BlazorHybrid -p:Configuration=Release -p:ArchiveOnBuild=true -p:CodesignKey="iPhone Distribution" -p:CodesignProvision="${{ env.IOS_CODE_SIGN_PROVISION }}" -p:ApplicationDisplayVersion="${{ vars.APPLICATION_DISPLAY_VERSION }}" -p:ApplicationVersion="${{ vars.APPLICATION_VERSION }}" -f net8.0-ios - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: iOS-bundle - path: src/Client/App/bin/release/net8.0-ios/ios-arm64/publish/*.ipa - - build_blazor_electron_linux: - name: build blazor electron (linux) - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Setup .NET for Electron.NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '6.x.x' - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Update appsettings.json api server address - uses: microsoft/variable-substitution@v1 - with: - files: 'src/Client/Core/appsettings.json' - env: - ApiServerAddress: ${{ env.API_SERVER_ADDRESS }} - - - name: Switch to BlazorElectron - run: awk '//{sub(">.*BlazorElectron temp.xml && mv temp.xml src/Directory.Build.props - - - name: Generate CSS/JS files - run: dotnet build src/Client/Core/TodoTemplate.Client.Core.csproj -t:BeforeBuildTasks --no-restore - - - name: Restore electron .net - run: dotnet build src/Client/Web/TodoTemplate.Client.Web.csproj -t:BeforeBuildTasks - - - name: Build app image - run: cd src/Client/Web/ && dotnet electronize build /target linux - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: linux-app-image - path: src/Client/Web/bin/Desktop/linux-unpacked \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/ci.yml b/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/ci.yml deleted file mode 100644 index b71693fb26..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.github/workflows/ci.yml +++ /dev/null @@ -1,157 +0,0 @@ -name: TodoTemplate CI - -# https://bitplatform.dev/templates/dev-ops - -env: - WEB_APP_DEPLOYMENT_TYPE: 'Spa' - -on: - workflow_dispatch: - push: - branches: [ "develop" ] - -jobs: - - build_blazor_server: - name: build blazor server - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Build - run: dotnet build src/Client/Web/TodoTemplate.Client.Web.csproj -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" - - build_blazor_hybrid_android: - name: build blazor hybrid (android) - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install maui - run: cd src && dotnet workload install maui-android - - - name: Build - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:RunAOTCompilation=false -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-android - - build_blazor_hybrid_windows: - name: build blazor hybrid (windows) - runs-on: windows-2022 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Build - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-windows10.0.19041.0 - - build_blazor_hybrid_iOS: - name: build blazor hybrid (iOS) - runs-on: macos-13 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Build - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-ios - - build_blazor_hybrid_maccatalyst: - name: build blazor hybrid (maccatalyst) - runs-on: macos-13 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Install maui - run: cd src && dotnet workload install maui - - - name: Build - run: dotnet build src/Client/App/TodoTemplate.Client.App.csproj -p:BlazorMode=BlazorHybrid -p:Configuration=Release -f net8.0-maccatalyst - - build_blazor_api_wasm: - name: build blazor api + web assembly - runs-on: ubuntu-22.04 - - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Switch to blazor wasm - run: sed -i 's/Microsoft.NET.Sdk.Web/Microsoft.NET.Sdk.BlazorWebAssembly/g' src/Client/Web/TodoTemplate.Client.Web.csproj - - - name: Install wasm - run: cd src && dotnet workload install wasm-tools wasm-experimental - - - name: Build - run: dotnet build src/Server/Api/TodoTemplate.Server.Api.csproj -p:BlazorMode=BlazorWebAssembly -p:Configuration=Release -p:WebAppDeploymentType="${{ env.WEB_APP_DEPLOYMENT_TYPE }}" \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.gitignore b/src/Templates/TodoTemplate/Bit.TodoTemplate/.gitignore deleted file mode 100644 index 1fc3b1c97d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.gitignore +++ /dev/null @@ -1,234 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studio 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -## TODO: Comment the next line if you want to checkin your -## web deploy settings but do note that will include unencrypted -## passwords -*.pubxml - -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.publishsettings -node_modules/ -orleans.codegen.cs - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# LightSwitch generated files -GeneratedArtifacts/ -_Pvt_Extensions/ -ModelManifest.xml - -# VS Code -.vscode - -# .NET Meteor -.meteor - -# Rider -.idea - -profile.arm.json - -# TodoTemplate -*.map -*Resource.designer.cs -/**/*.css -custom.aprof - -/src/Server/Api/Attachments/**/*.* - -/src/Client/Core/wwwroot/scripts/app*.js - -/src/Server/Api/TodoTemplateDb.db* \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.template.config/template.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/.template.config/template.json deleted file mode 100644 index b336e2beef..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.template.config/template.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/template", - "author": "bit platform", - "classifications": [ - "ASP.NET Core", - "Blazor", - "MAUI" - ], - "tags": { - "language": "C#", - "type": "solution" - }, - "identity": "Bit.TodoTemplate", - "name": "bit TodoTemplate", - "shortName": "bit-todo", - "sourceName": "TodoTemplate", - "preferNameDirectory": true, - "symbols": { - //Guid generator for App Id - "ApplicationIdGuid": { - "type": "generated", - "generator": "guid", - "replaces": "AC87AA5B-4B37-4E52-8468-2D5DF24AF257", - "parameters": { - "defaultFormat": "D" //Guid format - }, - "onlyIf": [ - { - "after": "" - } - ] - }, - "database": { - "displayName": "Database", - "type": "parameter", - "datatype": "choice", - "defaultValue": "SqlServer", - "choices": [ - { - "choice": "SqlServer", - "description": "Sql Server" - }, - { - "choice": "Sqlite", - "description": "Sqlite" - }, - { - "choice": "Other", - "description": "Other" - } - ] - }, - "pipeline": { - "displayName": "CI-CD Pipeline", - "type": "parameter", - "datatype": "choice", - "defaultValue": "GitHub", - "choices": [ - { - "choice": "GitHub", - "description": "GitHub actions" - }, - { - "choice": "Azure", - "description": "Azure DevOps pipelines" - }, - { - "choice": "Other", - "description": "Other" - } - ] - } - }, - "postActions": [], - "sources": [ - { - "modifiers": [ - { - "copyOnly": [ - "global.json", - "**.Web/Pages/Home.razor", - "**/*.scss", - "**/*.svg", - "**/*.png" - ], - "exclude": [ - ".vs/**", - "**/[Bb]in/**", - "**/[Oo]bj/**", - ".template.config/**", - "**/*.filelist", - "**/*.user", - "**/*.lock.json", - "**/.git/**", - "**/*.nuspec", - "**/Migrations/**" - ] - }, - { - "condition": "(pipeline != GitHub)", - "exclude": [ ".github/**" ] - }, - { - "condition": "(pipeline != Azure)", - "exclude": [ ".azure-devops/**" ] - } - ] - } - ] -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/.vscode/launch.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/.vscode/launch.json deleted file mode 100644 index e8e4a9cdd5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/.vscode/launch.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "version": "0.2.0", - "compounds": [ - { - "name": "Watch Api and Web", - "configurations": [ - "Watch Api", - "Watch Web" - ] - } - ], - "configurations": [ - { - "name": "Watch Api", - "type": "coreclr", - "request": "launch", - "cwd": "${workspaceFolder}/src/Server/Api", - "program": "dotnet", - "args": [ - "watch", - "--project", - ".", - "verbose" - ], - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - { - "name": "Watch Web", - "type": "coreclr", - "request": "launch", - "cwd": "${workspaceFolder}/src/Client/Web", - "program": "dotnet", - "args": [ - "watch", - "--project", - ".", - "verbose" - ], - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - ] -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.bat b/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.bat deleted file mode 100644 index 52aa2b50c5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.bat +++ /dev/null @@ -1,16 +0,0 @@ -:: This batch script cleans your project by deleting unnecessary files. -:: It is important to close any IDEs, such as Visual Studio, before running this script to prevent conflicts or data loss. -:: The commands in this script are specifically designed for Windows. - -:: Deletes CSS, JS, and source map files that are not tracked in Git. -powershell -Command "[string]$trackedFiles = git ls-files; Get-ChildItem -Include *.css,*.min.css,*.js,*.min.js,*.map -Recurse | ForEach-Object { if ($trackedFiles -NotMatch $_.Name) { Remove-Item -Recurse -Path $_ -Confirm:$false -Force }}" - -:: Runs the dotnet clean command for each .csproj file. -powershell -Command "Get-ChildItem -Include *.csproj -Recurse | ForEach-Object { dotnet clean $_.FullName }" - -:: Deletes the specified files and folders. -powershell -Command "Get-ChildItem -Include *.csproj.user,Resources.designer.cs,bin,obj,node_modules,Packages,TestResults,AppPackages,.meteor -Recurse | ForEach-Object { Remove-Item -Recurse -Path $_ -Confirm:$false -Force }" -FOR /d /r . %%d IN (.vs) DO @IF EXIST "%%d" rd /s /q "%%d" - -:: Deletes empty directories. -powershell -Command "Get-ChildItem -Recurse | Where-Object { $_.PSIsContainer -and @(Get-ChildItem -Lit $_.FullName).Count -eq 0 } | Remove-Item -Confirm:$false -Force" \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.sh b/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.sh deleted file mode 100644 index 04061b11a9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/Clean.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# This batch script cleans your project by deleting unnecessary files. -# It is important to close any IDEs, such as vs for mac, before running this script to prevent conflicts or data loss. -# The commands in this script are specifically designed for macOS/Linux. - -# Runs the dotnet clean command for each .csproj file. -for csproj in $(find . -name '*.csproj'); do - dotnet clean $csproj -done - -# Deletes specified directories -for dir in $(find . -type d \( -name "bin" -o -name "obj" -o -name "node_modules" -o -name "Packages" -o -name ".vs" -o -name "TestResults" -o -name "AppPackages" -o -name ".meteor" \)); do - rm -rf $dir -done - -# Deletes specified files -for file in $(find . -type f \( -name "*.csproj.user" -o -name "Resources.designer.cs" -o -name "*.css" -o -name "*.min.css" -o -name "*.js" -o -name "*.min.js" -o -name "*.map" \)); do - rm -f $file -done - -# Deletes empty directories. -find . -type d -empty -delete \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/TodoTemplate.sln b/src/Templates/TodoTemplate/Bit.TodoTemplate/TodoTemplate.sln deleted file mode 100644 index f952033faf..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/TodoTemplate.sln +++ /dev/null @@ -1,107 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".SolutionItems", ".SolutionItems", "{5CF43F76-BB71-4B5B-B4DF-1C753E042A8F}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - .gitignore = .gitignore - Clean.bat = Clean.bat - src\Directory.Build.props = src\Directory.Build.props - global.json = global.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{99987B56-D7E8-43AA-9EFC-07EC384B4382}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Server", "Server", "{75B77EDE-884B-404B-8533-CD522440B23F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{4CB2E4C8-C1B1-45B8-BF54-91388F129D35}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infra", "Infra", "{4FFA9633-C4EC-4DD8-8C26-DE597E731E09}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Shared", "src\Shared\TodoTemplate.Shared.csproj", "{E654B009-D083-4476-AEA5-EF5D73BF2EA8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Iac", "src\Infra\Iac\TodoTemplate.Iac.csproj", "{50296618-0E17-4596-9BFF-B5C47EB40E74}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Server.Api", "src\Server\Api\TodoTemplate.Server.Api.csproj", "{29532CE7-708E-4ED0-981E-EF17C573B6CB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.Core", "src\Client\Core\TodoTemplate.Client.Core.csproj", "{0AAA866C-CEA9-4D11-B66A-AA2E295DA30B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.Web", "src\Client\Web\TodoTemplate.Client.Web.csproj", "{37B0BFFF-762E-42C6-A999-80EF9F38BE4C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TodoTemplate.Client.App", "src\Client\App\TodoTemplate.Client.App.csproj", "{5DD4EE2C-8397-4E32-B147-6FF87D7DD648}" -EndProject -#if (pipeline == "Azure") -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure-devops", ".azure-devops", "{308C2DB4-661A-410A-91B5-6C54CDB4E9B5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{6CBB5D23-A91C-493B-BA95-CE6A6A8E0C79}" - ProjectSection(SolutionItems) = preProject - .azure-devops\workflows\cd.yml = .azure-devops\workflows\cd.yml - .azure-devops\workflows\ci.yml = .azure-devops\workflows\ci.yml - EndProjectSection -EndProject -#elif (pipeline == "GitHub") -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{405C750E-F6ED-4CEB-92F2-010066DC4364}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{09A4E0FB-544F-4BA1-8C68-FD5DB514B819}" - ProjectSection(SolutionItems) = preProject - .github\workflows\cd.yml = .github\workflows\cd.yml - .github\workflows\ci.yml = .github\workflows\ci.yml - EndProjectSection -EndProject -#endif -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E654B009-D083-4476-AEA5-EF5D73BF2EA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E654B009-D083-4476-AEA5-EF5D73BF2EA8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E654B009-D083-4476-AEA5-EF5D73BF2EA8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E654B009-D083-4476-AEA5-EF5D73BF2EA8}.Release|Any CPU.Build.0 = Release|Any CPU - {50296618-0E17-4596-9BFF-B5C47EB40E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {50296618-0E17-4596-9BFF-B5C47EB40E74}.Debug|Any CPU.Build.0 = Debug|Any CPU - {50296618-0E17-4596-9BFF-B5C47EB40E74}.Release|Any CPU.ActiveCfg = Release|Any CPU - {50296618-0E17-4596-9BFF-B5C47EB40E74}.Release|Any CPU.Build.0 = Release|Any CPU - {29532CE7-708E-4ED0-981E-EF17C573B6CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29532CE7-708E-4ED0-981E-EF17C573B6CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29532CE7-708E-4ED0-981E-EF17C573B6CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29532CE7-708E-4ED0-981E-EF17C573B6CB}.Release|Any CPU.Build.0 = Release|Any CPU - {0AAA866C-CEA9-4D11-B66A-AA2E295DA30B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0AAA866C-CEA9-4D11-B66A-AA2E295DA30B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0AAA866C-CEA9-4D11-B66A-AA2E295DA30B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0AAA866C-CEA9-4D11-B66A-AA2E295DA30B}.Release|Any CPU.Build.0 = Release|Any CPU - {37B0BFFF-762E-42C6-A999-80EF9F38BE4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37B0BFFF-762E-42C6-A999-80EF9F38BE4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37B0BFFF-762E-42C6-A999-80EF9F38BE4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37B0BFFF-762E-42C6-A999-80EF9F38BE4C}.Release|Any CPU.Build.0 = Release|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Release|Any CPU.Build.0 = Release|Any CPU - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {E654B009-D083-4476-AEA5-EF5D73BF2EA8} = {4CB2E4C8-C1B1-45B8-BF54-91388F129D35} - {50296618-0E17-4596-9BFF-B5C47EB40E74} = {4FFA9633-C4EC-4DD8-8C26-DE597E731E09} - {29532CE7-708E-4ED0-981E-EF17C573B6CB} = {75B77EDE-884B-404B-8533-CD522440B23F} - {0AAA866C-CEA9-4D11-B66A-AA2E295DA30B} = {99987B56-D7E8-43AA-9EFC-07EC384B4382} - {37B0BFFF-762E-42C6-A999-80EF9F38BE4C} = {99987B56-D7E8-43AA-9EFC-07EC384B4382} - {5DD4EE2C-8397-4E32-B147-6FF87D7DD648} = {99987B56-D7E8-43AA-9EFC-07EC384B4382} -#if (pipeline == "Azure") - {308C2DB4-661A-410A-91B5-6C54CDB4E9B5} = {5CF43F76-BB71-4B5B-B4DF-1C753E042A8F} - {6CBB5D23-A91C-493B-BA95-CE6A6A8E0C79} = {308C2DB4-661A-410A-91B5-6C54CDB4E9B5} -#elif (pipeline == "GitHub") - {405C750E-F6ED-4CEB-92F2-010066DC4364} = {5CF43F76-BB71-4B5B-B4DF-1C753E042A8F} - {09A4E0FB-544F-4BA1-8C68-FD5DB514B819} = {405C750E-F6ED-4CEB-92F2-010066DC4364} -#endif - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/global.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/global.json deleted file mode 100644 index 1b99e7d61d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "8.0.100-rc.2.23502.2", - "rollForward": "disable" - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml deleted file mode 100644 index da866499b2..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml.cs deleted file mode 100644 index 3e814f44d7..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/App.xaml.cs +++ /dev/null @@ -1,13 +0,0 @@ -[assembly: XamlCompilation(XamlCompilationOptions.Compile)] - -namespace TodoTemplate.Client.App; - -public partial class App -{ - public App(MainPage mainPage) - { - InitializeComponent(); - - MainPage = new NavigationPage(mainPage); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 8bec8e6765..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,29 +0,0 @@ -//-:cnd:noEmit -using TodoTemplate.Client.App; -using TodoTemplate.Client.App.Services; - -namespace Microsoft.Extensions.DependencyInjection; - -public static class IServiceCollectionExtensions -{ - public static IServiceCollection AddClientAppServices(this IServiceCollection services) - { - // Services registered in this class can be injected in Android, iOS, Windows, and macOS. - -#if ANDROID - services.AddClientAndroidServices(); -#elif iOS - services.AddClientiOSServices(); -#elif Mac - services.AddClientMacServices(); -#elif Windows - services.AddClientWindowsServices(); -#endif - - services.AddScoped(); - services.AddSingleton(); - services.AddScoped(); - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml deleted file mode 100644 index 1005902ce2..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml.cs deleted file mode 100644 index 825229cb10..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MainPage.xaml.cs +++ /dev/null @@ -1,101 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Client.App; - -public partial class MainPage -{ - private readonly IExceptionHandler _exceptionHandler; - private readonly IBitDeviceCoordinator _deviceCoordinator; - - public MainPage(IExceptionHandler exceptionHandler, IBitDeviceCoordinator deviceCoordinator) - { - _exceptionHandler = exceptionHandler; - _deviceCoordinator = deviceCoordinator; - - InitializeComponent(); - - SetupBlazorWebView(); - SetupStatusBar(); - } - - private void SetupBlazorWebView() - { - BlazorWebViewHandler.BlazorWebViewMapper.AppendToMapping("CustomBlazorWebViewMapper", (handler, view) => - { -#if WINDOWS - if (AppInfo.Current.RequestedTheme == AppTheme.Dark) - { - handler.PlatformView.DefaultBackgroundColor = Microsoft.UI.Colors.Black; - } -#elif IOS || MACCATALYST - handler.PlatformView.Configuration.AllowsInlineMediaPlayback = true; - - handler.PlatformView.ScrollView.Bounces = false; - - handler.PlatformView.BackgroundColor = UIKit.UIColor.Clear; - handler.PlatformView.Opaque = false; -#if DEBUG - if ((DeviceInfo.Current.Platform == DevicePlatform.MacCatalyst && DeviceInfo.Current.Version >= new Version(13, 3)) - || (DeviceInfo.Current.Platform == DevicePlatform.iOS && DeviceInfo.Current.Version >= new Version(16, 4))) - { - handler.PlatformView.SetValueForKey(Foundation.NSObject.FromObject(true), new Foundation.NSString("inspectable")); - } -#endif -#elif ANDROID - handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent); - - handler.PlatformView.OverScrollMode = Android.Views.OverScrollMode.Never; - - Android.Webkit.WebSettings settings = handler.PlatformView.Settings; - - settings.AllowFileAccessFromFileURLs = - settings.AllowUniversalAccessFromFileURLs = - settings.AllowContentAccess = - settings.AllowFileAccess = - settings.DatabaseEnabled = - settings.JavaScriptCanOpenWindowsAutomatically = - settings.DomStorageEnabled = true; - -#if DEBUG - settings.MixedContentMode = Android.Webkit.MixedContentHandling.AlwaysAllow; -#endif - - settings.BlockNetworkLoads = - settings.BlockNetworkImage = false; -#endif - }); - - Loaded += async delegate - { - try - { -#if WINDOWS && RELEASE - var webView2 = (Microsoft.UI.Xaml.Controls.WebView2)blazorWebView.Handler!.PlatformView!; - await webView2!.EnsureCoreWebView2Async(); - - var settings = webView2.CoreWebView2.Settings; - settings.IsZoomControlEnabled = false; - settings.AreBrowserAcceleratorKeysEnabled = false; -#endif - } - catch (Exception exp) - { - _exceptionHandler.Handle(exp); - } - }; - } - - private void SetupStatusBar() - { - Microsoft.Maui.Handlers.WindowHandler.Mapper.AppendToMapping(nameof(IWindow), async (handler, view) => - { - try - { - await _deviceCoordinator.ApplyTheme(AppInfo.Current.RequestedTheme is AppTheme.Dark); - } - catch (Exception exp) - { - _exceptionHandler.Handle(exp); - } - }); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MauiProgram.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MauiProgram.cs deleted file mode 100644 index d2579982c8..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/MauiProgram.cs +++ /dev/null @@ -1,51 +0,0 @@ -//-:cnd:noEmit -using System.Reflection; -using Microsoft.Extensions.FileProviders; -using TodoTemplate.Client.Core.Services.HttpMessageHandlers; - -namespace TodoTemplate.Client.App; - -public static class MauiProgram -{ - public static MauiApp CreateMauiApp() - { -#if !BlazorHybrid - throw new InvalidOperationException("Please switch to blazor hybrid as described in https://bitplatform.dev/templates/hosting-models"); -#endif - - var builder = MauiApp.CreateBuilder(); - var assembly = typeof(MainLayout).GetTypeInfo().Assembly; - - builder - .UseMauiApp() - .Configuration.AddJsonFile(new EmbeddedFileProvider(assembly), "appsettings.json", optional: false, false); - - var services = builder.Services; - - services.AddMauiBlazorWebView(); -#if DEBUG - services.AddBlazorWebViewDeveloperTools(); -#endif - - Uri.TryCreate(builder.Configuration.GetApiServerAddress(), UriKind.Absolute, out var apiServerAddress); - - services.AddScoped(sp => - { - var handler = sp.GetRequiredService(); - HttpClient httpClient = new(handler) - { - BaseAddress = apiServerAddress - }; - return httpClient; - }); - - services.AddTransient(); - services.AddSharedServices(); - services.AddClientSharedServices(); - services.AddClientAppServices(); - - var mauiApp = builder.Build(); - - return mauiApp; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/AndroidManifest.xml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/AndroidManifest.xml deleted file mode 100644 index d4a38147c9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index c669f4f455..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.Extensions.DependencyInjection; - -public static class IAndroidServiceCollectionExtensions -{ - public static IServiceCollection AddClientAndroidServices(this IServiceCollection services) - { - // Services registered in this class can be injected in Android. - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainActivity.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainActivity.cs deleted file mode 100644 index 58f34184b9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainActivity.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Android.App; -using Android.Content.PM; - -namespace TodoTemplate.Client.App.Platforms.Android; - -[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] -public class MainActivity : MauiAppCompatActivity -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainApplication.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainApplication.cs deleted file mode 100644 index e28e5d09e4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Android/MainApplication.cs +++ /dev/null @@ -1,24 +0,0 @@ -//-:cnd:noEmit -using Android.App; -using Android.Runtime; - -[assembly: UsesPermission(Android.Manifest.Permission.Internet)] -[assembly: UsesPermission(Android.Manifest.Permission.AccessNetworkState)] - -namespace TodoTemplate.Client.App.Platforms.Android; - -[Application( -#if DEBUG - UsesCleartextTraffic = true -#endif -)] -public class MainApplication : MauiApplication -{ - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) - { - } - - protected override MauiApp CreateMauiApp() => MauiProgram - .CreateMauiApp(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs deleted file mode 100644 index 37c2698fd9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace TodoTemplate.Client.App.Platforms.MacCatalyst; - -[Register(nameof(AppDelegate))] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Debug.plist b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Debug.plist deleted file mode 100644 index 674d08a59a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Debug.plist +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - com.apple.security.get-task-allow - - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Release.plist b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Release.plist deleted file mode 100644 index 9117d79dc4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Entitlements.Release.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 0cc5d4fd3b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.Extensions.DependencyInjection; - -public static class IMacServiceCollectionExtensions -{ - public static IServiceCollection AddClientMacServices(this IServiceCollection services) - { - // Services registered in this class can be injected in macOS. - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Info.plist b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Info.plist deleted file mode 100644 index 57bad79b0d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - UIDeviceFamily - - - 1 - - 2 - - 6 - - UIRequiredDeviceCapabilities - - arm64 - - NSCameraUsageDescription - This app uses camera for uploading profile photo using FileUpload component - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Program.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Program.cs deleted file mode 100644 index 2e37b76a9d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/MacCatalyst/Program.cs +++ /dev/null @@ -1,11 +0,0 @@ -using UIKit; - -namespace TodoTemplate.Client.App.Platforms.MacCatalyst; - -public class Program -{ - static void Main(string[] args) - { - UIApplication.Main(args, null, typeof(AppDelegate)); - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Tizen/Main.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Tizen/Main.cs deleted file mode 100644 index 678f960b0d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Tizen/Main.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TodoTemplate.Client.App; - -class Program : MauiApplication -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); - - static void Main(string[] args) - { - var app = new Program(); - app.Run(args); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml deleted file mode 100644 index 43d8b0e538..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml.cs deleted file mode 100644 index 672fc9b28f..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/App.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TodoTemplate.Client.App.Platforms.Windows; - -public partial class App -{ - public App() - { - InitializeComponent(); - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 27419a2233..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.Extensions.DependencyInjection; - -public static class IWindowsServiceCollectionExtensions -{ - public static IServiceCollection AddClientWindowsServices(this IServiceCollection services) - { - // Services registered in this class can be injected in Windows. - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Package.appxmanifest b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Package.appxmanifest deleted file mode 100644 index dd1ba9aafe..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/Package.appxmanifest +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - $placeholder$ - User Name - $placeholder$.png - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/app.manifest b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/app.manifest deleted file mode 100644 index 80074b3a94..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/Windows/app.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - true/PM - PerMonitorV2, PerMonitor - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 16886245ef..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Microsoft.Extensions.DependencyInjection; - -public static class IiOSServiceCollectionExtensions -{ - public static IServiceCollection AddClientiOSServices(this IServiceCollection services) - { - // Services registered in this class can be injected in iOS. - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Info.plist b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Info.plist deleted file mode 100644 index 4b84a0f512..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - LSRequiresIPhoneOS - - UIDeviceFamily - - 1 - 2 - - UIViewControllerBasedStatusBarAppearance - - UIRequiredDeviceCapabilities - - arm64 - - NSCameraUsageDescription - This app uses camera for uploading profile photo using FileUpload component - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Program.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Program.cs deleted file mode 100644 index 4475ca330b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Platforms/iOS/Program.cs +++ /dev/null @@ -1,11 +0,0 @@ -using UIKit; - -namespace TodoTemplate.Client.App.Platforms.iOS; - -public class Program -{ - static void Main(string[] args) - { - UIApplication.Main(args, null, typeof(AppDelegate)); - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Properties/launchSettings.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Properties/launchSettings.json deleted file mode 100644 index edf8aadcc8..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Windows Machine": { - "commandName": "MsixPackage", - "nativeDebugging": false - } - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/AppIcon/appicon.svg b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/AppIcon/appicon.svg deleted file mode 100644 index c7ed8849e8..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/AppIcon/appicon.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Raw/AboutAssets.txt b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Raw/AboutAssets.txt deleted file mode 100644 index 15d6244845..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Raw/AboutAssets.txt +++ /dev/null @@ -1,15 +0,0 @@ -Any raw assets you want to be deployed with your application can be placed in -this directory (and child directories). Deployment of the asset to your application -is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. - - - -These files will be deployed with you package and will be accessible using Essentials: - - async Task LoadMauiAsset() - { - using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); - using var reader = new StreamReader(stream); - - var contents = reader.ReadToEnd(); - } diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Splash/splash.svg b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Splash/splash.svg deleted file mode 100644 index 1b77fe97de..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Resources/Splash/splash.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppDeviceCoordinator.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppDeviceCoordinator.cs deleted file mode 100644 index d0993bf889..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppDeviceCoordinator.cs +++ /dev/null @@ -1,55 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Client.App.Services; - -/// -/// More info at -/// -public class AppDeviceCoordinator : IBitDeviceCoordinator -{ - public double GetStatusBarHeight() - { -#if ANDROID - var resourceId = MauiApplication.Current.Resources!.GetIdentifier("status_bar_height", "dimen", "android"); - var dimensionPixelSize = MauiApplication.Current.Resources.GetDimensionPixelSize(resourceId); - var density = (double)DeviceDisplay.Current.MainDisplayInfo.Density; - return dimensionPixelSize / density; -#elif IOS - var window = UIKit.UIApplication.SharedApplication.Windows.First().WindowScene; - return window!.StatusBarManager!.StatusBarFrame.Height; -#elif WINDOWS - return 30; -#elif MACCATALYST - return 25; -#else - return 0; -#endif - } - - public async Task ApplyTheme(bool isDark) - { - Application.Current!.UserAppTheme = isDark ? AppTheme.Dark : AppTheme.Light; -#if ANDROID - var window = Platform.CurrentActivity?.Window; - window!.DecorView!.SystemUiFlags = Android.Views.SystemUiFlags.LightStatusBar; - if (isDark) - { - window!.DecorView!.SystemUiFlags &= ~Android.Views.SystemUiFlags.LightStatusBar; - } - - window.SetStatusBarColor(isDark ? Android.Graphics.Color.ParseColor("#0D1117") : Android.Graphics.Color.White); -#elif IOS - var statusBarStyle = isDark ? UIKit.UIStatusBarStyle.LightContent : UIKit.UIStatusBarStyle.DarkContent; - await Device.InvokeOnMainThreadAsync(() => - { - UIKit.UIApplication.SharedApplication.SetStatusBarStyle(statusBarStyle, false); - Platform.GetCurrentUIViewController().SetNeedsStatusBarAppearanceUpdate(); - }); -#elif MACCATALYST - var window = UIKit.UIApplication.SharedApplication.Windows[0].WindowScene; - if (window != null) - { - window.Titlebar!.TitleVisibility = UIKit.UITitlebarTitleVisibility.Hidden; - } -#endif - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppExceptionHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppExceptionHandler.cs deleted file mode 100644 index 60ac6ed77a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/Services/AppExceptionHandler.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace TodoTemplate.Client.App.Services; - -/// -/// You can easily install AppCenter, Firebase Crashlytics, and other exception tracking libraries in your Client.App project. -/// Then, you can use their APIs to monitor all exceptions across Android, iOS, Windows, and macOS. -/// -public partial class AppExceptionHandler : ExceptionHandlerBase -{ - public override void Handle(Exception exception, IDictionary? parameters = null) - { - base.Handle(exception, parameters); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj deleted file mode 100644 index 2e550d3dc3..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/TodoTemplate.Client.App.csproj +++ /dev/null @@ -1,121 +0,0 @@ - - - - net8.0-android;net8.0-ios;net8.0-maccatalyst - $(TargetFrameworks);net8.0-windows10.0.19041.0 - net8.0-android - - - Exe - true - true - false - - - TodoTemplate - - - com.bitplatform.Todo.Template - AC87AA5B-4B37-4E52-8468-2D5DF24AF257 - - - 1.0 - 1 - - - True - - $(NoWarn);ClassWithoutModifierAnalyzer - enable - - - - true - apk - android-arm - false - true - - - - true - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - Platforms/MacCatalyst/Entitlements.Debug.plist - - - - Platforms/MacCatalyst/Entitlements.Release.plist - true - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/wwwroot/index.html b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/wwwroot/index.html deleted file mode 100644 index 15f68f0e7f..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/App/wwwroot/index.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
- - - - - - - - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/App.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/App.razor.cs deleted file mode 100644 index bde91d60a4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/App.razor.cs +++ /dev/null @@ -1,115 +0,0 @@ -//-:cnd:noEmit -using Microsoft.AspNetCore.Components.Routing; - -namespace TodoTemplate.Client.Core; - -public partial class App -{ -#if BlazorWebAssembly && !BlazorHybrid - private List _lazyLoadedAssemblies = new(); - [AutoInject] private Microsoft.AspNetCore.Components.WebAssembly.Services.LazyAssemblyLoader _assemblyLoader = default!; -#endif - - [AutoInject] private IJSRuntime _jsRuntime = default!; - [AutoInject] private IBitDeviceCoordinator _bitDeviceCoordinator { get; set; } = default!; - - private bool _cultureHasNotBeenSet = true; - -#if BlazorHybrid - protected override async Task OnInitializedAsync() - { - await SetupBodyClasses(); - await base.OnInitializedAsync(); - } -#else - protected override async Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - await SetupBodyClasses(); - } - - await base.OnAfterRenderAsync(firstRender); - } -#endif - - private async Task SetupBodyClasses() - { - var cssClasses = new List(); - - if (BlazorModeDetector.Current.IsBlazorWebAssembly()) - { - cssClasses.Add("bit-blazor-wasm"); - } - else if (BlazorModeDetector.Current.IsBlazorServer()) - { - cssClasses.Add("bit-blazor-server"); - } - else if (BlazorModeDetector.Current.IsBlazorHybrid()) - { - cssClasses.Add("bit-blazor-hybrid"); - - if (OperatingSystem.IsWindows()) - { - cssClasses.Add("bit-windows"); - } - else if (OperatingSystem.IsLinux()) - { - cssClasses.Add("bit-linux"); - } - else if (OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst()) - { - cssClasses.Add("bit-macos"); - } - else if (OperatingSystem.IsIOS() && OperatingSystem.IsMacCatalyst() is false) - { - cssClasses.Add("bit-ios"); - } - else if (OperatingSystem.IsAndroid()) - { - cssClasses.Add("bit-android"); - } - } - else if (BlazorModeDetector.Current.IsBlazorElectron()) - { - cssClasses.Add("bit-blazor-electron"); - } - - var cssVariables = new Dictionary(); - var statusBarHeight = _bitDeviceCoordinator.GetStatusBarHeight(); - - if (OperatingSystem.IsMacCatalyst() is false) - { - //For iOS this is handled in css using safe-area env() variables - //For Android there's an issue with keyboard in fullscreen mode. more info: https://github.com/bitfoundation/bitplatform/issues/5626 - //For Windows there's an issue with TitleBar. more info: https://github.com/bitfoundation/bitplatform/issues/5695 - statusBarHeight = 0; - } - - cssVariables.Add("--bit-status-bar-height", $"{statusBarHeight.ToString("F3", CultureInfo.InvariantCulture)}px"); - await _jsRuntime.ApplyBodyElementClasses(cssClasses, cssVariables); - } - - private async Task OnNavigateAsync(NavigationContext args) - { - // Blazor Server & Pre Rendering use created cultures in UseRequestLocalization middleware - // Android, windows and iOS have to set culture programmatically. - // Browser's culture is handled in the Web project's Program.BlazorWebAssembly.cs -#if BlazorHybrid && MultilingualEnabled - if (_cultureHasNotBeenSet) - { - _cultureHasNotBeenSet = false; - var preferredCultureCookie = Preferences.Get(".AspNetCore.Culture", null); - CultureInfoManager.SetCurrentCulture(preferredCultureCookie); - } -#endif - -#if BlazorWebAssembly && !BlazorHybrid - if (args.Path.Contains("some-lazy-loaded-page") && _lazyLoadedAssemblies.Any(asm => asm.GetName().Name == "SomeAssembly") is false) - { - var assemblies = await _assemblyLoader.LoadAssembliesAsync(["SomeAssembly.wasm"]); - _lazyLoadedAssemblies.AddRange(assemblies); - } -#endif - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs deleted file mode 100644 index 207e0ceb3a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationBuilderExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Reflection; - -namespace Microsoft.Extensions.Configuration; - -public static class IConfigurationBuilderExtensions -{ - public static void AddClientConfigurations(this IConfigurationBuilder builder) - { - var assembly = Assembly.Load("TodoTemplate.Client.Core"); - builder.AddJsonStream(assembly.GetManifestResourceStream("TodoTemplate.Client.Core.appsettings.json")!); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationExtensions.cs deleted file mode 100644 index e88b29bed5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Extensions/IConfigurationExtensions.cs +++ /dev/null @@ -1,11 +0,0 @@ -//-:cnd:noEmit -namespace Microsoft.Extensions.Configuration; -public static class IConfigurationExtensions -{ - public static string GetApiServerAddress(this IConfiguration configuration) - { - var apiServerAddress = configuration.GetValue("ApiServerAddress", defaultValue: "api/")!; - - return Uri.TryCreate(apiServerAddress, UriKind.RelativeOrAbsolute, out _) ? apiServerAddress : throw new InvalidOperationException($"Api server address {apiServerAddress} is invalid"); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor.cs deleted file mode 100644 index 17718a3a02..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/HomePage.razor.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace TodoTemplate.Client.Core.Pages; - -public partial class HomePage -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs deleted file mode 100644 index 8f84ccf751..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/EmailConfirmationPage.razor.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace TodoTemplate.Client.Core.Pages.Identity; - -public partial class EmailConfirmationPage -{ - private bool _isLoading; - private string? _emailConfirmationMessage; - private BitMessageBarType _emailConfirmationMessageType; - - [Parameter] - [SupplyParameterFromQuery] - public string? Email { get; set; } - - [Parameter] - [SupplyParameterFromQuery(Name = "email-confirmed")] - public bool EmailConfirmed { get; set; } - - private void RedirectToSignIn() - { - NavigationManager.NavigateTo("/sign-in"); - } - - private async Task DoResendLink() - { - if (_isLoading) return; - - _isLoading = true; - _emailConfirmationMessage = null; - - try - { - await HttpClient.PostAsJsonAsync("Auth/SendConfirmationEmail", new() { Email = Email }, AppJsonContext.Default.SendConfirmationEmailRequestDto); - - _emailConfirmationMessageType = BitMessageBarType.Success; - - _emailConfirmationMessage = Localizer[nameof(AppStrings.ResendConfirmationLinkMessage)]; - } - catch (KnownException e) - { - _emailConfirmationMessageType = BitMessageBarType.Error; - - _emailConfirmationMessage = e.Message; - } - finally - { - _isLoading = false; - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor deleted file mode 100644 index d2402d9b12..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/Identity/SignInPage.razor +++ /dev/null @@ -1,56 +0,0 @@ -@page "/sign-in" -@inherits AppComponentBase - -@Localizer[nameof(AppStrings.SignInTitle)] - -
- - - - @if (string.IsNullOrEmpty(_signInMessage) is false) - { - - @_signInMessage - - } - -

@Localizer[nameof(AppStrings.SignInTitle)]

- -
- - -
- -
- - -
- - - @Localizer[nameof(AppStrings.SignIn)] - - -
- @Localizer[nameof(AppStrings.ForgotPasswordLink)] -
- -
- @Localizer[nameof(AppStrings.DontHaveAccountMessage)] @Localizer[nameof(AppStrings.SignUp)] -
-
-
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor.cs deleted file mode 100644 index e6823ab73c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Pages/TermsPage.razor.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace TodoTemplate.Client.Core.Pages; - -public partial class TermsPage -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Scripts/app.ts b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Scripts/app.ts deleted file mode 100644 index 3009cd6273..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Scripts/app.ts +++ /dev/null @@ -1,49 +0,0 @@ -class App { - public static setCookie(name: string, value: string, seconds: number) { - const date = new Date(); - date.setSeconds(date.getSeconds() + seconds); - document.cookie = `${name}=${value};expires=${date.toUTCString()};path=/;samesite=strict;`; - } - - public static getCookie(name: string): string | null { - // https://stackoverflow.com/a/25490531/2720104 - return document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || null; - } - - public static removeCookie(name: string): void { - document.cookie = `${name}=; Max-Age=0`; - } - - public static goBack(): void { - window.history.back(); - } - - /** - * To disable the scrollbar of the body when showing the modal, so the modal can be always shown in the viewport without being scrolled out. - **/ - public static setBodyOverflow(hidden: boolean) { - document.body.style.overflow = hidden ? "hidden" : "auto"; - } - - public static applyBodyElementClasses(cssClasses: string[], cssVariables: any): void { - cssClasses?.forEach(c => document.body.classList.add(c)); - Object.keys(cssVariables).forEach(key => document.body.style.setProperty(key, cssVariables[key])); - } -} - -declare class BitTheme { static init(options: any): void; }; - -BitTheme.init({ - system: true, - onChange: (newTheme: string, oldThem: string) => { - if (newTheme === 'dark') { - document.body.classList.add('theme-dark'); - document.body.classList.remove('theme-light'); - document.querySelector("meta[name=theme-color]")!.setAttribute('content', '#0d1117'); - } else { - document.body.classList.add('theme-light'); - document.body.classList.remove('theme-dark'); - document.querySelector("meta[name=theme-color]")!.setAttribute('content', '#ffffff'); - } - } -}); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs deleted file mode 100644 index ba9b6e13cd..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AppAuthenticationStateProvider.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System.Text; -using System.Text.Json; - -namespace TodoTemplate.Client.Core.Services; - -public partial class AppAuthenticationStateProvider : AuthenticationStateProvider -{ - [AutoInject] private IAuthTokenProvider _tokenProvider = default!; - - public async Task RaiseAuthenticationStateHasChanged() - { - NotifyAuthenticationStateChanged(Task.FromResult(await GetAuthenticationStateAsync())); - } - - public override async Task GetAuthenticationStateAsync() - { - var access_token = await _tokenProvider.GetAccessTokenAsync(); - - if (string.IsNullOrWhiteSpace(access_token)) - { - return NotSignedIn(); - } - - var identity = new ClaimsIdentity(claims: ParseTokenClaims(access_token), authenticationType: "Bearer", nameType: "name", roleType: "role"); - - return new AuthenticationState(new ClaimsPrincipal(identity)); - } - - public async Task IsUserAuthenticatedAsync() - { - return (await GetAuthenticationStateAsync()).User.Identity?.IsAuthenticated == true; - } - - AuthenticationState NotSignedIn() - { - return new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity())); - } - - private static IEnumerable ParseTokenClaims(string access_token) - { - return ParseJwt(access_token) - .Select(keyValue => new Claim(keyValue.Key, keyValue.Value.ToString() ?? string.Empty)) - .ToArray(); - } - - private static Dictionary ParseJwt(string access_token) - { - // Split the token to get the payload - string base64UrlPayload = access_token.Split('.')[1]; - - // Convert the payload from Base64Url format to Base64 - string base64Payload = ConvertBase64UrlToBase64(base64UrlPayload); - - // Decode the Base64 string to get a JSON string - string jsonPayload = Encoding.UTF8.GetString(Convert.FromBase64String(base64Payload)); - - // Deserialize the JSON string to a dictionary - var claims = JsonSerializer.Deserialize(jsonPayload, AppJsonContext.Default.DictionaryStringObject)!; - - return claims; - } - - private static string ConvertBase64UrlToBase64(string base64Url) - { - base64Url = base64Url.Replace('-', '+').Replace('_', '/'); - - // Adjust base64Url string length for padding - switch (base64Url.Length % 4) - { - case 2: - base64Url += "=="; - break; - case 3: - base64Url += "="; - break; - } - - return base64Url; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AuthenticationService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AuthenticationService.cs deleted file mode 100644 index 13cc25b901..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/AuthenticationService.cs +++ /dev/null @@ -1,38 +0,0 @@ -//-:cnd:noEmit -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Client.Core.Services; - -public partial class AuthenticationService : IAuthenticationService -{ - [AutoInject] private HttpClient _httpClient = default!; - - [AutoInject] private IJSRuntime _jsRuntime = default!; - - [AutoInject] private AppAuthenticationStateProvider _authenticationStateProvider = default!; - - public async Task SignIn(SignInRequestDto dto) - { - var result = await (await _httpClient.PostAsJsonAsync("Auth/SignIn", dto, AppJsonContext.Default.SignInRequestDto)) - .Content.ReadFromJsonAsync(AppJsonContext.Default.SignInResponseDto); - -#if BlazorHybrid - Preferences.Set("access_token", result!.AccessToken); -#else - await _jsRuntime.InvokeVoidAsync("App.setCookie", "access_token", result!.AccessToken, result.ExpiresIn); -#endif - - await _authenticationStateProvider.RaiseAuthenticationStateHasChanged(); - } - - public async Task SignOut() - { -#if BlazorHybrid - Preferences.Remove("access_token"); -#else - await _jsRuntime.InvokeVoidAsync("App.removeCookie", "access_token"); -#endif - - await _authenticationStateProvider.RaiseAuthenticationStateHasChanged(); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs deleted file mode 100644 index c92bc7a1bd..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ClientSideAuthTokenProvider.cs +++ /dev/null @@ -1,16 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Client.Core.Services; - -public partial class ClientSideAuthTokenProvider : IAuthTokenProvider -{ - [AutoInject] private IJSRuntime _jsRuntime = default!; - - public async Task GetAccessTokenAsync() - { -#if BlazorHybrid - return Preferences.Get("access_token", null); -#else - return await _jsRuntime.InvokeAsync("App.getCookie", "access_token"); -#endif - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs deleted file mode 100644 index 4c007f59ca..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IAuthenticationService.cs +++ /dev/null @@ -1,10 +0,0 @@ -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Client.Core.Services.Contracts; - -public interface IAuthenticationService -{ - Task SignIn(SignInRequestDto dto); - - Task SignOut(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs deleted file mode 100644 index 83be44fb27..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IBitDeviceCoordinator.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TodoTemplate.Client.Core.Services.Contracts; - -/// -/// This service performs device-specific tasks, such as setting the theme. -/// -public interface IBitDeviceCoordinator -{ - public double GetStatusBarHeight() { return 0; } - - public async Task ApplyTheme(bool isDark) { } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs deleted file mode 100644 index 44c844a83c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IExceptionHandler.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace TodoTemplate.Client.Core.Services.Contracts; - -public interface IExceptionHandler -{ - void Handle(Exception exception, IDictionary? parameters = null); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs deleted file mode 100644 index a78bf05496..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPrerenderStateService.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace TodoTemplate.Client.Core.Services.Contracts; - -/// -/// This service simplifies the process of persisting application state in Pre-Rendering mode -/// (explained in this documentation: https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration#persist-prerendered-state). -/// If your project does not require prerendering to be enabled, you can completely remove this service and its usages from your project. -/// -public interface IPrerenderStateService -{ - /// - /// Instead of using ApplicationState.TryTakeFromJson, ApplicationState.RegisterOnPersisting, - /// and ApplicationState.PersistAsJson (explained here: https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration#persist-prerendered-state), - /// one can easily use the following method () in the OnInit lifecycle method of the Blazor components or pages - /// to retrieve everything that requires an async-await (like current user's info). - /// - Task GetValue(string key, Func> factory); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPubSubService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPubSubService.cs deleted file mode 100644 index e58a30716b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/Contracts/IPubSubService.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Client.Core.Services.Contracts; - -/// -/// Contract for Publish/Subscribe pattern. -/// -public interface IPubSubService -{ - void Publish(string message, object? payload); - Action Subscribe(string message, Action handler); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ExceptionHandlerBase.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ExceptionHandlerBase.cs deleted file mode 100644 index 3f6c6f045a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/ExceptionHandlerBase.cs +++ /dev/null @@ -1,51 +0,0 @@ -//-:cnd:noEmit -using System.Diagnostics; - -namespace TodoTemplate.Client.Core.Services; - -public abstract partial class ExceptionHandlerBase : IExceptionHandler -{ - [AutoInject] protected readonly IStringLocalizer Localizer = default!; - [AutoInject] protected readonly IAuthenticationService AuthenticationService = default!; - [AutoInject] protected readonly MessageBoxService MessageBoxService = default!; - - public virtual void Handle(Exception exception, IDictionary? parameters = null) - { - if (exception is UnauthorizedException) - { - SignOut(); - - return; - } - -#if DEBUG - string exceptionMessage = (exception as KnownException)?.Message ?? exception.ToString(); - _ = MessageBoxService.Show(exceptionMessage, Localizer[nameof(AppStrings.Error)]); - _ = Console.Out.WriteLineAsync(exceptionMessage); - Debugger.Break(); -#else - if (exception is KnownException knownException) - { - _ = MessageBoxService.Show(knownException.Message, Localizer[nameof(AppStrings.Error)]); - } - else - { - _ = MessageBoxService.Show(Localizer[nameof(AppStrings.UnknownException)], Localizer[nameof(AppStrings.Error)]); - } -#endif - } - - private async void SignOut() - { - try - { - await MessageBoxService.Show(Localizer[nameof(AppStrings.YouNeedToSignIn)], Localizer[nameof(AppStrings.Error)]); - - await AuthenticationService.SignOut(); - } - catch (Exception exp) - { - Handle(exp); - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs deleted file mode 100644 index 9eeb95a2f1..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/AuthDelegatingHandler.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Net.Http.Headers; - -namespace TodoTemplate.Client.Core.Services.HttpMessageHandlers; - -public class AuthDelegatingHandler - : DelegatingHandler -{ - private IAuthTokenProvider _tokenProvider = default!; - private IJSRuntime _jsRuntime = default!; - - public AuthDelegatingHandler(IAuthTokenProvider tokenProvider, IJSRuntime jsRuntime, RetryDelegatingHandler handler) - : base(handler) - { - _tokenProvider = tokenProvider; - _jsRuntime = jsRuntime; - } - - public AuthDelegatingHandler(IAuthTokenProvider tokenProvider, IJSRuntime jsRuntime) - : base() - { - _tokenProvider = tokenProvider; - _jsRuntime = jsRuntime; - } - - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { - if (request.Headers.Authorization is null) - { - var access_token = await _tokenProvider.GetAccessTokenAsync(); - if (access_token is not null) - { - request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", access_token); - } - } - - try - { - return await base.SendAsync(request, cancellationToken); - } - catch (UnauthorizedException) - { - // try to get refresh token, store access token and refresh token, - // then use the new access token to request's authorization header and call base.SendAsync again. - throw; - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs deleted file mode 100644 index 7a3a3b9507..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/ExceptionDelegatingHandler.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Client.Core.Services.HttpMessageHandlers; - -public class ExceptionDelegatingHandler - : DelegatingHandler -{ - public ExceptionDelegatingHandler(HttpClientHandler httpClientHandler) - : base(httpClientHandler) - { - - } - - public ExceptionDelegatingHandler() - { - - } - - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { - bool serverCommunicationSuccess = false; - - try - { - var response = await base.SendAsync(request, cancellationToken); - - serverCommunicationSuccess = true; - - if (response.StatusCode is HttpStatusCode.Unauthorized) - { - throw new UnauthorizedException(); - } - - if (response.IsSuccessStatusCode is false && response.Content.Headers.ContentType?.MediaType?.Contains("application/json", StringComparison.InvariantCultureIgnoreCase) is true) - { - if (response.Headers.TryGetValues("Request-ID", out IEnumerable? values) && values is not null && values.Any()) - { - RestErrorInfo restError = (await response!.Content.ReadFromJsonAsync(AppJsonContext.Default.RestErrorInfo, cancellationToken))!; - - Type exceptionType = typeof(RestErrorInfo).Assembly.GetType(restError.ExceptionType!) ?? typeof(UnknownException); - - var args = new List { typeof(KnownException).IsAssignableFrom(exceptionType) ? new LocalizedString(restError.Key!, restError.Message!) : restError.Message! }; - - if (exceptionType == typeof(ResourceValidationException)) - { - args.Add(restError.Payload); - } - - Exception exp = (Exception)Activator.CreateInstance(exceptionType, args.ToArray())!; - - throw exp; - } - } - - response.EnsureSuccessStatusCode(); - - return response; - } - catch (Exception exp) when ((exp is HttpRequestException && serverCommunicationSuccess is false) - || exp is TaskCanceledException tcExp && tcExp.InnerException is TimeoutException) - { - throw new ServerConnectionException(nameof(AppStrings.ServerConnectionException), exp); - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs deleted file mode 100644 index 620b83af68..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/LocalizationDelegatingHandler.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Net.Http.Headers; - -namespace TodoTemplate.Client.Core.Services.HttpMessageHandlers; - -public class LocalizationDelegatingHandler - : DelegatingHandler -{ - public LocalizationDelegatingHandler(AuthDelegatingHandler handler) - : base(handler) - { - - } - - public LocalizationDelegatingHandler() - { - - } - - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { -#if MultilingualEnabled - request.Headers.AcceptLanguage.Add(new StringWithQualityHeaderValue(CultureInfo.CurrentCulture.Name)); -#endif - - return await base.SendAsync(request, cancellationToken); - } -} - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs deleted file mode 100644 index 77be0531bd..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/HttpMessageHandlers/RetryDelegatingHandler.cs +++ /dev/null @@ -1,55 +0,0 @@ -namespace TodoTemplate.Client.Core.Services.HttpMessageHandlers; - -public class RetryDelegatingHandler - : DelegatingHandler -{ - public RetryDelegatingHandler(ExceptionDelegatingHandler handler) - : base(handler) - { - - } - - public RetryDelegatingHandler() - { - - } - - protected override async Task SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) - { - var delays = GetDelays(scaleFirstTry: TimeSpan.FromSeconds(3), maxRetries: 3).ToArray(); - - Exception? lastExp = null; - - foreach (var delay in delays) - { - try - { - return await base.SendAsync(request, cancellationToken); - } - catch (Exception exp) when (exp is not KnownException) - { - lastExp = exp; - await Task.Delay(delay, cancellationToken); - } - } - - throw lastExp!; - } - - private static IEnumerable GetDelays(TimeSpan scaleFirstTry, int maxRetries) - { - TimeSpan maxValue = TimeSpan.MaxValue; - var maxTimeSpanDouble = maxValue.Ticks - 1_000.0; - var i = 0; - var targetTicksFirstDelay = scaleFirstTry.Ticks; - var num = 0.0; - for (; i < maxRetries; i++) - { - var num2 = i + Random.Shared.NextDouble(); - var next = Math.Pow(2.0, num2) * Math.Tanh(Math.Sqrt(4.0 * num2)); - var num3 = next - num; - yield return TimeSpan.FromTicks((long)Math.Min(num3 * 0.7_142_857_142_857_143 * targetTicksFirstDelay, maxTimeSpanDouble)); - num = next; - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/MessageBoxService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/MessageBoxService.cs deleted file mode 100644 index cca210a9da..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/MessageBoxService.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TodoTemplate.Client.Core.Services; -public partial class MessageBoxService -{ - [AutoInject] IPubSubService _pubSubService = default!; - - public async Task Show(string message, string title = "") - { - TaskCompletionSource tsc = new(); - _pubSubService.Publish(PubSubMessages.SHOW_MESSAGE, (message, title, tsc)); - await tsc.Task; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PrerenderStateService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PrerenderStateService.cs deleted file mode 100644 index cbe84edcd9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PrerenderStateService.cs +++ /dev/null @@ -1,61 +0,0 @@ -//-:cnd:noEmit - -namespace TodoTemplate.Client.Core.Services; - -/// -/// For more information docs. -/// -#if (BlazorWebAssembly || BlazorServer) && (SpaPrerendered || PwaPrerendered) -public class PrerenderStateService : IPrerenderStateService, IAsyncDisposable -{ - private PersistingComponentStateSubscription? _subscription; - private readonly PersistentComponentState _applicationState; - private readonly ConcurrentDictionary _values = new(); - - public PrerenderStateService(PersistentComponentState applicationState) - { - _applicationState = applicationState; - - if (OperatingSystem.IsBrowser() is false) - _subscription = applicationState.RegisterOnPersisting(PersistAsJson); - } - - public async Task GetValue(string key, Func> factory) - { - if (_applicationState.TryTakeFromJson(key, out T? value)) - return value; - var result = await factory(); - Persist(key, result); - return result; - } - - void Persist(string key, T value) - { - if (OperatingSystem.IsBrowser()) - return; - _values.TryRemove(key, out object? _); - _values.TryAdd(key, value); - } - - async Task PersistAsJson() - { - if (OperatingSystem.IsBrowser()) - return; - foreach (var item in _values) - _applicationState.PersistAsJson(item.Key, item.Value); - } - - public async ValueTask DisposeAsync() - { - _subscription?.Dispose(); - } -} -#else -public class PrerenderStateService : IPrerenderStateService -{ - public Task GetValue(string key, Func> factory) - { - return factory(); - } -} -#endif diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubMessages.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubMessages.cs deleted file mode 100644 index dcf42030e2..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubMessages.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace TodoTemplate.Client.Core.Services; - -public static class PubSubMessages -{ - public const string PROFILE_UPDATED = "PROFILEUPDATED"; - public const string SHOW_MESSAGE = "SHOWMESSAGE"; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubService.cs deleted file mode 100644 index 5a9b4161d2..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Services/PubSubService.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace TodoTemplate.Client.Core.Services; - -/// -/// For more information docs. -/// -public class PubSubService : IPubSubService -{ - private readonly ConcurrentDictionary>> _handlers = new(); - - public void Publish(string message, object? payload) - { - if (_handlers.TryGetValue(message, out var handlers)) - { - handlers.ForEach(handler => handler(payload)); - } - } - - public Action Subscribe(string message, Action handler) - { - var handlers = _handlers.ContainsKey(message) - ? _handlers[message] - : _handlers[message] = new List>(); - - handlers.Add(handler); - - return () => handlers.Remove(handler); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppComponentBase.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppComponentBase.cs deleted file mode 100644 index 5086c93c9b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppComponentBase.cs +++ /dev/null @@ -1,171 +0,0 @@ -namespace TodoTemplate.Client.Core.Shared; - -public partial class AppComponentBase : ComponentBase -{ - [AutoInject] protected HttpClient HttpClient = default!; - - /// - /// - /// - [AutoInject] protected IPrerenderStateService PrerenderStateService = default!; - - /// - /// - /// - [AutoInject] protected IPubSubService PubSubService = default!; - - [AutoInject] protected IConfiguration Configuration = default!; - - [AutoInject] protected IJSRuntime JSRuntime { get; set; } = default!; - - [AutoInject] protected NavigationManager NavigationManager = default!; - - [AutoInject] protected IAuthTokenProvider AuthTokenProvider = default!; - - [AutoInject] protected IStringLocalizer Localizer = default!; - - [AutoInject] protected IAuthenticationService AuthenticationService = default!; - - [AutoInject] protected IExceptionHandler ExceptionHandler { get; set; } = default!; - - [AutoInject] protected AppAuthenticationStateProvider AuthenticationStateProvider = default!; - - protected async sealed override Task OnInitializedAsync() - { - try - { - await OnInitAsync(); - await base.OnInitializedAsync(); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - } - - protected async sealed override Task OnParametersSetAsync() - { - try - { - await OnParamsSetAsync(); - await base.OnParametersSetAsync(); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - } - - protected async override Task OnAfterRenderAsync(bool firstRender) - { - if (firstRender) - { - try - { - await OnAfterFirstRenderAsync(); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - } - - await base.OnAfterRenderAsync(firstRender); - } - - /// - /// Replacement for which catches all possible exceptions in order to prevent app crash. - /// - protected virtual Task OnInitAsync() - { - return Task.CompletedTask; - } - - /// - /// Replacement for which catches all possible exceptions in order to prevent app crash. - /// - protected virtual Task OnParamsSetAsync() - { - return Task.CompletedTask; - } - - /// - /// Method invoked after first time the component has been rendered. - /// - protected virtual Task OnAfterFirstRenderAsync() - { - return Task.CompletedTask; - } - - /// - /// Executes passed action while catching all possible exceptions to prevent app crash. - /// - public virtual Action WrapHandled(Action action) - { - return () => - { - try - { - action(); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - }; - } - - /// - /// Executes passed action while catching all possible exceptions to prevent app crash. - /// - public virtual Action WrapHandled(Action func) - { - return (e) => - { - try - { - func(e); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - }; - } - - /// - /// Executes passed function while catching all possible exceptions to prevent app crash. - /// - public virtual Func WrapHandled(Func func) - { - return async () => - { - try - { - await func(); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - }; - } - - /// - /// Executes passed function while catching all possible exceptions to prevent app crash. - /// - public virtual Func WrapHandled(Func func) - { - return async (e) => - { - try - { - await func(e); - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - }; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs deleted file mode 100644 index a988aab0c0..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppDataAnnotationsValidator.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using Microsoft.AspNetCore.Components.Forms; -using TodoTemplate.Shared.Attributes; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Client.Core.Shared; - -/// -/// To implement forms where each error is displayed according to the language chosen by the user, you can use the -/// on the corresponding class instead of using `ErrorResourceType` on each property. Check out for an example. -/// However, you need to use instead of in Blazor EditForms for this method to work. -/// -public partial class AppDataAnnotationsValidator : AppComponentBase, IDisposable -{ - private static readonly PropertyInfo _OtherPropertyNamePropertyInfo = typeof(CompareAttribute).GetProperty(nameof(CompareAttribute.OtherPropertyDisplayName))!; - - private bool _disposed; - private ValidationMessageStore _validationMessageStore = default!; - - [AutoInject] private IServiceProvider _serviceProvider = default!; - [AutoInject] private IStringLocalizerFactory _stringLocalizerFactory = default!; - - [CascadingParameter] private EditContext _editContext { get; set; } = default!; - - protected override Task OnInitAsync() - { - if (_editContext is null) - throw new InvalidOperationException("EditContext is required"); - - _editContext.OnFieldChanged += OnFieldChanged; - _editContext.OnValidationRequested += OnValidationRequested; - - _validationMessageStore = new ValidationMessageStore(_editContext); - - return base.OnInitAsync(); - } - - private void OnFieldChanged(object? sender, FieldChangedEventArgs eventArgs) - { - var fieldIdentifier = eventArgs.FieldIdentifier; - var propertyInfo = fieldIdentifier.Model.GetType().GetProperty(fieldIdentifier.FieldName); - if (propertyInfo is null) return; - - var propertyValue = propertyInfo.GetValue(fieldIdentifier.Model); - var validationContext = new ValidationContext(fieldIdentifier.Model, _serviceProvider, items: null) - { - MemberName = propertyInfo.Name - }; - var results = new List(); - - var parent = propertyInfo.DeclaringType!; - var dtoResourceTypeAttr = parent.GetCustomAttribute(); - if (dtoResourceTypeAttr is not null) - { - var resourceType = dtoResourceTypeAttr.ResourceType; - var stringLocalizer = _stringLocalizerFactory.Create(resourceType); - var validationAttributes = propertyInfo.GetCustomAttributes(); - - foreach (var attribute in validationAttributes) - { - if (string.IsNullOrEmpty(attribute.ErrorMessage) is false) - { - attribute.ErrorMessageResourceName = attribute.ErrorMessage; - attribute.ErrorMessage = null; - } - - if (string.IsNullOrWhiteSpace(attribute.ErrorMessageResourceName) is false && attribute.ErrorMessageResourceType is null) - { - attribute.ErrorMessageResourceType = resourceType; - var displayAttribute = propertyInfo.GetCustomAttribute(); - validationContext.DisplayName = stringLocalizer.GetString(displayAttribute?.Name ?? propertyInfo.Name); - - if (attribute is CompareAttribute compareAttribute) - { - var otherPropertyInfoDisplayAttribute = (parent.GetProperty(compareAttribute.OtherProperty) ?? throw new InvalidOperationException($"Invalid OtherProperty {compareAttribute.OtherProperty}")).GetCustomAttribute(); - _OtherPropertyNamePropertyInfo.SetValue(attribute, stringLocalizer.GetString(otherPropertyInfoDisplayAttribute?.Name ?? compareAttribute.OtherProperty).ToString()); - } - } - - var result = attribute.GetValidationResult(propertyValue, validationContext); - - if (result is not null) - { - results.Add(result); - } - } - - } - else - { - Validator.TryValidateProperty(propertyValue, validationContext, results); - } - - _validationMessageStore.Clear(fieldIdentifier); - foreach (var result in CollectionsMarshal.AsSpan(results)) - { - _validationMessageStore.Add(fieldIdentifier, result.ErrorMessage!); - } - - _editContext.NotifyValidationStateChanged(); - } - - private void OnValidationRequested(object? sender, ValidationRequestedEventArgs e) - { - var validationContext = new ValidationContext(_editContext.Model, _serviceProvider, items: null); - var results = new List(); - - var objectType = validationContext.ObjectType; - var objectInstance = validationContext.ObjectInstance; - var dtoResourceTypeAttr = objectType.GetCustomAttribute(); - - _validationMessageStore.Clear(); - if (dtoResourceTypeAttr is not null) - { - var resourceType = dtoResourceTypeAttr.ResourceType; - - var stringLocalizer = _stringLocalizerFactory.Create(resourceType); - - var properties = objectType.GetProperties(BindingFlags.Instance | BindingFlags.Public); - - foreach (var propertyInfo in properties) - { - var context = new ValidationContext(objectInstance, validationContext, validationContext.Items); - context.MemberName = propertyInfo.Name; - var propertyValue = propertyInfo.GetValue(objectInstance); - var validationAttributes = propertyInfo.GetCustomAttributes(); - foreach (var attribute in validationAttributes) - { - if (string.IsNullOrEmpty(attribute.ErrorMessage) is false) - { - attribute.ErrorMessageResourceName = attribute.ErrorMessage; - attribute.ErrorMessage = null; - } - - if (string.IsNullOrWhiteSpace(attribute.ErrorMessageResourceName) is false && attribute.ErrorMessageResourceType is null) - { - attribute.ErrorMessageResourceType = resourceType; - var displayAttribute = propertyInfo.GetCustomAttribute(); - validationContext.DisplayName = stringLocalizer.GetString(displayAttribute?.Name ?? propertyInfo.Name); - if (attribute is CompareAttribute compareAttribute) - { - var otherPropertyInfoDisplayAttribute = (properties.FirstOrDefault(p => p.Name == compareAttribute.OtherProperty) ?? throw new InvalidOperationException($"Invalid OtherProperty {compareAttribute.OtherProperty}")).GetCustomAttribute(); - _OtherPropertyNamePropertyInfo.SetValue(attribute, stringLocalizer.GetString(otherPropertyInfoDisplayAttribute?.Name ?? compareAttribute.OtherProperty).ToString()); - } - } - - var result = attribute.GetValidationResult(propertyValue, context); - - if (result is not null) - { - results.Add(result); - } - } - } - } - else - { - Validator.TryValidateObject(_editContext.Model, validationContext, results, true); - } - - _validationMessageStore.Clear(); - foreach (var validationResult in results) - { - if (validationResult == null) continue; - - var hasMemberNames = false; - foreach (var memberName in validationResult.MemberNames) - { - hasMemberNames = true; - _validationMessageStore.Add(_editContext.Field(memberName), validationResult.ErrorMessage!); - } - - if (hasMemberNames) continue; - - _validationMessageStore.Add(new FieldIdentifier(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!); - } - - _editContext.NotifyValidationStateChanged(); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (_disposed || disposing is false) return; - - if (_editContext is not null) - { - _editContext.OnFieldChanged -= OnFieldChanged; - _editContext.OnValidationRequested -= OnValidationRequested; - } - - _disposed = true; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor deleted file mode 100644 index e4748a96a3..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor +++ /dev/null @@ -1,30 +0,0 @@ -@inherits ErrorBoundaryBase - -@if (CurrentException is null) -{ - @ChildContent -} -else if (ErrorContent is null) -{ -
-
- -
-
- -
-

Oops, something went wrong...

- @if (ShowException) - { -
@CurrentException?.ToString()
- } -
- Refresh - Home -
-
-} -else -{ - @ErrorContent(CurrentException) -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs deleted file mode 100644 index a2a6b7dca4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/AppErrorBoundary.razor.cs +++ /dev/null @@ -1,35 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Client.Core.Shared; - -public partial class AppErrorBoundary -{ - [AutoInject] private IExceptionHandler _exceptionHandler = default!; - - [AutoInject] private NavigationManager _navigationManager = default!; - - private bool ShowException { get; set; } - -#if DEBUG - protected override void OnInitialized() - { - ShowException = true; - } -#endif - - protected override Task OnErrorAsync(Exception exception) - { - _exceptionHandler.Handle(exception); - - return Task.CompletedTask; - } - - private void Refresh() - { - _navigationManager.Refresh(forceReload: true); - } - - private void GoHome() - { - _navigationManager.NavigateTo("/", true); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs deleted file mode 100644 index 4c6677b5e4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ChangePrerenderResponseStatusCode.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Client.Core.Shared; - -/// -/// This component is used during prerendering to determine the value of the StatusCode parameter for the returned HTTP response. -/// -public partial class ChangePrerenderResponseStatusCode : AppComponentBase -{ - [Parameter] - public HttpStatusCode StatusCode { get; set; } - - private static readonly Type? _httpContextAccessorType = Type.GetType("Microsoft.AspNetCore.Http.IHttpContextAccessor, Microsoft.AspNetCore.Http.Abstractions"); - - [AutoInject] - public IServiceProvider _serviceProvider = default!; - - protected override Task OnInitAsync() - { - if (_httpContextAccessorType is not null && BlazorModeDetector.Current.IsBlazorWebAssembly()) - { - var httpContextAccessor = _serviceProvider.GetService(_httpContextAccessorType); - - var httpContextProperty = _httpContextAccessorType.GetProperty("HttpContext")!; - - var httpContext = httpContextProperty.GetValue(httpContextAccessor)!; - - var response = httpContext.GetType().GetProperty("Response")!.GetValue(httpContext)!; - - response.GetType().GetProperty("StatusCode")!.SetValue(response, (int)StatusCode); - } - - return base.OnInitAsync(); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor deleted file mode 100644 index 613f693e0c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/ConfirmMessageBox.razor +++ /dev/null @@ -1,25 +0,0 @@ -@inherits AppComponentBase; - - -
-
- @_title - -
-
- @_message -
-
- - @Localizer[nameof(AppStrings.Yes)] - - - - @Localizer[nameof(AppStrings.No)] - -
-
-
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor deleted file mode 100644 index 3d77d75ff4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor +++ /dev/null @@ -1,98 +0,0 @@ - - -
-
-
-
-
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor.cs deleted file mode 100644 index 34dd97a178..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/LoadingComponent.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace TodoTemplate.Client.Core.Shared; - -public partial class LoadingComponent -{ - [Parameter] public string Color { get; set; } = "#123456"; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.scss b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.scss deleted file mode 100644 index bbf208cc52..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/MessageBox.razor.scss +++ /dev/null @@ -1,31 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_media-queries.scss'; - -.main { - flex-grow: 1; - display: flex; - padding: rem2(10px); - flex-direction: column; -} - -.header { - display: flex; -} - -.title { - flex-grow: 1; -} - -.body { - flex-grow: 1; - display: flex; - overflow: auto; - max-width: 90vw; - white-space: pre; - margin: rem2(10px) 0; -} - -.footer { - display: flex; - justify-content: center; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor deleted file mode 100644 index 654f18b90c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor +++ /dev/null @@ -1,14 +0,0 @@ -@inherits AppComponentBase - - - - -
-
-

@Localizer[nameof(AppStrings.ForbiddenException)]

-

You're signed in as @_user.GetUserName()

-
- Sign in as different user -
-
-
diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs deleted file mode 100644 index d9b686e253..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace TodoTemplate.Client.Core.Shared; - -public partial class NotAuthorizedComponent -{ - private ClaimsPrincipal _user { get; set; } = default!; - - [CascadingParameter] private Task _authenticationStateTask { get; set; } = default!; - - protected async override Task OnParamsSetAsync() - { - _user = (await _authenticationStateTask).User; - - await base.OnParamsSetAsync(); - } - - protected override void OnAfterRender(bool firstRender) - { - try - { - if (firstRender && _user.Identity?.IsAuthenticated is false) - { - RedirectToSignInPage(); - } - } - catch (Exception exp) - { - ExceptionHandler.Handle(exp); - } - - base.OnAfterRender(firstRender); - } - - private async Task SignIn() - { - await AuthenticationService.SignOut(); - - RedirectToSignInPage(); - } - - private void RedirectToSignInPage() - { - var redirectUrl = NavigationManager.ToBaseRelativePath(NavigationManager.Uri); - - NavigationManager.NavigateTo($"/sign-in?redirectUrl={redirectUrl}"); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss deleted file mode 100644 index d49cb47127..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Shared/NotAuthorizedComponent.razor.scss +++ /dev/null @@ -1,28 +0,0 @@ -@import '../Styles/abstracts/_functions.scss'; -@import '../Styles/abstracts/_bit-css-variables.scss'; - -.main { - width: 100%; - display: flex; - padding: rem2(8px); - text-align: center; - max-width: rem2(800px); - flex-direction: column; - max-height: rem2(600px); - border-radius: rem2(4px); - background-color: $bit-color-background-primary; -} - -.title { - color: $bit-color-state-error; -} - -.description { - overflow: auto; - white-space: pre; - margin: rem2(24px); -} - -.buttons { - margin-bottom: rem2(24px); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_bit-css-variables.scss b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_bit-css-variables.scss deleted file mode 100644 index b715b9c518..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_bit-css-variables.scss +++ /dev/null @@ -1,123 +0,0 @@ -/*-------- Colors --------*/ -$bit-color-primary-main: var(--bit-clr-primary-main); -$bit-color-primary-dark: var(--bit-clr-primary-dark); -$bit-color-primary-light: var(--bit-clr-primary-light); -$bit-color-primary-text: var(--bit-clr-primary-text); - -$bit-color-secondary-main: var(--bit-clr-secondary-main); -$bit-color-secondary-dark: var(--bit-clr-secondary-dark); -$bit-color-secondary-light: var(--bit-clr-secondary-light); -$bit-color-secondary-text: var(--bit-clr-secondary-text); - -//foreground -$bit-color-foreground-primary: var(--bit-clr-fg-primary); -$bit-color-foreground-secondary: var(--bit-clr-fg-secondary); -$bit-color-foreground-disabled: var(--bit-clr-fg-disabled); - -//backgrounds -$bit-color-background-primary: var(--bit-clr-bg-primary); -$bit-color-background-secondary: var(--bit-clr-bg-secondary); -$bit-color-background-disabled: var(--bit-clr-bg-disabled); -$bit-color-background-overlay: var(--bit-clr-bg-overlay); - -//borders -$bit-color-border-primary: var(--bit-clr-brd-primary); -$bit-color-border-secondary: var(--bit-clr-brd-secondary); -$bit-color-border-disabled: var(--bit-clr-brd-disabled); - -//actions -$bit-color-action-hover-primary: var(--bit-clr-act-hover-pri); -$bit-color-action-active-primary: var(--bit-clr-act-active-pri); -$bit-color-action-hover-primary-dark: var(--bit-clr-act-hover-pri-dark); -$bit-color-action-active-primary-dark: var(--bit-clr-act-active-pri-dark); -$bit-color-action-hover-primary-light: var(--bit-clr-act-hover-pri-light); -$bit-color-action-active-primary-light: var(--bit-clr-act-active-pri-light); -$bit-color-action-hover-secondary: var(--bit-clr-act-hover-sec); -$bit-color-action-active-secondary: var(--bit-clr-act-active-sec); -$bit-color-action-hover-secondary-dark: var(--bit-clr-act-hover-sec-dark); -$bit-color-action-active-secondary-dark: var(--bit-clr-act-active-sec-dark); -$bit-color-action-hover-secondary-light: var(--bit-clr-act-hover-sec-light); -$bit-color-action-active-secondary-light: var(--bit-clr-act-active-sec-light); -//actions-foreground -$bit-color-action-hover-foreground-primary: var(--bit-clr-act-hover-fg-pri); -$bit-color-action-active-foreground-primary: var(--bit-clr-act-active-fg-pri); -$bit-color-action-hover-foreground-secondary: var(--bit-clr-act-hover-fg-sec); -$bit-color-action-active-foreground-secondary: var(--bit-clr-act-hover-fg-sec); -//actions-backgrounds -$bit-color-action-hover-background-primary: var(--bit-clr-act-hover-bg-pri); -$bit-color-action-active-background-primary: var(--bit-clr-act-active-bg-pri); -$bit-color-action-hover-background-secondary: var(--bit-clr-act-hover-bg-sec); -$bit-color-action-active-background-secondary: var(--bit-clr-act-active-bg-sec); -//actions-borders -$bit-color-action-hover-border-primary: var(--bit-clr-act-hover-brd-pri); -$bit-color-action-active-border-primary: var(--bit-clr-act-active-brd-pri); -$bit-color-action-hover-border-secondary: var(--bit-clr-act-hover-brd-sec); -$bit-color-action-active-border-secondary: var(--bit-clr-act-active-brd-sec); - -//states -$bit-color-state-info: var(--bit-clr-sta-info); -$bit-color-state-info-bg: var(--bit-clr-sta-info-bg); -$bit-color-state-success: var(--bit-clr-sta-success); -$bit-color-state-success-bg: var(--bit-clr-sta-success-bg); -$bit-color-state-warning: var(--bit-clr-sta-warning); -$bit-color-state-warning-bg: var(--bit-clr-sta-warning-bg); -$bit-color-state-severe-warning: var(--bit-clr-sta-severe-warning); -$bit-color-state-severe-warning-bg: var(--bit-clr-sta-severe-warning-bg); -$bit-color-state-error: var(--bit-clr-sta-error); -$bit-color-state-error-bg: var(--bit-clr-sta-error-bg); -$bit-color-state-required: var(--bit-clr-sta-req); - -//neutrals -$bit-color-neutrals-white: var(--bit-clr-ntr-white); -$bit-color-neutrals-black: var(--bit-clr-ntr-black); -$bit-color-neutrals-gray10: var(--bit-clr-ntr-gray10); -$bit-color-neutrals-gray20: var(--bit-clr-ntr-gray20); -$bit-color-neutrals-gray30: var(--bit-clr-ntr-gray30); -$bit-color-neutrals-gray40: var(--bit-clr-ntr-gray40); -$bit-color-neutrals-gray50: var(--bit-clr-ntr-gray50); -$bit-color-neutrals-gray60: var(--bit-clr-ntr-gray60); -$bit-color-neutrals-gray70: var(--bit-clr-ntr-gray70); -$bit-color-neutrals-gray80: var(--bit-clr-ntr-gray80); -$bit-color-neutrals-gray90: var(--bit-clr-ntr-gray90); -$bit-color-neutrals-gray100: var(--bit-clr-ntr-gray100); -$bit-color-neutrals-gray110: var(--bit-clr-ntr-gray110); -$bit-color-neutrals-gray120: var(--bit-clr-ntr-gray120); -$bit-color-neutrals-gray130: var(--bit-clr-ntr-gray130); -$bit-color-neutrals-gray140: var(--bit-clr-ntr-gray140); -$bit-color-neutrals-gray150: var(--bit-clr-ntr-gray150); -$bit-color-neutrals-gray160: var(--bit-clr-ntr-gray160); -$bit-color-neutrals-gray170: var(--bit-clr-ntr-gray170); -$bit-color-neutrals-gray180: var(--bit-clr-ntr-gray180); -$bit-color-neutrals-gray190: var(--bit-clr-ntr-gray190); -$bit-color-neutrals-gray200: var(--bit-clr-ntr-gray200); -$bit-color-neutrals-gray210: var(--bit-clr-ntr-gray210); -$bit-color-neutrals-gray220: var(--bit-clr-ntr-gray220); - -//shadows-callout -$bit-box-shadow-callout: var(--bit-shd-cal); - -//shadows -$bit-box-shadow-1: var(--bit-shd-1); -$bit-box-shadow-2: var(--bit-shd-2); -$bit-box-shadow-3: var(--bit-shd-3); -$bit-box-shadow-4: var(--bit-shd-4); -$bit-box-shadow-5: var(--bit-shd-5); -$bit-box-shadow-6: var(--bit-shd-6); -$bit-box-shadow-7: var(--bit-shd-7); -$bit-box-shadow-8: var(--bit-shd-8); -$bit-box-shadow-9: var(--bit-shd-9); -$bit-box-shadow-10: var(--bit-shd-10); -$bit-box-shadow-11: var(--bit-shd-11); -$bit-box-shadow-12: var(--bit-shd-12); -$bit-box-shadow-13: var(--bit-shd-13); -$bit-box-shadow-14: var(--bit-shd-14); -$bit-box-shadow-15: var(--bit-shd-15); -$bit-box-shadow-16: var(--bit-shd-16); -$bit-box-shadow-17: var(--bit-shd-17); -$bit-box-shadow-18: var(--bit-shd-18); -$bit-box-shadow-19: var(--bit-shd-19); -$bit-box-shadow-20: var(--bit-shd-20); -$bit-box-shadow-21: var(--bit-shd-21); -$bit-box-shadow-22: var(--bit-shd-22); -$bit-box-shadow-23: var(--bit-shd-23); -$bit-box-shadow-24: var(--bit-shd-24); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_functions.scss b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_functions.scss deleted file mode 100644 index 29bd35e9c0..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/Styles/abstracts/_functions.scss +++ /dev/null @@ -1,15 +0,0 @@ -@use 'sass:math'; - -$html-font-size: 16px; - -@function stripUnit($value) { - @return math.div($value, ($value * 0 + 1)); -} - -@function em2($pxValue, $base-font-size: $html-font-size) { - @return #{calc(stripUnit($pxValue) / stripUnit($base-font-size))}em; -} - -@function rem2($pxValue) { - @return #{calc(stripUnit($pxValue) / stripUnit($html-font-size))}rem; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/_Imports.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/_Imports.razor deleted file mode 100644 index 8ecc645d59..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/_Imports.razor +++ /dev/null @@ -1,19 +0,0 @@ -@using System.Reflection -@using System.Globalization -@using Microsoft.JSInterop -@using Microsoft.AspNetCore.Authorization -@using Microsoft.Extensions.Configuration -@using Microsoft.AspNetCore.Components -@using Microsoft.AspNetCore.Components.Web -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Authorization -@using Microsoft.AspNetCore.Components.Web.Virtualization -@using Bit.BlazorUI -@using TodoTemplate -@using TodoTemplate.Shared.Enums -@using TodoTemplate.Client.Core -@using TodoTemplate.Client.Core.Pages -@using TodoTemplate.Client.Core.Shared -@using TodoTemplate.Client.Core.Services.Contracts -@using TodoTemplate.Client.Core.Services \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/appsettings.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/appsettings.json deleted file mode 100644 index dc65de9a63..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/appsettings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "DetailedErrors": true, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*", - "ApiServerAddress": "http://localhost:5040/api/" -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/compilerconfig.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/compilerconfig.json deleted file mode 100644 index 8383efd1a1..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/compilerconfig.json +++ /dev/null @@ -1,128 +0,0 @@ -[ - { - "outputFile": "Shared/MainLayout.razor.css", - "inputFile": "Shared/MainLayout.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/AppErrorBoundary.razor.css", - "inputFile": "Shared/AppErrorBoundary.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/ConfirmMessageBox.razor.css", - "inputFile": "Shared/ConfirmMessageBox.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/MessageBox.razor.css", - "inputFile": "Shared/MessageBox.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/Header.razor.css", - "inputFile": "Shared/Header.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/Footer.razor.css", - "inputFile": "Shared/Footer.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/NavMenu.razor.css", - "inputFile": "Shared/NavMenu.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/NotAuthorizedComponent.razor.css", - "inputFile": "Shared/NotAuthorizedComponent.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/SignOutConfirmModal.razor.css", - "inputFile": "Shared/SignOutConfirmModal.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Shared/PageNotFound.razor.css", - "inputFile": "Shared/PageNotFound.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/HomePage.razor.css", - "inputFile": "Pages/HomePage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/TermsPage.razor.css", - "inputFile": "Pages/TermsPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/SignUpPage.razor.css", - "inputFile": "Pages/Identity/SignUpPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/SignInPage.razor.css", - "inputFile": "Pages/Identity/SignInPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/EmailConfirmationPage.razor.css", - "inputFile": "Pages/Identity/EmailConfirmationPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/ForgotPasswordPage.razor.css", - "inputFile": "Pages/Identity/ForgotPasswordPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/ResetPasswordPage.razor.css", - "inputFile": "Pages/Identity/ResetPasswordPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/TodoPage.razor.css", - "inputFile": "Pages/TodoPage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/EditProfilePage.razor.css", - "inputFile": "Pages/Identity/EditProfilePage.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.css", - "inputFile": "Pages/Identity/DeleteAccountConfirmModal.razor.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - }, - { - "outputFile": "wwwroot/styles/app.css", - "inputFile": "Styles/app.scss", - "minify": { "enabled": false }, - "options": { "sourceMap": false } - } -] \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/tsconfig.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/tsconfig.json deleted file mode 100644 index 1e38659c56..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compileOnSave": true, - "compilerOptions": { - "strict": true, - "noImplicitAny": true, - "lib": [ "DOM", "ESNext" ], - "outFile": "wwwroot/scripts/app.js" - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/bit-logo.svg b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/bit-logo.svg deleted file mode 100644 index fbd43466a7..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/bit-logo.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/icons/error-triangle.svg b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/icons/error-triangle.svg deleted file mode 100644 index ca7f27fc98..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Core/wwwroot/images/icons/error-triangle.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/.config/dotnet-tools.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/.config/dotnet-tools.json deleted file mode 100644 index 5bd5ffbaef..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/.config/dotnet-tools.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "electronnet.cli": { - "version": "23.6.1", - "commands": [ - "electronize" - ] - } - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/HttpRequestExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/HttpRequestExtensions.cs deleted file mode 100644 index b8d735e228..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/HttpRequestExtensions.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Microsoft.Net.Http.Headers; - -namespace Microsoft.AspNetCore.Http; - -public static class HttpRequestExtensions -{ - /// - /// https://blog.elmah.io/how-to-get-base-url-in-asp-net-core/ - /// - public static string GetBaseUrl(this HttpRequest req) - { - var uriBuilder = new UriBuilder(req.Scheme, req.Host.Host, req.Host.Port ?? -1); - if (uriBuilder.Uri.IsDefaultPort) - { - uriBuilder.Port = -1; - } - - return uriBuilder.Uri.AbsoluteUri; - } - - public static bool ShouldRenderStaticMode(this HttpRequest request) - { - var agent = GetLoweredUserAgent(request); - - if (agent.Contains("google")) return true; - - if (agent.Contains("bing")) return true; - - if (agent.Contains("lighthouse")) return true; - - return false; - } - - private static string GetLoweredUserAgent(HttpRequest request) - { - var userAgent = request.Headers[HeaderNames.UserAgent].ToString(); - - if (string.IsNullOrEmpty(userAgent)) return string.Empty; - - return userAgent.ToLowerInvariant(); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 80746e7e31..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using TodoTemplate.Client.Web.Services; - -namespace Microsoft.Extensions.DependencyInjection; - -public static class IServiceCollectionExtensions -{ - public static IServiceCollection AddClientWebServices(this IServiceCollection services) - { - // Services being registered here can get injected in web (blazor web assembly & blazor server) - services.AddScoped(); - services.AddScoped(); - - return services; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBswupProgressBar.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBswupProgressBar.razor deleted file mode 100644 index cfeca6fc07..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBswupProgressBar.razor +++ /dev/null @@ -1,78 +0,0 @@ -@using Bit.Bswup -@using Bit.BlazorUI - -@inherits AppComponentBase - - - -
- -
- - - - - - @* *@ -
\ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBupProgressBar.razor b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBupProgressBar.razor deleted file mode 100644 index b23dd8fb3c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/AppBupProgressBar.razor +++ /dev/null @@ -1,49 +0,0 @@ -@using Bit.Bup -@using Bit.BlazorUI - - - -@code { - private bool _showLoading = true; - - protected override void OnAfterRender(bool firstRender) - { - base.OnAfterRender(firstRender); - if (firstRender is false) return; - - _showLoading = false; - StateHasChanged(); - } -} - -@if (_showLoading) -{ -
- -
- - -
-} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Host.cshtml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Host.cshtml deleted file mode 100644 index a9b3ff4e0f..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Host.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@page "/" -@using TodoTemplate.Client.Core; -@using TodoTemplate.Shared.Infra; -@namespace TodoTemplate.Client.Web.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = "_Layout"; - var isBlazorServer = BlazorModeDetector.Current.IsBlazorServer(); - var isSpa = WebAppDeploymentTypeDetector.Current.IsSpa(); - var isPwa = WebAppDeploymentTypeDetector.Current.IsPwa(); - var isSpaPrerendered = WebAppDeploymentTypeDetector.Current.IsSpaPrerendered(); - var isPwaPrerendered = WebAppDeploymentTypeDetector.Current.IsPwaPrerendered(); - var isPrerenderedOnly = WebAppDeploymentTypeDetector.Current.IsPrerenderedOnly(); - - var noPrerender = Request.Query["no-prerender"].Count > 0; - - RenderMode renderMode = RenderMode.Static; - - if (isPrerenderedOnly is false) - { - if (isBlazorServer) - { - renderMode = isSpa || isPwa || noPrerender ? RenderMode.Server : RenderMode.ServerPrerendered; - } - else - { - renderMode = isSpa || isPwa || noPrerender ? RenderMode.WebAssembly : RenderMode.WebAssemblyPrerendered; - } - } -} - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Layout.cshtml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Layout.cshtml deleted file mode 100644 index c930d5440d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Pages/_Layout.cshtml +++ /dev/null @@ -1,129 +0,0 @@ -@using Bit.BlazorUI -@using TodoTemplate.Shared.Infra -@using Microsoft.AspNetCore.Components.Web -@using RenderMode = Microsoft.AspNetCore.Mvc.Rendering.RenderMode - -@namespace TodoTemplate.Client.Web.Pages -@inject IHttpContextAccessor ContextAccessor -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - var isElectron = BlazorModeDetector.Current.IsBlazorElectron(); - var isBlazorServer = BlazorModeDetector.Current.IsBlazorServer(); - var isSpa = WebAppDeploymentTypeDetector.Current.IsSpa(); - var isPwa = WebAppDeploymentTypeDetector.Current.IsPwa(); - var isSpaPrerendered = WebAppDeploymentTypeDetector.Current.IsSpaPrerendered(); - var isPwaPrerendered = WebAppDeploymentTypeDetector.Current.IsPwaPrerendered(); - var isPrerenderedOnly = WebAppDeploymentTypeDetector.Current.IsPrerenderedOnly(); - - var request = ContextAccessor?.HttpContext?.Request; - var noPrerender = (request?.Query["no-prerender"].Count ?? 0) > 0; - - RenderMode renderMode = RenderMode.Static; - if (isPrerenderedOnly is false) - { - if (isBlazorServer) - { - renderMode = isSpa || isPwa || noPrerender ? RenderMode.Server : RenderMode.ServerPrerendered; - } - else - { - renderMode = isSpa || isPwa || noPrerender ? RenderMode.WebAssembly : RenderMode.WebAssemblyPrerendered; - } - } - - if (renderMode is RenderMode.ServerPrerendered or RenderMode.WebAssemblyPrerendered) - { - if (request?.ShouldRenderStaticMode() is true) - { - renderMode = RenderMode.Static; - isPrerenderedOnly = true; - } - } -} - - - - - - - - - - - - - @if (isPwa || isPwaPrerendered) - { - - } - - -
- @if (isSpa || isPwa || noPrerender) - { - - } - - - - - - @RenderBody() -
- - @if (isPrerenderedOnly is false) - { - @if (isBlazorServer) - { - - } - else - { - - @if (isPwa || isPwaPrerendered) - { - - - - @if (isPwaPrerendered) - { - - } - else - { - - - } - } - else if (isSpa || isSpaPrerendered) - { - - - @if (isSpaPrerendered) - { - - } - else - { - - - } - } - } - - } - - - @if ((isSpaPrerendered || isPwaPrerendered) && !noPrerender) - { - - } - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorElectron.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorElectron.cs deleted file mode 100644 index 80e2a63748..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorElectron.cs +++ /dev/null @@ -1,49 +0,0 @@ -//-:cnd:noEmit -#if BlazorElectron -using ElectronNET.API; -using ElectronNET.API.Entities; -#endif - -namespace TodoTemplate.Client.Web; - -public partial class Program -{ -#if BlazorElectron - public static WebApplication CreateHostBuilder(string[] args) - { - var builder = WebApplication.CreateBuilder(args); - builder.Configuration.AddClientConfigurations(); - builder.WebHost.UseElectron(args); - builder.Services.AddElectron(); - - builder.WebHost.UseUrls("http://localhost:8001"); - - Startup.Services.Add(builder.Services, builder.Configuration); - - var app = builder.Build(); - - Startup.Middlewares.Use(app, builder.Environment); - - Task.Run(async () => - { - var window = await Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions - { - AutoHideMenuBar = true, - BackgroundColor = "#0D2960", - WebPreferences = new WebPreferences - { - NodeIntegration = false - } - }, "http://localhost:8001"); - - window.OnClosed += delegate - { - app.Services.GetRequiredService().StopApplication(); - Electron.App.Quit(); - }; - }); - - return app; - } -#endif -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorServer.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorServer.cs deleted file mode 100644 index 306686c573..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorServer.cs +++ /dev/null @@ -1,36 +0,0 @@ -//-:cnd:noEmit -#if BlazorServer -#endif - -namespace TodoTemplate.Client.Web; - -public partial class Program -{ -#if BlazorServer && !BlazorElectron - public static WebApplication CreateHostBuilder(string[] args) - { - var builder = WebApplication.CreateBuilder(args); - builder.Configuration.AddClientConfigurations(); - -#if DEBUG - if (OperatingSystem.IsWindows()) - { - // The following line (using the * in the URL), allows the emulators and mobile devices to access the app using the host IP address. - builder.WebHost.UseUrls("https://localhost:4041", "http://localhost:4040", "https://*:4041", "http://*:4040"); - } - else - { - builder.WebHost.UseUrls("https://localhost:4041", "http://localhost:4040"); - } -#endif - - Startup.Services.Add(builder.Services, builder.Configuration); - - var app = builder.Build(); - - Startup.Middlewares.Use(app, builder.Environment); - - return app; - } -#endif -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorWebAssembly.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorWebAssembly.cs deleted file mode 100644 index b44dcdd03b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.BlazorWebAssembly.cs +++ /dev/null @@ -1,52 +0,0 @@ -//-:cnd:noEmit -#if BlazorWebAssembly -using TodoTemplate.Client.Core.Services.HttpMessageHandlers; -using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -#endif - -namespace TodoTemplate.Client.Web; - -public partial class Program -{ -#if BlazorWebAssembly - public static WebAssemblyHost CreateHostBuilder(string[] args) - { - var builder = WebAssemblyHostBuilder.CreateDefault(); - - builder.Configuration.AddClientConfigurations(); - - Uri.TryCreate(builder.Configuration.GetApiServerAddress(), UriKind.RelativeOrAbsolute, out var apiServerAddress); - - if (apiServerAddress!.IsAbsoluteUri is false) - { - apiServerAddress = new Uri($"{builder.HostEnvironment.BaseAddress}{apiServerAddress}"); - } - - builder.Services.AddSingleton(sp => - { - var handler = sp.GetRequiredService(); - HttpClient httpClient = new(handler) - { - BaseAddress = apiServerAddress - }; - return httpClient; - }); - - builder.Services.AddScoped(); - builder.Services.AddTransient(); - - builder.Services.AddSharedServices(); - builder.Services.AddClientSharedServices(); - builder.Services.AddClientWebServices(); - - var host = builder.Build(); - -#if MultilingualEnabled - var preferredCultureCookie = ((IJSInProcessRuntime)host.Services.GetRequiredService()).Invoke("window.App.getCookie", ".AspNetCore.Culture"); - CultureInfoManager.SetCurrentCulture(preferredCultureCookie); -#endif - - return host; - } -#endif -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.cs deleted file mode 100644 index e038d4a8dd..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Client.Web; - -public partial class Program -{ - public static async Task Main(string[] args) - { -#if !BlazorWebAssembly && !BlazorServer - throw new InvalidOperationException("Please switch to either blazor web assembly or server as described in https://bitplatform.dev/templates/hosting-models"); -#else - await CreateHostBuilder(args) - .RunAsync(); -#endif - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Properties/launchSettings.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Properties/launchSettings.json deleted file mode 100644 index 0e3f59774c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Properties/launchSettings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "profiles": { - "TodoTemplate.Client.Web": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:4041;http://localhost:4040" - }, - "TodoTemplate.Client.Web.Electron": { - "commandName": "Executable", - "executablePath": "dotnet", - "commandLineArgs": "electronize start", - "workingDirectory": "." - } - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebDeviceCoordinator.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebDeviceCoordinator.cs deleted file mode 100644 index 27f34aa639..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebDeviceCoordinator.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace TodoTemplate.Client.Web.Services; - -public class WebDeviceCoordinator : IBitDeviceCoordinator -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebExceptionHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebExceptionHandler.cs deleted file mode 100644 index ea2727d7a7..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Services/WebExceptionHandler.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TodoTemplate.Client.Web.Services; - -public partial class WebExceptionHandler : ExceptionHandlerBase -{ - public override void Handle(Exception exception, IDictionary? parameters = null) - { - base.Handle(exception, parameters); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Middlewares.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Middlewares.cs deleted file mode 100644 index d6fbc2792c..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Middlewares.cs +++ /dev/null @@ -1,39 +0,0 @@ -//-:cnd:noEmit -#if BlazorServer -namespace TodoTemplate.Client.Web.Startup; - -public class Middlewares -{ - public static void Use(WebApplication app, IHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - else - { - app.UseExceptionHandler("/Error"); - } - - if (env.IsDevelopment() is false) - { - app.UseHttpsRedirection(); - app.UseResponseCompression(); - } - app.UseStaticFiles(); - -#if MultilingualEnabled - var supportedCultures = CultureInfoManager.SupportedCultures.Select(sc => CultureInfoManager.CreateCultureInfo(sc.code)).ToArray(); - app.UseRequestLocalization(new RequestLocalizationOptions - { - SupportedCultures = supportedCultures, - SupportedUICultures = supportedCultures, - ApplyCurrentCultureToResponseHeaders = true - }.SetDefaultCulture(CultureInfoManager.DefaultCulture.code)); -#endif - - app.MapBlazorHub(); - app.MapFallbackToPage("/_Host"); - } -} -#endif diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Services.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Services.cs deleted file mode 100644 index cb9a556ebb..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/Startup/Services.cs +++ /dev/null @@ -1,45 +0,0 @@ -//-:cnd:noEmit -#if BlazorServer -using System.IO.Compression; -using Microsoft.AspNetCore.ResponseCompression; -using TodoTemplate.Client.Core.Services.HttpMessageHandlers; -using TodoTemplate.Client.Web.Services; - -namespace TodoTemplate.Client.Web.Startup; - -public static class Services -{ - public static void Add(IServiceCollection services, IConfiguration configuration) - { - services.AddScoped(sp => - { - Uri.TryCreate(configuration.GetApiServerAddress(), UriKind.Absolute, out var apiServerAddress); - var handler = sp.GetRequiredService(); - HttpClient httpClient = new(handler) - { - BaseAddress = apiServerAddress - }; - - return httpClient; - }); - - services.AddHttpContextAccessor(); - services.AddRazorPages(); - services.AddServerSideBlazor(); - services.AddResponseCompression(opts => - { - opts.EnableForHttps = true; - opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(["application/octet-stream"]).ToArray(); - opts.Providers.Add(); - opts.Providers.Add(); - }) - .Configure(opt => opt.Level = CompressionLevel.Fastest) - .Configure(opt => opt.Level = CompressionLevel.Fastest); - services.AddTransient(); - - services.AddSharedServices(); - services.AddClientSharedServices(); - services.AddClientWebServices(); - } -} -#endif diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/TodoTemplate.Client.Web.csproj b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/TodoTemplate.Client.Web.csproj deleted file mode 100644 index b98f63472d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/TodoTemplate.Client.Web.csproj +++ /dev/null @@ -1,88 +0,0 @@ - - - - net8.0 - - true - false - - service-worker-assets.js - false - - true - true - true - true - - false - - - BeforeBuildTasks; - $(ResolveStaticWebAssetsInputsDependsOn) - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/electron.manifest.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/electron.manifest.json deleted file mode 100644 index df9855dfcb..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/electron.manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "executable": "TodoTemplate.Client.Web", - "splashscreen": { - "imageFile": "" - }, - "name": "TodoTemplate", - "author": "", - "singleInstance": true, - "environment": "Production", - "build": { - "appId": "com.TodoTemplate.Client.Web.app", - "productName": "TodoTemplate.Client.Web", - "copyright": "Copyright © 2023", - "buildVersion": "1.0.0", - "compression": "maximum", - "directories": { - "output": "../../../bin/Desktop" - }, - "extraResources": [ - { - "from": "./bin", - "to": "bin", - "filter": [ "**/*" ] - } - ], - "files": [ - { - "from": "./ElectronHostHook/node_modules", - "to": "ElectronHostHook/node_modules", - "filter": [ "**/*" ] - }, - "**/*" - ] - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/favicon.ico b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/favicon.ico deleted file mode 100644 index 0890544d35..0000000000 Binary files a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/favicon.ico and /dev/null differ diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/images/icons/bit-icon-512.png b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/images/icons/bit-icon-512.png deleted file mode 100644 index 206c866b82..0000000000 Binary files a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/images/icons/bit-icon-512.png and /dev/null differ diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/manifest.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/manifest.json deleted file mode 100644 index d384d6a3fe..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/manifest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "dir": "ltr", - "lang": "en", - "scope": "/", - "start_url": "/", - "orientation": "any", - "id": "bitTodoTemplate", - "display": "standalone", - "theme_color": "#2EA3FF", - "related_applications": [], - "name": "bit TodoTemplate", - "background_color": "#0D1117", - "short_name": "bit TodoTemplate", - "prefer_related_applications": false, - "display_override": [ "window-controls-overlay" ], - "description": "bit TodoTemplate is a project template that includes work packages and actions that you can apply to various projects.", - "features": [ - "Cross Platform", - "fast", - "simple" - ], - "categories": [ - "utilities" - ], - "icons": [ - { - "sizes": "512x512", - "type": "image/png", - "src": "images/icons/bit-icon-512.png" - } - ], - "shortcuts": [ - { - "name": "Terms", - "url": "/terms" - }, - { - "name": "Todo", - "url": "/todo" - }, - { - "name": "EditProfile", - "url": "/edit-profile" - } - ] -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.js b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.js deleted file mode 100644 index ec84898c3a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.js +++ /dev/null @@ -1,34 +0,0 @@ -// bit version: 7.2.0-pre-01 -// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup - -// Make sure to apply all changes you make here to the service-worker.published.js file too (if required). - -self.assetsInclude = []; -self.assetsExclude = [ - /bit\.blazorui\.fluent\.css$/, - /bit\.blazorui\.fluent-dark\.css$/, - /bit\.blazorui\.fluent-light\.css$/, -]; -self.externalAssets = [ - { - "url": "/" - }, -]; - -self.serverHandledUrls = [ - /\/api\//, - /\/odata\//, - /\/jobs\//, - /\/core\//, - /\/signalr\//, - /\/healthchecks-ui/, - /\/healthz/, - /\/swagger/ -]; - -self.isPassive = true; -self.defaultUrl = "/"; -self.caseInsensitiveUrl = true; -self.noPrerenderQuery = 'no-prerender=true'; - -self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.published.js b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.published.js deleted file mode 100644 index 4c0fd90e5b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Client/Web/wwwroot/service-worker.published.js +++ /dev/null @@ -1,32 +0,0 @@ -// bit version: 7.2.0-pre-01 -// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup - -self.assetsInclude = []; -self.assetsExclude = [ - /bit\.blazorui\.fluent\.css$/, - /bit\.blazorui\.fluent-dark\.css$/, - /bit\.blazorui\.fluent-light\.css$/, -]; -self.externalAssets = [ - { - "url": "/" - }, -]; - -self.serverHandledUrls = [ - /\/api\//, - /\/odata\//, - /\/jobs\//, - /\/core\//, - /\/signalr\//, - /\/healthchecks-ui/, - /\/healthz/, - /\/swagger/ -]; - -self.isPassive = true; -self.defaultUrl = "/"; -self.caseInsensitiveUrl = true; -self.noPrerenderQuery = 'no-prerender=true'; - -self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Directory.Build.props b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Directory.Build.props deleted file mode 100644 index ee6bfc1a2a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Directory.Build.props +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - BlazorServer - - - - Spa - - - - true - $(DefineConstants);BlazorElectron - Spa - BlazorServer - - $(DefineConstants);BlazorWebAssembly - $(DefineConstants);BlazorServer - $(DefineConstants);BlazorHybrid - $(DefineConstants);Spa - $(DefineConstants);Pwa - $(DefineConstants);SpaPrerendered - $(DefineConstants);PwaPrerendered - $(DefineConstants);PrerenderedOnly - $(DefineConstants);Android - $(DefineConstants);iOS - $(DefineConstants);Windows - $(DefineConstants);Mac - - 12.0 - enable - enable - true - $(NoWarn);CS1998;CS1591 - - en - true - $(DefineConstants);MultilingualEnabled - - 14.2 - 14.0 - 24.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Program.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Program.cs deleted file mode 100644 index 04ce0c5c72..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Program.cs +++ /dev/null @@ -1,7 +0,0 @@ -using Pulumi; -using TodoTemplate.Iac; - -public class Program -{ - static Task Main() => Deployment.RunAsync(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Pulumi.yaml b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Pulumi.yaml deleted file mode 100644 index da81a482a4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Infra/Iac/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: TodoTemplate.Iac -runtime: dotnet -description: TodoTemplate infrastructure as a code diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/.config/dotnet-tools.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/.config/dotnet-tools.json deleted file mode 100644 index a4652233c5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/.config/dotnet-tools.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "dotnet-ef": { - "version": "8.0.0-rc.2.23480.2", - "commands": [ - "dotnet-ef" - ] - } - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/AppSettings.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/AppSettings.cs deleted file mode 100644 index 51ac2c1084..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/AppSettings.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace TodoTemplate.Server.Api; - -public class AppSettings -{ - public IdentitySettings IdentitySettings { get; set; } = default!; - - public JwtSettings JwtSettings { get; set; } = default!; - - public EmailSettings EmailSettings { get; set; } = default!; - - public HealthCheckSettings HealthCheckSettings { get; set; } = default!; - - public string UserProfileImagesDir { get; set; } = default!; - - public string WebServerAddress { get; set; } = default!; -} - -public class HealthCheckSettings -{ - public bool EnableHealthChecks { get; set; } -} - -public class IdentitySettings -{ - public bool PasswordRequireDigit { get; set; } - public int PasswordRequiredLength { get; set; } - public bool PasswordRequireNonAlphanumeric { get; set; } - public bool PasswordRequireUppercase { get; set; } - public bool PasswordRequireLowercase { get; set; } - public bool RequireUniqueEmail { get; set; } - public TimeSpan ConfirmationEmailResendDelay { get; set; } - public TimeSpan ResetPasswordEmailResendDelay { get; set; } -} - -public class JwtSettings -{ - public string IdentityCertificatePassword { get; set; } = default!; - public string Issuer { get; set; } = default!; - public string Audience { get; set; } = default!; - public int NotBeforeMinutes { get; set; } - public int ExpirationMinutes { get; set; } -} - -public class EmailSettings -{ - public string Host { get; set; } = default!; - /// - /// If true, the web app tries to store emails as .eml file in the bin/Debug/net8.0/sent-emails folder instead of sending them using smtp server (recommended for testing purposes only). - /// - public bool UseLocalFolderForEmails => Host is "LocalFolder"; - public int Port { get; set; } - public string UserName { get; set; } = default!; - public string Password { get; set; } = default!; - public string DefaultFromEmail { get; set; } = default!; - public string DefaultFromName { get; set; } = default!; - public bool HasCredential => (string.IsNullOrEmpty(UserName) is false) && (string.IsNullOrEmpty(Password) is false); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AppControllerBase.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AppControllerBase.cs deleted file mode 100644 index edd86b54ce..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AppControllerBase.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TodoTemplate.Server.Api.Controllers; - -public partial class AppControllerBase : ControllerBase -{ - [AutoInject] protected AppSettings AppSettings = default!; - - [AutoInject] protected AppDbContext DbContext = default!; - - [AutoInject] protected IStringLocalizer Localizer = default!; - - [AutoInject] protected IUserInformationProvider UserInformationProvider = default!; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AttachmentController.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AttachmentController.cs deleted file mode 100644 index 776b065404..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/AttachmentController.cs +++ /dev/null @@ -1,135 +0,0 @@ -using ImageMagick; -using MimeTypes; -using TodoTemplate.Server.Api.Models.Identity; -using SystemFile = System.IO.File; - -namespace TodoTemplate.Server.Api.Controllers; - -[Route("api/[controller]/[action]")] -[ApiController] -public partial class AttachmentController : AppControllerBase -{ - [AutoInject] private UserManager _userManager = default!; - [AutoInject] private IWebHostEnvironment _webHostEnvironment = default!; - - [HttpPost] - [RequestSizeLimit(11 * 1024 * 1024 /*11MB*/)] - public async Task UploadProfileImage(IFormFile? file, CancellationToken cancellationToken) - { - if (file is null) - throw new BadRequestException(); - - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.FindByIdAsync(userId.ToString()); - - if (user is null) - throw new ResourceNotFoundException(); - - var destFileName = $"{userId}_{file.FileName}"; - - var userProfileImagesDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppSettings.UserProfileImagesDir); - - var destFilePath = Path.Combine(userProfileImagesDir, destFileName); - - await using (var requestStream = file.OpenReadStream()) - { - Directory.CreateDirectory(userProfileImagesDir); - - await using var fileStream = SystemFile.Create(destFilePath); - - await requestStream.CopyToAsync(fileStream, cancellationToken); - } - - if (user.ProfileImageName is not null) - { - try - { - var oldFilePath = Path.Combine(userProfileImagesDir, user.ProfileImageName); - - if (SystemFile.Exists(oldFilePath)) - { - SystemFile.Delete(oldFilePath); - } - } - catch - { - // not important - } - } - - destFileName = destFileName.Replace(Path.GetExtension(destFileName), "_256.webp"); - var resizedFilePath = Path.Combine(userProfileImagesDir, destFileName); - - try - { - using MagickImage sourceImage = new(destFilePath); - - MagickGeometry resizedImageSize = new(256, 256); - - sourceImage.Resize(resizedImageSize); - - sourceImage.Write(resizedFilePath, MagickFormat.WebP); - - user.ProfileImageName = destFileName; - - await _userManager.UpdateAsync(user); - } - catch - { - if (SystemFile.Exists(resizedFilePath)) - SystemFile.Delete(resizedFilePath); - - throw; - } - finally - { - SystemFile.Delete(destFilePath); - } - } - - [HttpDelete] - public async Task RemoveProfileImage() - { - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.FindByIdAsync(userId.ToString()); - - if (user?.ProfileImageName is null) - throw new ResourceNotFoundException(); - - var userProfileImageDirPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppSettings.UserProfileImagesDir); - - var filePath = Path.Combine(userProfileImageDirPath, user.ProfileImageName); - - if (SystemFile.Exists(filePath) is false) - throw new ResourceNotFoundException(Localizer[nameof(AppStrings.UserImageCouldNotBeFound)]); - - user.ProfileImageName = null; - - await _userManager.UpdateAsync(user); - - SystemFile.Delete(filePath); - } - - [HttpGet] - public async Task GetProfileImage() - { - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.FindByIdAsync(userId.ToString()); - - if (user?.ProfileImageName is null) - throw new ResourceNotFoundException(); - - var userProfileImageDirPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppSettings.UserProfileImagesDir); - - var filePath = Path.Combine(userProfileImageDirPath, user.ProfileImageName); - - if (SystemFile.Exists(filePath) is false) - return new EmptyResult(); - - return PhysicalFile(Path.Combine(_webHostEnvironment.ContentRootPath, filePath), - MimeTypeMap.GetMimeType(Path.GetExtension(filePath)), enableRangeProcessing: true); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/AuthController.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/AuthController.cs deleted file mode 100644 index 8ad785b447..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/AuthController.cs +++ /dev/null @@ -1,230 +0,0 @@ -//-:cnd:noEmit -using System.Web; -using FluentEmail.Core; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Web; -using TodoTemplate.Server.Api.Models.Emailing; -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Server.Api.Resources; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Server.Api.Controllers.Identity; - -[Microsoft.AspNetCore.Mvc.Route("api/[controller]/[action]")] -[ApiController, AllowAnonymous] -public partial class AuthController : AppControllerBase -{ - [AutoInject] private UserManager _userManager = default!; - - [AutoInject] private IJwtService _jwtService = default!; - - [AutoInject] private SignInManager _signInManager = default!; - - [AutoInject] private IFluentEmail _fluentEmail = default!; - - [AutoInject] private IStringLocalizer _emailLocalizer = default!; - - [AutoInject] private HtmlRenderer _htmlRenderer = default!; - - /// - /// By leveraging summary tags in your controller's actions and DTO properties you can make your codes much easier to maintain. - /// These comments will also be used in swagger docs and ui. - /// - [HttpPost] - public async Task SignUp(SignUpRequestDto signUpRequest, CancellationToken cancellationToken) - { - var existingUser = await _userManager.FindByNameAsync(signUpRequest.Email!); - - var userToAdd = signUpRequest.Map(); - - if (existingUser is not null) - { - if (await _userManager.IsEmailConfirmedAsync(existingUser)) - { - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.DuplicateEmail), existingUser.Email!)); - } - else - { - await _userManager.DeleteAsync(existingUser); - userToAdd.ConfirmationEmailRequestedOn = existingUser.ConfirmationEmailRequestedOn; - } - } - - var result = await _userManager.CreateAsync(userToAdd, signUpRequest.Password!); - - if (result.Succeeded is false) - { - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, signUpRequest.Email!)).ToArray()); - } - - await SendConfirmationEmail(new() { Email = userToAdd.Email }, userToAdd, cancellationToken); - } - - [HttpPost] - public async Task SendConfirmationEmail(SendConfirmationEmailRequestDto sendConfirmationEmailRequest, CancellationToken cancellationToken) - { - var user = await _userManager.FindByEmailAsync(sendConfirmationEmailRequest.Email!); - - if (user is null) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), sendConfirmationEmailRequest.Email!)); - - if (await _userManager.IsEmailConfirmedAsync(user)) - throw new BadRequestException(Localizer[nameof(AppStrings.EmailAlreadyConfirmed)]); - - await SendConfirmationEmail(sendConfirmationEmailRequest, user, cancellationToken); - } - - private async Task SendConfirmationEmail(SendConfirmationEmailRequestDto sendConfirmationEmailRequest, User user, CancellationToken cancellationToken) - { - var resendDelay = (DateTimeOffset.Now - user.ConfirmationEmailRequestedOn) - AppSettings.IdentitySettings.ConfirmationEmailResendDelay; - - if (resendDelay < TimeSpan.Zero) - throw new TooManyRequestsExceptions(Localizer.GetString(nameof(AppStrings.WaitForConfirmationEmailResendDelay), resendDelay.Value.ToString("mm\\:ss"))); - - var token = await _userManager.GenerateEmailConfirmationTokenAsync(user); - - var controller = RouteData.Values["controller"]!.ToString(); - - var confirmationLink = Url.Action(nameof(ConfirmEmail), controller, - new { user.Email, token }, - HttpContext.Request.Scheme); - - var body = await _htmlRenderer.Dispatcher.InvokeAsync(async () => - { - var renderedComponent = await _htmlRenderer.RenderComponentAsync(ParameterView.FromDictionary(new Dictionary() - { - { nameof(EmailConfirmationTemplate.Model), - new EmailConfirmationModel - { - ConfirmationLink = confirmationLink, - HostUri = new Uri($"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.PathBase}") - } - } - })); - - return renderedComponent.ToHtmlString(); - }); - - var result = await _fluentEmail - .To(user.Email, user.DisplayName) - .Subject(_emailLocalizer[EmailStrings.ConfirmationEmailSubject]) - .Body(body, isHtml: true) - .SendAsync(cancellationToken); - - user.ConfirmationEmailRequestedOn = DateTimeOffset.Now; - - await _userManager.UpdateAsync(user); - - if (!result.Successful) - throw new ResourceValidationException(result.ErrorMessages.Select(err => Localizer[err]).ToArray()); - } - - [HttpPost] - public async Task SendResetPasswordEmail(SendResetPasswordEmailRequestDto sendResetPasswordEmailRequest - , CancellationToken cancellationToken) - { - var user = await _userManager.FindByEmailAsync(sendResetPasswordEmailRequest.Email!); - - if (user is null) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), sendResetPasswordEmailRequest.Email!)); - - var resendDelay = (DateTimeOffset.Now - user.ResetPasswordEmailRequestedOn) - AppSettings.IdentitySettings.ResetPasswordEmailResendDelay; - - if (resendDelay < TimeSpan.Zero) - throw new TooManyRequestsExceptions(Localizer.GetString(nameof(AppStrings.WaitForResetPasswordEmailResendDelay), resendDelay.Value.ToString("mm\\:ss"))); - - var token = await _userManager.GeneratePasswordResetTokenAsync(user); - - var resetPasswordLink = $"reset-password?email={HttpUtility.UrlEncode(user.Email)}&token={HttpUtility.UrlEncode(token)}"; - -#if BlazorServer - resetPasswordLink = $"{AppSettings.WebServerAddress}{resetPasswordLink}"; -#else - resetPasswordLink = $"{new Uri($"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.PathBase}")}{resetPasswordLink}"; -#endif - - var body = await _htmlRenderer.Dispatcher.InvokeAsync(async () => - { - var renderedComponent = await _htmlRenderer.RenderComponentAsync(ParameterView.FromDictionary(new Dictionary() - { - { nameof(ResetPasswordTemplate.Model), - new ResetPasswordModel - { - DisplayName = user.DisplayName, - ResetPasswordLink = resetPasswordLink, - HostUri = new Uri($"{HttpContext.Request.Scheme}://{HttpContext.Request.Host}{HttpContext.Request.PathBase}") - } - } - })); - - return renderedComponent.ToHtmlString(); - }); - - var result = await _fluentEmail - .To(user.Email, user.DisplayName) - .Subject(_emailLocalizer[EmailStrings.ResetPasswordEmailSubject]) - .Body(body, isHtml: true) - .SendAsync(cancellationToken); - - user.ResetPasswordEmailRequestedOn = DateTimeOffset.Now; - - await _userManager.UpdateAsync(user); - - if (!result.Successful) - throw new ResourceValidationException(result.ErrorMessages.Select(err => Localizer[err]).ToArray()); - } - - [HttpGet] - public async Task ConfirmEmail(string email, string token) - { - var user = await _userManager.FindByEmailAsync(email); - - if (user is null) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), email)); - - var emailConfirmed = user.EmailConfirmed || (await _userManager.ConfirmEmailAsync(user, token)).Succeeded; - - string url = $"email-confirmation?email={email}&email-confirmed={emailConfirmed}"; - -#if BlazorServer - url = $"{AppSettings.WebServerAddress}{url}"; -#else - url = $"/{url}"; -#endif - - return Redirect(url); - } - - [HttpPost] - public async Task ResetPassword(ResetPasswordRequestDto resetPasswordRequest) - { - var user = await _userManager.FindByEmailAsync(resetPasswordRequest.Email!); - - if (user is null) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), resetPasswordRequest.Email!)); - - var result = await _userManager.ResetPasswordAsync(user, resetPasswordRequest.Token!, resetPasswordRequest.Password!); - - if (!result.Succeeded) - throw new ResourceValidationException(result.Errors.Select(e => Localizer.GetString(e.Code, resetPasswordRequest.Email!)).ToArray()); - } - - [HttpPost] - public async Task SignIn(SignInRequestDto signInRequest) - { - var user = await _userManager.FindByNameAsync(signInRequest.UserName!); - - if (user is null) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), signInRequest.UserName!)); - - var checkPasswordResult = await _signInManager.CheckPasswordSignInAsync(user, signInRequest.Password!, lockoutOnFailure: true); - - if (checkPasswordResult.IsLockedOut) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserLockedOut), (DateTimeOffset.UtcNow - user.LockoutEnd!).Value.ToString("mm\\:ss"))); - - if (!checkPasswordResult.Succeeded) - throw new BadRequestException(Localizer.GetString(nameof(AppStrings.InvalidUsernameOrPassword), signInRequest.UserName!)); - - return await _jwtService.GenerateToken(user); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/UserController.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/UserController.cs deleted file mode 100644 index c71cbb5409..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Controllers/Identity/UserController.cs +++ /dev/null @@ -1,52 +0,0 @@ -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Server.Api.Controllers.Identity; - -[Route("api/[controller]/[action]")] -[ApiController] -public partial class UserController : AppControllerBase -{ - [AutoInject] private UserManager _userManager = default!; - - [HttpGet] - public async Task GetCurrentUser(CancellationToken cancellationToken) - { - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.Users.FirstOrDefaultAsync(user => user.Id == userId, cancellationToken); - - if (user is null) - throw new ResourceNotFoundException(); - - return user.Map(); - } - - [HttpPut] - public async Task Update(EditUserDto userDto, CancellationToken cancellationToken) - { - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.Users.FirstOrDefaultAsync(user => user.Id == userId, cancellationToken); - - if (user is null) - throw new ResourceNotFoundException(); - - userDto.Patch(user); - - await _userManager.UpdateAsync(user); - - return await GetCurrentUser(cancellationToken); - } - - [HttpDelete] - public async Task Delete(CancellationToken cancellationToken) - { - var userId = UserInformationProvider.GetUserId(); - - var user = await _userManager.Users.FirstOrDefaultAsync(user => user.Id == userId, cancellationToken) - ?? throw new ResourceNotFoundException(); - - await _userManager.DeleteAsync(user); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/AppDbContext.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/AppDbContext.cs deleted file mode 100644 index 0e3d1abfed..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/AppDbContext.cs +++ /dev/null @@ -1,72 +0,0 @@ -//+:cnd:noEmit -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Server.Api.Models.Todo; - -namespace TodoTemplate.Server.Api.Data; - -public class AppDbContext : IdentityDbContext -{ - public AppDbContext(DbContextOptions options) - : base(options) - { - } - - public DbSet TodoItems { get; set; } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - builder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly); - - ConfigIdentityTables(builder); - } - - public override int SaveChanges(bool acceptAllChangesOnSuccess) - { - try - { - return base.SaveChanges(acceptAllChangesOnSuccess); - } - catch (DbUpdateConcurrencyException exception) - { - throw new ConflictException(nameof(AppStrings.UpdateConcurrencyException), exception); - } - } - - public override async Task SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = new CancellationToken()) - { - try - { - return await base.SaveChangesAsync(acceptAllChangesOnSuccess, cancellationToken); - } - catch (DbUpdateConcurrencyException exception) - { - throw new ConflictException(nameof(AppStrings.UpdateConcurrencyException), exception); - } - } - - //#if (database == "Sqlite") - protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) - { - if (Database.ProviderName!.EndsWith("Sqlite", StringComparison.InvariantCulture)) - { - configurationBuilder.Properties().HaveConversion(); - configurationBuilder.Properties().HaveConversion(); - } - } - //#endif - - private void ConfigIdentityTables(ModelBuilder builder) - { - //Config Asp Identity table name - builder.Entity().ToTable("Users"); - builder.Entity().ToTable("Roles"); - builder.Entity>().ToTable("UserRoles"); - builder.Entity>().ToTable("RoleClaims"); - builder.Entity>().ToTable("UserLogins"); - builder.Entity>().ToTable("UserTokens"); - builder.Entity>().ToTable("UserClaims"); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs deleted file mode 100644 index 3b50845103..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/RoleConfiguration.cs +++ /dev/null @@ -1,12 +0,0 @@ -using TodoTemplate.Server.Api.Models.Identity; - -namespace TodoTemplate.Server.Api.Data.Configurations.Identity; - -public class RoleConfiguration : IEntityTypeConfiguration -{ - public void Configure(EntityTypeBuilder builder) - { - builder.Property(role => role.Name).HasMaxLength(50); - } -} - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs deleted file mode 100644 index 59673e3a71..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Data/Configurations/Identity/UserConfiguration.cs +++ /dev/null @@ -1,31 +0,0 @@ -using TodoTemplate.Server.Api.Models.Identity; - -namespace TodoTemplate.Server.Api.Data.Configurations.Identity; - -public class UserConfiguration : IEntityTypeConfiguration -{ - public void Configure(EntityTypeBuilder builder) - { - const string userName = "test@bitplatform.dev"; - - var appUser = new User - { - Id = 1, - EmailConfirmed = true, - Gender = Gender.Other, - BirthDate = new DateTime(2023, 1, 1), - FullName = "TodoTemplate test account", - UserName = userName, - Email = userName, - NormalizedUserName = userName.ToUpperInvariant(), - NormalizedEmail = userName.ToUpperInvariant(), - SecurityStamp = Guid.NewGuid().ToString() - }; - - var hasher = new PasswordHasher(); - - appUser.PasswordHash = hasher.HashPassword(appUser, "123456"); - - builder.HasData(appUser); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index 467ae4ae5f..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System.IdentityModel.Tokens.Jwt; -using System.Security.Cryptography; -using System.Security.Cryptography.X509Certificates; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.IdentityModel.Tokens; -using Microsoft.OpenApi.Models; -using Swashbuckle.AspNetCore.SwaggerGen; -using TodoTemplate.Server.Api; -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Server.Api.Services; - -namespace Microsoft.Extensions.DependencyInjection; - -public static class IServiceCollectionExtensions -{ - public static void AddIdentity(this IServiceCollection services, IConfiguration configuration) - { - var appSettings = configuration.GetSection(nameof(AppSettings)).Get()!; - var settings = appSettings.IdentitySettings; - - services.AddIdentity(options => - { - options.User.RequireUniqueEmail = settings.RequireUniqueEmail; - options.SignIn.RequireConfirmedEmail = true; - options.Password.RequireDigit = settings.PasswordRequireDigit; - options.Password.RequireLowercase = settings.PasswordRequireLowercase; - options.Password.RequireUppercase = settings.PasswordRequireUppercase; - options.Password.RequireNonAlphanumeric = settings.PasswordRequireNonAlphanumeric; - options.Password.RequiredLength = settings.PasswordRequiredLength; - }).AddEntityFrameworkStores().AddDefaultTokenProviders(); - } - - public static void AddJwt(this IServiceCollection services, IConfiguration configuration) - { - // https://github.com/dotnet/aspnetcore/issues/4660 - JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); - JwtSecurityTokenHandler.DefaultMapInboundClaims = false; - JwtSecurityTokenHandler.DefaultOutboundClaimTypeMap.Clear(); - - var appSettings = configuration.GetSection(nameof(AppSettings)).Get()!; - var settings = appSettings.JwtSettings; - - services.AddScoped(); - - services.AddAuthentication(options => - { - options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; - options.DefaultScheme = JwtBearerDefaults.AuthenticationScheme; - }).AddJwtBearer(options => - { - var certificatePath = Path.Combine(Directory.GetCurrentDirectory(), "IdentityCertificate.pfx"); - RSA? rsaPrivateKey; - using (X509Certificate2 signingCert = new X509Certificate2(certificatePath, appSettings.JwtSettings.IdentityCertificatePassword, OperatingSystem.IsWindows() ? X509KeyStorageFlags.EphemeralKeySet : X509KeyStorageFlags.DefaultKeySet)) - { - rsaPrivateKey = signingCert.GetRSAPrivateKey(); - } - var validationParameters = new TokenValidationParameters - { - ClockSkew = TimeSpan.Zero, - RequireSignedTokens = true, - - ValidateIssuerSigningKey = true, - IssuerSigningKey = new RsaSecurityKey(rsaPrivateKey), - - RequireExpirationTime = true, - ValidateLifetime = true, - - ValidateAudience = true, - ValidAudience = settings.Audience, - - ValidateIssuer = true, - ValidIssuer = settings.Issuer, - }; - - options.Events = new JwtBearerEvents - { - OnMessageReceived = async context => - { - // The server accepts the access_token from either the authorization header, the cookie, or the request URL query string - - var access_token = context.Request.Cookies["access_token"]; - - if (string.IsNullOrEmpty(access_token)) - { - access_token = context.Request.Query["access_token"]; - } - - context.Token = access_token; - } - }; - - options.SaveToken = true; - options.TokenValidationParameters = validationParameters; - }); - - services.AddAuthorization(); - } - - public static void AddSwaggerGen(this IServiceCollection services) - { - services.AddSwaggerGen(options => - { - options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "TodoTemplate.Server.Api.xml")); - options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "TodoTemplate.Shared.xml")); - - options.OperationFilter(); - - options.AddSecurityDefinition("bearerAuth", new OpenApiSecurityScheme - { - Name = "Authorization", - Type = SecuritySchemeType.Http, - Scheme = "bearer", - BearerFormat = "JWT", - In = ParameterLocation.Header, - Description = "JWT Authorization header using the Bearer scheme." - }); - - options.AddSecurityRequirement(new OpenApiSecurityRequirement - { - { - new OpenApiSecurityScheme - { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "bearerAuth" - } - }, - Array.Empty() - } - }); - }); - } - - public static void AddHealthChecks(this IServiceCollection services, IWebHostEnvironment env, IConfiguration configuration) - { - var appSettings = configuration.GetSection(nameof(AppSettings)).Get()!; - - var healthCheckSettings = appSettings.HealthCheckSettings; - - if (healthCheckSettings.EnableHealthChecks is false) - return; - - services.AddHealthChecksUI(setupSettings: setup => - { - setup.AddHealthCheckEndpoint("TodoHealthChecks", env.IsDevelopment() ? "https://localhost:5041/healthz" : "/healthz"); - }).AddInMemoryStorage(); - - var healthChecksBuilder = services.AddHealthChecks() - .AddProcessAllocatedMemoryHealthCheck(maximumMegabytesAllocated: 6 * 1024) - .AddDiskStorageHealthCheck(opt => - opt.AddDrive(Path.GetPathRoot(Directory.GetCurrentDirectory())!, minimumFreeMegabytes: 5 * 1024)) - .AddDbContextCheck(); - - var emailSettings = appSettings.EmailSettings; - - if (emailSettings.UseLocalFolderForEmails is false) - { - healthChecksBuilder - .AddSmtpHealthCheck(options => - { - options.Host = emailSettings.Host; - options.Port = emailSettings.Port; - - if (emailSettings.HasCredential) - { - options.LoginWith(emailSettings.UserName, emailSettings.Password); - } - }); - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/ODataOperationFilter.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/ODataOperationFilter.cs deleted file mode 100644 index 6057cb4a80..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Extensions/ODataOperationFilter.cs +++ /dev/null @@ -1,111 +0,0 @@ -using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.OpenApi.Models; - -namespace Swashbuckle.AspNetCore.SwaggerGen; - -/// -/// https://docs.microsoft.com/en-us/odata/concepts/queryoptions-overview -/// -public class ODataOperationFilter : IOperationFilter -{ - public void Apply(OpenApiOperation operation, OperationFilterContext context) - { - if (operation.Parameters == null) operation.Parameters = new List(); - - var descriptor = (ControllerActionDescriptor)context.ApiDescription.ActionDescriptor; - - var odataQueryOptionsParameter = descriptor.Parameters.SingleOrDefault(p => typeof(ODataQueryOptions).IsAssignableFrom(p.ParameterType)); - - if (descriptor != null && descriptor.FilterDescriptors.Any(filter => filter.Filter is EnableQueryAttribute) || odataQueryOptionsParameter is not null) - { - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$select", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "string", - }, - Description = "Returns only the selected properties. (ex. FirstName, LastName)", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$expand", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "string", - }, - Description = "Include only the selected objects. (ex. Childrens, Locations)", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$filter", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "string", - }, - Description = "Filter the response with OData filter queries.", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$search", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "string", - }, - Description = "Filter the response with OData search queries.", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$top", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "int", - }, - Description = "Number of objects to return. (ex. 25)", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$skip", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "int", - }, - Description = "Number of objects to skip in the current order (ex. 50)", - Required = false - }); - - operation.Parameters.Add(new OpenApiParameter() - { - Name = "$orderby", - In = ParameterLocation.Query, - Schema = new OpenApiSchema - { - Type = "string", - }, - Description = "Define the order by one or more fields (ex. LastModified)", - Required = false - }); - } - - if (odataQueryOptionsParameter is not null) - { - operation.Parameters.Remove(operation.Parameters.Single(p => p.Name == odataQueryOptionsParameter.Name)); - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/IdentityCertificate.pfx b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/IdentityCertificate.pfx deleted file mode 100644 index 7ad2e2842b..0000000000 Binary files a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/IdentityCertificate.pfx and /dev/null differ diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/IdentityMapper.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/IdentityMapper.cs deleted file mode 100644 index db95cd463b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/IdentityMapper.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Riok.Mapperly.Abstractions; -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Server.Api.Mappers; - -/// -/// More info at Server/Api/Mappers/README.md -/// -[Mapper(UseDeepCloning = true)] -public static partial class IdentityMapper -{ - public static partial UserDto Map(this User source); - public static partial void Patch(this EditUserDto source, User destination); - - private static partial User MapInternal(this SignUpRequestDto source); - public static User Map(this SignUpRequestDto source) - { - var destination = source.MapInternal(); - - destination.UserName = source.Email; // after map sample. - - return destination; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/Readme.md b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/Readme.md deleted file mode 100644 index 03523e9752..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Mappers/Readme.md +++ /dev/null @@ -1,17 +0,0 @@ -When you have an IQueryable of an Entity or Model classes from EntityFrameworkCore, -you ultimately need to convert it into an IQueryable of DTO classes and return it to the client. -The client can also implement pagination during the API call by sending values for $top, $skip and sort by $orderby in query string. -Ultimately, the query is executed by aspnetcore and the data gets streamed from the database to the client, which is the most optimal case. -For this, you need to write a `Project` for each Entity you intend to return a query of DTO class from. - -You also write a `Map` for when a DTO is sent to the server for create or update api, -so you can convert it to an Entity and save it in the database using ef core. -You also need a Map method to convert DTO to Entity and vice versa. - -You also need a `Patch` method for the update scenario, to perform update operation, first get the Entity from the database with its Id, -then patch the latest changes from the DTO sent by the client, and finally save it. - -These methods (`Project`, `Map` and `Patch`) are gets called in controllers. - -For more information and to learn about customizing the mapping process, visit the website below: -https://mapperly.riok.app/docs/intro/ \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.Designer.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.Designer.cs deleted file mode 100644 index 168c657a06..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.Designer.cs +++ /dev/null @@ -1,359 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoTemplate.Server.Api.Data; - -#nullable disable - -namespace TodoTemplate.Server.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - [Migration("20230824105001_InitialMigration")] - partial class InitialMigration - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Identity.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Identity.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("BirthDate") - .HasColumnType("datetimeoffset"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("ConfirmationEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("FullName") - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfileImageName") - .HasColumnType("nvarchar(max)"); - - b.Property("ResetPasswordEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "9d0d2a72-f5c8-4726-bcea-9a4417878873", - Email = "test@bitplatform.dev", - EmailConfirmed = true, - FullName = "TodoTemplate test account", - Gender = 2, - LockoutEnabled = false, - NormalizedEmail = "TEST@BITPLATFORM.DEV", - NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEDhxksdfk+yXwH0o1xZGZCnb5+gnK5XQRYQwx3tOQUcWOWy7a2w5FuI3ahddQiUw0w==", - PhoneNumberConfirmed = false, - SecurityStamp = "e5ec721d-b782-4259-81c8-b6101fc6768f", - TwoFactorEnabled = false, - UserName = "test@bitplatform.dev" - }); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Todo.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Date") - .HasColumnType("datetimeoffset"); - - b.Property("IsDone") - .HasColumnType("bit"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Todo.TodoItem", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.cs deleted file mode 100644 index 919941e9d8..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/20230824105001_InitialMigration.cs +++ /dev/null @@ -1,264 +0,0 @@ -#nullable disable - -namespace TodoTemplate.Server.Api.Migrations -{ - /// - public partial class InitialMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Roles", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Roles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Users", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - FullName = table.Column(type: "nvarchar(max)", nullable: true), - Gender = table.Column(type: "int", nullable: true), - BirthDate = table.Column(type: "datetimeoffset", nullable: true), - ProfileImageName = table.Column(type: "nvarchar(max)", nullable: true), - ConfirmationEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - ResetPasswordEmailRequestedOn = table.Column(type: "datetimeoffset", nullable: true), - UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - EmailConfirmed = table.Column(type: "bit", nullable: false), - PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), - SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), - PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), - TwoFactorEnabled = table.Column(type: "bit", nullable: false), - LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), - LockoutEnabled = table.Column(type: "bit", nullable: false), - AccessFailedCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Users", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "RoleClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - RoleId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_RoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_RoleClaims_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "TodoItems", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Title = table.Column(type: "nvarchar(max)", nullable: true), - Date = table.Column(type: "datetimeoffset", nullable: false), - IsDone = table.Column(type: "bit", nullable: false), - UserId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_TodoItems", x => x.Id); - table.ForeignKey( - name: "FK_TodoItems_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserClaims", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - UserId = table.Column(type: "int", nullable: false), - ClaimType = table.Column(type: "nvarchar(max)", nullable: true), - ClaimValue = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserClaims", x => x.Id); - table.ForeignKey( - name: "FK_UserClaims_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserLogins", - columns: table => new - { - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), - ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), - UserId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_UserLogins_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserRoles", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - RoleId = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_UserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_UserRoles_Roles_RoleId", - column: x => x.RoleId, - principalTable: "Roles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_UserRoles_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "UserTokens", - columns: table => new - { - UserId = table.Column(type: "int", nullable: false), - LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), - Name = table.Column(type: "nvarchar(450)", nullable: false), - Value = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_UserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_UserTokens_Users_UserId", - column: x => x.UserId, - principalTable: "Users", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.InsertData( - table: "Users", - columns: new[] { "Id", "AccessFailedCount", "BirthDate", "ConcurrencyStamp", "ConfirmationEmailRequestedOn", "Email", "EmailConfirmed", "FullName", "Gender", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "ProfileImageName", "ResetPasswordEmailRequestedOn", "SecurityStamp", "TwoFactorEnabled", "UserName" }, - values: new object[] { 1, 0, new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), "9d0d2a72-f5c8-4726-bcea-9a4417878873", null, "test@bitplatform.dev", true, "TodoTemplate test account", 2, false, null, "TEST@BITPLATFORM.DEV", "TEST@BITPLATFORM.DEV", "AQAAAAIAAYagAAAAEDhxksdfk+yXwH0o1xZGZCnb5+gnK5XQRYQwx3tOQUcWOWy7a2w5FuI3ahddQiUw0w==", null, false, null, null, "e5ec721d-b782-4259-81c8-b6101fc6768f", false, "test@bitplatform.dev" }); - - migrationBuilder.CreateIndex( - name: "IX_RoleClaims_RoleId", - table: "RoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "Roles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_TodoItems_UserId", - table: "TodoItems", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserClaims_UserId", - table: "UserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserLogins_UserId", - table: "UserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_UserRoles_RoleId", - table: "UserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "Users", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "Users", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "RoleClaims"); - - migrationBuilder.DropTable( - name: "TodoItems"); - - migrationBuilder.DropTable( - name: "UserClaims"); - - migrationBuilder.DropTable( - name: "UserLogins"); - - migrationBuilder.DropTable( - name: "UserRoles"); - - migrationBuilder.DropTable( - name: "UserTokens"); - - migrationBuilder.DropTable( - name: "Roles"); - - migrationBuilder.DropTable( - name: "Users"); - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs deleted file mode 100644 index febdef9902..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Migrations/AppDbContextModelSnapshot.cs +++ /dev/null @@ -1,356 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoTemplate.Server.Api.Data; - -#nullable disable - -namespace TodoTemplate.Server.Api.Migrations -{ - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("RoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("UserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("UserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("RoleId") - .HasColumnType("int"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("UserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("int"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("UserTokens", (string)null); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Identity.Role", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("Roles", (string)null); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Identity.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("BirthDate") - .HasColumnType("datetimeoffset"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("ConfirmationEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("EmailConfirmed") - .HasColumnType("bit"); - - b.Property("FullName") - .HasColumnType("nvarchar(max)"); - - b.Property("Gender") - .HasColumnType("int"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property("ProfileImageName") - .HasColumnType("nvarchar(max)"); - - b.Property("ResetPasswordEmailRequestedOn") - .HasColumnType("datetimeoffset"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("Users", (string)null); - - b.HasData( - new - { - Id = 1, - AccessFailedCount = 0, - BirthDate = new DateTimeOffset(new DateTime(2023, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 1, 0, 0, 0)), - ConcurrencyStamp = "9d0d2a72-f5c8-4726-bcea-9a4417878873", - Email = "test@bitplatform.dev", - EmailConfirmed = true, - FullName = "TodoTemplate test account", - Gender = 2, - LockoutEnabled = false, - NormalizedEmail = "TEST@BITPLATFORM.DEV", - NormalizedUserName = "TEST@BITPLATFORM.DEV", - PasswordHash = "AQAAAAIAAYagAAAAEDhxksdfk+yXwH0o1xZGZCnb5+gnK5XQRYQwx3tOQUcWOWy7a2w5FuI3ahddQiUw0w==", - PhoneNumberConfirmed = false, - SecurityStamp = "e5ec721d-b782-4259-81c8-b6101fc6768f", - TwoFactorEnabled = false, - UserName = "test@bitplatform.dev" - }); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Todo.TodoItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Date") - .HasColumnType("datetimeoffset"); - - b.Property("IsDone") - .HasColumnType("bit"); - - b.Property("Title") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("TodoItems"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.Role", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("TodoTemplate.Server.Api.Models.Todo.TodoItem", b => - { - b.HasOne("TodoTemplate.Server.Api.Models.Identity.User", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs deleted file mode 100644 index 0a35e39fba..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/EmailConfirmationModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace TodoTemplate.Server.Api.Models.Emailing; - -public class EmailConfirmationModel -{ - public string? ConfirmationLink { get; set; } - - public Uri? HostUri { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs deleted file mode 100644 index b00a4c1192..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Emailing/ResetPasswordModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Server.Api.Models.Emailing; - -public class ResetPasswordModel -{ - public string? DisplayName { get; set; } - - public string? ResetPasswordLink { get; set; } - - public Uri? HostUri { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/Role.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/Role.cs deleted file mode 100644 index 3e049665ae..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/Role.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace TodoTemplate.Server.Api.Models.Identity; - -public class Role : IdentityRole -{ -} - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/User.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/User.cs deleted file mode 100644 index 0a5510dc04..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Models/Identity/User.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TodoTemplate.Server.Api.Models.Identity; - -public class User : IdentityUser -{ - [PersonalData] - public string? FullName { get; set; } - - [PersonalData] - public Gender? Gender { get; set; } - - [PersonalData] - public DateTimeOffset? BirthDate { get; set; } - - [PersonalData] - public string? ProfileImageName { get; set; } - - public DateTimeOffset? ConfirmationEmailRequestedOn { get; set; } - - public DateTimeOffset? ResetPasswordEmailRequestedOn { get; set; } - - public string? DisplayName => FullName ?? NormalizedUserName; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Program.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Program.cs deleted file mode 100644 index 5cb3c8ea12..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -//-:cnd:noEmit -var builder = WebApplication.CreateBuilder(args); - -#if BlazorWebAssembly -builder.Configuration.AddClientConfigurations(); -#endif - -#if DEBUG -if (OperatingSystem.IsWindows()) -{ - // The following line (using the * in the URL), allows the emulators and mobile devices to access the app using the host IP address. - builder.WebHost.UseUrls("https://localhost:5041", "http://localhost:5040", "https://*:5041", "http://*:5040"); -} -else -{ - builder.WebHost.UseUrls("https://localhost:5041", "http://localhost:5040"); -} -#endif - -TodoTemplate.Server.Api.Startup.Services.Add(builder.Services, builder.Environment, builder.Configuration); - -var app = builder.Build(); - -TodoTemplate.Server.Api.Startup.Middlewares.Use(app, builder.Environment, builder.Configuration); - -app.Run(); diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Properties/launchSettings.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Properties/launchSettings.json deleted file mode 100644 index d4276f9602..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Properties/launchSettings.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "profiles": { - "TodoTemplate.Server.Api-Swagger": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "http://localhost:5040;https://localhost:5041", - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - // This configuration allows debugging the Blazor Web Assembly - "TodoTemplate.Server.Api-BlazorWebAssembly": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5040;https://localhost:5041", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.Designer.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.Designer.cs deleted file mode 100644 index a590cdc590..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.Designer.cs +++ /dev/null @@ -1,163 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace TodoTemplate.Server.Api.Resources { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class EmailStrings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal EmailStrings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TodoTemplate.Server.Api.Resources.EmailStrings", typeof(EmailStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - public static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to TodoTemplate. - /// - public static string AppName { - get { - return ResourceManager.GetString("AppName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to TodoTemplate - Confirm your email address. - /// - public static string ConfirmationEmailSubject { - get { - return ResourceManager.GetString("ConfirmationEmailSubject", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Confirm email. - /// - public static string ConfirmEmail { - get { - return ResourceManager.GetString("ConfirmEmail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Or, copy the link below to your browser address bar:. - /// - public static string CopyLink { - get { - return ResourceManager.GetString("CopyLink", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You're receiving this message because recently you have signed up for a TodoTemplate account. - /// Confirm your email address by clicking the button below.. - /// - public static string EmailConfirmationMessageBody { - get { - return ResourceManager.GetString("EmailConfirmationMessageBody", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to TodoTemplate - Reset your password. - /// - public static string ResetPasswordEmailSubject { - get { - return ResourceManager.GetString("ResetPasswordEmailSubject", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hello {0}. - /// - public static string ResetPasswordHello { - get { - return ResourceManager.GetString("ResetPasswordHello", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Someone has requested a link to change your password.. - /// - public static string ResetPasswordMessage { - get { - return ResourceManager.GetString("ResetPasswordMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your password won't change until you access the link above and create a new one.. - /// - public static string ResetPasswordNote { - get { - return ResourceManager.GetString("ResetPasswordNote", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset your password. - /// - public static string ResetYourPassword { - get { - return ResourceManager.GetString("ResetYourPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Welcome to TodoTemplate!. - /// - public static string WelcomeToApp { - get { - return ResourceManager.GetString("WelcomeToApp", resourceCulture); - } - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.fr.resx b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.fr.resx deleted file mode 100644 index 8688908f98..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.fr.resx +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TodoTemplate - Confirmez votre adresse e-mail - - - TodoTemplate - Réinitialiser votre mot de passe - - - Confirmez votre email - - - Vous recevez ce message car vous vous êtes récemment inscrit à un compte TodoTemplate. - Confirmez votre adresse e-mail en cliquant sur le bouton ci-dessous. - - - Bienvenue sur TodoTemplate ! - - - TodoTemplate - - - Ou copiez le lien ci-dessous dans la barre d'adresse de votre navigateur : - - - Bonjour {0} - - - Quelqu'un a demandé un lien pour changer votre mot de passe. - - - Votre mot de passe ne changera pas tant que vous n'aurez pas accédé au lien ci-dessus et créé un nouveau. - - - réinitialisez votre mot de passe - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.resx b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.resx deleted file mode 100644 index fc95c94cdf..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Resources/EmailStrings.resx +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TodoTemplate - Confirm your email address - - - Confirm email - - - Or, copy the link below to your browser address bar: - - - You're receiving this message because recently you have signed up for a TodoTemplate account. - Confirm your email address by clicking the button below. - - - TodoTemplate - Reset your password - - - Hello {0} - - - Someone has requested a link to change your password. - - - Your password won't change until you access the link above and create a new one. - - - Reset your password - - - TodoTemplate - - - Welcome to TodoTemplate! - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/ApiExceptionHandler.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/ApiExceptionHandler.cs deleted file mode 100644 index c6feb4a858..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/ApiExceptionHandler.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Net; -using System.Reflection; -using Microsoft.AspNetCore.Diagnostics; - -namespace TodoTemplate.Server.Api.Services; - -public partial class ApiExceptionHandler : IExceptionHandler -{ - [AutoInject] private IWebHostEnvironment _webHostEnvironment = default!; - - public async ValueTask TryHandleAsync(HttpContext httpContext, Exception e, CancellationToken cancellationToken) - { - // Using the Request-Id header, one can find the log for server-related exceptions - httpContext.Response.Headers.Append("Request-ID", httpContext.TraceIdentifier); - - var exception = UnWrapException(e); - var localizer = httpContext.RequestServices.GetRequiredService>(); - var knownException = exception as KnownException; - - // The details of all of the exceptions are returned only in dev mode. in any other modes like production, only the details of the known exceptions are returned. - var key = knownException?.Key ?? nameof(UnknownException); - var message = knownException?.Message ?? (_webHostEnvironment.IsDevelopment() ? exception.Message : localizer[nameof(UnknownException)]); - - var statusCode = (int)(exception is RestException restExp ? restExp.StatusCode : HttpStatusCode.InternalServerError); - - if (exception is KnownException && message == key) - { - message = localizer[message]; - } - - var restExceptionPayload = new RestErrorInfo - { - Key = key, - Message = message, - ExceptionType = knownException?.GetType().FullName ?? typeof(UnknownException).FullName - }; - - if (exception is ResourceValidationException validationException) - { - restExceptionPayload.Payload = validationException.Payload; - } - - httpContext.Response.StatusCode = statusCode; - - await httpContext.Response.WriteAsJsonAsync(restExceptionPayload, AppJsonContext.Default.RestErrorInfo, cancellationToken: cancellationToken); - - return true; - } - - private Exception UnWrapException(Exception exp) - { - return exp is TargetInvocationException && exp.InnerException is not null - ? exp.InnerException - : exp; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IJwtService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IJwtService.cs deleted file mode 100644 index 0bd9d96a8e..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IJwtService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Server.Api.Services.Contracts; - -public interface IJwtService -{ - Task GenerateToken(User user); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs deleted file mode 100644 index e8641f4d00..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/Contracts/IUserInformationProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace TodoTemplate.Server.Api.Services.Contracts; - -public interface IUserInformationProvider -{ - bool IsAuthenticated(); - - IEnumerable GetClaims(); - - ClaimsIdentity GetClaimsIdentity(); - - int GetUserId(); - - string GetUserName(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/JwtService.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/JwtService.cs deleted file mode 100644 index fbc3f484de..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/JwtService.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.IdentityModel.Tokens.Jwt; -using System.Security.Cryptography; -using System.Security.Cryptography.X509Certificates; -using Microsoft.IdentityModel.Tokens; -using TodoTemplate.Server.Api.Models.Identity; -using TodoTemplate.Shared.Dtos.Identity; - -namespace TodoTemplate.Server.Api.Services; - -public partial class JwtService : IJwtService -{ - [AutoInject] private SignInManager _signInManager = default!; - - [AutoInject] private AppSettings _appSettings = default!; - - public async Task GenerateToken(User user) - { - var certificatePath = Path.Combine(Directory.GetCurrentDirectory(), "IdentityCertificate.pfx"); - RSA? rsaPrivateKey; - using (X509Certificate2 signingCert = new X509Certificate2(certificatePath, _appSettings.JwtSettings.IdentityCertificatePassword, OperatingSystem.IsWindows() ? X509KeyStorageFlags.EphemeralKeySet : X509KeyStorageFlags.DefaultKeySet)) - { - rsaPrivateKey = signingCert.GetRSAPrivateKey(); - } - - var signingCredentials = new SigningCredentials(new RsaSecurityKey(rsaPrivateKey), SecurityAlgorithms.RsaSha512); - - var claims = (await _signInManager.ClaimsFactory.CreateAsync(user)).Claims; - - var jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); - - var securityToken = jwtSecurityTokenHandler - .CreateJwtSecurityToken(new SecurityTokenDescriptor - { - Issuer = _appSettings.JwtSettings.Issuer, - Audience = _appSettings.JwtSettings.Audience, - IssuedAt = DateTime.UtcNow, - NotBefore = DateTime.UtcNow.AddMinutes(_appSettings.JwtSettings.NotBeforeMinutes), - Expires = DateTime.UtcNow.AddMinutes(_appSettings.JwtSettings.ExpirationMinutes), - SigningCredentials = signingCredentials, - Subject = new ClaimsIdentity(claims) - }); - - return new SignInResponseDto - { - AccessToken = jwtSecurityTokenHandler.WriteToken(securityToken), - ExpiresIn = (long)TimeSpan.FromMinutes(_appSettings.JwtSettings.ExpirationMinutes).TotalSeconds - }; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/UserInformationProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/UserInformationProvider.cs deleted file mode 100644 index 70c696f3ec..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Services/UserInformationProvider.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace TodoTemplate.Server.Api.Services; - -public partial class UserInformationProvider : IUserInformationProvider -{ - [AutoInject] - public IHttpContextAccessor _httpContextAccessor = default!; - - public IEnumerable GetClaims() - { - if (IsAuthenticated() is false) - { - throw new InvalidOperationException(); - } - - return GetClaimsIdentity().Claims; - } - - public ClaimsIdentity GetClaimsIdentity() - { - if (IsAuthenticated() is false) - { - throw new InvalidOperationException(); - } - - return (ClaimsIdentity)_httpContextAccessor.HttpContext!.User.Identity!; - } - - public int GetUserId() - { - if (IsAuthenticated() is false) - { - throw new InvalidOperationException(); - } - - return _httpContextAccessor.HttpContext!.User.GetUserId(); - } - - public string GetUserName() - { - if (IsAuthenticated() is false) - { - throw new InvalidOperationException(); - } - - return _httpContextAccessor.HttpContext!.User.GetUserName(); - } - - public bool IsAuthenticated() - { - if (_httpContextAccessor.HttpContext is null) - { - throw new InvalidOperationException(); - } - - return _httpContextAccessor.HttpContext.User?.Identity?.IsAuthenticated is true; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Services.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Services.cs deleted file mode 100644 index 582dd80189..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/Startup/Services.cs +++ /dev/null @@ -1,167 +0,0 @@ -//-:cnd:noEmit -using System.IO.Compression; -using System.Net; -using System.Net.Mail; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.HttpOverrides; -using Microsoft.AspNetCore.OData; -using Microsoft.AspNetCore.ResponseCompression; -using TodoTemplate.Server.Api.Services; -#if BlazorWebAssembly -using System.Net.Http; -using Microsoft.JSInterop; -using TodoTemplate.Client.Web.Services; -using TodoTemplate.Client.Core.Services; -using TodoTemplate.Client.Core.Services.HttpMessageHandlers; -using Microsoft.AspNetCore.Components; -#endif - -namespace TodoTemplate.Server.Api.Startup; - -public static class Services -{ - public static void Add(IServiceCollection services, IWebHostEnvironment env, IConfiguration configuration) - { - // Services being registered here can get injected into controllers and services in Api project. - - var appSettings = configuration.GetSection(nameof(AppSettings)).Get()!; - - services.AddSharedServices(); - - services.AddScoped(); - services.AddExceptionHandler(); - -#if BlazorWebAssembly - services.AddTransient(); - services.AddClientSharedServices(); - services.AddClientWebServices(); - - // In the Pre-Rendering mode, the configured HttpClient will use the access_token provided by the cookie in the request, so the pre-rendered content would be fitting for the current user. - services.AddHttpClient("WebAssemblyPreRenderingHttpClient") - .AddHttpMessageHandler(sp => new LocalizationDelegatingHandler()) - .AddHttpMessageHandler(sp => new AuthDelegatingHandler(sp.GetRequiredService(), sp.GetRequiredService())) - .AddHttpMessageHandler(sp => new RetryDelegatingHandler()) - .AddHttpMessageHandler(sp => new ExceptionDelegatingHandler()) - .ConfigurePrimaryHttpMessageHandler() - .ConfigureHttpClient((sp, httpClient) => - { - Uri.TryCreate(configuration.GetApiServerAddress(), UriKind.RelativeOrAbsolute, out var apiServerAddress); - if (apiServerAddress!.IsAbsoluteUri is false) - { - apiServerAddress = new Uri($"{sp.GetRequiredService().HttpContext!.Request.GetBaseUrl()}{apiServerAddress}"); - } - httpClient.BaseAddress = apiServerAddress; - }); - services.AddScoped(); - - services.AddScoped(sp => - { - IHttpClientFactory httpClientFactory = sp.GetRequiredService(); - return httpClientFactory.CreateClient("WebAssemblyPreRenderingHttpClient"); - // this is for pre rendering of blazor client/wasm - // for other usages of http client, for example calling 3rd party apis, either use services.AddHttpClient("NamedHttpClient") or services.AddHttpClient(); - }); - services.AddRazorPages(); -#endif - - //+:cnd:noEmit - - services.AddCors(); - - services - .AddControllers() - .AddOData(options => options.EnableQueryFeatures()) - .AddDataAnnotationsLocalization(options => options.DataAnnotationLocalizerProvider = StringLocalizerProvider.ProvideLocalizer) - .ConfigureApiBehaviorOptions(options => - { - options.InvalidModelStateResponseFactory = context => - { - throw new ResourceValidationException(context.ModelState.Select(ms => (ms.Key, ms.Value!.Errors.Select(e => new LocalizedString(e.ErrorMessage, e.ErrorMessage)).ToArray())).ToArray()); - }; - }); - - services.Configure(options => - { - options.ForwardedHeaders = ForwardedHeaders.All; - options.ForwardedHostHeaderName = "X-Host"; - }); - - services.AddResponseCaching(); - - services.AddHttpContextAccessor(); - - services.AddResponseCompression(opts => - { - opts.EnableForHttps = true; - opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(["application/octet-stream"]).ToArray(); - opts.Providers.Add(); - opts.Providers.Add(); - }) - .Configure(opt => opt.Level = CompressionLevel.Fastest) - .Configure(opt => opt.Level = CompressionLevel.Fastest); - - services.AddDbContext(options => - { - //#if (database == "SqlServer") - options.UseSqlServer(configuration.GetConnectionString("SqlServerConnectionString"), dbOptions => - { - dbOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); - }); - //#endif - //#if (IsInsideProjectTemplate == true) - return; - //#endif - //#if (database == "Sqlite") - options.UseSqlite(configuration.GetConnectionString("SqliteConnectionString"), dbOptions => - { - dbOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); - }); - //#endif - }); - - services.Configure(configuration.GetSection(nameof(AppSettings))); - - services.AddScoped(sp => sp.GetRequiredService>().Value); - - services.AddEndpointsApiExplorer(); - - services.AddSwaggerGen(); - - services.AddIdentity(configuration); - - services.AddJwt(configuration); - - services.AddHealthChecks(env, configuration); - - services.AddScoped(); - - var fluentEmailServiceBuilder = services.AddFluentEmail(appSettings.EmailSettings.DefaultFromEmail, appSettings.EmailSettings.DefaultFromName); - - if (appSettings.EmailSettings.UseLocalFolderForEmails) - { - var sentEmailsFolderPath = Path.Combine(AppContext.BaseDirectory, "sent-emails"); - - Directory.CreateDirectory(sentEmailsFolderPath); - - fluentEmailServiceBuilder.AddSmtpSender(() => new SmtpClient - { - DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory, - PickupDirectoryLocation = sentEmailsFolderPath - }); - } - else - { - if (appSettings.EmailSettings.HasCredential) - { - fluentEmailServiceBuilder.AddSmtpSender(() => new(appSettings.EmailSettings.Host, appSettings.EmailSettings.Port) - { - Credentials = new NetworkCredential(appSettings.EmailSettings.UserName, appSettings.EmailSettings.Password) - }); - } - else - { - fluentEmailServiceBuilder.AddSmtpSender(appSettings.EmailSettings.Host, appSettings.EmailSettings.Port); - } - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.Development.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.Development.json deleted file mode 100644 index ceda6d4bd0..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.Development.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "AppSettings": { - "WebServerAddress": "https://localhost:4041/" - } -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.json b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.json deleted file mode 100644 index d41e5da3d8..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/appsettings.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "ConnectionStrings": { - //#if (database == "SqlServer") - "SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=TodoTemplateDb;Integrated Security=true;Application Name=TodoTemplate;TrustServerCertificate=True;", - //#elif (database == "Sqlite") - "SqliteConnectionString": "Data Source=TodoTemplateDb.db;" - //#endif - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AppSettings": { - "JwtSettings": { - "IdentityCertificatePassword": "P@ssw0rdP@ssw0rd", - "Issuer": "TodoTemplate", - "Audience": "TodoTemplate", - "NotBeforeMinutes": "0", - "ExpirationMinutes": "1440" - }, - "IdentitySettings": { - "PasswordRequireDigit": "false", - "PasswordRequiredLength": "6", - "PasswordRequireNonAlphanumeric": "false", - "PasswordRequireUppercase": "false", - "PasswordRequireLowercase": "false", - "RequireUniqueEmail": "true", - "ConfirmationEmailResendDelay": "0.00:02:00", //Format: D.HH:mm:nn - "ResetPasswordEmailResendDelay": "0.00:02:00" //Format: D.HH:mm:nn - }, - "EmailSettings": { - "Host": "LocalFolder", // Local folder means storing emails as .eml file in bin/Debug/net8.0/sent-emails folder (Recommended for testing purposes only) instead of sending them using smtp server. - "Port": "25", - "DefaultFromEmail": "info@TodoTemplate.com", - "DefaultFromName": "TodoTemplate", - "UserName": null, - "Password": null - }, - "HealthCheckSettings": { - "EnableHealthChecks": false - }, - "UserProfileImagesDir": "Attachments/Profiles/" - }, - "AllowedHosts": "*" -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/images/icon.png b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/images/icon.png deleted file mode 100644 index cc23d80db0..0000000000 Binary files a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/images/icon.png and /dev/null differ diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/swagger/swagger-utils.js b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/swagger/swagger-utils.js deleted file mode 100644 index 358dfc0fc9..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Server/Api/wwwroot/swagger/swagger-utils.js +++ /dev/null @@ -1,232 +0,0 @@ -/* -based on: https://www.codedesigntips.com/2021/06/28/swagger-ui-with-login-form-and-role-based-api-visibility/ -*/ -(() => { - window.addEventListener('load', () => setTimeout(initLoginForm, 0), false); -})(); - -const ACCESS_TOKEN_COOKIE_NAME = 'access_token'; -let accessTokenExpiresIn = 0; - -const initLoginForm = () => { - const swagger = window.ui; - if (!swagger) { - console.error('Swagger wasn\'t found'); - return; - } - - overrideSwaggerAuthorizeEvent(swagger); - overrideSwaggerLogoutEvent(swagger); - tryAuthorizeWithLocalData(swagger); - showLoginUI(swagger); -} - -const tryAuthorizeWithLocalData = (swagger) => { - if (isAuthorized(swagger)) - return; - - const token = getCookie(ACCESS_TOKEN_COOKIE_NAME); - if (!token) - return; - - const authorizationObject = getAuthorizationRequestObject(token); - swagger.authActions.authorize(authorizationObject); -} - -const overrideSwaggerAuthorizeEvent = (swagger) => { - const originalAuthorize = swagger.authActions.authorize; - swagger.authActions.authorize = async (args) => { - const result = await originalAuthorize(args); - - if (!getCookie(ACCESS_TOKEN_COOKIE_NAME)) { - setCookie(ACCESS_TOKEN_COOKIE_NAME, result.payload.bearerAuth.value, accessTokenExpiresIn); - } - - reloadPage(swagger); - return result; - }; -} - -const overrideSwaggerLogoutEvent = (swagger) => { - const originalLogout = swagger.authActions.logout; - swagger.authActions.logout = async (args) => { - const result = await originalLogout(args); - removeCookie(ACCESS_TOKEN_COOKIE_NAME); - reloadPage(swagger); - return result; - }; -} - -const showLoginUI = (swagger) => { - new MutationObserver(function (mutations, self) { - const descriptionDiv = isLoginFormMustShow(swagger); - if (descriptionDiv) - createLoginUI(swagger, descriptionDiv); - }).observe(document, { childList: true, subtree: true }); -} - -const isLoginFormMustShow = (swagger) => { - const rootDiv = document.querySelector("#swagger-ui > section > div.swagger-ui > div:nth-child(2)"); - if (rootDiv == null) - return false; - - const informationContainerDiv = rootDiv.querySelector("div.information-container.wrapper"); - if (informationContainerDiv == null) - return false; - - const descriptionDiv = informationContainerDiv.querySelector("section > div > div > div.description"); - if (descriptionDiv == null) - return false; - - const loginDiv = descriptionDiv.querySelector("div.login"); - if (loginDiv != null) - return false; - - if (isAuthorized(swagger)) - return false; - - return descriptionDiv; -} - -const createLoginUI = function (swagger, rootDiv) { - const div = document.createElement("div"); - div.className = "login"; - - rootDiv.appendChild(div); - - //username - const userNameLabel = document.createElement("label"); - div.appendChild(userNameLabel); - - const userNameSpan = document.createElement("span"); - userNameSpan.innerText = "User"; - userNameLabel.appendChild(userNameSpan); - - const userNameInput = document.createElement("input"); - userNameInput.type = "text"; - userNameInput.style = "margin-left: 10px; margin-right: 10px;"; - userNameLabel.appendChild(userNameInput); - - //Password - const passwordLabel = document.createElement("label"); - div.appendChild(passwordLabel); - - const passwordSpan = document.createElement("span"); - passwordSpan.innerText = "Password"; - passwordLabel.appendChild(passwordSpan); - - const passwordInput = document.createElement("input"); - passwordInput.type = "password"; - passwordInput.style = "margin-left: 10px; margin-right: 10px;"; - passwordLabel.appendChild(passwordInput); - - //Login button - const loginButton = document.createElement("button") - loginButton.type = "submit"; - loginButton.type = "button"; - loginButton.classList.add("btn"); - loginButton.classList.add("auth"); - loginButton.classList.add("authorize"); - loginButton.classList.add("button"); - loginButton.innerText = "Login"; - loginButton.onclick = function () { - const userName = userNameInput.value; - const password = passwordInput.value; - - if (userName === "" || password === "") { - alert("Insert userName and password!"); - return; - } - - login(swagger, userName, password); - }; - - div.appendChild(loginButton); -} - -const login = async (swagger, userName, password) => { - const response = await fetch('/api/Auth/SignIn', { - headers: { "Content-Type": "application/json; charset=utf-8" }, - method: 'POST', - body: JSON.stringify({ "userName": userName, "password": password }) - }) - if (response.ok) { - const result = await response.json(); - const accessToken = result.accessToken; - accessTokenExpiresIn = result.expiresIn; - - const authorizationObject = getAuthorizationRequestObject(accessToken); - swagger.authActions.authorize(authorizationObject); - } else { - alert(await response.text()) - } -} - -const getAuthorizationRequestObject = (accessToken) => { - return { - "bearerAuth": { - "name": "Bearer", - "schema": { - "type": "apiKey", - "description": "JWT Authorization header using the Bearer scheme.", - "name": "Authorization", - "in": "header" - }, - value: accessToken - }, - }; -} - -const getCurrentUrl = (swagger) => { - const spec = swagger.getState()._root.entries.find(e => e[0] === 'spec'); - if (!spec) - return undefined; - - const url = spec[1]._root.entries.find(e => e[0] === 'url'); - if (!url) - return undefined; - - return url[1]; -} - -const reloadPage = (swagger) => { - const url = getCurrentUrl(swagger); - if (url) { - swagger.specActions.download(url); - } -}; - -function getAuthorization(swagger) { - return swagger.auth()._root.entries.find(e => e[0] === 'authorized'); -} - -function isAuthorized(swagger) { - const auth = getAuthorization(swagger); - return auth && auth[1].size !== 0; -} - -function setCookie(name, value, seconds) { - const date = new Date(); - date.setSeconds(date.getSeconds() + seconds); - document.cookie = `${name}=${value};expires=${date.toUTCString()};path=/`; -} - -function getCookie(name) { - const cookies = document.cookie.split(';'); - for (let i = 0; i < cookies.length; i++) { - const cookie = cookies[i].split('='); - if (trim(cookie[0]) === escape(name)) { - return unescape(trim(cookie[1])); - } - } - return null; -} - -function removeCookie(name) { - const date = new Date(); - document.cookie = `${name}=;expires=${date.toUTCString()};path=/`; -} - -function trim(value) { - return value.replace(/^\s+|\s+$/g, ''); -} \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/AutoInjectAttribute.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/AutoInjectAttribute.cs deleted file mode 100644 index 3d0d2d298d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/AutoInjectAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Microsoft.Extensions.DependencyInjection; - -/// -/// This attribute can be applied on either fields or properties to generate the rest of the required codes using Bit.SourceGenerators. -/// The Bit.SourceGenerators for this attribute generates an appropriate property with the [Inject] attribute for Blazor components and constructor injection for other classes. -/// -[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)] -public sealed class AutoInjectAttribute : Attribute -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs deleted file mode 100644 index ef6e684f8a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Attributes/DtoResourceTypeAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace TodoTemplate.Shared.Attributes; - -/// -/// Gets or sets the resource type to use for error message and localizations lookups. -/// -[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] -public class DtoResourceTypeAttribute : Attribute -{ - public Type ResourceType { get; } - - public DtoResourceTypeAttribute(Type resourceType) - { - ResourceType = resourceType ?? throw new ArgumentNullException(nameof(resourceType)); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/AppJsonContext.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/AppJsonContext.cs deleted file mode 100644 index f0dd9d0a2b..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/AppJsonContext.cs +++ /dev/null @@ -1,26 +0,0 @@ -using TodoTemplate.Shared.Dtos.Identity; -using TodoTemplate.Shared.Dtos.Todo; - -namespace TodoTemplate.Shared.Dtos; - -/// -/// https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/ -/// -[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] -[JsonSerializable(typeof(Dictionary))] -[JsonSerializable(typeof(TodoItemDto))] -[JsonSerializable(typeof(List))] -[JsonSerializable(typeof(UserDto))] -[JsonSerializable(typeof(List))] -[JsonSerializable(typeof(SignInRequestDto))] -[JsonSerializable(typeof(SignInResponseDto))] -[JsonSerializable(typeof(SignUpRequestDto))] -[JsonSerializable(typeof(EditUserDto))] -[JsonSerializable(typeof(RestErrorInfo))] -[JsonSerializable(typeof(EmailConfirmedRequestDto))] -[JsonSerializable(typeof(SendConfirmationEmailRequestDto))] -[JsonSerializable(typeof(SendResetPasswordEmailRequestDto))] -[JsonSerializable(typeof(ResetPasswordRequestDto))] -public partial class AppJsonContext : JsonSerializerContext -{ -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EditUserDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EditUserDto.cs deleted file mode 100644 index 75a9e64128..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EditUserDto.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class EditUserDto -{ - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.FullName))] - public string? FullName { get; set; } - - [Display(Name = nameof(AppStrings.Gender))] - public Gender? Gender { get; set; } - - [Display(Name = nameof(AppStrings.BirthDate))] - public DateTimeOffset? BirthDate { get; set; } - - [JsonIgnore] - public string? GenderAsString - { - get - { - return Gender?.ToString(); - } - set - { - if (string.IsNullOrEmpty(value) is false) - { - Gender = Enum.Parse(value); - } - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs deleted file mode 100644 index 8374b89007..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/EmailConfirmedRequestDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class EmailConfirmedRequestDto -{ - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs deleted file mode 100644 index 22638cbd4d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/ResetPasswordRequestDto.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class ResetPasswordRequestDto -{ - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } - - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - public string? Token { get; set; } - - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [MinLength(6, ErrorMessage = nameof(AppStrings.MinLengthAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Password))] - public string? Password { get; set; } - - [NotMapped] - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [Compare(nameof(Password), ErrorMessage = nameof(AppStrings.CompareAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.ConfirmNewPassword))] - public string? ConfirmPassword { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/RoleDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/RoleDto.cs deleted file mode 100644 index 28ced675e1..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/RoleDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class RoleDto -{ - public int Id { get; set; } - - public string? Name { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs deleted file mode 100644 index 8169a1b043..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class SendConfirmationEmailRequestDto -{ - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError)), - EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs deleted file mode 100644 index a3ff797883..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class SendResetPasswordEmailRequestDto -{ - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInRequestDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInRequestDto.cs deleted file mode 100644 index fb2f41ee83..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInRequestDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class SignInRequestDto -{ - /// me@gmail.com - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? UserName { get; set; } - - /// 123456 - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Password))] - public string? Password { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInResponseDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInResponseDto.cs deleted file mode 100644 index 9b723c7774..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/SignInResponseDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class SignInResponseDto -{ - public string? AccessToken { get; set; } - - public long ExpiresIn { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/UserDto.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/UserDto.cs deleted file mode 100644 index 0bc7b14f50..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Dtos/Identity/UserDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TodoTemplate.Shared.Dtos.Identity; - -[DtoResourceType(typeof(AppStrings))] -public class UserDto -{ - public int Id { get; set; } - - // By default, username gets filled from email during signup in Api/Models/Mapper.cs class. - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError)), - EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? UserName { get; set; } - - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Email))] - public string? Email { get; set; } - - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.Password))] - public string? Password { get; set; } - - [Required(ErrorMessage = nameof(AppStrings.RequiredAttribute_ValidationError))] - [Display(Name = nameof(AppStrings.FullName))] - public string? FullName { get; set; } - - [Display(Name = nameof(AppStrings.Gender))] - public Gender? Gender { get; set; } - - [Display(Name = nameof(AppStrings.BirthDate))] - public DateTimeOffset? BirthDate { get; set; } - - public string? ProfileImageName { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/EmailTemplate.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/EmailTemplate.cs deleted file mode 100644 index c3ad9274fa..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/EmailTemplate.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace TodoTemplate.Shared.Enums; - -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum EmailTemplate -{ - EmailChange, - EmailConfirmation -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/Gender.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/Gender.cs deleted file mode 100644 index cf939d2f11..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Enums/Gender.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TodoTemplate.Shared.Enums; - -[JsonConverter(typeof(JsonStringEnumConverter))] -public enum Gender -{ - Male, - Female, - Other -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/BadRequestException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/BadRequestException.cs deleted file mode 100644 index 09f1a0890a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/BadRequestException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class BadRequestException : RestException -{ - public BadRequestException() - : base(nameof(AppStrings.BadRequestException)) - { - } - - public BadRequestException(string message) - : base(message) - { - } - - public BadRequestException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public BadRequestException(LocalizedString message) - : base(message) - { - } - - public BadRequestException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.BadRequest; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ConflictException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ConflictException.cs deleted file mode 100644 index 9b3997c6ab..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ConflictException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class ConflictException : RestException -{ - public ConflictException() - : this(nameof(AppStrings.ConflicException)) - { - } - - public ConflictException(string message) - : base(message) - { - } - - public ConflictException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public ConflictException(LocalizedString message) - : base(message) - { - } - - public ConflictException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.Conflict; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/DomainLogicException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/DomainLogicException.cs deleted file mode 100644 index 28dfa4ed4d..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/DomainLogicException.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public class DomainLogicException : KnownException -{ - public DomainLogicException(string message) - : base(message) - { - } - - public DomainLogicException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public DomainLogicException(LocalizedString message) - : base(message) - { - } - - public DomainLogicException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ErrorResourcePayload.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ErrorResourcePayload.cs deleted file mode 100644 index 08f9a5c9ca..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ErrorResourcePayload.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public class ErrorResourcePayload -{ - public string? ResourceTypeName { get; set; } = "*"; - - public List Details { get; set; } = new(); -} - -public class PropertyErrorResourceCollection -{ - public string? Name { get; set; } = "*"; - - public List Errors { get; set; } = new(); -} - -public class ErrorResource -{ - public string? Key { get; set; } - - public string? Message { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ForbiddenException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ForbiddenException.cs deleted file mode 100644 index b074aad1af..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ForbiddenException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class ForbiddenException : RestException -{ - public ForbiddenException() - : base(nameof(AppStrings.ForbiddenException)) - { - } - - public ForbiddenException(string message) - : base(message) - { - } - - public ForbiddenException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public ForbiddenException(LocalizedString message) - : base(message) - { - } - - public ForbiddenException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.Forbidden; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/KnownException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/KnownException.cs deleted file mode 100644 index 118df98228..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/KnownException.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public abstract class KnownException : Exception -{ - public KnownException(string message) - : base(message) - { - Key = message; - } - - public KnownException(string message, Exception? innerException) - : base(message, innerException) - { - Key = message; - } - - public KnownException(LocalizedString message) - : base(message.Value) - { - Key = message.Name; - } - - public KnownException(LocalizedString message, Exception? innerException) - : base(message.Value, innerException) - { - Key = message.Name; - } - - public string? Key { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceNotFoundException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceNotFoundException.cs deleted file mode 100644 index ddee67cda1..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceNotFoundException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class ResourceNotFoundException : RestException -{ - public ResourceNotFoundException() - : base(nameof(AppStrings.ResourceNotFoundException)) - { - } - - public ResourceNotFoundException(string message) - : base(message) - { - } - - public ResourceNotFoundException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public ResourceNotFoundException(LocalizedString message) - : base(message) - { - } - - public ResourceNotFoundException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.NotFound; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceValidationException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceValidationException.cs deleted file mode 100644 index 67b8aabbad..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ResourceValidationException.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class ResourceValidationException : RestException -{ - public ResourceValidationException(params LocalizedString[] errorMessages) - : this([("*", errorMessages)]) - { - - } - - public ResourceValidationException((string propName, LocalizedString[] errorMessages)[] details) - : this("*", details) - { - - } - - public ResourceValidationException(Type resourceType, (string propName, LocalizedString[] errorMessages)[] details) - : this(resourceType.FullName!, details) - { - - } - - public ResourceValidationException(string resourceTypeName, (string propName, LocalizedString[] errorMessages)[] details) - : this(new ErrorResourcePayload() - { - ResourceTypeName = resourceTypeName, - Details = details.Select(propErrors => new PropertyErrorResourceCollection - { - Name = propErrors.propName, - Errors = propErrors.errorMessages.Select(e => new ErrorResource() - { - Key = e.Name, - Message = e.Value - }).ToList() - }).ToList() - }) - { - - } - - public ResourceValidationException(ErrorResourcePayload payload) - : this(message: nameof(AppStrings.ResourceValidationException), payload) - { - - } - - public ResourceValidationException(string message, ErrorResourcePayload payload) - : base(message) - { - Payload = payload; - } - - public ErrorResourcePayload Payload { get; set; } = new ErrorResourcePayload(); - - public override HttpStatusCode StatusCode => HttpStatusCode.BadRequest; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestErrorInfo.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestErrorInfo.cs deleted file mode 100644 index 8a854a83cf..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestErrorInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public class RestErrorInfo -{ - public string? ExceptionType { get; set; } - - public string? Key { get; set; } - - public string? Message { get; set; } - - public ErrorResourcePayload? Payload { get; set; } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestException.cs deleted file mode 100644 index 152be870b5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/RestException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class RestException : KnownException -{ - public RestException() - : base(nameof(AppStrings.RestException)) - { - } - - public RestException(string message) - : base(message) - { - } - - public RestException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public RestException(LocalizedString message) - : base(message) - { - } - - public RestException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public virtual HttpStatusCode StatusCode => HttpStatusCode.InternalServerError; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ServerConnectionException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ServerConnectionException.cs deleted file mode 100644 index 9700fd2274..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/ServerConnectionException.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public class ServerConnectionException : UnknownException -{ - public ServerConnectionException() - : base(nameof(AppStrings.ServerConnectionException)) - { - } - - public ServerConnectionException(string message) - : base(message) - { - } - - public ServerConnectionException(string message, Exception innerException) - : base(message, innerException) - { - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs deleted file mode 100644 index 30d4936ffd..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/TooManyRequestsExceptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class TooManyRequestsExceptions : RestException -{ - public TooManyRequestsExceptions() - : base(nameof(AppStrings.TooManyRequestsExceptions)) - { - } - - public TooManyRequestsExceptions(string message) - : base(message) - { - } - - public TooManyRequestsExceptions(string message, Exception? innerException) - : base(message, innerException) - { - } - - public TooManyRequestsExceptions(LocalizedString message) - : base(message) - { - } - - public TooManyRequestsExceptions(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.TooManyRequests; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnauthorizedException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnauthorizedException.cs deleted file mode 100644 index dae7d8a8f4..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnauthorizedException.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Net; - -namespace TodoTemplate.Shared.Exceptions; - -public class UnauthorizedException : RestException -{ - public UnauthorizedException() - : base(nameof(AppStrings.UnauthorizedException)) - { - } - - public UnauthorizedException(string message) - : base(message) - { - } - - public UnauthorizedException(string message, Exception? innerException) - : base(message, innerException) - { - } - - public UnauthorizedException(LocalizedString message) - : base(message) - { - } - - public UnauthorizedException(LocalizedString message, Exception? innerException) - : base(message, innerException) - { - } - - public override HttpStatusCode StatusCode => HttpStatusCode.Unauthorized; -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnknownException.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnknownException.cs deleted file mode 100644 index bacc9d29fb..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Exceptions/UnknownException.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace TodoTemplate.Shared.Exceptions; - -public class UnknownException : Exception -{ - public UnknownException() - : base(nameof(AppStrings.UnknownException)) - { - } - - public UnknownException(string message) - : base(message) - { - } - - public UnknownException(string message, Exception innerException) - : base(message, innerException) - { - } -} - diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/ClaimsPrincipalExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/ClaimsPrincipalExtensions.cs deleted file mode 100644 index 9929bc0776..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/ClaimsPrincipalExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace System.Security.Claims; - -public static class ClaimsPrincipalExtensions -{ - public static int GetUserId(this ClaimsPrincipal claimsPrincipal) - { - return int.Parse(claimsPrincipal.FindFirst(ClaimTypes.NameIdentifier)!.Value); - } - - public static string GetUserName(this ClaimsPrincipal claimsPrincipal) - { - return claimsPrincipal.FindFirst(ClaimTypes.Name)!.Value; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/IServiceCollectionExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index c6d8bb4cc2..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,17 +0,0 @@ -using TodoTemplate.Shared.Services; - -namespace Microsoft.Extensions.DependencyInjection; - -public static class IServiceCollectionExtensions -{ - public static void AddSharedServices(this IServiceCollection services) - { - // Services being registered here can get injected everywhere (Api, Web, Android, iOS, Windows, and Mac) - - services.AddLocalization(); - - services.AddAuthorizationCore(); - - services.AddSingleton(); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/LinqExtensions.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/LinqExtensions.cs deleted file mode 100644 index 718221b8fc..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Extensions/LinqExtensions.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Linq.Expressions; - -namespace System.Collections.Generic; - -public static class LinqExtensions -{ - /// - /// https://extensionmethod.net/csharp/ienumerable-t/whereif - /// - public static IQueryable WhereIf(this IQueryable query, bool predicate, Expression> itemPredicate) - { - return predicate ? query.Where(itemPredicate) : query; - } - - public static IQueryable OrderByIf(this IQueryable query, bool predicate, Expression> keySelector) - { - return predicate ? query.OrderBy(keySelector) : query; - } - - public static IQueryable OrderByDescendingIf(this IQueryable query, bool predicate, Expression> keySelector) - { - return predicate ? query.OrderByDescending(keySelector) : query; - } - - public static IEnumerable WhereIf(this IEnumerable source, bool predicate, Func itemPredicate) - { - return predicate ? source.Where(itemPredicate) : source; - } - - public static IEnumerable OrderByIf(this IEnumerable source, bool predicate, Func keySelector) - { - return predicate ? source.OrderBy(keySelector) : source; - } - - public static IEnumerable OrderByDescendingIf(this IEnumerable source, bool predicate, Func keySelector) - { - return predicate ? source.OrderByDescending(keySelector) : source; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorMode.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorMode.cs deleted file mode 100644 index 9fc3ba7bf1..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorMode.cs +++ /dev/null @@ -1,14 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Shared.Infra; - -public enum BlazorMode -{ - BlazorServer = 0, - BlazorWebAssembly = 1, - BlazorHybrid = 2, -#if BlazorElectron - BlazorElectron = 0, -#else - BlazorElectron = 3 -#endif -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorModeDetector.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorModeDetector.cs deleted file mode 100644 index 778436f668..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BlazorModeDetector.cs +++ /dev/null @@ -1,46 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Shared.Infra; - -/// -/// https://bitplatform.dev/templates/hosting-models -/// -public class BlazorModeDetector -{ - public static BlazorModeDetector Current { get; set; } = new BlazorModeDetector(); - - public virtual bool IsBlazorServer() - { - return Mode == BlazorMode.BlazorServer; - } - - public virtual bool IsBlazorWebAssembly() - { - return Mode == BlazorMode.BlazorWebAssembly; - } - - public virtual bool IsBlazorHybrid() - { - return Mode == BlazorMode.BlazorHybrid; - } - - public virtual bool IsBlazorElectron() - { - return Mode == BlazorMode.BlazorElectron; - } - - public virtual BlazorMode Mode - { - get - { -#if BlazorElectron - return BlazorMode.BlazorElectron; -#elif BlazorWebAssembly - return BlazorMode.BlazorWebAssembly; -#elif BlazorHybrid - return BlazorMode.BlazorHybrid; -#else - return BlazorMode.BlazorServer; -#endif - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationMode.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationMode.cs deleted file mode 100644 index f9fd187c54..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationMode.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace TodoTemplate.Shared.Infra; - -public enum BuildConfigurationMode -{ - Debug, - Release -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationModeDetector.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationModeDetector.cs deleted file mode 100644 index 2a8b4db266..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/BuildConfigurationModeDetector.cs +++ /dev/null @@ -1,32 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Shared.Infra; - -public class BuildConfigurationModeDetector -{ - public static BuildConfigurationModeDetector Current { get; set; } = new BuildConfigurationModeDetector(); - - public virtual bool IsDebug() - { - return Mode == BuildConfigurationMode.Debug; - } - - - public virtual bool Release() - { - return Mode == BuildConfigurationMode.Release; - } - - - public virtual BuildConfigurationMode Mode - { - get - { -#if DEBUG - return BuildConfigurationMode.Debug; -#else - return BuildConfigurationMode.Release; -#endif - - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentType.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentType.cs deleted file mode 100644 index 876127d3a6..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentType.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace TodoTemplate.Shared.Infra; - -public enum WebAppDeploymentType -{ - Spa, - Pwa, - SpaPrerendered, - PwaPrerendered, - PrerenderedOnly, -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs deleted file mode 100644 index 17feaaac26..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Infra/WebAppDeploymentTypeDetector.cs +++ /dev/null @@ -1,53 +0,0 @@ -//-:cnd:noEmit -namespace TodoTemplate.Shared.Infra; - -/// -/// https://bitplatform.dev/templates/hosting-models -/// -public class WebAppDeploymentTypeDetector -{ - public static WebAppDeploymentTypeDetector Current { get; set; } = new WebAppDeploymentTypeDetector(); - - public virtual bool IsPrerenderedOnly() - { - return Mode == WebAppDeploymentType.PrerenderedOnly; - } - - public virtual bool IsSpa() - { - return Mode == WebAppDeploymentType.Spa; - } - - public virtual bool IsPwa() - { - return Mode == WebAppDeploymentType.Pwa; - } - - public virtual bool IsSpaPrerendered() - { - return Mode == WebAppDeploymentType.SpaPrerendered; - } - - public virtual bool IsPwaPrerendered() - { - return Mode == WebAppDeploymentType.PwaPrerendered; - } - - public virtual WebAppDeploymentType Mode - { - get - { -#if PrerenderedOnly - return WebAppDeploymentType.PrerenderedOnly; -#elif Spa - return WebAppDeploymentType.Spa; -#elif Pwa - return WebAppDeploymentType.Pwa; -#elif SpaPrerendered - return WebAppDeploymentType.SpaPrerendered; -#elif PwaPrerendered - return WebAppDeploymentType.PwaPrerendered; -#endif - } - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Mapper.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Mapper.cs deleted file mode 100644 index fd57170e35..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Mapper.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Riok.Mapperly.Abstractions; -using TodoTemplate.Shared.Dtos.Identity; -using TodoTemplate.Shared.Dtos.Todo; - -namespace TodoTemplate.Shared; - -/// -/// Patching methods help you patch the DTO you have received from the server (for example, after calling an Update api) -/// onto the DTO you have bound to the UI. This way, the UI gets updated with the latest saved changes, -/// and there's no need to re-fetch that specific data from the server. -/// For complete end to end sample you can check EditProfilePage.razor.cs -/// You can add as many as Patch methods you want for other DTO classes here. -/// For more information and to learn about customizing the mapping process, visit the website below: -/// https://mapperly.riok.app/docs/intro/ -/// -[Mapper(UseDeepCloning = true)] -public static partial class Mapper -{ - public static partial void Patch(this TodoItemDto source, TodoItemDto destination); - public static partial void Patch(this UserDto source, UserDto destination); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.fr.resx b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.fr.resx deleted file mode 100644 index f5f0f2143e..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.fr.resx +++ /dev/null @@ -1,757 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Demande non valide - - - La demande n’a pas pu être traitée en raison d’un conflit dans la demande - - - L’accès à la ressource demandée est interdit - - - Les données de la demande ne sont pas valides - - - Une erreur s’est produite lors de la communication avec le serveur - - - Votre demande ne contient pas d’informations d’authentification valides - - - Une erreur inconnue s’est produite - - - L’enregistrement a été modifié par un autre utilisateur après que vous ayez obtenu les données d’origine. L’opération a été annulée. - - - Erreur connue - - - Ressource introuvable - - - Trop de demandes - - - Une erreur s’est produite lors de la suppression du fichier - - - Une erreur s’est produite lors du téléchargement du fichier - - - L’élément À faire n’a pas pu être trouvé - - - L’image de l’utilisateur est introuvable - - - L’adresse e-mail '{0}' n’est pas confirmée. - - - Vous avez déjà demandé l’e-mail de confirmation. Réessayez dans {0} - - - Vous avez déjà demandé l’e-mail de réinitialisation du mot de passe. Réessayez dans {0} - - - Votre adresse e-mail est déjà confirmée. - - - Erreur - - - Actif - - - Ajouter - - - Tout - - - Alphabétique - - - Vous avez déjà un compte ? - - - Annuler - - - Vérifiez votre courrier indésirable si vous ne le trouvez pas dans la boîte de réception. - - - Terminé - - - Nous avons envoyé un lien de confirmation à votre adresse e-mail. -Veuillez confirmer votre adresse e-mail en cliquant sur le lien. - - - Confirmez votre adresse e-mail - - - Confirmer le nouveau mot de passe - - - Date - - - Vous n’avez pas de compte ? - - - Éditer - - - Modifier le profil - - - Messagerie électronique - - - Échec de la confirmation par e-mail ! - - - Confirmation par e-mail - - - E-mail confirmé avec succès ! - - - Veuillez saisir l’adresse e-mail avec laquelle vous vous êtes inscrit afin que nous puissions vous envoyer un lien de réinitialisation du mot de passe à votre adresse e-mail. - - - Mot de passe oublié - - - Mot de passe oublié ? - - - Nom complet - - - Autre - - - Femelle - - - Mâle - - - Référentiel GitHub - - - Il semble que le lien de confirmation ne soit pas valide ou qu’il ait expiré. - - - Nouveau mot de passe - - - Pas encore de choses à faire - - - Vous n’avez pas reçu l’e-mail de confirmation ? - - - Vous n’avez pas reçu l’e-mail de confirmation ? - - - OU - - - Mot de passe - - - Votre mot de passe a été modifié avec succès. - - - Je suis d’accord avec le - - - Petits caractères - - - Le profil a été mis à jour avec succès. - - - Enlever - - - Le lien de confirmation a été renvoyé à votre adresse e-mail. - - - Renvoyer l’e-mail - - - Réinitialiser le mot de passe - - - Le lien de réinitialisation du mot de passe a été envoyé à votre adresse e-mail. - - - Réinitialiser le mot de passe - - - Sauvegarder - - - Sélectionnez votre date de naissance - - - Connexion - - - Connexion - - - Se déconnecter - - - S’enregistrer - - - S’enregistrer - - - Trier par - - - Envoyer - - - Ajouter une tâche - - - Cherchez des choses à faire... - - - Créez facilement votre application Blazor multimode (WASM, Serveur, Hybride, pré-rendu) dans les plus brefs délais ! - - - Page d’accueil de TodoTemplate - - - À faire - - - Télécharger une nouvelle image de profil - - - Acceptez-vous les conditions ? - - - Nom d’utilisateur - - - Vous devez accepter nos conditions. - - - Aller à aujourd’hui - - - Genre - - - Petits caractères - - - Êtes-vous sûr de vouloir vous déconnecter ? - - - Naissance - - - Domicile - - - Image de profil - - - Titre - - - Vous devez être connecté pour continuer. - - - Nom d’utilisateur ou mot de passe non valide - - - Supprimer le compte - - - Non - - - Oui - - - Êtes-vous sûr de vouloir supprimer votre compte ? - - - Mettre à jour - - - Voulez-vous vraiment supprimer {0} - - - Supprimer l’élément de tâche - - - Le champ {0} n’est égal à aucune des valeurs spécifiées dans AllowedValuesAttribute. - - - Le type de métadonnées associé au type '{0}' contient les propriétés ou champs inconnus suivants : {1}. Assurez-vous que les noms de ces membres correspondent aux noms des propriétés du type principal. - - - Le type '{0}' ne contient pas de propriété publique nommée '{1}'. - - - Le champ {0} n’est pas un codage Base64 valide. - - - La propriété {0}. {1} n’a pas pu être trouvé. - - - '{0}' et '{1}' ne correspondent pas. - - - Impossible de trouver une propriété nommée {0}. - - - Le champ {0} n’est pas un numéro de carte de crédit valide. - - - La méthode CustomValidationAttribute '{0}' de type '{1}' doit retourner System.ComponentModel.DataAnnotations.ValidationResult. Utilisez System.ComponentModel.DataAnnotations.ValidationResult.Success pour représenter la réussite. - - - La méthode CustomValidationAttribute '{0}' n’existe pas dans le type '{1}' ou n’est pas publique et statique. - - - La méthode CustomValidationAttribute.Method n’a pas été spécifiée. - - - La méthode CustomValidationAttribute '{0}' de type '{1}' doit correspondre à la signature attendue : public static ValidationResult {0}(valeur d’objet, contexte ValidationContext). La valeur peut être fortement typée. Le paramètre ValidationContext est facultatif. - - - Impossible de convertir la valeur du type '{0}' en '{1}' comme prévu par la méthode {2}. {3}. - - - Le type de validation personnalisé '{0}' doit être public. - - - {0} n’est pas valide. - - - Le CustomValidationAttribute.ValidatorType n’a pas été spécifié. - - - La chaîne DataType personnalisée ne peut pas être nulle ou vide. - - - Le champ {0} est égal à l’une des valeurs spécifiées dans DeniedValuesAttribute. - - - La propriété {0} n’a pas été définie. Utilisez la méthode {1} pour obtenir la valeur. - - - Le champ {0} n’est pas une adresse e-mail valide. - - - Le type fourni pour EnumDataTypeAttribute ne peut pas être null. - - - Le type '{0}' doit représenter un type d’énumération. - - - Le champ {0} n’accepte que les fichiers avec les extensions suivantes : {1} - - - Impossible de récupérer la propriété '{0}' en raison de l’échec de la localisation. Le type '{1}' n’est pas public ou ne contient pas de propriété de chaîne statique publique portant le nom '{2}'. - - - MaxLengthAttribute doit avoir une valeur Length supérieure à zéro. Utilisez MaxLength() sans paramètres pour indiquer que la chaîne ou le tableau peut avoir la longueur maximale autorisée. - - - Le champ {0} doit être de type chaîne ou tableau avec une longueur maximale de '{1}'. - - - MetadataClassType ne peut pas être null. - - - MinLengthAttribute doit avoir une valeur Length égale ou supérieure à zéro. - - - Le champ {0} doit être de type chaîne ou tableau avec une longueur minimale de '{1}'. - - - LengthAttribute doit avoir une valeur MinimumLength égale ou supérieure à zéro. - - - LengthAttribute doit avoir une valeur MaximumLength supérieure ou égale à MinimumLength. - - - Le champ {0} doit être un type de chaîne ou de collection dont la longueur minimale est de « {1} » et la longueur maximale de « {2} ». - - - Le champ de type {0} doit être de type chaîne, tableau ou ICollection. - - - Le champ {0} n’est pas un numéro de téléphone valide. - - - Le type {0} devez implémenter {1}. - - - La valeur maximale '{0}' doit être supérieure ou égale à la valeur minimale '{1}'. - - - Impossible d’utiliser des limites exclusives lorsque la valeur maximale est égale à la valeur minimale. - - - Les valeurs minimale et maximale doivent être définies. - - - L’OperandType doit être défini lorsque des chaînes sont utilisées pour les valeurs minimale et maximale. - - - Le champ {0} doit être compris entre {1} et {2}. - - - Le champ {0} doit être compris entre {1} exclusif et {2}. - - - Le champ {0} doit être compris entre {1} et {2} exclusif. - - - Le champ {0} doit être compris entre {1} exclusif et {2} exclusif. - - - Le champ {0} doit correspondre à l’expression régulière '{1}'. - - - Le modèle doit être défini sur une expression régulière valide. - - - Le champ {0} est obligatoire. - - - La longueur maximale doit être un entier non négatif. - - - Le champ {0} doit être une chaîne d’une longueur maximale de {1}. - - - Le champ {0} doit être une chaîne d’une longueur minimale de {2} et d’une longueur maximale de {1}. - - - Le paramètre clé à la position {0} avec la valeur '{1}' n’est pas une chaîne de caractères. Chaque paramètre de contrôle de clé doit être une chaîne de caractères. - - - Le paramètre clé à la position {0} est null. Chaque paramètre de contrôle de clé doit être une chaîne de caractères. - - - Le paramètre clé à la position {0} avec la valeur '{1}' apparaît plus d’une fois. - - - Le nombre de paramètres de contrôle doit être pair. - - - Le champ {0} n’est pas une URL http, https ou ftp valide et complète. - - - ErrorMessageString ou ErrorMessageResourceName doivent être définis, mais pas les deux. - - - IsValid(valeur de l’objet) n’a pas été implémenté par cette classe. Le point d’entrée préféré est GetValidationResult() et les classes doivent remplacer IsValid(valeur de l’objet, contexte ValidationContext). - - - ErrorMessageResourceType et ErrorMessageResourceName doivent tous deux être définis sur cet attribut. - - - La propriété '{0}' du type de ressource '{1}' n’est pas un type de chaîne. - - - Le type de ressource '{0}' n’a pas de propriété statique accessible nommée '{1}'. - - - Le champ {0} n’est pas valide. - - - L’instance fournie doit correspondre à l’ObjectInstance sur le ValidationContext fourni. - - - La valeur de la propriété '{0}' doit être de type '{1}'. - - - Échec de la concurrence optimiste, l’objet a été modifié. - - - Une défaillance inconnue s’est produite. - - - L’e-mail '{0}' est déjà pris. - - - Le nom de rôle '{0}' est déjà pris. - - - Le nom d’utilisateur '{0}' est déjà pris. - - - L’adresse e-mail « {0} » n’est pas valide. - - - Le type {0} doit dériver de {1}<{2}>. - - - Le PasswordHasherCompatibilityMode fourni n’est pas valide. - - - Le nombre d’itérations doit être un entier positif. - - - Le nom de rôle « {0} » n’est pas valide. - - - Jeton non valide. - - - Le nom d’utilisateur '{0}' n’est pas valide, ne peut contenir que des lettres ou des chiffres. - - - Un utilisateur avec cette connexion existe déjà. - - - AddIdentity doit être appelé sur la collection de services. - - - Aucun IUserTwoFactorTokenProvider<{0}> nommé '{1}' n’est enregistré. - - - Le tampon de sécurité de l’utilisateur ne peut pas être nul. - - - Mot de passe incorrect. - - - Les mots de passe doivent comporter au moins un chiffre ('0'-'9'). - - - Les mots de passe doivent comporter au moins une minuscule ('a'-'z'). - - - Les mots de passe doivent comporter au moins un caractère non alphanumérique. - - - Les mots de passe doivent comporter au moins une majuscule ('A'-'Z'). - - - Les mots de passe doivent comporter au moins {0} caractères. - - - Le rôle {0} n’existe pas. - - - Store n’implémente pas IQueryableUserStore<TUser>.</TUser> - - - Store n’implémente pas IRoleClaimStore<TRole>.</TRole> - - - Store n’implémente pas IUserAuthenticationTokenStore<User>.</User> - - - Store n’implémente pas IUserClaimStore<TUser>.</TUser> - - - Store n’implémente pas IUserConfirmationStore<TUser>.</TUser> - - - Store n’implémente pas IUserEmailStore<TUser>.</TUser> - - - Store n’implémente pas IUserLockoutStore<TUser>.</TUser> - - - Store n’implémente pas IUserLoginStore<TUser>.</TUser> - - - Store n’implémente pas IUserPasswordStore<TUser>.</TUser> - - - Store n’implémente pas IUserSecurityStampStore<TUser>.</TUser> - - - Store n’implémente pas IUserAuthenticatorKeyStore<User>.</User> - - - L’utilisation du code de récupération a échoué. - - - L’utilisateur dispose déjà d’un mot de passe défini. - - - Utilisateur déjà dans le rôle '{0}'. - - - L’utilisateur est bloqué. - - - Le verrouillage n’est pas activé pour cet utilisateur. - - - Le {0} utilisateur n’existe pas. - - - L’utilisateur n’est pas dans le rôle '{0}'. - - - Les mots de passe doivent comporter au moins {0} caractères différents. - - - Aucun RoleType n’a été spécifié, essayez AddRoles<TRole>().</TRole> - - - Aucun service IPersonalDataProtector n’a été enregistré, cela est requis lorsque ProtectPersonalData = true. - - - Store n’implémente pas IQueryableRoleStore<TRole>.</TRole> - - - Store n’implémente pas IUserPhoneNumberStore<TUser>.</TUser> - - - Store n’implémente pas IUserRoleStore<TUser>.</TUser> - - - Store n’implémente pas IUserTwoFactorStore<TUser>.</TUser> - - - Store n’implémente pas IUserTwoFactorRecoveryCodeStore<User>.</User> - - - Store n’implémente pas IProtectedUserStore,<TUser> ce qui est requis lorsque ProtectPersonalData = true.</TUser> - - - Incapable de se connecter au serveur. - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.resx b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.resx deleted file mode 100644 index 55dff7cad5..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/AppStrings.resx +++ /dev/null @@ -1,812 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - The {0} field does not equal any of the values specified in AllowedValuesAttribute. - - - The associated metadata type for type '{0}' contains the following unknown properties or fields: {1}. Please make sure that the names of these members match the names of the properties on the main type. - - - The type '{0}' does not contain a public property named '{1}'. - - - The {0} field is not a valid Base64 encoding. - - - The property {0}.{1} could not be found. - - - '{0}' and '{1}' do not match. - - - Could not find a property named {0}. - - - The {0} field is not a valid credit card number. - - - The CustomValidationAttribute method '{0}' in type '{1}' must return System.ComponentModel.DataAnnotations.ValidationResult. Use System.ComponentModel.DataAnnotations.ValidationResult.Success to represent success. - - - The CustomValidationAttribute method '{0}' does not exist in type '{1}' or is not public and static. - - - The CustomValidationAttribute.Method was not specified. - - - The CustomValidationAttribute method '{0}' in type '{1}' must match the expected signature: public static ValidationResult {0}(object value, ValidationContext context). The value can be strongly typed. The ValidationContext parameter is optional. - - - Could not convert the value of type '{0}' to '{1}' as expected by method {2}.{3}. - - - The custom validation type '{0}' must be public. - - - {0} is not valid. - - - The CustomValidationAttribute.ValidatorType was not specified. - - - The custom DataType string cannot be null or empty. - - - The {0} field equals one of the values specified in DeniedValuesAttribute. - - - The {0} property has not been set. Use the {1} method to get the value. - - - The {0} field is not a valid e-mail address. - - - The type provided for EnumDataTypeAttribute cannot be null. - - - The type '{0}' needs to represent an enumeration type. - - - The {0} field only accepts files with the following extensions: {1} - - - Cannot retrieve property '{0}' because localization failed. Type '{1}' is not public or does not contain a public static string property with the name '{2}'. - - - MaxLengthAttribute must have a Length value that is greater than zero. Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length. - - - The field {0} must be a string or array type with a maximum length of '{1}'. - - - MetadataClassType cannot be null. - - - MinLengthAttribute must have a Length value that is zero or greater. - - - The field {0} must be a string or array type with a minimum length of '{1}'. - - - LengthAttribute must have a MinimumLength value that is zero or greater. - - - LengthAttribute must have a MaximumLength value that is greater than or equal to MinimumLength. - - - The field {0} must be a string or collection type with a minimum length of '{1}' and maximum length of '{2}'. - - - The field of type {0} must be a string, array or ICollection type. - - - The {0} field is not a valid phone number. - - - The type {0} must implement {1}. - - - The maximum value '{0}' must be greater than or equal to the minimum value '{1}'. - - - Cannot use exclusive bounds when the maximum value is equal to the minimum value. - - - The minimum and maximum values must be set. - - - The OperandType must be set when strings are used for minimum and maximum values. - - - The field {0} must be between {1} and {2}. - - - The field {0} must be between {1} exclusive and {2}. - - - The field {0} must be between {1} and {2} exclusive. - - - The field {0} must be between {1} exclusive and {2} exclusive. - - - The field {0} must match the regular expression '{1}'. - - - The pattern must be set to a valid regular expression. - - - The {0} field is required. - - - The maximum length must be a nonnegative integer. - - - The field {0} must be a string with a maximum length of {1}. - - - The field {0} must be a string with a minimum length of {2} and a maximum length of {1}. - - - The key parameter at position {0} with value '{1}' is not a string. Every key control parameter must be a string. - - - The key parameter at position {0} is null. Every key control parameter must be a string. - - - The key parameter at position {0} with value '{1}' occurs more than once. - - - The number of control parameters must be even. - - - The {0} field is not a valid fully-qualified http, https, or ftp URL. - - - Either ErrorMessageString or ErrorMessageResourceName must be set, but not both. - - - IsValid(object value) has not been implemented by this class. The preferred entry point is GetValidationResult() and classes should override IsValid(object value, ValidationContext context). - - - Both ErrorMessageResourceType and ErrorMessageResourceName need to be set on this attribute. - - - The property '{0}' on resource type '{1}' is not a string type. - - - The resource type '{0}' does not have an accessible static property named '{1}'. - - - The field {0} is invalid. - - - The instance provided must match the ObjectInstance on the ValidationContext supplied. - - - The value for property '{0}' must be of type '{1}'. - - - - Optimistic concurrency failure, object has been modified. - Error when optimistic concurrency fails - - - An unknown failure has occurred. - Default identity result error message - - - Email '{0}' is already taken. - Error for duplicate emails - - - Role name '{0}' is already taken. - Error for duplicate roles - - - Username '{0}' is already taken. - Error for duplicate user names - - - Email '{0}' is invalid. - Invalid email - - - Type {0} must derive from {1}<{2}>. - Error when the manager type is not derived correctly - - - The provided PasswordHasherCompatibilityMode is invalid. - Error when the password hasher doesn't understand the format it's being asked to produce. - - - The iteration count must be a positive integer. - Error when the iteration count is < 1. - - - Role name '{0}' is invalid. - Error for invalid role names - - - Invalid token. - Error when a token is not recognized - - - Username '{0}' is invalid, can only contain letters or digits. - User names can only contain letters or digits - - - A user with this login already exists. - Error when a login already linked - - - AddIdentity must be called on the service collection. - Error when AddIdentity is not called - - - No IUserTwoFactorTokenProvider<{0}> named '{1}' is registered. - Error when there is no IUserTwoFactorTokenProvider - - - User security stamp cannot be null. - Error when a user's security stamp is null. - - - Incorrect password. - Error when a password doesn't match - - - Passwords must have at least one digit ('0'-'9'). - Error when passwords do not have a digit - - - Passwords must have at least one lowercase ('a'-'z'). - Error when passwords do not have a lowercase letter - - - Passwords must have at least one non alphanumeric character. - Error when password does not have enough non alphanumeric characters - - - Passwords must have at least one uppercase ('A'-'Z'). - Error when passwords do not have an uppercase letter - - - Passwords must be at least {0} characters. - Error message for passwords that are too short - - - Role {0} does not exist. - Error when a role does not exist - - - Store does not implement IQueryableRoleStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IQueryableUserStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IRoleClaimStore<TRole>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticationTokenStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserClaimStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserConfirmationStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserEmailStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLockoutStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserLoginStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPasswordStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserPhoneNumberStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserRoleStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserSecurityStampStore<TUser>. - Error when the store does not implement this interface - - - Store does not implement IUserAuthenticatorKeyStore<User>. - Error when the store does not implement this interface - - - Store does not implement IUserTwoFactorStore<TUser>. - Error when the store does not implement this interface - - - Recovery code redemption failed. - Error when a recovery code is not redeemed. - - - User already has a password set. - Error when AddPasswordAsync called when a user already has a password - - - User already in role '{0}'. - Error when a user is already in a role - - - User is locked out. - Error when a user is locked out - - - Lockout is not enabled for this user. - Error when lockout is not enabled - - - User {0} does not exist. - Error when a user does not exist - - - User is not in role '{0}'. - Error when a user is not in the role - - - Store does not implement IUserTwoFactorRecoveryCodeStore<User>. - Error when the store does not implement this interface - - - Passwords must use at least {0} different characters. - Error message for passwords that are based on similar characters - - - No RoleType was specified, try AddRoles<TRole>(). - Error when the IdentityBuilder.RoleType was not specified - - - Store does not implement IProtectedUserStore<TUser> which is required when ProtectPersonalData = true. - Error when the store does not implement this interface - - - No IPersonalDataProtector service was registered, this is required when ProtectPersonalData = true. - Error when there is no IPersonalDataProtector - - - - Invalid request - - - Request could not be processed because of conflict in the request - - - Access to the requested resource is forbidden - - - Request data is not valid - - - An error occurred while communicating with server - - - Your request lacks valid authentication credentials - - - Unknown error has occurred - - - The record was modified by another user after you got the original data. the operation was canceled. - - - Known error - - - Resource not found - - - Too many requests - - - Unable to connect to server. - - - - An error occurred while removing file - - - An error occurred while uploading file - - - To Do item could not be found - - - User image could not be found - - - Email '{0}' is not confirmed. - Error when a email is not confirmed by the confirmation link - - - You have already requested the confirmation email. Try again in {0} - - - You have already requested the reset password email. Try again in {0} - - - Your email is already confirmed. - - - Error - - - Active - - - Add - - - All - - - Alphabetical - - - Already have an account? - - - Cancel - - - Check your Spam/Junk, if you could not find it in the Inbox. - - - Completed - - - We have sent a confirmation link to your email address. -Please confirm your email by clicking on the link. - - - Confirm Your Email Address - - - Confirm New Password - - - Date - - - Don’t have an account? - - - Edit - - - Edit profile - - - Email - - - Email Confirmation Failed! - - - Email Confirmation - - - Email Confirmed Successfully! - - - Please enter the email address you have been signed up with so we can send a reset password link to your email address. - - - Forget password - - - Forgot password? - - - FullName - - - Other - - - Female - - - Male - - - GitHub Repo - - - Looks like the confirmation link either is invalid or has expired. - - - New Password - - - No todos yet - - - Haven’t you received the confirmation email? - - - Haven’t you received the confirmation email? - - - OR - - - Password - - - Your password changed successfully. - - - I agree to the - - - Terms - - - Profile updated successfully. - - - Remove - - - The confirmation link has been re-sent to your email address. - - - Resend email - - - Reset password - - - The reset password link has been sent to your email address. - - - Reset password - - - Save - - - Select your birth date - - - Sign in - - - Sign in - - - Sign out - - - Sign up - - - Sign up - - - Sort by - - - Submit - - - Add a todo - - - Search some todo... - - - Create your multi-mode (WASM, Server, Hybrid, pre-rendering) Blazor app easily in the shortest time ever! - - - TodoTemplate Home - - - Todo - - - Upload a new profile image - - - Do you accept terms? - - - Username - - - You must agree to our terms. - - - Go to today - - - Gender - - - Terms - - - Are you sure you want to Sign out? - - - Birthdate - - - Home - - - Profile Image - - - Title - - - You must be signed in to continue. - - - Invalid username or password - - - Delete Account - - - No - - - Yes - - - Are you sure you want to delete your account? - - - Update - - - Are you sure you want to delete {0} - - - Delete todo item - - \ No newline at end of file diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/StringLocalizerProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/StringLocalizerProvider.cs deleted file mode 100644 index b39559636e..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Resources/StringLocalizerProvider.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Reflection; - -namespace TodoTemplate.Shared.Resources; - -public static class StringLocalizerProvider -{ - public static IStringLocalizer ProvideLocalizer(Type dtoType, IStringLocalizerFactory factory) - { - return factory.Create(dtoType.GetCustomAttribute()?.ResourceType ?? typeof(AppStrings)); - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs deleted file mode 100644 index 7f467c6843..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IAuthTokenProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace TodoTemplate.Shared.Services.Contracts; - -public interface IAuthTokenProvider -{ - Task GetAccessTokenAsync(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IDateTimeProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IDateTimeProvider.cs deleted file mode 100644 index 80da0e05fc..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/Contracts/IDateTimeProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace TodoTemplate.Shared.Services.Contracts; - -public interface IDateTimeProvider -{ - DateTimeOffset GetCurrentDateTime(); -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/DateTimeProvider.cs b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/DateTimeProvider.cs deleted file mode 100644 index 5e7e9c448a..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/Services/DateTimeProvider.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace TodoTemplate.Shared.Services; - -public class DateTimeProvider : IDateTimeProvider -{ - public DateTimeOffset GetCurrentDateTime() - { - return DateTimeOffset.UtcNow; - } -} diff --git a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/TodoTemplate.Shared.csproj b/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/TodoTemplate.Shared.csproj deleted file mode 100644 index eb045b35ca..0000000000 --- a/src/Templates/TodoTemplate/Bit.TodoTemplate/src/Shared/TodoTemplate.Shared.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - - net8.0 - en-US - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - compile; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - True - True - $([System.String]::Copy('%(Filename)').Replace('.Designer','')).resx - - - PublicResXFileCodeGenerator - %(Filename).Designer.cs - - - - diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/HomePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/HomePage.razor index 2aea4413b9..82cdab839a 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/HomePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/HomePage.razor @@ -77,11 +77,13 @@
dotnet new - bit-todo  bit-admin + bit-bp  bit-web --database sqlite    sqlserver --pipeline github azure + --sample + todo none --name MyAwesomeProject
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CacheMechanismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CacheMechanismPage.razor index ebb453d8f3..a9c30ad0a5 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CacheMechanismPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CacheMechanismPage.razor @@ -43,4 +43,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CreateProjectPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CreateProjectPage.razor index f80dd40f01..d7602c397e 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CreateProjectPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/CreateProjectPage.razor @@ -21,28 +21,30 @@ 1. Install the project templates from the NuGet package manager with one of the following commands:
-dotnet new install Bit.AdminPanel::7.1.0
-dotnet new install Bit.TodoTemplate::7.1.0
-dotnet new install Bit.BlazorDual::7.1.0
+dotnet new install Bit.Boilerplate::7.1.0 +dotnet new install Bit.BlazorWeb::7.1.0
- 2. Create a new project using the installed project template with one of the following commands: + 2. Create a new project using dotnet new command or Visual Studio create new project wizard:
-
-dotnet new bit-admin
-dotnet new bit-todo
-dotnet new bit-dual
Note: bit project templates accept the following parameters:
  • --name (default is current folder name)
  • -
  • --database default to 'SqlServer' among following options: 'SqlServer', 'Sqlite', 'Other'
  • -
  • --pipeline default to 'GitHub' among the following options: 'GitHub', 'Azure' (AzureDevOps pipelines), 'Other'
  • +
  • --database default to SqlServer among following options: SqlServer Sqlite, Other
  • +
  • --pipeline default to GitHub among the following options: GitHub, Azure (AzureDevOps pipelines), Other
  • +
  • --sample default to AdminPanel among the following options: AdminPanel, Todo, None
+ Examples:
-dotnet new bit-admin --name MyProject --database sqlite --pipeline github
-dotnet new bit-todo --name MyProject --database sqlite --pipeline github
-dotnet new bit-dual --name MyProject --database sqlite --pipeline github
+1- Create a web based admin panel with SQL Server, using Azure DevOps for CI/CD: +dotnet new bit-web --name MyAdminPanel --database SqlServer --pipeline Azure --sample AdminPanel + +2- Create a cross-platform Todo app for mobile, desktop, and web with GitHub Actions and a SQLite database. +dotnet new bit-bp --name MyTodoApp --database Sqlite --pipeline GitHub --sample Todo + +3- Create a mobile, desktop, and web app without sample pages, integrating GitHub Actions and a SQL Server database. +dotnet new bit-web --name MyCompany.MyApp --database SqlServer --pipeline GitHub --sample None
Note: We recommend to create the project in a path that is not too long without space character in the folder names.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DeploymentTypePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DeploymentTypePage.razor index b22bbe8e99..897d64038b 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DeploymentTypePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DeploymentTypePage.razor @@ -91,4 +91,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DevOpsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DevOpsPage.razor index 16d911df9f..db190c7689 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DevOpsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/DevOpsPage.razor @@ -97,4 +97,4 @@ APPLICATION_DISPLAY_VERSION
- + diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ExceptionHandlingPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ExceptionHandlingPage.razor index d89169e20b..2e5b86cb81 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ExceptionHandlingPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ExceptionHandlingPage.razor @@ -49,4 +49,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/HostingModelsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/HostingModelsPage.razor index ec587ba8cf..798ea73072 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/HostingModelsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/HostingModelsPage.razor @@ -11,6 +11,9 @@ Hosting models (Blazor Mode)
+
+ Note: The following doesn't apply to Bit.BlazorWeb. Follow the docs from Settings page +
bit project templates use Blazor for building UI. Blazor is a web framework for building web UI components that uses modern technologies to host different models.
Blazor can be hosted on server-side in ASP.NET Core (Blazor Server), on client-side in the browser on a WebAssembly-based .NET runtime (Blazor WebAssembly, Blazor WASM), diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/MultilingualismPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/MultilingualismPage.razor index 3618abeed0..0535ac8c10 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/MultilingualismPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/MultilingualismPage.razor @@ -51,4 +51,4 @@ public class CustomerDto
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/OverviewPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/OverviewPage.razor index 2e767ac45a..716f496d09 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/OverviewPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/OverviewPage.razor @@ -29,7 +29,7 @@ SPA demo Android Apple Store - Nuget + Nuget Figma
@@ -56,7 +56,7 @@ Prerendered PWA Android Apple Store - NuGet + NuGet Figma
@@ -65,22 +65,19 @@

- BlazorDual + BlazorWeb
TodoTemplate
- The BlazorDual is a project template that includes different parts of a dual mode (Blazor Server and WebAssembly) Todo website. -
-
- Note: This project template basically is a simplified version of the TodoTemplate, and is suited for projects that - only need a website and don't require iOS, android or desktop apps. + Note: This project template basically is a simplified version of the Boilerplate, and is suited for projects that + only need a web app and don't require mobile or desktop apps.
- NuGet + NuGet
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/PlatformIntegrationPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/PlatformIntegrationPage.razor index 7d18c1a95c..ddd527e19f 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/PlatformIntegrationPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/PlatformIntegrationPage.razor @@ -23,7 +23,7 @@
If you wish to use JavaScript, write the relevant function in app.ts and call it using JSRuntime. There are some examples in the project template, for example, for reading and writing in the cookie.
- Note: The rest of the details are not related to BlazorDual since this template doesn't produce an App output. + Note: The rest of the details are not related to BlazorWeb since this template doesn't produce an App output.
@@ -140,4 +140,4 @@ public interface IContactsService
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ProjectStructurePage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ProjectStructurePage.razor index 3088e2b168..0e18e2fc1e 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ProjectStructurePage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/ProjectStructurePage.razor @@ -45,6 +45,9 @@
This project contains server-side codes including Controllers, efcore DbContext, models, asp.net core identity related classes, etc.
+
+ Note: BlazorWeb has Server project instead of Api. +
@@ -63,7 +66,7 @@ These pages and components are shared between app (for mobile/desktop) and web projects.
- Note: BlazorDual project has no core project, because it doesn't support mobile/desktop version and there's no app project, so we've put everything in web project. + Note: BlazorWeb project has no core project, because it doesn't support mobile/desktop version and there's no app project, so we've put everything in client project.
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/SettingsPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/SettingsPage.razor index fe7809955c..f40993544d 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/SettingsPage.razor +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Pages/Templates/SettingsPage.razor @@ -42,8 +42,8 @@
"JwtSettings": {
     "IdentityCertificatePassword": "P@ssw0rdP@ssw0rd",
-    "Issuer": "TodoTemplate",
-    "Audience": "TodoTemplate",
+    "Issuer": "Boilerplate",
+    "Audience": "Boilerplate",
     "NotBeforeMinutes": "0",
     "ExpirationMinutes": "1440"
 }
@@ -108,4 +108,4 @@ Export-PfxCertificate -cert ('Cert:\LocalMachine\My\' + $cert.thumbprint) -FileP
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/NavMenu.razor.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/NavMenu.razor.cs index 73070839e6..648819c70e 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/NavMenu.razor.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/NavMenu.razor.cs @@ -16,12 +16,12 @@ public partial class NavMenu : IDisposable new BitNavItem { Text = "Run", Url = "/templates/run", AdditionalUrls = new string[] { "/admin-panel/run", "/todo-template/run" } }, new BitNavItem { Text = "Hosting models", Url = "/templates/hosting-models", AdditionalUrls = new string[] { "/admin-panel/hosting-models", "/todo-template/hosting-models" } }, new BitNavItem { Text = "Deployment type", Url = "/templates/deployment-type", AdditionalUrls = new string[] { "/admin-panel/deployment-type", "/todo-template/deployment-type" } }, - new BitNavItem { Text = "Settings", Url = "/templates/settings", AdditionalUrls = new string[] { "/admin-panel/settings", "/todo-template/settings" } }, - new BitNavItem { Text = "Exception handling", Url = "/templates/exception-handling", AdditionalUrls = new string[] { "/admin-panel/exception-handling", "/todo-template/exception-handling" } }, new BitNavItem { Text = "Cache mechanism", Url = "/templates/cache-mechanism", AdditionalUrls = new string[] { "/admin-panel/cache-mechanism", "/todo-template/cache-mechanism" } }, - new BitNavItem { Text = "Multilingualism", Url = "/templates/multilingualism", AdditionalUrls = new string[] { "/admin-panel/multilingualism", "/todo-template/multilingualism" } }, new BitNavItem { Text = "DevOps", Url = "/templates/devops", AdditionalUrls = new string[] { "/admin-panel/devops", "/todo-template/devops" } }, new BitNavItem { Text = "Platform integration", Url = "/templates/platform-integration", AdditionalUrls = new string[] { "/admin-panel/platform-integration", "/todo-template/platform-integration" } }, + new BitNavItem { Text = "Settings", Url = "/templates/settings", AdditionalUrls = new string[] { "/admin-panel/settings", "/todo-template/settings" } }, + new BitNavItem { Text = "Exception handling", Url = "/templates/exception-handling", AdditionalUrls = new string[] { "/admin-panel/exception-handling", "/todo-template/exception-handling" } }, + new BitNavItem { Text = "Multilingualism", Url = "/templates/multilingualism", AdditionalUrls = new string[] { "/admin-panel/multilingualism", "/todo-template/multilingualism" } }, }; diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/Urls.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/Urls.cs index 8cdd10f864..d540a779c4 100644 --- a/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/Urls.cs +++ b/src/Websites/Platform/src/Bit.Websites.Platform.Web/Shared/Urls.cs @@ -22,18 +22,18 @@ public static class Urls public const string Templates = "/templates/overview"; + public const string BoilerplateNuget = "https://www.nuget.org/packages/Bit.Boilerplate/"; + public const string TodoTemplatePwaPrerendered = "https://todo.bitplatform.dev/"; public const string TodoTemplateGooglePlay = "https://play.google.com/store/apps/details?id=com.bitplatform.Todo.Template"; public const string TodoTemplateAppleStore = "https://apps.apple.com/us/app/bit-todotemplate/id6450611072"; - public const string TodoTemplateNuget = "https://www.nuget.org/packages/Bit.TodoTemplate/"; public const string TodoTemplateFigma = "https://www.figma.com/file/PHDEnipl4PCWIoh5dCRpLd/Todo-Template?node-id=2022%3A5223"; - public const string BlazorDualNuget = "https://www.nuget.org/packages/Bit.BlazorDual/"; + public const string BlazorWebTemplate = "https://www.nuget.org/packages/Bit.BlazorWeb/"; public const string AdminPanelMultiLingual = "https://adminpanel.bitplatform.dev/"; public const string AdminPanelGooglePlay = "https://play.google.com/store/apps/details?id=com.bitplatform.AdminPanel.Template"; public const string AdminPanelAppleStore = "https://apps.apple.com/us/app/bit-adminpanel/id6450611349"; - public const string AdminPanelNuget = "https://www.nuget.org/packages/Bit.AdminPanel"; public const string AdminPanelFigma = "https://www.figma.com/community/file/1161030350747233731"; public const string Components = "https://components.bitplatform.dev/";