mirror of
https://github.com/Stefan-5422/-T5-Elektrifikatsiya.git
synced 2026-09-04 00:45:58 +02:00
Project structure
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33205.214
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elektrifikatsiya", "Elektrifikatsiya\Elektrifikatsiya.csproj", "{B35B4694-ACC4-4CD6-9518-B338F30111A0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B35B4694-ACC4-4CD6-9518-B338F30111A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B35B4694-ACC4-4CD6-9518-B338F30111A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B35B4694-ACC4-4CD6-9518-B338F30111A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B35B4694-ACC4-4CD6-9518-B338F30111A0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9B41CAF0-2427-4A49-9649-2150F53E3DDB}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,48 @@
|
||||
<Blazorise.ThemeProvider Theme="@theme">
|
||||
<Router AppAssembly="typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="routeData" DefaultLayout="typeof(Elektrifikatsiya.Layouts.MainLayout)" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<p>Sorry, there's nothing at this address.</p>
|
||||
</NotFound>
|
||||
</Router>
|
||||
<MessageProvider />
|
||||
<NotificationProvider />
|
||||
<PageProgressProvider />
|
||||
</Blazorise.ThemeProvider>
|
||||
@code {
|
||||
private Theme theme = new()
|
||||
{
|
||||
BarOptions = new()
|
||||
{
|
||||
HorizontalHeight = "72px"
|
||||
},
|
||||
ColorOptions = new()
|
||||
{
|
||||
Primary = "#0288D1",
|
||||
Secondary = "#A65529",
|
||||
Success = "#23C02E",
|
||||
Info = "#9BD8FE",
|
||||
Warning = "#F8B86C",
|
||||
Danger = "#F95741",
|
||||
Light = "#F0F0F0",
|
||||
Dark = "#535353",
|
||||
},
|
||||
BackgroundOptions = new()
|
||||
{
|
||||
Primary = "#0288D1",
|
||||
Secondary = "#A65529",
|
||||
Success = "#23C02E",
|
||||
Info = "#9BD8FE",
|
||||
Warning = "#F8B86C",
|
||||
Danger = "#F95741",
|
||||
Light = "#F0F0F0",
|
||||
Dark = "#535353",
|
||||
},
|
||||
InputOptions = new()
|
||||
{
|
||||
CheckColor = "#0288D1",
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@using System.Reflection
|
||||
<Bar Padding="Padding.Is1" Background="Background.Dark">
|
||||
<Heading TextAlignment="TextAlignment.Center" Width="Width.Is100" TextColor="TextColor.White" Size="HeadingSize.Is6">@($"{Assembly.GetExecutingAssembly().GetName().Name} v{Assembly.GetExecutingAssembly().GetName().Version}")</Heading>
|
||||
</Bar>
|
||||
@@ -0,0 +1,53 @@
|
||||
<Bar Breakpoint="Breakpoint.Desktop" NavigationBreakpoint="Breakpoint.Tablet" ThemeContrast="ThemeContrast.Dark"
|
||||
Mode="BarMode.VerticalInline" CollapseMode="BarCollapseMode.Small">
|
||||
<BarToggler />
|
||||
<BarBrand>
|
||||
<BarItem>
|
||||
<BarLink To="">
|
||||
<BarIcon IconName="customIcon" />
|
||||
Elektrifikatsiya
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
</BarBrand>
|
||||
<BarMenu>
|
||||
<BarStart>
|
||||
<BarItem>
|
||||
<BarLink To="/">
|
||||
<BarIcon IconName="IconName.Dashboard" />
|
||||
Dashboard
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarDropdown @bind-Visible="pagesBarVisible">
|
||||
<BarDropdownToggle>
|
||||
<BarIcon IconName="IconName.Edit" />
|
||||
Pages
|
||||
</BarDropdownToggle>
|
||||
<BarDropdownMenu>
|
||||
<BarDropdownItem To="/simple-form">Simple Form</BarDropdownItem>
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
</BarStart>
|
||||
<BarEnd>
|
||||
<BarItem>
|
||||
<BarDropdown>
|
||||
<BarDropdownToggle>
|
||||
<BarIcon IconName="IconName.Smartphone" />
|
||||
Apps
|
||||
</BarDropdownToggle>
|
||||
<BarDropdownMenu>
|
||||
<BarDropdownItem To="/apps/todo">
|
||||
Todo
|
||||
</BarDropdownItem>
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
</BarEnd>
|
||||
</BarMenu>
|
||||
</Bar>
|
||||
@code {
|
||||
private bool pagesBarVisible = true;
|
||||
|
||||
RenderFragment customIcon =@<img src="/brand-logo.png" style="width:32px; height: 32px" />;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<style>
|
||||
.demo-theme-color-item {
|
||||
display: table-cell;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.demo-theme-color-item .material-icons {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
@foreach ( var color in ThemeColors.Items.Values )
|
||||
{
|
||||
<div>
|
||||
@foreach ( var shade in color.Shades.Values )
|
||||
{
|
||||
var temp = shade.Value;
|
||||
|
||||
<div class="@(ClassNames(temp))" style="background: @temp" @onclick="@(()=>OnClick(temp))"></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@code{
|
||||
[Parameter]
|
||||
public string Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
if ( value == _value )
|
||||
{
|
||||
return;
|
||||
}
|
||||
_value = value;
|
||||
|
||||
InvokeAsync( StateHasChanged );
|
||||
|
||||
ValueChanged.InvokeAsync( value );
|
||||
}
|
||||
}
|
||||
|
||||
string ClassNames( string value )
|
||||
=> $"demo-theme-color-item{( value == Value ? " selected" : "" )}";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> ValueChanged { get; set; }
|
||||
|
||||
private string _value;
|
||||
|
||||
Task OnClick( string value )
|
||||
{
|
||||
Value = value;
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
@using Blazorise.Localization
|
||||
|
||||
<Bar @bind-Visible="@topbarVisible" Breakpoint="Breakpoint.Desktop" Background="Background.Primary" ThemeContrast="ThemeContrast.Light">
|
||||
<BarBrand>
|
||||
<BarItem>
|
||||
<BarLink To="">
|
||||
<BarIcon Margin="Margin.Is2.FromEnd" IconName="IconName.Dashboard" />
|
||||
Elektrifikatsiya
|
||||
</BarLink>
|
||||
</BarItem>
|
||||
</BarBrand>
|
||||
<BarToggler />
|
||||
<BarMenu>
|
||||
<BarStart>
|
||||
<BarItem>
|
||||
<BarLink To="/">Home</BarLink>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarLink To="https://blazorise.com/docs/">Documentation</BarLink>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarDropdown>
|
||||
<BarDropdownToggle>More</BarDropdownToggle>
|
||||
<BarDropdownMenu>
|
||||
<BarDropdownItem To="https://blazorise.com/docs/start/">
|
||||
Quick-Start Guide
|
||||
</BarDropdownItem>
|
||||
<BarDropdownDivider />
|
||||
<BarDropdownItem To="https://blazorise.com/docs/usage/">
|
||||
Usage
|
||||
</BarDropdownItem>
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarDropdown>
|
||||
<BarDropdownToggle>Layout</BarDropdownToggle>
|
||||
<BarDropdownMenu>
|
||||
<BarDropdownItem Clicked="@(()=>OnLayoutTypeChecked("fixed-header"))">
|
||||
@if ( LayoutType == "fixed-header" )
|
||||
{
|
||||
<Icon Name="IconName.CheckCircle" TextColor="TextColor.Success" />
|
||||
}
|
||||
Fixed Header
|
||||
</BarDropdownItem>
|
||||
<BarDropdownItem Clicked="@(()=>OnLayoutTypeChecked("fixed-header-footer-only"))">
|
||||
@if ( LayoutType == "fixed-header-footer-only" )
|
||||
{
|
||||
<Icon Name="IconName.CheckCircle" TextColor="TextColor.Success" />
|
||||
}
|
||||
Fixed Header and Footer only
|
||||
</BarDropdownItem>
|
||||
<BarDropdownItem Clicked="@(()=>OnLayoutTypeChecked("sider-with-header-on-top"))">
|
||||
@if ( LayoutType == "sider-with-header-on-top" )
|
||||
{
|
||||
<Icon Name="IconName.CheckCircle" TextColor="TextColor.Success" />
|
||||
}
|
||||
Sider with Header on top
|
||||
</BarDropdownItem>
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
|
||||
|
||||
</BarStart>
|
||||
<BarEnd>
|
||||
<BarItem>
|
||||
<BarDropdown RightAligned>
|
||||
<BarDropdownToggle><Icon Name="IconName.Language" /></BarDropdownToggle>
|
||||
<BarDropdownMenu>
|
||||
@foreach ( var cultureInfo in LocalizationService.AvailableCultures )
|
||||
{
|
||||
<BarDropdownItem @key="@cultureInfo.Name" Clicked="@(()=>SelectCulture(cultureInfo.Name))">
|
||||
@if ( cultureInfo.IsNeutralCulture )
|
||||
{
|
||||
@cultureInfo.EnglishName
|
||||
}
|
||||
else
|
||||
{
|
||||
@cultureInfo.Parent.EnglishName
|
||||
}
|
||||
</BarDropdownItem>
|
||||
}
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarDropdown RightAligned>
|
||||
<BarDropdownToggle><Icon Name="IconName.Tint" /> Theme</BarDropdownToggle>
|
||||
<BarDropdownMenu Style="padding: 15px; min-width:550px;">
|
||||
<Row>
|
||||
<Column Margin="Margin.Is2.FromBottom">
|
||||
<Field>
|
||||
<Switch TValue="bool" Checked="@(Theme?.Enabled == true)" CheckedChanged="@ThemeEnabledChanged">Theme enabled</Switch>
|
||||
</Field>
|
||||
</Column>
|
||||
</Row>
|
||||
<Row>
|
||||
<Column Margin="Margin.Is2.FromBottom">
|
||||
<Field>
|
||||
<Check TValue="bool" Checked="@(Theme?.IsGradient == true)" CheckedChanged="@ThemeGradientChanged">Gradient colors</Check>
|
||||
</Field>
|
||||
<Field>
|
||||
<Check TValue="bool" Checked="@(Theme?.IsRounded == true)" CheckedChanged="@ThemeRoundedChanged">Rounded elements</Check>
|
||||
</Field>
|
||||
</Column>
|
||||
</Row>
|
||||
<Row>
|
||||
<Column>
|
||||
<Container Fluid>
|
||||
<ThemeColorSelector Value="@(Theme?.ColorOptions?.Primary)" ValueChanged="@ThemeColorChanged"></ThemeColorSelector>
|
||||
</Container>
|
||||
</Column>
|
||||
</Row>
|
||||
</BarDropdownMenu>
|
||||
</BarDropdown>
|
||||
</BarItem>
|
||||
<BarItem>
|
||||
<BarLink To="https://github.com/Megabit/Blazorise">GitHub</BarLink>
|
||||
</BarItem>
|
||||
</BarEnd>
|
||||
</BarMenu>
|
||||
</Bar>
|
||||
@code {
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await SelectCulture( "en-US" );
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
Task SelectCulture( string name )
|
||||
{
|
||||
LocalizationService.ChangeLanguage( name );
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private bool topbarVisible = false;
|
||||
|
||||
Task OnLayoutTypeChecked( string layoutType )
|
||||
{
|
||||
LayoutType = layoutType;
|
||||
|
||||
return LayoutTypeChanged.InvokeAsync( layoutType );
|
||||
}
|
||||
|
||||
[Parameter] public EventCallback<bool> ThemeEnabledChanged { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<bool> ThemeGradientChanged { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<bool> ThemeRoundedChanged { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<string> ThemeColorChanged { get; set; }
|
||||
|
||||
[Parameter] public string LayoutType { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<string> LayoutTypeChanged { get; set; }
|
||||
|
||||
[Inject] protected ITextLocalizerService LocalizationService { get; set; }
|
||||
|
||||
[CascadingParameter] protected Theme Theme { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using Blazorise;
|
||||
|
||||
using Elektrifikatsiya.Components.TodoApp;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Elektrifikatsiya.Components.TodoApp;
|
||||
public abstract class BaseTodoItems : ComponentBase
|
||||
{
|
||||
protected Validations validations;
|
||||
|
||||
protected string description;
|
||||
|
||||
protected Filter filter = Filter.All;
|
||||
|
||||
protected List<Todo> todos = new()
|
||||
{
|
||||
new() { Description = "Buy milk" },
|
||||
new() { Description = "Call John regarding the meeting" },
|
||||
new() { Description = "Walk a dog" },
|
||||
};
|
||||
|
||||
protected IEnumerable<Todo> Todos
|
||||
{
|
||||
get
|
||||
{
|
||||
var query = from t in todos select t;
|
||||
|
||||
if (filter == Filter.Active)
|
||||
query = from q in query where !q.Completed select q;
|
||||
|
||||
if (filter == Filter.Completed)
|
||||
query = from q in query where q.Completed select q;
|
||||
|
||||
return query;
|
||||
}
|
||||
}
|
||||
|
||||
protected void SetFilter(Filter filter)
|
||||
{
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
protected void OnCheckAll(bool isChecked)
|
||||
{
|
||||
todos.ForEach(x => x.Completed = isChecked);
|
||||
}
|
||||
|
||||
protected async Task OnAddTodo()
|
||||
{
|
||||
if (await validations.ValidateAll())
|
||||
{
|
||||
todos.Add(new() { Description = description });
|
||||
description = null;
|
||||
|
||||
await validations.ClearAll();
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnClearCompleted()
|
||||
{
|
||||
todos.RemoveAll(x => x.Completed);
|
||||
filter = Filter.All;
|
||||
}
|
||||
|
||||
protected Task OnTodoStatusChanged(bool isChecked)
|
||||
{
|
||||
return InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Elektrifikatsiya.Components.TodoApp;
|
||||
|
||||
public enum Filter
|
||||
{
|
||||
All,
|
||||
Active,
|
||||
Completed,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Elektrifikatsiya.Components.TodoApp;
|
||||
|
||||
public class Todo
|
||||
{
|
||||
public bool Completed { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<ListGroupItem>
|
||||
<Field Horizontal Padding="Padding.IsAuto.OnAll">
|
||||
<FieldBody ColumnSize="ColumnSize.Is1">
|
||||
<Check TValue="bool" Checked="@Todo.Completed" CheckedChanged="@OnCheckedChanged"></Check>
|
||||
</FieldBody>
|
||||
<FieldBody ColumnSize="ColumnSize.Is11">
|
||||
@Todo.Description
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</ListGroupItem>
|
||||
@code{
|
||||
Task OnCheckedChanged( bool isChecked )
|
||||
{
|
||||
Todo.Completed = isChecked;
|
||||
|
||||
return StatusChanged?.Invoke( isChecked );
|
||||
}
|
||||
|
||||
[Parameter] public Todo Todo { get; set; }
|
||||
|
||||
[Parameter] public Func<bool, Task> StatusChanged { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
@inherits BaseTodoItems
|
||||
<Container Fluid>
|
||||
<Row>
|
||||
<Column>
|
||||
<Card>
|
||||
<CardHeader Padding="Padding.Is1.FromBottom">
|
||||
<CardTitle Size="4">Todo List</CardTitle>
|
||||
</CardHeader>
|
||||
<CardBody Padding="Padding.Is0.FromBottom">
|
||||
<Fields>
|
||||
<Column ColumnSize="ColumnSize.Is1">
|
||||
<Check TValue="bool" Checked="@Todos.All(x=>x.Completed)" CheckedChanged="@OnCheckAll">All</Check>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is11">
|
||||
<Addons>
|
||||
<Addon AddonType="AddonType.Body">
|
||||
<Validations @ref="validations" Mode="ValidationMode.Manual">
|
||||
<Validation Validator="@ValidationRule.IsNotEmpty">
|
||||
<TextEdit @bind-Text="@description" Placeholder="What needs to be done?"></TextEdit>
|
||||
</Validation>
|
||||
</Validations>
|
||||
</Addon>
|
||||
<Addon AddonType="AddonType.End">
|
||||
<Button Color="Color.Primary" Clicked="@OnAddTodo">
|
||||
<Icon Name="IconName.Add" />Add
|
||||
</Button>
|
||||
</Addon>
|
||||
</Addons>
|
||||
</Column>
|
||||
</Fields>
|
||||
</CardBody>
|
||||
<CardBody Padding="Padding.Is0.OnY">
|
||||
<ListGroup Flush>
|
||||
@foreach ( var todo in Todos )
|
||||
{
|
||||
<TodoItem Todo="@todo" StatusChanged="@OnTodoStatusChanged" />
|
||||
}
|
||||
</ListGroup>
|
||||
</CardBody>
|
||||
<CardFooter Padding="Padding.Is3.FromBottom">
|
||||
<Field Horizontal>
|
||||
<FieldBody ColumnSize="ColumnSize.Is10">
|
||||
<Buttons Role="ButtonsRole.Addons">
|
||||
<Button Color="Color.Info" Clicked="@(() => SetFilter( Filter.All ))" Active="@(filter == Filter.All)">All</Button>
|
||||
<Button Color="Color.Info" Clicked="@(() => SetFilter( Filter.Active ))" Active="@(filter == Filter.Active)">Active</Button>
|
||||
<Button Color="Color.Info" Clicked="@(() => SetFilter( Filter.Completed ))" Active="@(filter == Filter.Completed)">Completed</Button>
|
||||
</Buttons>
|
||||
</FieldBody>
|
||||
<FieldBody ColumnSize="ColumnSize.Is2">
|
||||
<Button Color="Color.Warning" Float="Float.End" Clicked="@OnClearCompleted" Display="@(todos.Any(x=>x.Completed) ? Display.Always : Display.None)">Clear Completed</Button>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</Column>
|
||||
</Row>
|
||||
</Container>
|
||||
@@ -0,0 +1,22 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Elektrifikatsiya/Elektrifikatsiya.csproj", "Elektrifikatsiya/"]
|
||||
RUN dotnet restore "Elektrifikatsiya/Elektrifikatsiya.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Elektrifikatsiya"
|
||||
RUN dotnet build "Elektrifikatsiya.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "Elektrifikatsiya.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "Elektrifikatsiya.dll"]
|
||||
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1</Version>
|
||||
<Authors>Megabit</Authors>
|
||||
<Company>Megabit</Company>
|
||||
<Description>
|
||||
This is a Blazorise Template for a Blazor Server Application.
|
||||
Blazorise is a component library built on top of Blazor and CSS frameworks like Bootstrap, Bulma and Material.
|
||||
</Description>
|
||||
<Copyright>Copyright 2018-2022 Megabit</Copyright>
|
||||
<UserSecretsId>bd144edc-e5c5-4b97-84d6-38c6b1edcbf9</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazorise" Version="1.1.*" />
|
||||
<PackageReference Include="Blazorise.Material" Version="1.1.*" />
|
||||
<PackageReference Include="Blazorise.Icons.Material" Version="1.1.*" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,68 @@
|
||||
@using Elektrifikatsiya.Components.Layout
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
|
||||
@if ( layoutType == "fixed-header" )
|
||||
{
|
||||
<Layout Sider>
|
||||
<LayoutSider>
|
||||
<LayoutSiderContent>
|
||||
<SideMenu />
|
||||
</LayoutSiderContent>
|
||||
</LayoutSider>
|
||||
<Layout>
|
||||
<LayoutHeader Fixed>
|
||||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
|
||||
ThemeGradientChanged="@OnThemeGradientChanged"
|
||||
ThemeRoundedChanged="@OnThemeRoundedChanged"
|
||||
ThemeColorChanged="@OnThemeColorChanged"
|
||||
@bind-LayoutType="@layoutType" />
|
||||
</LayoutHeader>
|
||||
<LayoutContent Padding="Padding.Is4.OnX.Is4.FromTop">
|
||||
@Body
|
||||
</LayoutContent>
|
||||
</Layout>
|
||||
</Layout>
|
||||
}
|
||||
else if ( layoutType == "fixed-header-footer-only" )
|
||||
{
|
||||
<Layout>
|
||||
<LayoutHeader Fixed>
|
||||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
|
||||
ThemeGradientChanged="@OnThemeGradientChanged"
|
||||
ThemeRoundedChanged="@OnThemeRoundedChanged"
|
||||
ThemeColorChanged="@OnThemeColorChanged"
|
||||
@bind-LayoutType="@layoutType" />
|
||||
</LayoutHeader>
|
||||
<LayoutContent Padding="Padding.Is4.OnX.Is4.FromTop">
|
||||
@Body
|
||||
</LayoutContent>
|
||||
<LayoutFooter Fixed>
|
||||
<FooterMenu></FooterMenu>
|
||||
</LayoutFooter>
|
||||
</Layout>
|
||||
}
|
||||
else if ( layoutType == "sider-with-header-on-top" )
|
||||
{
|
||||
<Layout>
|
||||
<LayoutHeader Fixed>
|
||||
<TopMenu ThemeEnabledChanged="@OnThemeEnabledChanged"
|
||||
ThemeGradientChanged="@OnThemeGradientChanged"
|
||||
ThemeRoundedChanged="@OnThemeRoundedChanged"
|
||||
ThemeColorChanged="@OnThemeColorChanged"
|
||||
@bind-LayoutType="@layoutType" />
|
||||
</LayoutHeader>
|
||||
<Layout Sider>
|
||||
<LayoutSider>
|
||||
<LayoutSiderContent>
|
||||
<SideMenu />
|
||||
</LayoutSiderContent>
|
||||
</LayoutSider>
|
||||
<Layout>
|
||||
<LayoutContent Padding="Padding.Is4.OnX.Is4.FromTop">
|
||||
@Body
|
||||
</LayoutContent>
|
||||
</Layout>
|
||||
</Layout>
|
||||
</Layout>
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using Blazorise;
|
||||
using Blazorise.Localization;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Elektrifikatsiya.Layouts;
|
||||
public partial class MainLayout
|
||||
{
|
||||
[Inject] protected ITextLocalizerService LocalizationService { get; set; }
|
||||
|
||||
[CascadingParameter] protected Theme? Theme { get; set; }
|
||||
|
||||
protected string layoutType = "fixed-header";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await SelectCulture("en-US");
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
private Task SelectCulture(string name)
|
||||
{
|
||||
LocalizationService.ChangeLanguage(name);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Task OnThemeEnabledChanged(bool value)
|
||||
{
|
||||
if (Theme is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Theme.Enabled = value;
|
||||
|
||||
return InvokeAsync(Theme.ThemeHasChanged);
|
||||
}
|
||||
|
||||
Task OnThemeGradientChanged(bool value)
|
||||
{
|
||||
if (Theme is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Theme.IsGradient = value;
|
||||
|
||||
return InvokeAsync(Theme.ThemeHasChanged);
|
||||
}
|
||||
|
||||
Task OnThemeRoundedChanged(bool value)
|
||||
{
|
||||
if (Theme is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Theme.IsRounded = value;
|
||||
|
||||
return InvokeAsync(Theme.ThemeHasChanged);
|
||||
}
|
||||
|
||||
Task OnThemeColorChanged(string value)
|
||||
{
|
||||
if (Theme is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Theme.ColorOptions ??= new();
|
||||
|
||||
Theme.BackgroundOptions ??= new();
|
||||
|
||||
Theme.TextColorOptions ??= new();
|
||||
|
||||
Theme.ColorOptions.Primary = value;
|
||||
Theme.BackgroundOptions.Primary = value;
|
||||
Theme.TextColorOptions.Primary = value;
|
||||
|
||||
Theme.InputOptions ??= new();
|
||||
|
||||
Theme.InputOptions.CheckColor = value;
|
||||
Theme.InputOptions.SliderColor = value;
|
||||
|
||||
Theme.SpinKitOptions ??= new();
|
||||
|
||||
Theme.SpinKitOptions.Color = value;
|
||||
|
||||
return InvokeAsync(Theme.ThemeHasChanged);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
@page "/"
|
||||
@inject IVersionProvider VersionProvider
|
||||
<Heading Size="HeadingSize.Is1" Margin="Margin.Is3.FromBottom">Blazorise</Heading>
|
||||
|
||||
<Paragraph>
|
||||
Blazorise is a component library built on top of Blazor and CSS frameworks like <Anchor To="https://getbootstrap.com/" Target="Target.Blank">Bootstrap</Anchor>, <Anchor To="https://bulma.io/" Target="Target.Blank">Bulma</Anchor>, <Anchor To="https://ant.design/" Target="Target.Blank">Ant Design</Anchor>, and <Anchor To="http://daemonite.github.io/material/" Target="Target.Blank">Material</Anchor>. It can be used to build responsive, single-page web applications.
|
||||
</Paragraph>
|
||||
|
||||
<Alert Color="Color.Info" Visible>
|
||||
<Paragraph>
|
||||
This is a Blazorise Starting Template allowing you to quickly get started building your project!
|
||||
</Paragraph>
|
||||
|
||||
<Paragraph>
|
||||
The bare minimum has been installed for you:
|
||||
<ul>
|
||||
<li>Blazorise @($"v{VersionProvider.MilestoneVersion}")</li>
|
||||
<li>The Blazorise Provider you have selected</li>
|
||||
<li>The corresponding icon provider</li>
|
||||
</ul>
|
||||
However Blazorise has many more extensions at your disposal.
|
||||
You can find them <Anchor To="https://blazorise.com/docs/extensions" Target="Target.Blank">here</Anchor>.
|
||||
</Paragraph>
|
||||
|
||||
<Paragraph>
|
||||
Please visit the official <Anchor To="https://bootstrapdemo.blazorise.com/" Target="Target.Blank">Blazorise Demo</Anchor> for component examples.
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
Please visit the official <Anchor To="https://blazorise.com/docs/" Target="Target.Blank">Blazorise Documentation</Anchor> to learn more about the available components.
|
||||
</Paragraph>
|
||||
</Alert>
|
||||
@@ -0,0 +1,37 @@
|
||||
@page
|
||||
@model Elektrifikatsiya.Pages.ErrorModel
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Error</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Error.</h1>
|
||||
<h2>An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Elektrifikatsiya.Pages;
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public class ErrorModel : PageModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
private readonly ILogger<ErrorModel> _logger;
|
||||
|
||||
public ErrorModel(ILogger<ErrorModel> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
@page "/simple-form"
|
||||
<Row>
|
||||
<Column ColumnSize="ColumnSize.Is6.OnDesktop">
|
||||
<Card Margin="Margin.Is4.FromBottom">
|
||||
<CardHeader>
|
||||
<CardTitle>Basic Example</CardTitle>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<Validations @ref="validationsBasicExampleRef" Mode="ValidationMode.Auto" ValidateOnLoad="false">
|
||||
<Validation Validator="@ValidationRule.IsEmail">
|
||||
<Field>
|
||||
<FieldLabel>Email address</FieldLabel>
|
||||
<TextEdit Placeholder="Enter email" />
|
||||
<FieldHelp>We'll never share your email with anyone else.</FieldHelp>
|
||||
</Field>
|
||||
</Validation>
|
||||
<Validation Validator="@ValidatePassword">
|
||||
<Field>
|
||||
<FieldLabel>Password</FieldLabel>
|
||||
<TextEdit Role="TextRole.Password" Placeholder="Password" />
|
||||
</Field>
|
||||
</Validation>
|
||||
|
||||
<Field>
|
||||
<Check TValue="bool">Remember me?</Check>
|
||||
</Field>
|
||||
<Button Color="Color.Primary" Clicked="SubmitBasicExample">Submit</Button>
|
||||
</Validations>
|
||||
</CardBody>
|
||||
</Card>
|
||||
</Column>
|
||||
<Column ColumnSize="ColumnSize.Is6.OnDesktop">
|
||||
<Card Margin="Margin.Is4.FromBottom">
|
||||
<CardHeader>
|
||||
<CardTitle>Horizontal Form</CardTitle>
|
||||
</CardHeader>
|
||||
<CardBody>
|
||||
<Validations @ref="validationsHorizontalFormRef" Mode="ValidationMode.Auto" ValidateOnLoad="false">
|
||||
<Validation Validator="@ValidationRule.IsEmail">
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.IsFull.OnTablet.Is3.OnDesktop">Email address</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.IsFull.OnTablet.Is9.OnDesktop">
|
||||
<TextEdit Placeholder="Email" />
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
<Validation Validator="@ValidatePassword">
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.IsFull.OnTablet.Is3.OnDesktop">Password</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.IsFull.OnTablet.Is9.OnDesktop">
|
||||
<TextEdit Role="TextRole.Password" Placeholder="Password" @bind-Text="@password" />
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
<Validation Validator="@ValidatePassword2">
|
||||
<Field Horizontal>
|
||||
<FieldLabel ColumnSize="ColumnSize.IsFull.OnTablet.Is3.OnDesktop">Re Password</FieldLabel>
|
||||
<FieldBody ColumnSize="ColumnSize.IsFull.OnTablet.Is9.OnDesktop">
|
||||
<TextEdit Role="TextRole.Password" Placeholder="Retype password" />
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validation>
|
||||
<Field Horizontal JustifyContent="JustifyContent.End">
|
||||
<FieldBody ColumnSize="ColumnSize.Is9.Is3.WithOffset">
|
||||
<Check TValue="bool">Remember me?</Check>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
<Field Horizontal JustifyContent="JustifyContent.End">
|
||||
<FieldBody ColumnSize="ColumnSize.Is9.Is3.WithOffset">
|
||||
<Button Color="Color.Primary" Clicked="SubmitHorizontalForm">Submit</Button>
|
||||
</FieldBody>
|
||||
</Field>
|
||||
</Validations>
|
||||
</CardBody>
|
||||
</Card>
|
||||
</Column>
|
||||
</Row>
|
||||
@code {
|
||||
Validations validationsBasicExampleRef;
|
||||
Validations validationsHorizontalFormRef;
|
||||
string password;
|
||||
|
||||
void ValidatePassword( ValidatorEventArgs e )
|
||||
{
|
||||
e.Status = Convert.ToString( e.Value )?.Length >= 6 ? ValidationStatus.Success : ValidationStatus.Error;
|
||||
}
|
||||
|
||||
void ValidatePassword2( ValidatorEventArgs e )
|
||||
{
|
||||
var password2 = Convert.ToString( e.Value );
|
||||
|
||||
if ( password2?.Length < 6 )
|
||||
{
|
||||
e.Status = ValidationStatus.Error;
|
||||
e.ErrorText = "Password must be at least 6 characters long!";
|
||||
}
|
||||
else if ( password2 != password )
|
||||
{
|
||||
e.Status = ValidationStatus.Error;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Status = ValidationStatus.Success;
|
||||
}
|
||||
}
|
||||
|
||||
async Task SubmitBasicExample()
|
||||
{
|
||||
if ( await validationsBasicExampleRef.ValidateAll() )
|
||||
{
|
||||
await validationsBasicExampleRef.ClearAll();
|
||||
}
|
||||
}
|
||||
|
||||
async Task SubmitHorizontalForm()
|
||||
{
|
||||
if ( await validationsHorizontalFormRef.ValidateAll() )
|
||||
{
|
||||
await validationsHorizontalFormRef.ClearAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@using Elektrifikatsiya.Components.TodoApp
|
||||
@page "/apps/todo"
|
||||
<TodoItems />
|
||||
@@ -0,0 +1,8 @@
|
||||
@page "/"
|
||||
@namespace Elektrifikatsiya.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
||||
<component type="typeof(App)" render-mode="Server" />
|
||||
@@ -0,0 +1,44 @@
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@namespace Elektrifikatsiya.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<base href="~/" />
|
||||
|
||||
<component type="typeof(HeadOutlet)" render-mode="Server" />
|
||||
<!-- Material CSS -->
|
||||
<link href="css/material/material.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Add Material font (Roboto) and Material icon as needed -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i|Roboto+Mono:300,400,700|Roboto+Slab:300,400,700" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
|
||||
<link href="_content/Blazorise/blazorise.min.css?v=1.1.3.0" rel="stylesheet" />
|
||||
<link href="_content/Blazorise.Material/blazorise.material.css" rel="stylesheet" />
|
||||
<link href="_content/Blazorise.Icons.Material/blazorise.icons.material.css" rel="stylesheet" />
|
||||
|
||||
<link rel="stylesheet" href="css/blazor-ui.css" />
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
<environment include="Staging,Production">
|
||||
An error has occurred. This application may no longer respond until reloaded.
|
||||
</environment>
|
||||
<environment include="Development">
|
||||
An unhandled exception has occurred. See browser dev tools for details.
|
||||
</environment>
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="js/material/material.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
using Blazorise;
|
||||
using Blazorise.Icons.Material;
|
||||
using Blazorise.Material;
|
||||
|
||||
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddServerSideBlazor();
|
||||
|
||||
AddBlazorise(builder.Services);
|
||||
|
||||
WebApplication app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
_ = app.UseExceptionHandler("/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
_ = app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
_ = endpoints.MapBlazorHub();
|
||||
_ = endpoints.MapFallbackToPage("/_Host");
|
||||
});
|
||||
|
||||
app.Run();
|
||||
|
||||
void AddBlazorise(IServiceCollection services)
|
||||
{
|
||||
_ = services
|
||||
.AddBlazorise();
|
||||
_ = services
|
||||
.AddMaterialProviders()
|
||||
.AddMaterialIcons();
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Elektrifikatsiya": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:7297;http://localhost:5255"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{IPAdress}:{ServicePort}",
|
||||
"publishAllPorts": true,
|
||||
"useSSL": true,
|
||||
"DockerfileRunArguments": "-p 80:80 -p 443:443"
|
||||
}
|
||||
},
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:61646",
|
||||
"sslPort": 44332
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@using Elektrifikatsiya
|
||||
@using Blazorise
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,28 @@
|
||||
#blazor-error-ui {
|
||||
background: #ffffe0;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: .6rem 1.25rem .7rem 1.25rem;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index: 1000
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: .75rem;
|
||||
top: .5rem
|
||||
}
|
||||
|
||||
.blazor-error-boundary {
|
||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||
padding: 1rem 1rem 1rem 3.7rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user