Skip to content

Commit

Permalink
Merge pull request #47 from majorimi/dev/color
Browse files Browse the repository at this point in the history
Updated demo app.
  • Loading branch information
majorimi authored Nov 30, 2020
2 parents 9f87263 + ab25579 commit 4600b4d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 18 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ Blazor Components
============

[![Build Status](https://dev.azure.com/major-soft/GitHub/_apis/build/status/blazor-components/blazor-components-build-check)](https://dev.azure.com/major-soft/GitHub/_build/latest?definitionId=6)
[![Build Status](https://dev.azure.com/major-soft/GitHub/_apis/build/status/blazor-components/blazor-components-Nuget?branchName=master)](https://dev.azure.com/major-soft/GitHub/_build/latest?definitionId=7&branchName=master)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/majorimi/blazor-components/blob/master/LICENSE)
![GitHub last commit](https://img.shields.io/github/last-commit/majorimi/blazor-components)
![GitHub Release Date](https://img.shields.io/github/release-date/majorimi/blazor-components)
![GitHub Repo stars](https://img.shields.io/github/stars/majorimi/blazor-components)
[![Build Status](https://dev.azure.com/major-soft/GitHub/_apis/build/status/blazor-components/blazor-components-Nuget?branchName=master)](https://dev.azure.com/major-soft/GitHub/_build/latest?definitionId=7&branchName=master)

Majorsoft Blazor Components is a set of UI Components and other useful Extensions for [Blazor](https://blazor.net) applications.
All components are available on [NuGet](https://www.nuget.org/profiles/Blazor.Components).
Expand Down
20 changes: 10 additions & 10 deletions demo/Blazor.Components.DemoApp/Blazor.Components.DemoApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Majorsoft.Blazor.Components.Common.JsInterop" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.CssEvents" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Debounce" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Loading" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Modal" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.PermaLink" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Timer" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Typeahead" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Server.Logging.Console" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.WebAssembly.Logging.Console" Version="1.0.0" />
<PackageReference Include="Majorsoft.Blazor.Components.Common.JsInterop" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.CssEvents" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.Debounce" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.Loading" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.Modal" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.PermaLink" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.Timer" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Components.Typeahead" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.Server.Logging.Console" Version="1.0.1" />
<PackageReference Include="Majorsoft.Blazor.WebAssembly.Logging.Console" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
Expand Down
8 changes: 4 additions & 4 deletions demo/Blazor.Components.DemoApp/Components/JSInterop.razor
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<div class="row pb-2">
<div class="col-12">
<p><code>RegisterPageMouseDownAsync()</code>, <code>RegisterPageMouseUpAsync()</code>, <code>RegisterPageMouseMoveAsync()</code> will add event listeners to HTML document/window <code>mouse</code> events.</p>
<button class="btn btn-primary" @onclick="GlobalClickEventHandler">@(_clickSubscribed ? "Unsubscribe from all event" : "Subscribe to all event")</button>
<button class="btn btn-primary" @onclick="GlobalClickEventHandler">@(_clickSubscribed2 ? "Unsubscribe from all event" : "Subscribe to all event")</button>
<br />

<label><strong>Global Mouse events log</strong>:</label>
Expand Down Expand Up @@ -257,11 +257,11 @@
//Mouse examples
private ElementReference _log3;
private string _logMessage3;
private bool _clickSubscribed3;
private bool _clickSubscribed2;
private string _mouseDown, _mouseUp, _mouseMove;
private async Task GlobalClickEventHandler()
{
if (_clickSubscribed3)
if (_clickSubscribed2)
{
await _globalMouseEventHandler.RemovePageMouseDownAsync(_mouseDown);
await _globalMouseEventHandler.RemovePageMouseUpAsync(_mouseUp);
Expand All @@ -274,7 +274,7 @@
_mouseMove = await _globalMouseEventHandler.RegisterPageMouseMoveAsync(async (args) => await PageMouseEvents(args, "Document Mouse MOVE"));
}

_clickSubscribed3 = !_clickSubscribed3;
_clickSubscribed2 = !_clickSubscribed2;
}
private async Task PageMouseEvents(MouseEventArgs args, string message)
{
Expand Down
2 changes: 1 addition & 1 deletion demo/Blazor.Components.DemoApp/Components/Loading.razor
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
@code {
protected override async Task OnAfterRenderAsync(bool firstRender)
{
@*await _loadingButton.InnerElementReference.FocusAsync();*@
await _loadingButton.InnerElementReference.FocusAsync();
}

private string _overlayColor = "lightblue";
Expand Down
17 changes: 15 additions & 2 deletions demo/Blazor.Components.DemoApp/Components/Permalink.razor
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ textarea {
IconPosition="@_iconPosition"
IconActions="@((PermaLinkIconActions)_action)"
IconStyle="_iconStyle"
IconSize="18"
IconMarginTop="7"
IconSize="_iconSize"
IconMarginTop="_iconMarginTop"
OnPermaLinkCopied="@LinkCopied">
<Content>
<h3>Customizable <code>PermaLinkElement</code> wrapper component</h3>
Expand All @@ -92,6 +92,17 @@ textarea {
</div>
</div>

<div class="row pb-2">
<div class="col-12 col-lg-8 col-xl-5">
<input type="range" min="10" max="22" @bind="_iconSize" @oninput="(e => _iconSize = int.Parse(e.Value?.ToString()))" /> <pre style="display: inline;">PermaLink icon size: @(_iconSize)px</pre>
</div>
</div>
<div class="row pb-2">
<div class="col-12 col-lg-8 col-xl-5">
<input type="range" min="0" max="14" @bind="_iconMarginTop" @oninput="(e => _iconMarginTop = int.Parse(e.Value?.ToString()))" /> <pre style="display: inline;">PermaLink icon Margin top: @(_iconMarginTop)px</pre>
</div>
</div>

<div class="row pb-2">
<div class="col-12 col-lg-8 col-xl-5">
Show PermaLink icon: <select class="form-control selectpicker w-100" @bind="_iconPosition">
Expand Down Expand Up @@ -140,6 +151,8 @@ textarea {
private PermaLinkStyle _iconStyle;
private int _action = (int)PermaLinkIconActions.Copy;

private int _iconSize = 18;
private int _iconMarginTop = 7;
private string _logMessage;
private ElementReference _log;

Expand Down

0 comments on commit 4600b4d

Please sign in to comment.