Move components into subfolders
This commit is contained in:
parent
0eb233ac30
commit
5fefdfdef1
35 changed files with 66 additions and 23 deletions
|
|
@ -1,3 +1,5 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
||||
<span class="anticon" role="img">
|
||||
<svg focusable="false" width="@Width" height="@Height" fill="@Color">
|
||||
<use href="_content/LANCommander.UI/bootstrap-icons.svg#@Type"></use>
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
||||
@ByteSizeLib.ByteSize.FromBytes(@Value).ToString()
|
||||
|
||||
@code {
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@inject Client Client
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Button OnClick="StartThread">New Thread</Button>
|
||||
|
||||
1
LANCommander.UI/Components/Chat/ChatList.razor
Normal file
1
LANCommander.UI/Components/Chat/ChatList.razor
Normal file
|
|
@ -0,0 +1 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
||||
<p>
|
||||
@Content
|
||||
</p>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
@using System.Globalization
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Comment Author="@UserName" Datetime="@StartedOn.ToString(CultureInfo.CurrentCulture)">
|
||||
<ContentTemplate>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
@using LANCommander.SDK
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@inject Client Client
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Flex Direction="FlexDirection.Vertical">
|
||||
<div style="flex-grow: 1;">
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
@inject NavigationManager Navigator
|
||||
@inject IJSRuntime JS
|
||||
@inject IMessageService MessageService
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<div class="ant-upload ant-upload-select-text ant-upload-drag ant-upload-select chunk-uploader" data-status="@CurrentProgressStatus">
|
||||
<Progress Type="ProgressType.Circle" Percent="Progress" Status="@CurrentProgressStatus" Class="uploader-progress" />
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
@using Microsoft.JSInterop
|
||||
@inject IJSRuntime JS
|
||||
@inject NavigationManager NavigationManager
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<ErrorBoundary>
|
||||
<ChildContent>
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Flex Gap="FlexGap.Middle" Align="FlexAlign.Center">
|
||||
@ChildContent
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
<script src="/_content/LANCommander.UI/bundle.js"></script>
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<script src="/_content/LANCommander.UI/bundle.js"></script>
|
||||
<script src="/_content/PSC.Blazor.Components.MarkdownEditor/js/easymde.min.js"></script>
|
||||
<script src="/_content/PSD.Blazor.Components.MarkdownEditor/js/markdownEditor.js"></script>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
@namespace LANCommander.UI.Components
|
||||
|
||||
<link rel="stylesheet" href="/_content/PSC.Blazor.Components.MarkdownEditor/css/markdowneditor.css" />
|
||||
<link rel="stylesheet" href="/_content/PSC.Blazor.Components.MarkdownEditor/css/easymde.min.css" />
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
@using LANCommander.UI.Providers
|
||||
@implements IDisposable
|
||||
@inject TimeProvider TimeProvider
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
@if (Value.HasValue && Value.Value != DateTime.MinValue)
|
||||
{
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
@using Microsoft.JSInterop
|
||||
@inject TimeProvider TimeProvider
|
||||
@inject IJSRuntime JS
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
@code {
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
@using LANCommander.SDK.Models
|
||||
@inject SDK.Client Client
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Spin Spinning="_loading">
|
||||
<Spin Spinning="_loading" WrapperClassName="@Class safe-image">
|
||||
@if (!_error)
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(Source))
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
.safe-image {
|
||||
& > div,
|
||||
.ant-spin-container,
|
||||
img {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
<div class="pane @Class" data-size="@Size">
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<div class="pane @Class" data-size="@Size">
|
||||
@ChildContent
|
||||
</div>
|
||||
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
@using Microsoft.JSInterop
|
||||
@inject IJSRuntime JS
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<CascadingValue Value="this" IsFixed="@true">
|
||||
<div id="split-pane-@(PaneId.ToString())" class="split-pane @Class" style="@Style">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import Split from 'split.js'
|
||||
import Split from 'split.js'
|
||||
|
||||
export class SplitPane {
|
||||
SplitPanes: HTMLElement[] = [];
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
<link rel="stylesheet" href="/_content/PSC.Blazor.Components.MarkdownEditor/css/markdowneditor.css" />
|
||||
<link rel="stylesheet" href="/_content/PSC.Blazor.Components.MarkdownEditor/css/easymde.min.css" />
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
@using LANCommander.SDK.Models
|
||||
@typeparam TItem where TItem : IKeyedModel
|
||||
@namespace LANCommander.UI.Components
|
||||
|
||||
<Select
|
||||
@ref="@Select"
|
||||
Mode="SelectMode.Multiple"
|
||||
Mode="SelectMode.Tags"
|
||||
DataSource="Entities"
|
||||
ItemValue="e => e.Id"
|
||||
ItemLabel="OptionLabelSelector"
|
||||
OnCreateCustomTag="async (tag) => await OnCreateCustomTag(tag)"
|
||||
@bind-Values="@SelectedValues"
|
||||
EnableSearch
|
||||
EnableVirtualization>
|
||||
|
|
@ -15,6 +17,8 @@
|
|||
@code {
|
||||
[Parameter] public Func<TItem, string> OptionLabelSelector { get; set; }
|
||||
[Parameter] public IEnumerable<TItem> Entities { get; set; }
|
||||
|
||||
[Parameter] public EventCallback<string> OnCreateTag { get; set; }
|
||||
|
||||
[Parameter] public ICollection<TItem> Values { get; set; }
|
||||
[Parameter] public EventCallback<ICollection<TItem>> ValuesChanged { get; set; }
|
||||
|
|
@ -38,4 +42,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task OnCreateCustomTag(string tag)
|
||||
{
|
||||
if (OnCreateTag.HasDelegate)
|
||||
await OnCreateTag.InvokeAsync(tag);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { Uploader } from "./Scripts/Uploader"
|
||||
import { SplitPane } from "./Scripts/SplitPane"
|
||||
import { TimeProvider } from "./Scripts/TimeProvider";
|
||||
import { Uploader } from "./Components/ChunkUploader/Uploader"
|
||||
import { SplitPane } from "./Components/SplitPane/SplitPane"
|
||||
import { TimeProvider } from "./Components/LocalTime/TimeProvider";
|
||||
import { Readline } from "xterm-readline"
|
||||
import { FitAddon } from "@xterm/addon-fit"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
@use '_blazor-error';
|
||||
@use '_layout';
|
||||
@use '_panel-layout';
|
||||
@use '_menu';
|
||||
@use '_file-manager';
|
||||
@use '_chunk-uploader';
|
||||
@use '_pdf-reader';
|
||||
@use '_transfer';
|
||||
@use '_split-pane';
|
||||
@use '_markdown-editor';
|
||||
@use '_authentication-provider';
|
||||
12
LANCommander.UI/_Imports.razor.scss
Normal file
12
LANCommander.UI/_Imports.razor.scss
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
@forward 'Styles/_blazor-error';
|
||||
@forward 'Styles/_layout';
|
||||
@forward 'Styles/_panel-layout';
|
||||
@forward 'Styles/_menu';
|
||||
@forward 'Styles/_pdf-reader';
|
||||
@forward 'Styles/_transfer';
|
||||
@forward 'Styles/_markdown-editor';
|
||||
@forward 'Styles/_authentication-provider';
|
||||
@forward 'Components/FileManager/FileManager.razor';
|
||||
@forward 'Components/ChunkUploader/ChunkUploader.razor';
|
||||
@forward 'Components/SplitPane/SplitPane.razor';
|
||||
@forward 'Components/SafeImage/SafeImage.razor';
|
||||
|
|
@ -3,7 +3,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: ['./Main.ts', './Styles/ui.scss'], // Adjust the path if your index.js is located elsewhere
|
||||
entry: ['./Main.ts', './_Imports.razor.scss'], // Adjust the path if your index.js is located elsewhere
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue