-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/update nuget to 1 6 0 (#212)
## Target <!-- Why are you making this change? --> Add a rounded option to the GetCroppedCanvas method #### Open Questions <!-- OPTIONAL - [ ] Use the GitHub checklists to spark discussion on issues that may arise from your approach. Please tick the box and explain your answer. --> ## Checklist <!-- It serves as a gentle reminder for common tasks. Confirm it's done and check everything that applies. --> - [x] Documentation updated - [x] Tests cover new or modified code - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] New dependencies added - [ ] Includes breaking changes - [x] Version bumped ## Visuals <!-- OPTIONAL Show results both before and after this change. When the output changes, it can be a screenshot of a trace, metric, or log illustrating the change. --> --------- Co-authored-by: ColdForeign <[email protected]> Co-authored-by: George Radchuk <[email protected]>
- Loading branch information
1 parent
962175f
commit 45bcfff
Showing
64 changed files
with
3,242 additions
and
670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
|
||
**Pull Request** | ||
- [ ] I would like to do a Pull Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Github Discussions | ||
url: https://github.com/CropperBlazor/Cropper.Blazor/discussions | ||
about: Please ask and answer questions here | ||
- name: Telegram | ||
url: https://t.me/+dLQD8Al6C9s0ZjMy | ||
about: You can also ask and answer questions here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. | ||
|
||
**Pull Request** | ||
- [ ] I would like to do a Pull Request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 24 additions & 14 deletions
38
src/Cropper.Blazor/Client/Components/AspectRatioSettings.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
<MudCard Class="d-flex justify-space-between flex-column mb-6"> | ||
<MudCardContent> | ||
<MudText>Aspect Ratio Settings (only for FREE aspect ratio)</MudText> | ||
<MudNumericField @bind-Value="MinAspectRatio" | ||
Label="Min aspect ratio" | ||
Disabled="!IsEnableAspectRatioSettings" | ||
Min="0" | ||
Max="MaxAspectRatio"> | ||
<MudCard Class="mud-height-full"> | ||
<MudCardHeader Class="border-solid border-b mud-border-lines-default"> | ||
<CardHeaderContent> | ||
<div class="d-flex flex-column gap-2"> | ||
<MudText Typo="Typo.h5">Aspect Ratio Settings</MudText> | ||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true"> | ||
This option work's only for <b>FREE</b> aspect ratio mode! | ||
</MudAlert> | ||
</div> | ||
</CardHeaderContent> | ||
</MudCardHeader> | ||
<MudCardContent Class="mud-height-full pt-0"> | ||
<MudNumericField @bind-Value="MinAspectRatio" Label="Min aspect ratio" | ||
Disabled="!IsFreeAspectRatioEnabled" | ||
Min="0" Max="MaxAspectRatio"> | ||
</MudNumericField> | ||
<MudNumericField @bind-Value="MaxAspectRatio" | ||
Label="Max aspect ratio" | ||
Disabled="!IsEnableAspectRatioSettings" | ||
<MudNumericField @bind-Value="MaxAspectRatio" Label="Max aspect ratio" | ||
Disabled="!IsFreeAspectRatioEnabled" | ||
Min="MinAspectRatio ?? 0"> | ||
</MudNumericField> | ||
<MudText Class="mt-4"> | ||
Current aspect ratio: @AspectRatio | ||
</MudText> | ||
<div class="d-flex gap-x-6 align-end"> | ||
<MudChip Variant="Variant.Outlined" Color="Color.Primary" Class="flex-1 ma-0 mt-4"> | ||
Current aspect ratio: | ||
</MudChip> | ||
<MudNumericField @bind-Value="AspectRatio" Format="N4" Variant="Variant.Text" | ||
HideSpinButtons="true" ReadOnly="true" Class="flex-1" /> | ||
</div> | ||
</MudCardContent> | ||
</MudCard> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 26 additions & 20 deletions
46
src/Cropper.Blazor/Client/Components/CroppedDimensionsSettings.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,32 @@ | ||
<MudCard Class="d-flex justify-space-between flex-column mb-6"> | ||
<MudCardContent> | ||
<MudText> | ||
Dimensions Settings | ||
<h6>This option may not work with arbitrary 'Aspect Ratios' images, it is recommended to use a free Aspect Ratio for this option or calculate the allowed values yourself</h6> | ||
</MudText> | ||
<MudNumericField @bind-Value="MinimumWidth" | ||
Label="Minimum Width" | ||
Min="0" | ||
Max="MaximumWidth"> | ||
<MudCard Class="mud-height-full"> | ||
<MudCardHeader Class="border-solid border-b mud-border-lines-default"> | ||
<CardHeaderContent> | ||
<div class="d-flex flex-column gap-2"> | ||
<MudText Typo="Typo.h5">Dimensions Settings</MudText> | ||
<MudAlert Severity="Severity.Warning" Variant="Variant.Outlined" Dense="true"> | ||
<b>This setting may not work with a specific aspect ratio.</b> | ||
It is recommended to use a <b>FREE</b> aspect ratio for this | ||
option or calculate the valid values yourself. | ||
</MudAlert> | ||
</div> | ||
</CardHeaderContent> | ||
</MudCardHeader> | ||
<MudCardContent Class="mud-height-full pt-0"> | ||
<div class="d-flex gap-x-6 flex-wrap flex-sm-nowrap"> | ||
<MudNumericField @bind-Value="MinimumHeight" Label="Minimum Height" Min="0" Max="MaximumHeight" | ||
Adornment="Adornment.End" AdornmentText="px" AdornmentColor="Color.Primary"> | ||
</MudNumericField> | ||
<MudNumericField @bind-Value="MaximumWidth" | ||
Label="Maximum Width" | ||
Min="MinimumWidth ?? 0"> | ||
<MudNumericField @bind-Value="MinimumWidth" Label="Minimum Width" Min="0" Max="MaximumWidth" | ||
Adornment="Adornment.End" AdornmentText="px" AdornmentColor="Color.Primary"> | ||
</MudNumericField> | ||
<MudNumericField @bind-Value="MinimumHeight" | ||
Label="Minimum Height" | ||
Min="0" | ||
Max="MaximumHeight"> | ||
</div> | ||
<div class="d-flex gap-x-6 flex-wrap flex-sm-nowrap"> | ||
<MudNumericField @bind-Value="MaximumHeight" Label="Maximum Height" Min="MinimumHeight ?? 0" | ||
Adornment="Adornment.End" AdornmentText="px" AdornmentColor="Color.Primary"> | ||
</MudNumericField> | ||
<MudNumericField @bind-Value="MaximumHeight" | ||
Label="Maximum Height" | ||
Min="MinimumHeight ?? 0"> | ||
<MudNumericField @bind-Value="MaximumWidth" Label="Maximum Width" Min="MinimumWidth ?? 0" | ||
Adornment="Adornment.End" AdornmentText="px" AdornmentColor="Color.Primary"> | ||
</MudNumericField> | ||
</div> | ||
</MudCardContent> | ||
</MudCard> |
8 changes: 4 additions & 4 deletions
8
src/Cropper.Blazor/Client/Components/CropperDataPreview.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Cropper.Blazor.Components; | ||
|
||
namespace Cropper.Blazor.Client.Components.Docs | ||
{ | ||
public static class ApiLink | ||
{ | ||
private static Dictionary<Type, string> SpecialCaseComponents = | ||
new() | ||
{ | ||
[typeof(CropperComponent)] = "cropper-component" | ||
}; | ||
|
||
public static string GetComponentLinkFor(Type type) | ||
{ | ||
return $"components/{GetComponentName(type)}"; | ||
} | ||
|
||
private static string GetComponentName(Type type) | ||
{ | ||
if (!SpecialCaseComponents.TryGetValue(type, out var component)) | ||
{ | ||
component = new string(type.ToString().Replace("Cropper.Blazor", "").TakeWhile(c => c != '`').ToArray()) | ||
.ToLowerInvariant(); | ||
} | ||
|
||
return component; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Reflection; | ||
|
||
namespace Cropper.Blazor.Client.Components.Docs | ||
{ | ||
public class ApiMethod | ||
{ | ||
public string Signature { get; set; } | ||
public ParameterInfo Return { get; set; } | ||
public string Documentation { get; set; } | ||
public MethodInfo MethodInfo { get; set; } | ||
public ParameterInfo[] Parameters { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Reflection; | ||
|
||
namespace Cropper.Blazor.Client.Components.Docs | ||
{ | ||
public class ApiProperty | ||
{ | ||
public string Name { get; set; } | ||
public Type Type { get; set; } | ||
public PropertyInfo PropertyInfo { get; set; } | ||
public string Description { get; set; } | ||
public object Default { get; set; } | ||
public bool IsTwoWay { get; set; } | ||
} | ||
} |
Oops, something went wrong.