Skip to content

Commit bc44d0a

Browse files
refactor: web projects
1 parent 8f88af9 commit bc44d0a

99 files changed

Lines changed: 6214 additions & 5613 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/2-Clients/AdminPanel/AdminPanel.csproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,11 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88
<ItemGroup>
9-
<PackageReference Include="CodeBlock.DevKit.Core" Version="1.3.3" />
10-
<PackageReference Include="CodeBlock.DevKit.Application" Version="1.3.3" />
11-
<PackageReference Include="CodeBlock.DevKit.Authorization" Version="1.3.3" />
12-
<PackageReference Include="CodeBlock.DevKit.Authorization.UI" Version="1.3.3" />
13-
<PackageReference Include="CodeBlock.DevKit.Web" Version="1.3.3" />
14-
<PackageReference Include="CodeBlock.DevKit.Web.Blazor.Server" Version="1.3.3" />
15-
<PackageReference Include="CodeBlock.DevKit.Licensing" Version="1.3.3" />
16-
<PackageReference Include="CodeBlock.DevKit.Licensing.UI" Version="1.3.3" />
179
<PackageReference Include="CodeBlock.DevKit.Clients.AdminPanel" Version="1.3.3" />
1810
</ItemGroup>
1911
<ItemGroup>
2012
<ProjectReference Include="..\..\1-Libraries\Infrastructure\Infrastructure.csproj" />
2113
</ItemGroup>
22-
<ItemGroup>
23-
<Content Update="wwwroot\site.webmanifest">
24-
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
25-
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
26-
</Content>
27-
</ItemGroup>
2814
<ItemGroup>
2915
<Content Include="..\..\..\codeblock.dev.license.lic">
3016
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

src/2-Clients/AdminPanel/App.razor

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,26 @@
44
@using System.Reflection
55
@inject ModuleRegistry ModuleRegistry
66
@inherits AppBase
7-
8-
<CascadingBlazoredModal HideCloseButton="false" ContentScrollable="true" DisableBackgroundCancel="true">
7+
<CascadingBlazoredModal HideCloseButton="false" ContentScrollable="true" DisableBackgroundCancel="true" Animation="@ModalAnimation.FadeIn(0.2)">
98
<CascadingAuthenticationState>
109
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="@ModuleRegistry.GetUIModuleAssemblies()">
1110
<Found Context="routeData">
12-
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
11+
<CustomAuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(AdminPanelLayout)">
1312
<Authorizing>
1413
<LayoutView Layout="@typeof(SimpleLayout)">
15-
<Error ShowIndexLink=false Title="@BlazorServerLocalizer[BlazorServerResource.Error_Authorization_Title]" Message="@BlazorServerLocalizer[BlazorServerResource.Error_Authorization_Message]" />
14+
<Alert ShowLinkedButtons=false Title="@CoreLocalizer[CoreResource.Error_Authorization_Title]" Message="@CoreLocalizer[CoreResource.Error_Authorization_Message]" />
1615
</LayoutView>
1716
</Authorizing>
1817
<NotAuthorized>
1918
<LayoutView Layout="@typeof(SimpleLayout)">
2019
<RedirectToLogin />
2120
</LayoutView>
2221
</NotAuthorized>
23-
</AuthorizeRouteView>
22+
</CustomAuthorizeRouteView>
2423
</Found>
2524
<NotFound>
2625
<LayoutView Layout="@typeof(SimpleLayout)">
27-
<Error Title="@BlazorServerLocalizer[BlazorServerResource.Error_NotFound_Title]" Message="@BlazorServerLocalizer[BlazorServerResource.Error_NotFound_Message]" />
26+
<Alert Title="@CoreLocalizer[CoreResource.Error_NotFound_Title]" Message="@CoreLocalizer[CoreResource.Error_NotFound_Message]" />
2827
</LayoutView>
2928
</NotFound>
3029
</Router>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@using CodeBlock.DevKit.Web.Blazor.Server.Attributes
2+
@inherits CustomNavMenu
3+
@attribute [ReplaceBaseComponent]
4+
5+
<div class="nav-item">
6+
<NavLink @onclick="base.HandleNavItemClicked" class="nav-link ms-1" href="/test">
7+
<span class="bi bi-plugin p-1" aria-hidden="true"></span> @AdminPanelLocalizer[AdminPanelResource.Nav_Menu_Custom]
8+
</NavLink>
9+
</div>

src/2-Clients/AdminPanel/Pages/Shared/_Layout.cshtml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
@page "/test"
22

33
<PageTitle>Test page</PageTitle>
4-
<h2>Test page</h2>
4+
5+
<h1 class="page-title">
6+
Test page
7+
</h1>

src/2-Clients/AdminPanel/Pages/_Host.cshtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
@page "/"
22
@namespace CanBeYours.AdminPanel.Pages
33
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
4+
@using CodeBlock.DevKit.Contracts.Models
45
@using CodeBlock.DevKit.Web.Blazor.Server.Components
56
@using CodeBlock.DevKit.Web.Localization
67
@using Microsoft.AspNetCore.Components.Web
78
@inject LocalizationSettings LocalizationSettings
9+
@inject ApplicationSettings ApplicationSettings
810
@{
911
Layout = null;
1012
}
@@ -13,9 +15,8 @@
1315
<html dir="@LocalizationSettings.GetCurrentLanguageDirection()" lang="@LocalizationSettings.GetCurrentLanguageCode()" style="font-family: @LocalizationSettings.GetCurrentLanguageFont() !important">
1416

1517
<head>
16-
<meta charset="utf-8" />
17-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
18-
<link rel="icon" href="~/favicon.ico" type="image/x-icon">
18+
<component type="typeof(HeadTags)" render-mode="ServerPrerendered" />
19+
<meta name="description" content="@ApplicationSettings.Localized.Description">
1920
<base href="~/" />
2021
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
2122
</head>

src/2-Clients/AdminPanel/Pages/_ViewStart.cshtml

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/2-Clients/AdminPanel/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
using CanBeYours.AdminPanel;
1+
// Copyright (c) CodeBlock.Dev. All rights reserved.
2+
// For more information visit https://codeblock.dev
23

3-
internal class Program
4+
namespace CanBeYours.AdminPanel;
5+
6+
public class Program
47
{
58
private static void Main(string[] args)
69
{

src/2-Clients/AdminPanel/Resources/AdminPanelResource.Designer.cs

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64+
<xsd:element name="root" msdata:IsDataSet="true">
65+
<xsd:complexType>
66+
<xsd:choice maxOccurs="unbounded">
67+
<xsd:element name="metadata">
68+
<xsd:complexType>
69+
<xsd:sequence>
70+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" use="required" type="xsd:string" />
73+
<xsd:attribute name="type" type="xsd:string" />
74+
<xsd:attribute name="mimetype" type="xsd:string" />
75+
<xsd:attribute ref="xml:space" />
76+
</xsd:complexType>
77+
</xsd:element>
78+
<xsd:element name="assembly">
79+
<xsd:complexType>
80+
<xsd:attribute name="alias" type="xsd:string" />
81+
<xsd:attribute name="name" type="xsd:string" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
<xsd:element name="data">
85+
<xsd:complexType>
86+
<xsd:sequence>
87+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89+
</xsd:sequence>
90+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93+
<xsd:attribute ref="xml:space" />
94+
</xsd:complexType>
95+
</xsd:element>
96+
<xsd:element name="resheader">
97+
<xsd:complexType>
98+
<xsd:sequence>
99+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100+
</xsd:sequence>
101+
<xsd:attribute name="name" type="xsd:string" use="required" />
102+
</xsd:complexType>
103+
</xsd:element>
104+
</xsd:choice>
105+
</xsd:complexType>
106+
</xsd:element>
107+
</xsd:schema>
108+
<resheader name="resmimetype">
109+
<value>text/microsoft-resx</value>
110+
</resheader>
111+
<resheader name="version">
112+
<value>2.0</value>
113+
</resheader>
114+
<resheader name="reader">
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116+
</resheader>
117+
<resheader name="writer">
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119+
</resheader>
120+
<data name="Nav_Menu_Custom" xml:space="preserve">
121+
<value>مخصص</value>
122+
</data>
123+
</root>

0 commit comments

Comments
 (0)