feat(Permission) Added start of the Storage feature. Detailed/Plain default toggle
This commit is contained in:
@@ -15,24 +15,24 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser"/>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig" Version="0.28.1"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0-preview.2.22153.2"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2"/>
|
||||
<PackageReference Include="Markdig" Version="0.28.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0-preview.2.22153.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.0-preview.2.22153.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Inputs\"/>
|
||||
<Folder Include="Inputs\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Model\Model.csproj"/>
|
||||
<ProjectReference Include="..\Services\Services.csproj"/>
|
||||
<ProjectReference Include="..\Model\Model.csproj" />
|
||||
<ProjectReference Include="..\Services\Services.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Inputs\"/>
|
||||
<None Remove="Inputs\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
<div class="formContainer">
|
||||
<div class="formTextContainer">
|
||||
<div class="formLabel">
|
||||
@Label:
|
||||
</div>
|
||||
<label class="switch">
|
||||
<input readonly="@ReadOnly"
|
||||
type="checkbox"
|
||||
id="@labelId"
|
||||
checked="@Value"
|
||||
@oninput="OnChange"/>
|
||||
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
@if (Info != "")
|
||||
{
|
||||
<div class="formInfo">
|
||||
@Info
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<style>
|
||||
.formContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.formTextContainer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.formLabel {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.formInfo {
|
||||
font-size: 0.8rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
top: 4px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--paper-border);
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #7838df;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string Label { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string Info { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<ChangeEventArgs> OnChange { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool ReadOnly { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public bool Value { get; set; }
|
||||
|
||||
private string labelId = "";
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
labelId = Label.ToLower().Replace(" ", "_");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
@inject ISearchService searchService
|
||||
@inject NavigationManager navigationManager
|
||||
@inject IJSRuntime jsRuntime
|
||||
@inject ISearchService SearchService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IJSRuntime JsRuntime
|
||||
|
||||
<button class="searchButtonContainer" @onclick="ButtonClicked">
|
||||
<div class="searchText">
|
||||
@@ -48,12 +48,12 @@
|
||||
|
||||
private void ButtonClicked(EventArgs eventArgs)
|
||||
{
|
||||
searchService.Show();
|
||||
SearchService.Show();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
userAgent = await jsRuntime.InvokeAsync<string>("getUserAgent");
|
||||
userAgent = await JsRuntime.InvokeAsync<string>("getUserAgent");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user