+
+
+
-
-
-
-
-
-
+
-
+
+
+
+
+
-
-
+ : ComponentBase
+ where CFile : ConfigFile
+ {
+ [Parameter]
+ public List Files { get; set; } = new List();
+
+ [Parameter]
+ public List Filters { get; set; } = new List();
+ [Parameter]
+ public List FilteredOutFiles { get; set; } = new List();
+ [Parameter]
+ public EventCallback ApplyFilter { get; set; }
+
+ [Parameter]
+ public EventCallback AddFile { get; set; }
+ [Parameter]
+ public EventCallback UpdateFile { get; set; }
+ [Parameter]
+ public EventCallback DeleteFile { get; set; }
+
+ [Parameter]
+ public RenderFragment Editor { get; set; }
+
+ [Parameter]
+ public RenderFragment CreateDialog { get; set; }
+
+ [Parameter]
+ public RenderFragment UpdateDialog { get; set; }
+
+ [Parameter]
+ public RenderFragment DeleteDialog { get; set; }
+
+ protected string SelectedFilter { get; set; }
+
+ protected bool IsAnyFileSelected => SelectedFile != default;
+
+ [Parameter]
+ public EventCallback SelectedFileChanged { get; set; }
+ [Parameter]
+ public CFile SelectedFile { get; set; }
+
+ protected async Task OnDeselectClick()
+ {
+ SelectedFile = null;
+ await SelectedFileChanged.InvokeAsync(SelectedFile);
+ }
+
+ protected async Task OnFilterClick(string filter)
+ {
+ await ApplyFilter.InvokeAsync(filter);
+ //for (int index = 0; index < Files.Count; index++)
+ // if (FilteredOutFiles.Contains(index))
+ // Files[index].Hide();
+ // else
+ // Files[index].Unhide();
+ }
+
+ protected async Task SearchInputChanged(string searchInput)
+ {
+ if (string.IsNullOrEmpty(searchInput))
+ Files.ForEach(f => f.Unhide());
+ else
+ Files.ForEach(f =>
+ {
+ if (f.Name.ToLower().Contains(searchInput.ToLower()))
+ f.Unhide();
+ else
+ f.Hide();
+ });
+ }
+
+ protected async Task OnFileClick(MouseEventArgs e, CFile file)
+ {
+ await SelectedFileChanged.InvokeAsync(file);
+ }
+
+ protected async Task OnAddDialog()
+ {
+ await AddFile.InvokeAsync(null);
+ }
+ protected async Task OnUpdateDialog()
+ {
+ await UpdateFile.InvokeAsync(SelectedFile);
+ }
+ protected async Task OnDeleteDialog()
+ {
+ await UpdateFile.InvokeAsync(SelectedFile);
+ }
+ }
+}
diff --git a/Seenginx/Pages/Nginx.razor.cs b/Seenginx/Pages/Nginx.razor.cs
index 458546d..60d6049 100644
--- a/Seenginx/Pages/Nginx.razor.cs
+++ b/Seenginx/Pages/Nginx.razor.cs
@@ -41,6 +41,14 @@ namespace Seenginx.Pages
{
if (filter == "All")
ConfigFiles.ForEach(f => f.Unhide());
+ else if (filter == "Root")
+ ConfigFiles.ForEach(f =>
+ {
+ if (f.Folder == FilterFolder[filter])
+ f.Unhide();
+ else
+ f.Hide();
+ });
else
ConfigFiles.ForEach(f =>
{
diff --git a/Seenginx/Pages/_Host.cshtml b/Seenginx/Pages/_Host.cshtml
index 36cf702..6870890 100644
--- a/Seenginx/Pages/_Host.cshtml
+++ b/Seenginx/Pages/_Host.cshtml
@@ -25,7 +25,7 @@
-
+
diff --git a/Seenginx/SCSS/main.scss b/Seenginx/SCSS/main.scss
index 6726688..ca1d700 100644
--- a/Seenginx/SCSS/main.scss
+++ b/Seenginx/SCSS/main.scss
@@ -1,4 +1,6 @@
-@import "mixins.scss";
+@import "variables.scss";
+@import "mixins.scss";
@import "base.scss";
@import "utility.scss";
-@import "override-framework.scss";
\ No newline at end of file
+@import "override-framework.scss";
+@import "template.scss";
\ No newline at end of file
diff --git a/Seenginx/SCSS/template.scss b/Seenginx/SCSS/template.scss
new file mode 100644
index 0000000..67531c2
--- /dev/null
+++ b/Seenginx/SCSS/template.scss
@@ -0,0 +1,44 @@
+.main {
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: start;
+ width: 100%;
+ height: 100vh;
+ padding: 2.5%;
+
+ &Nav {
+ overflow-y: auto;
+ padding: $border-radius;
+ width: 17%;
+ margin-right: 40px;
+ }
+
+ &Page {
+ overflow-y: auto;
+ padding: $border-radius-b;
+ width: calc(83% - 40px);
+ align-self: stretch;
+ }
+}
+
+.files {
+ display: flex;
+ flex-direction: column;
+ align-items: stretch;
+
+ &WithEditor {
+ display: flex;
+ align-items: stretch;
+ height: 100%;
+ }
+
+ & .buttons {
+ justify-content: space-between;
+ align-items: stretch;
+ }
+
+ &List {
+ height: 100%;
+ overflow-y: auto;
+ }
+}
diff --git a/Seenginx/SCSS/utility.scss b/Seenginx/SCSS/utility.scss
index 2be3a5a..8260613 100644
--- a/Seenginx/SCSS/utility.scss
+++ b/Seenginx/SCSS/utility.scss
@@ -14,5 +14,54 @@
.flexCenter {
display: flex;
- align-content: center
+ align-content: center;
+ align-items: center
}
+
+.is {
+ &NoWrap {
+ white-space: nowrap
+ }
+
+ &Finger {
+ cursor: pointer
+ }
+}
+
+.neomorph {
+ /*box-shadow: 0px 0px 4px 4px rgba($background, 1), -8px -8px 16px rgba($light-shadow, 1), 8px 8px 16px rgba($dark-shadow, 1);*/
+ box-shadow: -8px -8px 16px rgba($light-shadow, .5), 8px 8px 16px rgba($dark-shadow, .5);
+
+ &Small {
+ /*box-shadow: 0px 0px 3px 3px rgba($background, 1), -6px -6px 12px rgba($light-shadow, 1), 6px 6px 12px rgba($dark-shadow, 1);*/
+ box-shadow: -6px -6px 12px rgba($light-shadow, .5), 6px 6px 12px rgba($dark-shadow, .5);
+ }
+
+ &Bottom {
+ filter: drop-shadow(8px 8px 14px rgba($dark-shadow, 1));
+ }
+}
+
+.gradientBackground {
+ background: linear-gradient(to right bottom,$background-light,$background-dark)
+}
+
+.borderR {
+ border-radius: $border-radius;
+
+ &Small {
+ border-radius: $border-radius-s;
+ }
+
+ &Big {
+ border-radius: $border-radius-b;
+ }
+}
+
+.bg {
+ background: $background
+}
+
+.sameMarginBottom{
+ margin-bottom: 1rem !important
+}
\ No newline at end of file
diff --git a/Seenginx/SCSS/variables.scss b/Seenginx/SCSS/variables.scss
new file mode 100644
index 0000000..91b884d
--- /dev/null
+++ b/Seenginx/SCSS/variables.scss
@@ -0,0 +1,8 @@
+$border-radius: 14px;
+$border-radius-s: 7px;
+$border-radius-b: 28px;
+$background: rgba(246,210,135,1);
+$background-light: rgba(247, 215, 148,1);
+$background-dark: rgba(245, 205, 121,1);
+$light-shadow: hsl(41, 86%, 90%);
+$dark-shadow: hsl(41, 86%, 60%);
\ No newline at end of file
diff --git a/Seenginx/Seenginx.csproj b/Seenginx/Seenginx.csproj
index c51e9c1..3097dc6 100644
--- a/Seenginx/Seenginx.csproj
+++ b/Seenginx/Seenginx.csproj
@@ -24,7 +24,6 @@
-
diff --git a/Seenginx/Shared/MainLayout.razor b/Seenginx/Shared/MainLayout.razor
index 18947ec..3786523 100644
--- a/Seenginx/Shared/MainLayout.razor
+++ b/Seenginx/Shared/MainLayout.razor
@@ -1,21 +1,14 @@
@inherits LayoutComponentBase
-
-
-
@Editor
diff --git a/Seenginx.Components/FilesWithEditor.razor.cs b/Seenginx.Components/FilesWithEditor.razor.cs
index 171a3eb..73f626a 100644
--- a/Seenginx.Components/FilesWithEditor.razor.cs
+++ b/Seenginx.Components/FilesWithEditor.razor.cs
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
using Seenginx.Models;
using System;
using System.Collections.Generic;
@@ -47,7 +48,7 @@ namespace Seenginx.Components
[Parameter]
public CFile SelectedFile { get; set; }
- protected string SearchInput { get; set; }
+ protected string SearchInput { get; set; } = string.Empty;
protected async Task OnDeselectClick()
{
@@ -55,20 +56,20 @@ namespace Seenginx.Components
await SelectedFileChanged.InvokeAsync(SelectedFile);
}
- protected async Task OnFilterClick(EventArgs e, string filter)
+ protected async Task OnFilterClick(MouseEventArgs e, string filter)
{
await ApplyFilter.InvokeAsync(filter);
- for (int index = 0; index < Files.Count; index++)
- if (FilteredOutFiles.Contains(index))
- Files[index].Hide();
- else
- Files[index].Unhide();
+ //for (int index = 0; index < Files.Count; index++)
+ // if (FilteredOutFiles.Contains(index))
+ // Files[index].Hide();
+ // else
+ // Files[index].Unhide();
}
- protected void SearchInputChanged()
+ protected async Task SearchInputChanged(ChangeEventArgs e)
{
if (string.IsNullOrEmpty(SearchInput))
- Files.ForEach(f => f.Hide());
+ Files.ForEach(f => f.Unhide());
else
Files.ForEach(f =>
{
@@ -79,7 +80,7 @@ namespace Seenginx.Components
});
}
- protected async Task OnFileClick(CFile file)
+ protected async Task OnFileClick(MouseEventArgs e, CFile file)
{
await SelectedFileChanged.InvokeAsync(file);
}
diff --git a/Seenginx.Models/ConfigFile.cs b/Seenginx.Models/ConfigFile.cs
index 47baeff..240022e 100644
--- a/Seenginx.Models/ConfigFile.cs
+++ b/Seenginx.Models/ConfigFile.cs
@@ -18,7 +18,7 @@ namespace Seenginx.Models
public bool CanBeDeleted { get; set; } = true;
public string IsVisible { get; set; } = string.Empty;
- public void Hide() { IsVisible = "hide"; }
+ public void Hide() { IsVisible = "is-hidden"; }
public void Unhide() { IsVisible = string.Empty; }
}
}
diff --git a/Seenginx/Components/FileItem.razor b/Seenginx/Components/FileItem.razor
new file mode 100644
index 0000000..8053436
--- /dev/null
+++ b/Seenginx/Components/FileItem.razor
@@ -0,0 +1,12 @@
+@inherits FileItemBase
+
+
+
+
+
\ No newline at end of file
diff --git a/Seenginx/Components/FileItem.razor.cs b/Seenginx/Components/FileItem.razor.cs
new file mode 100644
index 0000000..d59ef73
--- /dev/null
+++ b/Seenginx/Components/FileItem.razor.cs
@@ -0,0 +1,16 @@
+using Microsoft.AspNetCore.Components;
+using Seenginx.Models;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Seenginx.Components
+{
+ public class FileItemBase : ComponentBase
+ {
+ [Parameter]
+ public ConfigFile File { get; set; }
+
+
+ }
+}
diff --git a/Seenginx/Components/FilesWithEditor.razor b/Seenginx/Components/FilesWithEditor.razor
new file mode 100644
index 0000000..2a26c00
--- /dev/null
+++ b/Seenginx/Components/FilesWithEditor.razor
@@ -0,0 +1,72 @@
+@typeparam CFile
+
+
+
+ @File.Folder
++ @File.Name +
+
+
+
+
diff --git a/Seenginx/Components/FilesWithEditor.razor.cs b/Seenginx/Components/FilesWithEditor.razor.cs
new file mode 100644
index 0000000..8046a36
--- /dev/null
+++ b/Seenginx/Components/FilesWithEditor.razor.cs
@@ -0,0 +1,101 @@
+using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components.Web;
+using Seenginx.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Seenginx.Components
+{
+ public partial class FilesWithEditor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @Editor
+
+
+
+
+
-
-
+
\ No newline at end of file
diff --git a/Seenginx/Shared/NavMenu.razor b/Seenginx/Shared/NavMenu.razor
index 6dec249..c7d1d17 100644
--- a/Seenginx/Shared/NavMenu.razor
+++ b/Seenginx/Shared/NavMenu.razor
@@ -1,10 +1,10 @@
@inherits NavMenuBase
-
-
-
-
-
-
-
+
- @Body
-
-
+
+
+ @Body
+
+
+