diff --git a/Seenginx.Models/Result.cs b/Seenginx.Models/Result.cs index 6c984c2..9aee4d2 100644 --- a/Seenginx.Models/Result.cs +++ b/Seenginx.Models/Result.cs @@ -27,4 +27,21 @@ namespace Seenginx.Models public void SetData(D data) => Data = data; } + + public class Result + { + public bool AllOk { get; private set; } = true; + public string ErrorMessage { get; private set; } + public Exception Exception { get; private set; } = null; + + public Result Invalidate(string errorMessage, Exception exception = null) + { + AllOk = false; + ErrorMessage = errorMessage; + if (exception != null) + Exception = exception; + + return this; + } + } } diff --git a/Seenginx/Components/FilesWithEditor.razor b/Seenginx/Components/FilesWithEditor.razor index b2597b8..aaa179d 100644 --- a/Seenginx/Components/FilesWithEditor.razor +++ b/Seenginx/Components/FilesWithEditor.razor @@ -7,7 +7,7 @@
- +
@@ -17,33 +17,39 @@ @if (IsAnyFileSelected) {
-
- - - - +
+ @SelectedFile.Name
-
- -
-
- +

+ } +

+ -

+

} else {
-
···
+
···
}
@@ -52,8 +58,8 @@
@foreach (var file in Files) { -
-

@file.Name

+
+

@file.Name

}
@@ -91,10 +97,10 @@ @if (HasTesting) { - + } - - + +
} else diff --git a/Seenginx/Components/FilesWithEditor.razor.cs b/Seenginx/Components/FilesWithEditor.razor.cs index 469c67f..f5caa1c 100644 --- a/Seenginx/Components/FilesWithEditor.razor.cs +++ b/Seenginx/Components/FilesWithEditor.razor.cs @@ -33,7 +33,6 @@ namespace Seenginx.Components [Parameter] public CFile SelectedFile { get; set; } = default; protected string SearchInput { get; set; } - private bool ConfigHasChanged => (string.IsNullOrEmpty(SelectedFile.DraftBody) ? false : SelectedFile.Body != SelectedFile.DraftBody); protected bool IsAnyFileSelected => SelectedFile != default; protected string IsSelectedFileDeletable @@ -90,6 +89,11 @@ namespace Seenginx.Components await RenameFileCallback.InvokeAsync(null); } + protected async Task OnLoadDraftClick(MouseEventArgs e) + { + await JsRuntime.InvokeVoidAsync("UpdateEditor", SelectedFile.DraftBody); + } + protected async Task OnFileCloseClick(MouseEventArgs e) { Files.ForEach(f => f.Deselect()); diff --git a/Seenginx/Pages/Nginx.razor b/Seenginx/Pages/Nginx.razor index aaa46dd..aab92f6 100644 --- a/Seenginx/Pages/Nginx.razor +++ b/Seenginx/Pages/Nginx.razor @@ -1,7 +1,8 @@ @inherits NginxBase @page "/nginx" diff --git a/Seenginx/Pages/Nginx.razor.cs b/Seenginx/Pages/Nginx.razor.cs index 997754c..4d2ba9f 100644 --- a/Seenginx/Pages/Nginx.razor.cs +++ b/Seenginx/Pages/Nginx.razor.cs @@ -17,7 +17,6 @@ namespace Seenginx.Pages public class NginxBase : ComponentBase { [Inject] public INginxService NginxService { get; set; } - [Inject] public IFileManager FileService { get; set; } [Inject] public IModalService Modal { get; set; } public string InputSearch { get; set; } @@ -47,7 +46,7 @@ namespace Seenginx.Pages SelectedFile = configFile; } - public async Task ShowAddFileModal() + public async Task AddFileModal() { var parameters = new ModalParameters(); parameters.Add(nameof(Templates), Templates); @@ -57,7 +56,7 @@ namespace Seenginx.Pages if (result.Cancelled) return; - var validationResult = await NginxService.ValidateNewConfigurationAsync((NewFileForm)result.Data); + var validationResult = await NginxService.ValidateForAddFileAsync((NewFileForm)result.Data); if (!validationResult.AllOk) { @@ -77,14 +76,70 @@ namespace Seenginx.Pages SelectedFile.Select(); } + public async Task RenameFileModal() + { + var parameters = new ModalParameters(); + parameters.Add(nameof(RenameForm.Name), SelectedFile.Name); + + var resultAwait = Modal.Show(string.Empty, parameters); + var result = await resultAwait.Result; + if (result.Cancelled) return; + + var validationResult = await NginxService.ValidateForRenameFileAsync(ConfigFiles, SelectedFile, result.Data.ToString()); + if (!validationResult.AllOk) + { + var popupAwait = Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, validationResult.ErrorMessage)); + await popupAwait.Result; + return; + } + + var renameResult = await NginxService.RenameFileAsync(SelectedFile, $"{result.Data}.conf"); + if (!renameResult.AllOk) + { + var popupAwait = Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, renameResult.ErrorMessage)); + await popupAwait.Result; + return; + } + + SelectedFile.Name = result.Data.ToString(); + } + public async Task SaveFileAsync() { - var saveUpdateResult = await FileService.SaveFileAsync(SelectedFile); + var validationResult = await NginxService.ValidateForSaveFileAsync(SelectedFile); + + if (!validationResult.AllOk) + { + await Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, validationResult.ErrorMessage)).Result; + return; + } + + var saveResult = await NginxService.SaveFileAsync(SelectedFile); + + if (!saveResult.AllOk) + { + await Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, saveResult.ErrorMessage)).Result; + return; + } } public async Task SaveDraftFileAsync() { - var saveUpdateDraftResult = await FileService.SaveDraftFileAsync(SelectedFile); + var validationResult = await NginxService.ValidateForSaveDraftFileAsync(SelectedFile); + + if (!validationResult.AllOk) + { + await Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, validationResult.ErrorMessage)).Result; + return; + } + + var saveDraftResult = await NginxService.SaveDraftFileAsync(SelectedFile); + + if (!saveDraftResult.AllOk) + { + await Modal.Show(string.Empty, new ModalParameters().Setup(PopupType.Ok, saveDraftResult.ErrorMessage)).Result; + return; + } } public async Task TestConfiguration() diff --git a/Seenginx/SCSS/utility.scss b/Seenginx/SCSS/utility.scss index b39a030..1dfdd90 100644 --- a/Seenginx/SCSS/utility.scss +++ b/Seenginx/SCSS/utility.scss @@ -104,6 +104,12 @@ border: none !important; transform: scale(1.1); } + + &Plain { + box-shadow: -2px -2px 4px rgba($light-shadow, .5), 2px 2px 4px rgba($dark-shadow, .5); + background: none !important; + border: none !important; + } } } diff --git a/Seenginx/Services/FileManager.cs b/Seenginx/Services/FileManager.cs deleted file mode 100644 index 8e3d488..0000000 --- a/Seenginx/Services/FileManager.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Seenginx.Models; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; - -namespace Seenginx.Services -{ - public class FileManager : IFileManager - { - public async Task> SaveFileAsync(ConfigFile configFile) - { - var result = new Result(configFile); - try - { - var validationResult = ValidForUpdate(configFile); - if (!validationResult.AllOk) - return result.Invalidate($"Failed validation for: {validationResult.ErrorMessage}"); - - await File.WriteAllTextAsync(configFile.FullPath, configFile.Body); - - return result; - } - catch (Exception ex) - { - return result.Invalidate($"Exception at {nameof(SaveFileAsync)}(), with {nameof(ConfigFile.Name)}=[{nameof(configFile.Name)}]", ex); - } - } - - public async Task> SaveDraftFileAsync(ConfigFile configFile) - { - var result = new Result(configFile); - try - { - var validationResult = ValidForUpdate(configFile); - if (!validationResult.AllOk) - return result.Invalidate($"Failed validation for: {validationResult.ErrorMessage}"); - - await File.WriteAllTextAsync($"{configFile.FullPath}.draft", configFile.DraftBody); - - return result; - } - catch (Exception ex) - { - return result.Invalidate($"Exception at {nameof(SaveDraftFileAsync)}(), with {nameof(ConfigFile.Name)}=[{nameof(configFile.Name)}]", ex); - } - } - - public Result DeleteFile(ConfigFile configFile) - { - var result = new Result(); - try - { - var validationResult = ValidForUpdate(configFile); - - if (!validationResult.AllOk) - return result.Invalidate($"Failed validation for: {validationResult.ErrorMessage}"); - - File.Delete(configFile.FullPath); - if (File.Exists($"{configFile.FullPath}.draft")) - File.Delete($"{configFile.FullPath}.draft"); - - return result; - } - catch (Exception ex) - { - return result.Invalidate($"Exception at {nameof(DeleteFile)}(), with {nameof(ConfigFile.Name)}=[{nameof(configFile.Name)}]", ex); - } - } - - private Result ValidForUpdate(ConfigFile configFile) - { - var result = new Result(); - if (!Directory.Exists(Directory.GetDirectoryRoot(configFile.FullPath))) - return result.Invalidate($"Directory '{Directory.GetDirectoryRoot(configFile.FullPath)}' doesn't exist."); - if (!File.Exists(configFile.FullPath)) - return result.Invalidate($"File '{configFile.FullPath}' doesn't exist."); - return result; - } - - } -} diff --git a/Seenginx/Services/IFileManager.cs b/Seenginx/Services/IFileManager.cs deleted file mode 100644 index d7668ba..0000000 --- a/Seenginx/Services/IFileManager.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Seenginx.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Seenginx.Services -{ - public interface IFileManager - { - Task> SaveFileAsync(ConfigFile configFile); - Task> SaveDraftFileAsync(ConfigFile configFile); - Result DeleteFile(ConfigFile configFile); - } -} diff --git a/Seenginx/Services/INginxService.cs b/Seenginx/Services/INginxService.cs index 0dcf80b..e9913a0 100644 --- a/Seenginx/Services/INginxService.cs +++ b/Seenginx/Services/INginxService.cs @@ -8,12 +8,22 @@ namespace Seenginx.Services { Task> GetFilesAsync(); Task> GetTemplates(); + Task> TestFileAsync(ConfigFile configFile); + + Task ValidateForAddFileAsync(NewFileForm newFileForm); Task> AddFileAsync(NewFileForm newFileForm); + + Task ValidateForSaveFileAsync(ConfigFile configFile); Task> SaveFileAsync(ConfigFile configFile); + + Task ValidateForSaveDraftFileAsync(ConfigFile configFile); Task> SaveDraftFileAsync(ConfigFile configFile); - Task> RenameFileAsync(ConfigFile configFile); - Task> DeleteFileAsync(ConfigFile configFile); - Task> ValidateNewConfigurationAsync(NewFileForm newFileForm); + + Task ValidateForRenameFileAsync(List configFiles, ConfigFile configFile, string newName); + Task RenameFileAsync(ConfigFile configFile, string newName); + + Task ValidateForDeleteFileAsync(ConfigFile configFile); + Task DeleteFileAsync(ConfigFile configFile); } } \ No newline at end of file diff --git a/Seenginx/Services/NginxService.cs b/Seenginx/Services/NginxService.cs index ee2294a..a8b70bc 100644 --- a/Seenginx/Services/NginxService.cs +++ b/Seenginx/Services/NginxService.cs @@ -20,110 +20,6 @@ namespace Seenginx.Services ConfigPaths = configPaths; } - public async Task> ValidateNewConfigurationAsync(NewFileForm newFileForm) - { - var validationResult = new Result(); - try - { - var filePath = Path.Combine(ConfigPaths.NginxPath, "conf.d", $"{newFileForm.Name}.conf"); - - if (File.Exists(filePath)) - return validationResult.Invalidate($"There's already a file with the '{newFileForm.Name}.conf' name."); - - return validationResult; - } - catch (Exception ex) - { - return validationResult.Invalidate($"Exception at {nameof(ValidateNewConfigurationAsync)}()", ex); - } - } - - public async Task> AddFileAsync(NewFileForm newFileForm) - { - var addResult = new Result(); - try - { - var newFile = new ConfigFile(); - newFile.Name = $"{newFileForm.Name}.conf"; - newFile.Folder = "/conf.d"; - newFile.FullPath = Path.Combine(ConfigPaths.NginxPath, "conf.d", newFile.Name); - newFile.Body = newFileForm.SelectedTemplate == 0.ToString() ? string.Empty : (await GetTemplates()).SingleOrDefault(t => t.Name == newFileForm.SelectedTemplate)?.Code; - newFile.LastUpdated = DateTime.UtcNow; - newFile.DraftBody = newFile.Body; - - await File.WriteAllTextAsync(newFile.FullPath, newFile.Body, Encoding.UTF8); - - addResult.SetData(newFile); - - return addResult; - } - catch (Exception ex) - { - return addResult.Invalidate(ex.Message, ex); - } - } - - public async Task> DeleteFileAsync(ConfigFile configFile) - { - var result = new Result(true); - try - { - if (!File.Exists(configFile.FullPath)) - return result.Invalidate($"File '{configFile.FullPath}' not found."); - - File.Delete(configFile.FullPath); - - return result; - } - catch (Exception ex) - { - return result.Invalidate(ex.Message, ex); - } - } - - public async Task> TestFileAsync(ConfigFile configFile) - { - await Task.Run(() => { }); - var result = new Result(); - result.SetData("Uhu"); - return result; - } - - public async Task> SaveFileAsync(ConfigFile configFile) - { - var saveResult = new Result(); - try - { - await File.WriteAllTextAsync(Path.Combine(ConfigPaths.NginxPath, configFile.Folder, configFile.Name), configFile.Body, Encoding.UTF8); - - return saveResult; - } - catch (Exception ex) - { - return saveResult.Invalidate(ex.Message, ex); - } - } - - public async Task> SaveDraftFileAsync(ConfigFile configFile) - { - var saveDraftResult = new Result(); - try - { - await File.WriteAllTextAsync(Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.draft"), configFile.DraftBody, Encoding.UTF8); - - return saveDraftResult; - } - catch (Exception ex) - { - return saveDraftResult.Invalidate(ex.Message, ex); - } - } - - public async Task> RenameFileAsync(ConfigFile configFile, string newName) - { - File.Move() - } - public async Task> GetFilesAsync() { await Task.Run(() => { }); @@ -138,28 +34,28 @@ namespace Seenginx.Services var rootConfigFiles = rootConfigs.Select(fp => { - var fileName = Path.GetFileName(fp); + var name = Path.GetFileNameWithoutExtension(fp); var configFile = new ConfigFile(); configFile.CanBeDeleted = false; configFile.Folder = string.Empty; configFile.LastUpdated = File.GetLastWriteTime(fp); - configFile.Name = fileName; - configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, configFile.Name); + configFile.Name = name; + configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, $"{configFile.Name}.conf"); configFile.Body = File.ReadAllText(fp); - if (rootDraftConfigs.Any(cfp => cfp.Contains(fileName))) - configFile.DraftBody = File.ReadAllText(rootDraftConfigs.First(cfp => cfp.Contains(fileName))); + if (rootDraftConfigs.Any(cfp => cfp.Contains(name))) + configFile.DraftBody = File.ReadAllText(rootDraftConfigs.First(cfp => cfp.Contains(name))); return configFile; }); var confdConfigFiles = confdConfigs.Select(fp => { - var fileName = Path.GetFileName(fp); + var fileName = Path.GetFileNameWithoutExtension(fp); var configFile = new ConfigFile(); configFile.CanBeDeleted = true; configFile.Folder = "conf.d"; configFile.LastUpdated = File.GetLastWriteTime(fp); configFile.Name = fileName; - configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, configFile.Name); + configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.conf"); configFile.Body = File.ReadAllText(fp); if (confDraftConfigs.Any(cfp => cfp.Contains(fileName))) configFile.DraftBody = File.ReadAllText(confDraftConfigs.First(cfp => cfp.Contains(fileName))); @@ -168,13 +64,13 @@ namespace Seenginx.Services }); var sitesAvailableConfigFiles = sitesAvailableConfigs.Select(fp => { - var fileName = Path.GetFileName(fp); + var fileName = Path.GetFileNameWithoutExtension(fp); var configFile = new ConfigFile(); configFile.CanBeDeleted = true; configFile.Folder = "sites-available"; configFile.LastUpdated = File.GetLastWriteTime(fp); configFile.Name = fileName; - configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, configFile.Name); + configFile.FullPath = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.conf"); configFile.Body = File.ReadAllText(fp); if (sitesAvailableDraftConfigs.Any(cfp => cfp.Contains(fileName))) configFile.DraftBody = File.ReadAllText(sitesAvailableDraftConfigs.First(cfp => cfp.Contains(fileName))); @@ -237,11 +133,209 @@ namespace Seenginx.Services } + public async Task ValidateForAddFileAsync(NewFileForm newFileForm) + { + var validationResult = new Result(); + try + { + var filePath = Path.Combine(ConfigPaths.NginxPath, "conf.d", $"{newFileForm.Name}.conf"); + + if (File.Exists(filePath)) + return validationResult.Invalidate($"There's already a file with the '{newFileForm.Name}.conf' name."); + + return validationResult; + } + catch (Exception ex) + { + return validationResult.Invalidate($"Exception at {nameof(ValidateForAddFileAsync)}()", ex); + } + } + + public async Task> AddFileAsync(NewFileForm newFileForm) + { + var addResult = new Result(); + try + { + var newFile = new ConfigFile(); + newFile.Name = $"{newFileForm.Name}.conf"; + newFile.Folder = "conf.d"; + newFile.FullPath = Path.Combine(ConfigPaths.NginxPath, newFile.Folder, newFile.Name); + newFile.Body = newFileForm.SelectedTemplate == 0.ToString() ? string.Empty : (await GetTemplates()).SingleOrDefault(t => t.Name == newFileForm.SelectedTemplate)?.Code; + newFile.LastUpdated = DateTime.UtcNow; + + await File.WriteAllTextAsync(newFile.FullPath, newFile.Body, Encoding.UTF8); + + addResult.SetData(newFile); + + return addResult; + } + catch (Exception ex) + { + return addResult.Invalidate(ex.Message, ex); + } + } - //public async Task> DeleteFileAsync(ConfigFile configFile) + public async Task ValidateForDeleteFileAsync(ConfigFile configFile) + { + var validationResult = new Result(); + try + { + if (File.Exists(configFile.FullPath)) + return validationResult.Invalidate($"File '{configFile.FullPath}' not found."); + + return validationResult; + } + catch (Exception ex) + { + return validationResult.Invalidate(ex.Message, ex); + } + } + + public async Task DeleteFileAsync(ConfigFile configFile) + { + var result = new Result(); + try + { + if (!File.Exists(configFile.FullPath)) + return result.Invalidate($"File '{configFile.FullPath}' not found."); + + File.Delete(configFile.FullPath); + + return result; + } + catch (Exception ex) + { + return result.Invalidate(ex.Message, ex); + } + } + + + public async Task ValidateForSaveFileAsync(ConfigFile configFile) + { + var validationResult = new Result(); + try + { + if (File.Exists(configFile.FullPath)) + return validationResult.Invalidate($"File '{configFile.FullPath}' not found."); + + return validationResult; + } + catch (Exception ex) + { + return validationResult.Invalidate(ex.Message, ex); + } + } + + public async Task> SaveFileAsync(ConfigFile configFile) + { + var saveResult = new Result(); + try + { + await File.WriteAllTextAsync(Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.conf"), configFile.Body, Encoding.UTF8); + + return saveResult; + } + catch (Exception ex) + { + return saveResult.Invalidate(ex.Message, ex); + } + } + + + public async Task ValidateForSaveDraftFileAsync(ConfigFile configFile) + { + var validationResult = new Result(); + try + { + var draftPathName = $"{configFile.FullPath}.draft"; + + if (File.Exists(draftPathName)) + return validationResult.Invalidate($"File '{draftPathName}' not found."); + + return validationResult; + } + catch (Exception ex) + { + return validationResult.Invalidate(ex.Message, ex); + } + } + + public async Task> SaveDraftFileAsync(ConfigFile configFile) + { + var saveDraftResult = new Result(); + try + { + await File.WriteAllTextAsync(Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.conf.draft"), configFile.DraftBody, Encoding.UTF8); + + return saveDraftResult; + } + catch (Exception ex) + { + return saveDraftResult.Invalidate(ex.Message, ex); + } + } + + + public async Task ValidateForRenameFileAsync(List configFiles, ConfigFile selectedConfigFile, string newName) + { + var renameResult = new Result(); + try + { + + + if(configFiles.Count(cf => cf.Name == newName) > 0) + return renameResult.Invalidate($"File '{selectedConfigFile.FullPath}' already exists."); + + + + + if (File.Exists(selectedConfigFile.FullPath)) + return renameResult.Invalidate($"Original file '{selectedConfigFile.FullPath}' not found."); + + var newPathName = Path.Combine(ConfigPaths.NginxPath, selectedConfigFile.Folder, $"{newName}.conf"); + if (File.Exists(newPathName)) + return renameResult.Invalidate($"The file '{newPathName}' already exists."); + + return renameResult; + } + catch (Exception ex) + { + return renameResult.Invalidate(ex.Message, ex); + } + } + + public async Task RenameFileAsync(ConfigFile configFile, string newName) + { + var renameResult = new Result(); + try + { + var originalPathName = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, $"{configFile.Name}.conf"); + var newPathName = Path.Combine(ConfigPaths.NginxPath, configFile.Folder, newName); + + File.Move(originalPathName, newPathName, overwrite: false); + + return renameResult; + } + catch (Exception ex) + { + return renameResult.Invalidate(ex.Message, ex); + } + } + + + + public async Task> TestFileAsync(ConfigFile configFile) + { + await Task.Run(() => { }); + var result = new Result(); + result.SetData("Uhu"); + return result; + } + + //public async Task DeleteFileAsync(ConfigFile configFile) //{ - // var result = new Result(true); + // var result = new Result(true); // try // { // return result; diff --git a/Seenginx/Shared/NavMenu.razor b/Seenginx/Shared/NavMenu.razor index be554db..99cc2f2 100644 --- a/Seenginx/Shared/NavMenu.razor +++ b/Seenginx/Shared/NavMenu.razor @@ -17,7 +17,7 @@ @key="@ActiveNav.Keys.ElementAt(0)" ActiveClass="@ActiveNav.GetValueOrDefault("nginx")" @onclick="@(e => SelectMenuItem("nginx"))"> - + Configuration @@ -26,7 +26,7 @@ @key="@ActiveNav.Keys.ElementAt(1)" ActiveClass="@ActiveNav.GetValueOrDefault("nginxlogs")" @onclick="@(e => SelectMenuItem("nginxlogs"))"> - + Logs @@ -41,7 +41,7 @@ @key="@ActiveNav.Keys.ElementAt(2)" ActiveClass="@ActiveNav.GetValueOrDefault("systemd")" @onclick="@(e => SelectMenuItem("systemd"))"> - + Configuration @@ -50,7 +50,7 @@ @key="@ActiveNav.Keys.ElementAt(3)" ActiveClass="@ActiveNav.GetValueOrDefault("systemdlogs")" @onclick="@(e => SelectMenuItem("systemdlogs"))"> - + Logs @@ -65,7 +65,7 @@ @key="@ActiveNav.Keys.ElementAt(4)" ActiveClass="@ActiveNav.GetValueOrDefault("dmesg")" @onclick="@(e => SelectMenuItem("dmesg"))"> - + Logs diff --git a/Seenginx/Shared/NginxConfigForm.razor b/Seenginx/Shared/NginxConfigForm.razor index 6a292d5..c191b9d 100644 --- a/Seenginx/Shared/NginxConfigForm.razor +++ b/Seenginx/Shared/NginxConfigForm.razor @@ -21,7 +21,7 @@ - +

Any template to quick setup the configuration

@@ -32,7 +32,7 @@
- +

Name it the same as the service which is going to run behind

diff --git a/Seenginx/Shared/RenameForm.razor b/Seenginx/Shared/RenameForm.razor new file mode 100644 index 0000000..f4a0de2 --- /dev/null +++ b/Seenginx/Shared/RenameForm.razor @@ -0,0 +1,65 @@ + + +@code { + [CascadingParameter] + BlazoredModalInstance BlazoredModal { get; set; } + + [Required, Parameter, MaxLength(251)] + public string Name { get; set; } + + void SubmitForm() => BlazoredModal.Close(ModalResult.Ok(Name)); + void Cancel() => BlazoredModal.Cancel(); +} diff --git a/Seenginx/Startup.cs b/Seenginx/Startup.cs index 0a3a327..c15a831 100644 --- a/Seenginx/Startup.cs +++ b/Seenginx/Startup.cs @@ -48,7 +48,6 @@ namespace Seenginx services.AddTransient(); services.AddTransient(); services.AddTransient(); - services.AddTransient(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/Seenginx/wwwroot/css/bulma-switch.min.css b/Seenginx/wwwroot/css/bulma-switch.min.css new file mode 100644 index 0000000..ec1148a --- /dev/null +++ b/Seenginx/wwwroot/css/bulma-switch.min.css @@ -0,0 +1 @@ +@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.switch[type=checkbox]{outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;position:absolute;opacity:0}.switch[type=checkbox]:focus+label::after,.switch[type=checkbox]:focus+label::before,.switch[type=checkbox]:focus+label:after,.switch[type=checkbox]:focus+label:before{outline:1px dotted #b5b5b5}.switch[type=checkbox][disabled]{cursor:not-allowed}.switch[type=checkbox][disabled]+label{opacity:.5}.switch[type=checkbox][disabled]+label::before,.switch[type=checkbox][disabled]+label:before{opacity:.5}.switch[type=checkbox][disabled]+label::after,.switch[type=checkbox][disabled]+label:after{opacity:.5}.switch[type=checkbox][disabled]+label:hover{cursor:not-allowed}.switch[type=checkbox]+label{position:relative;display:initial;font-size:1rem;line-height:initial;padding-left:3.5rem;padding-top:.2rem;cursor:pointer}.switch[type=checkbox]+label::before,.switch[type=checkbox]+label:before{position:absolute;display:block;top:0;left:0;width:3rem;height:1.5rem;border:.1rem solid transparent;border-radius:3px;background:#b5b5b5;content:''}.switch[type=checkbox]+label::after,.switch[type=checkbox]+label:after{display:block;position:absolute;top:.25rem;left:.25rem;width:1rem;height:1rem;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);border-radius:3px;background:#fff;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;content:''}.switch[type=checkbox].is-rtl+label{padding-left:0;padding-right:3.5rem}.switch[type=checkbox].is-rtl+label::before,.switch[type=checkbox].is-rtl+label:before{left:auto;right:0}.switch[type=checkbox].is-rtl+label::after,.switch[type=checkbox].is-rtl+label:after{left:auto;right:.25rem}.switch[type=checkbox]:checked+label::before,.switch[type=checkbox]:checked+label:before{background:#00d1b2}.switch[type=checkbox]:checked+label::after{left:1.625rem}.switch[type=checkbox]:checked.is-rtl+label::after,.switch[type=checkbox]:checked.is-rtl+label:after{left:auto;right:1.625rem}.switch[type=checkbox].is-outlined+label::before,.switch[type=checkbox].is-outlined+label:before{background-color:transparent;border-color:#b5b5b5}.switch[type=checkbox].is-outlined+label::after,.switch[type=checkbox].is-outlined+label:after{background:#b5b5b5}.switch[type=checkbox].is-outlined:checked+label::before,.switch[type=checkbox].is-outlined:checked+label:before{background-color:transparent;border-color:#00d1b2}.switch[type=checkbox].is-outlined:checked+label::after,.switch[type=checkbox].is-outlined:checked+label:after{background:#00d1b2}.switch[type=checkbox].is-thin+label::before,.switch[type=checkbox].is-thin+label:before{top:.54545rem;height:.375rem}.switch[type=checkbox].is-thin+label::after,.switch[type=checkbox].is-thin+label:after{-webkit-box-shadow:0 0 3px #7a7a7a;box-shadow:0 0 3px #7a7a7a}.switch[type=checkbox].is-rounded+label::before,.switch[type=checkbox].is-rounded+label:before{border-radius:20px}.switch[type=checkbox].is-rounded+label::after,.switch[type=checkbox].is-rounded+label:after{border-radius:50%}.switch[type=checkbox].is-small+label{position:relative;display:initial;font-size:.75rem;line-height:initial;padding-left:2.75rem;padding-top:.2rem;cursor:pointer}.switch[type=checkbox].is-small+label::before,.switch[type=checkbox].is-small+label:before{position:absolute;display:block;top:0;left:0;width:2.25rem;height:1.125rem;border:.1rem solid transparent;border-radius:3px;background:#b5b5b5;content:''}.switch[type=checkbox].is-small+label::after,.switch[type=checkbox].is-small+label:after{display:block;position:absolute;top:.25rem;left:.25rem;width:.625rem;height:.625rem;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);border-radius:3px;background:#fff;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;content:''}.switch[type=checkbox].is-small.is-rtl+label{padding-left:0;padding-right:2.75rem}.switch[type=checkbox].is-small.is-rtl+label::before,.switch[type=checkbox].is-small.is-rtl+label:before{left:auto;right:0}.switch[type=checkbox].is-small.is-rtl+label::after,.switch[type=checkbox].is-small.is-rtl+label:after{left:auto;right:.25rem}.switch[type=checkbox].is-small:checked+label::before,.switch[type=checkbox].is-small:checked+label:before{background:#00d1b2}.switch[type=checkbox].is-small:checked+label::after{left:1.25rem}.switch[type=checkbox].is-small:checked.is-rtl+label::after,.switch[type=checkbox].is-small:checked.is-rtl+label:after{left:auto;right:1.25rem}.switch[type=checkbox].is-small.is-outlined+label::before,.switch[type=checkbox].is-small.is-outlined+label:before{background-color:transparent;border-color:#b5b5b5}.switch[type=checkbox].is-small.is-outlined+label::after,.switch[type=checkbox].is-small.is-outlined+label:after{background:#b5b5b5}.switch[type=checkbox].is-small.is-outlined:checked+label::before,.switch[type=checkbox].is-small.is-outlined:checked+label:before{background-color:transparent;border-color:#00d1b2}.switch[type=checkbox].is-small.is-outlined:checked+label::after,.switch[type=checkbox].is-small.is-outlined:checked+label:after{background:#00d1b2}.switch[type=checkbox].is-small.is-thin+label::before,.switch[type=checkbox].is-small.is-thin+label:before{top:.40909rem;height:.28125rem}.switch[type=checkbox].is-small.is-thin+label::after,.switch[type=checkbox].is-small.is-thin+label:after{-webkit-box-shadow:0 0 3px #7a7a7a;box-shadow:0 0 3px #7a7a7a}.switch[type=checkbox].is-small.is-rounded+label::before,.switch[type=checkbox].is-small.is-rounded+label:before{border-radius:20px}.switch[type=checkbox].is-small.is-rounded+label::after,.switch[type=checkbox].is-small.is-rounded+label:after{border-radius:50%}.switch[type=checkbox].is-medium+label{position:relative;display:initial;font-size:1.25rem;line-height:initial;padding-left:4.25rem;padding-top:.2rem;cursor:pointer}.switch[type=checkbox].is-medium+label::before,.switch[type=checkbox].is-medium+label:before{position:absolute;display:block;top:0;left:0;width:3.75rem;height:1.875rem;border:.1rem solid transparent;border-radius:3px;background:#b5b5b5;content:''}.switch[type=checkbox].is-medium+label::after,.switch[type=checkbox].is-medium+label:after{display:block;position:absolute;top:.25rem;left:.25rem;width:1.375rem;height:1.375rem;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);border-radius:3px;background:#fff;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;content:''}.switch[type=checkbox].is-medium.is-rtl+label{padding-left:0;padding-right:4.25rem}.switch[type=checkbox].is-medium.is-rtl+label::before,.switch[type=checkbox].is-medium.is-rtl+label:before{left:auto;right:0}.switch[type=checkbox].is-medium.is-rtl+label::after,.switch[type=checkbox].is-medium.is-rtl+label:after{left:auto;right:.25rem}.switch[type=checkbox].is-medium:checked+label::before,.switch[type=checkbox].is-medium:checked+label:before{background:#00d1b2}.switch[type=checkbox].is-medium:checked+label::after{left:2rem}.switch[type=checkbox].is-medium:checked.is-rtl+label::after,.switch[type=checkbox].is-medium:checked.is-rtl+label:after{left:auto;right:2rem}.switch[type=checkbox].is-medium.is-outlined+label::before,.switch[type=checkbox].is-medium.is-outlined+label:before{background-color:transparent;border-color:#b5b5b5}.switch[type=checkbox].is-medium.is-outlined+label::after,.switch[type=checkbox].is-medium.is-outlined+label:after{background:#b5b5b5}.switch[type=checkbox].is-medium.is-outlined:checked+label::before,.switch[type=checkbox].is-medium.is-outlined:checked+label:before{background-color:transparent;border-color:#00d1b2}.switch[type=checkbox].is-medium.is-outlined:checked+label::after,.switch[type=checkbox].is-medium.is-outlined:checked+label:after{background:#00d1b2}.switch[type=checkbox].is-medium.is-thin+label::before,.switch[type=checkbox].is-medium.is-thin+label:before{top:.68182rem;height:.46875rem}.switch[type=checkbox].is-medium.is-thin+label::after,.switch[type=checkbox].is-medium.is-thin+label:after{-webkit-box-shadow:0 0 3px #7a7a7a;box-shadow:0 0 3px #7a7a7a}.switch[type=checkbox].is-medium.is-rounded+label::before,.switch[type=checkbox].is-medium.is-rounded+label:before{border-radius:20px}.switch[type=checkbox].is-medium.is-rounded+label::after,.switch[type=checkbox].is-medium.is-rounded+label:after{border-radius:50%}.switch[type=checkbox].is-large+label{position:relative;display:initial;font-size:1.5rem;line-height:initial;padding-left:5rem;padding-top:.2rem;cursor:pointer}.switch[type=checkbox].is-large+label::before,.switch[type=checkbox].is-large+label:before{position:absolute;display:block;top:0;left:0;width:4.5rem;height:2.25rem;border:.1rem solid transparent;border-radius:3px;background:#b5b5b5;content:''}.switch[type=checkbox].is-large+label::after,.switch[type=checkbox].is-large+label:after{display:block;position:absolute;top:.25rem;left:.25rem;width:1.75rem;height:1.75rem;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);border-radius:3px;background:#fff;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;content:''}.switch[type=checkbox].is-large.is-rtl+label{padding-left:0;padding-right:5rem}.switch[type=checkbox].is-large.is-rtl+label::before,.switch[type=checkbox].is-large.is-rtl+label:before{left:auto;right:0}.switch[type=checkbox].is-large.is-rtl+label::after,.switch[type=checkbox].is-large.is-rtl+label:after{left:auto;right:.25rem}.switch[type=checkbox].is-large:checked+label::before,.switch[type=checkbox].is-large:checked+label:before{background:#00d1b2}.switch[type=checkbox].is-large:checked+label::after{left:2.375rem}.switch[type=checkbox].is-large:checked.is-rtl+label::after,.switch[type=checkbox].is-large:checked.is-rtl+label:after{left:auto;right:2.375rem}.switch[type=checkbox].is-large.is-outlined+label::before,.switch[type=checkbox].is-large.is-outlined+label:before{background-color:transparent;border-color:#b5b5b5}.switch[type=checkbox].is-large.is-outlined+label::after,.switch[type=checkbox].is-large.is-outlined+label:after{background:#b5b5b5}.switch[type=checkbox].is-large.is-outlined:checked+label::before,.switch[type=checkbox].is-large.is-outlined:checked+label:before{background-color:transparent;border-color:#00d1b2}.switch[type=checkbox].is-large.is-outlined:checked+label::after,.switch[type=checkbox].is-large.is-outlined:checked+label:after{background:#00d1b2}.switch[type=checkbox].is-large.is-thin+label::before,.switch[type=checkbox].is-large.is-thin+label:before{top:.81818rem;height:.5625rem}.switch[type=checkbox].is-large.is-thin+label::after,.switch[type=checkbox].is-large.is-thin+label:after{-webkit-box-shadow:0 0 3px #7a7a7a;box-shadow:0 0 3px #7a7a7a}.switch[type=checkbox].is-large.is-rounded+label::before,.switch[type=checkbox].is-large.is-rounded+label:before{border-radius:20px}.switch[type=checkbox].is-large.is-rounded+label::after,.switch[type=checkbox].is-large.is-rounded+label:after{border-radius:50%}.switch[type=checkbox].is-white:checked+label::before,.switch[type=checkbox].is-white:checked+label:before{background:#fff}.switch[type=checkbox].is-white.is-outlined:checked+label::before,.switch[type=checkbox].is-white.is-outlined:checked+label:before{background-color:transparent;border-color:#fff!important}.switch[type=checkbox].is-white.is-outlined:checked+label::after,.switch[type=checkbox].is-white.is-outlined:checked+label:after{background:#fff}.switch[type=checkbox].is-white.is-thin.is-outlined+label::after,.switch[type=checkbox].is-white.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-white+label::before,.switch[type=checkbox].is-unchecked-white+label:before{background:#fff}.switch[type=checkbox].is-unchecked-white.is-outlined+label::before,.switch[type=checkbox].is-unchecked-white.is-outlined+label:before{background-color:transparent;border-color:#fff!important}.switch[type=checkbox].is-unchecked-white.is-outlined+label::after,.switch[type=checkbox].is-unchecked-white.is-outlined+label:after{background:#fff}.switch[type=checkbox].is-black:checked+label::before,.switch[type=checkbox].is-black:checked+label:before{background:#0a0a0a}.switch[type=checkbox].is-black.is-outlined:checked+label::before,.switch[type=checkbox].is-black.is-outlined:checked+label:before{background-color:transparent;border-color:#0a0a0a!important}.switch[type=checkbox].is-black.is-outlined:checked+label::after,.switch[type=checkbox].is-black.is-outlined:checked+label:after{background:#0a0a0a}.switch[type=checkbox].is-black.is-thin.is-outlined+label::after,.switch[type=checkbox].is-black.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-black+label::before,.switch[type=checkbox].is-unchecked-black+label:before{background:#0a0a0a}.switch[type=checkbox].is-unchecked-black.is-outlined+label::before,.switch[type=checkbox].is-unchecked-black.is-outlined+label:before{background-color:transparent;border-color:#0a0a0a!important}.switch[type=checkbox].is-unchecked-black.is-outlined+label::after,.switch[type=checkbox].is-unchecked-black.is-outlined+label:after{background:#0a0a0a}.switch[type=checkbox].is-light:checked+label::before,.switch[type=checkbox].is-light:checked+label:before{background:#f5f5f5}.switch[type=checkbox].is-light.is-outlined:checked+label::before,.switch[type=checkbox].is-light.is-outlined:checked+label:before{background-color:transparent;border-color:#f5f5f5!important}.switch[type=checkbox].is-light.is-outlined:checked+label::after,.switch[type=checkbox].is-light.is-outlined:checked+label:after{background:#f5f5f5}.switch[type=checkbox].is-light.is-thin.is-outlined+label::after,.switch[type=checkbox].is-light.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-light+label::before,.switch[type=checkbox].is-unchecked-light+label:before{background:#f5f5f5}.switch[type=checkbox].is-unchecked-light.is-outlined+label::before,.switch[type=checkbox].is-unchecked-light.is-outlined+label:before{background-color:transparent;border-color:#f5f5f5!important}.switch[type=checkbox].is-unchecked-light.is-outlined+label::after,.switch[type=checkbox].is-unchecked-light.is-outlined+label:after{background:#f5f5f5}.switch[type=checkbox].is-dark:checked+label::before,.switch[type=checkbox].is-dark:checked+label:before{background:#363636}.switch[type=checkbox].is-dark.is-outlined:checked+label::before,.switch[type=checkbox].is-dark.is-outlined:checked+label:before{background-color:transparent;border-color:#363636!important}.switch[type=checkbox].is-dark.is-outlined:checked+label::after,.switch[type=checkbox].is-dark.is-outlined:checked+label:after{background:#363636}.switch[type=checkbox].is-dark.is-thin.is-outlined+label::after,.switch[type=checkbox].is-dark.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-dark+label::before,.switch[type=checkbox].is-unchecked-dark+label:before{background:#363636}.switch[type=checkbox].is-unchecked-dark.is-outlined+label::before,.switch[type=checkbox].is-unchecked-dark.is-outlined+label:before{background-color:transparent;border-color:#363636!important}.switch[type=checkbox].is-unchecked-dark.is-outlined+label::after,.switch[type=checkbox].is-unchecked-dark.is-outlined+label:after{background:#363636}.switch[type=checkbox].is-primary:checked+label::before,.switch[type=checkbox].is-primary:checked+label:before{background:#00d1b2}.switch[type=checkbox].is-primary.is-outlined:checked+label::before,.switch[type=checkbox].is-primary.is-outlined:checked+label:before{background-color:transparent;border-color:#00d1b2!important}.switch[type=checkbox].is-primary.is-outlined:checked+label::after,.switch[type=checkbox].is-primary.is-outlined:checked+label:after{background:#00d1b2}.switch[type=checkbox].is-primary.is-thin.is-outlined+label::after,.switch[type=checkbox].is-primary.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-primary+label::before,.switch[type=checkbox].is-unchecked-primary+label:before{background:#00d1b2}.switch[type=checkbox].is-unchecked-primary.is-outlined+label::before,.switch[type=checkbox].is-unchecked-primary.is-outlined+label:before{background-color:transparent;border-color:#00d1b2!important}.switch[type=checkbox].is-unchecked-primary.is-outlined+label::after,.switch[type=checkbox].is-unchecked-primary.is-outlined+label:after{background:#00d1b2}.switch[type=checkbox].is-link:checked+label::before,.switch[type=checkbox].is-link:checked+label:before{background:#3273dc}.switch[type=checkbox].is-link.is-outlined:checked+label::before,.switch[type=checkbox].is-link.is-outlined:checked+label:before{background-color:transparent;border-color:#3273dc!important}.switch[type=checkbox].is-link.is-outlined:checked+label::after,.switch[type=checkbox].is-link.is-outlined:checked+label:after{background:#3273dc}.switch[type=checkbox].is-link.is-thin.is-outlined+label::after,.switch[type=checkbox].is-link.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-link+label::before,.switch[type=checkbox].is-unchecked-link+label:before{background:#3273dc}.switch[type=checkbox].is-unchecked-link.is-outlined+label::before,.switch[type=checkbox].is-unchecked-link.is-outlined+label:before{background-color:transparent;border-color:#3273dc!important}.switch[type=checkbox].is-unchecked-link.is-outlined+label::after,.switch[type=checkbox].is-unchecked-link.is-outlined+label:after{background:#3273dc}.switch[type=checkbox].is-info:checked+label::before,.switch[type=checkbox].is-info:checked+label:before{background:#209cee}.switch[type=checkbox].is-info.is-outlined:checked+label::before,.switch[type=checkbox].is-info.is-outlined:checked+label:before{background-color:transparent;border-color:#209cee!important}.switch[type=checkbox].is-info.is-outlined:checked+label::after,.switch[type=checkbox].is-info.is-outlined:checked+label:after{background:#209cee}.switch[type=checkbox].is-info.is-thin.is-outlined+label::after,.switch[type=checkbox].is-info.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-info+label::before,.switch[type=checkbox].is-unchecked-info+label:before{background:#209cee}.switch[type=checkbox].is-unchecked-info.is-outlined+label::before,.switch[type=checkbox].is-unchecked-info.is-outlined+label:before{background-color:transparent;border-color:#209cee!important}.switch[type=checkbox].is-unchecked-info.is-outlined+label::after,.switch[type=checkbox].is-unchecked-info.is-outlined+label:after{background:#209cee}.switch[type=checkbox].is-success:checked+label::before,.switch[type=checkbox].is-success:checked+label:before{background:#23d160}.switch[type=checkbox].is-success.is-outlined:checked+label::before,.switch[type=checkbox].is-success.is-outlined:checked+label:before{background-color:transparent;border-color:#23d160!important}.switch[type=checkbox].is-success.is-outlined:checked+label::after,.switch[type=checkbox].is-success.is-outlined:checked+label:after{background:#23d160}.switch[type=checkbox].is-success.is-thin.is-outlined+label::after,.switch[type=checkbox].is-success.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-success+label::before,.switch[type=checkbox].is-unchecked-success+label:before{background:#23d160}.switch[type=checkbox].is-unchecked-success.is-outlined+label::before,.switch[type=checkbox].is-unchecked-success.is-outlined+label:before{background-color:transparent;border-color:#23d160!important}.switch[type=checkbox].is-unchecked-success.is-outlined+label::after,.switch[type=checkbox].is-unchecked-success.is-outlined+label:after{background:#23d160}.switch[type=checkbox].is-warning:checked+label::before,.switch[type=checkbox].is-warning:checked+label:before{background:#ffdd57}.switch[type=checkbox].is-warning.is-outlined:checked+label::before,.switch[type=checkbox].is-warning.is-outlined:checked+label:before{background-color:transparent;border-color:#ffdd57!important}.switch[type=checkbox].is-warning.is-outlined:checked+label::after,.switch[type=checkbox].is-warning.is-outlined:checked+label:after{background:#ffdd57}.switch[type=checkbox].is-warning.is-thin.is-outlined+label::after,.switch[type=checkbox].is-warning.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-warning+label::before,.switch[type=checkbox].is-unchecked-warning+label:before{background:#ffdd57}.switch[type=checkbox].is-unchecked-warning.is-outlined+label::before,.switch[type=checkbox].is-unchecked-warning.is-outlined+label:before{background-color:transparent;border-color:#ffdd57!important}.switch[type=checkbox].is-unchecked-warning.is-outlined+label::after,.switch[type=checkbox].is-unchecked-warning.is-outlined+label:after{background:#ffdd57}.switch[type=checkbox].is-danger:checked+label::before,.switch[type=checkbox].is-danger:checked+label:before{background:#ff3860}.switch[type=checkbox].is-danger.is-outlined:checked+label::before,.switch[type=checkbox].is-danger.is-outlined:checked+label:before{background-color:transparent;border-color:#ff3860!important}.switch[type=checkbox].is-danger.is-outlined:checked+label::after,.switch[type=checkbox].is-danger.is-outlined:checked+label:after{background:#ff3860}.switch[type=checkbox].is-danger.is-thin.is-outlined+label::after,.switch[type=checkbox].is-danger.is-thin.is-outlined+label:after{-webkit-box-shadow:none;box-shadow:none}.switch[type=checkbox].is-unchecked-danger+label::before,.switch[type=checkbox].is-unchecked-danger+label:before{background:#ff3860}.switch[type=checkbox].is-unchecked-danger.is-outlined+label::before,.switch[type=checkbox].is-unchecked-danger.is-outlined+label:before{background-color:transparent;border-color:#ff3860!important}.switch[type=checkbox].is-unchecked-danger.is-outlined+label::after,.switch[type=checkbox].is-unchecked-danger.is-outlined+label:after{background:#ff3860} \ No newline at end of file diff --git a/Seenginx/wwwroot/css/main.css b/Seenginx/wwwroot/css/main.css index ecd9bd2..8fff8f5 100644 --- a/Seenginx/wwwroot/css/main.css +++ b/Seenginx/wwwroot/css/main.css @@ -106,6 +106,10 @@ html { background: none !important; border: none !important; transform: scale(1.1); } + .neoBtnSmallPlain { + box-shadow: -2px -2px 4px rgba(251, 238, 208, 0.5), 2px 2px 4px rgba(241, 185, 65, 0.5); + background: none !important; + border: none !important; } .neoFile { box-shadow: 0px 0px 0px rgba(251, 238, 208, 0.5), 0px 0px 0px rgba(241, 185, 65, 0.5) !important; diff --git a/Seenginx/wwwroot/css/main.min.css b/Seenginx/wwwroot/css/main.min.css index 58d9ae5..efb77c7 100644 --- a/Seenginx/wwwroot/css/main.min.css +++ b/Seenginx/wwwroot/css/main.min.css @@ -1 +1 @@ -#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;}html{scrollbar-color:#f1b941 transparent;scrollbar-width:thin;scrollbar-arrow-color:#fbeed0;scrollbar-base-color:#f6d287;scrollbar-darkshadow-color:#f1b941;overflow-x:auto;overflow-y:auto;}*{scrollbar-width:inherit;}.isHidden{display:none;}@media only screen and (max-width:37.5em){.isHiddenMobile{display:none;}}.petiteCaps{font-variant:petite-caps;}.flexCenter{display:flex;align-content:center;align-items:center;}.noBottomMargin{margin-bottom:0 !important;}.isNoWrap{white-space:nowrap;}.isFinger{cursor:pointer;}.neomorph{box-shadow:-8px -8px 16px rgba(251,238,208,.5),8px 8px 16px rgba(241,185,65,.5);}.neomorphSmall{box-shadow:-6px -6px 12px rgba(251,238,208,.5),6px 6px 12px rgba(241,185,65,.5);}.neomorphXSmall{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5);}.neomorphBottom{filter:drop-shadow(8px 8px 14px #f1b941);}.neomorphInset{box-shadow:inset 8px 8px 16px rgba(241,185,65,.5),inset -8px -8px 16px rgba(251,238,208,.5);}.neomorphInsetSmall{box-shadow:inset 6px 6px 12px rgba(241,185,65,.5),inset -6px -6px 12px rgba(251,238,208,.5);}.neomorphInsetXSmall{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5);}.neoBtn{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5);background:none !important;border:none !important;transition:all .2s linear;-webkit-backface-visibility:hidden;backface-visibility:hidden;}.neoBtn:focus{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5) !important;}.neoBtn:hover{box-shadow:-6px -6px 12px rgba(251,238,208,.5),6px 6px 12px rgba(241,185,65,.5);background:none !important;border:none !important;transform:scale(1.1);}.neoBtnSmall{box-shadow:-2px -2px 4px rgba(251,238,208,.5),2px 2px 4px rgba(241,185,65,.5);background:none !important;border:none !important;transition:all .2s linear;-webkit-backface-visibility:hidden;backface-visibility:hidden;}.neoBtnSmall:focus{box-shadow:-2px -2px 4px rgba(251,238,208,.5),2px 2px 4px rgba(241,185,65,.5) !important;}.neoBtnSmall:hover{box-shadow:-4px -4px 8px rgba(251,238,208,.5),4px 4px 8px rgba(241,185,65,.5);background:none !important;border:none !important;transform:scale(1.1);}.neoFile{box-shadow:0 0 0 rgba(251,238,208,.5),0 0 0 rgba(241,185,65,.5) !important;transition:all .2s linear;-webkit-backface-visibility:hidden !important;backface-visibility:hidden !important;background:#f6d287 !important;}.neoFile:hover{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5) !important;}.neoFile.isSelected{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5) !important;}.neoFile.is-active,.neoFile.active{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5) !important;color:#181515 !important;}.neoInput{box-shadow:inset 2px 2px 4px rgba(241,185,65,.5),inset -2px -2px 4px rgba(251,238,208,.5) !important;background:#f6d287 !important;border:none !important;}.neoInput:focus{border:none !important;}.neoSelect>select{box-shadow:inset 2px 2px 4px rgba(241,185,65,.5),inset -2px -2px 4px rgba(251,238,208,.5) !important;background:#f6d287 !important;border:none !important;}.neoSelect>select:focus{border:none !important;}.gradientBackground{background:linear-gradient(to right bottom,#f7d794,#f5cd79);}.borderR{border-radius:14px;}.borderRSmall{border-radius:7px !important;}.borderRBig{border-radius:28px;}.bg{background:#f6d287;}.sameMarginBottom{margin-bottom:1rem !important;}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.fullwidth{width:100%;}@font-face{font-family:'Ubuntu';src:url(/fonts/ubuntu-light-webfont.woff2) format("woff2");font-weight:300;font-style:normal;}@font-face{font-family:'Ubuntu-Mono';src:url(/fonts/ubuntumono-regular-webfont.woff2) format("woff2");font-style:normal;}html{font-family:Ubuntu,sans-serif;}.menu-list li a{font-family:Ubuntu-Mono,'Noto Mono';}#editor{position:absolute;top:0;right:0;bottom:0;left:0;}.select:not(.is-multiple):not(.is-loading)::after{border-color:#f1b941;}.select:not(.is-multiple):not(.is-loading):hover::after{border-color:#be860e;}.ace-solarized-light{background:#f6d287;}.ace-solarized-light .ace_gutter{background:#f5cd79;}.ace-solarized-light .ace_gutter-active-line{border-radius:50px 0 0 50px;}.ace-solarized-light .ace_marker-layer .ace_active-line{border-radius:0 50px 50px 0;}.modal-content{border-radius:28px;}.modal-card-head,.modal-card-foot{background:#f6d287;}.modal-card-head{border:none;border-radius:0;}.modal-card-body{background:#f6d287;}.modal-card-foot{border:none;border-radius:0;}.blazored-modal{background-color:transparent;border-radius:0;border:none;padding:0;box-shadow:none;}.blazored-modal-container{left:0;top:0;}.blazored-modal-overlay{background:#f6d287;}.main{display:flex;flex-wrap:nowrap;align-items:start;width:100%;height:100vh;padding:2.5%;}.mainNav{overflow-y:auto;padding:14px;width:17%;margin-right:40px;}.mainPage{overflow-y:auto;padding:28px;width:calc(83% - 40px);align-self:stretch;}.filesWithEditor{display:grid;grid-template-areas:"filterFiles fileTitle" "files codeEditor" "filesActions editorActions";grid-gap:25px;height:100%;max-height:100%;min-height:10%;grid-template-rows:30px auto 30px;grid-template-columns:28% auto;width:100%;}.filesWithEditor .filterFiles{grid-area:filterFiles;}.filesWithEditor .fileTitle{grid-area:fileTitle;}.filesWithEditor .fileTitle .field,.filesWithEditor .fileTitle .control{height:100%;}.filesWithEditor .files{grid-area:files;display:block;min-height:10%;padding:4% 0;}.filesWithEditor .filesList{display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:10%;width:auto;padding:4% 7% 4% 8%;overflow-y:auto;margin-right:4%;}.filesWithEditor .codeEditor{grid-area:codeEditor;min-height:0;height:100%;position:relative;display:flex;justify-content:center;align-items:center;}.filesWithEditor .codeEditor .editor{height:100%;margin:0;width:100%;}.filesWithEditor .filesActions{grid-area:filesActions;}.filesWithEditor .editorActions{grid-area:editorActions;}.menu-list>li>.neoFile{margin-bottom:4%;}.confFile{padding:4% 6%;margin-bottom:3%;}.confFile:last-child{margin-bottom:0;}.stripe{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-size:300%;background:radial-gradient(90% 90%,#f7d794,#f5cd79);} \ No newline at end of file +#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;}html{scrollbar-color:#f1b941 transparent;scrollbar-width:thin;scrollbar-arrow-color:#fbeed0;scrollbar-base-color:#f6d287;scrollbar-darkshadow-color:#f1b941;overflow-x:auto;overflow-y:auto;}*{scrollbar-width:inherit;}.isHidden{display:none;}@media only screen and (max-width:37.5em){.isHiddenMobile{display:none;}}.petiteCaps{font-variant:petite-caps;}.flexCenter{display:flex;align-content:center;align-items:center;}.noBottomMargin{margin-bottom:0 !important;}.isNoWrap{white-space:nowrap;}.isFinger{cursor:pointer;}.neomorph{box-shadow:-8px -8px 16px rgba(251,238,208,.5),8px 8px 16px rgba(241,185,65,.5);}.neomorphSmall{box-shadow:-6px -6px 12px rgba(251,238,208,.5),6px 6px 12px rgba(241,185,65,.5);}.neomorphXSmall{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5);}.neomorphBottom{filter:drop-shadow(8px 8px 14px #f1b941);}.neomorphInset{box-shadow:inset 8px 8px 16px rgba(241,185,65,.5),inset -8px -8px 16px rgba(251,238,208,.5);}.neomorphInsetSmall{box-shadow:inset 6px 6px 12px rgba(241,185,65,.5),inset -6px -6px 12px rgba(251,238,208,.5);}.neomorphInsetXSmall{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5);}.neoBtn{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5);background:none !important;border:none !important;transition:all .2s linear;-webkit-backface-visibility:hidden;backface-visibility:hidden;}.neoBtn:focus{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5) !important;}.neoBtn:hover{box-shadow:-6px -6px 12px rgba(251,238,208,.5),6px 6px 12px rgba(241,185,65,.5);background:none !important;border:none !important;transform:scale(1.1);}.neoBtnSmall{box-shadow:-2px -2px 4px rgba(251,238,208,.5),2px 2px 4px rgba(241,185,65,.5);background:none !important;border:none !important;transition:all .2s linear;-webkit-backface-visibility:hidden;backface-visibility:hidden;}.neoBtnSmall:focus{box-shadow:-2px -2px 4px rgba(251,238,208,.5),2px 2px 4px rgba(241,185,65,.5) !important;}.neoBtnSmall:hover{box-shadow:-4px -4px 8px rgba(251,238,208,.5),4px 4px 8px rgba(241,185,65,.5);background:none !important;border:none !important;transform:scale(1.1);}.neoBtnSmallPlain{box-shadow:-2px -2px 4px rgba(251,238,208,.5),2px 2px 4px rgba(241,185,65,.5);background:none !important;border:none !important;}.neoFile{box-shadow:0 0 0 rgba(251,238,208,.5),0 0 0 rgba(241,185,65,.5) !important;transition:all .2s linear;-webkit-backface-visibility:hidden !important;backface-visibility:hidden !important;background:#f6d287 !important;}.neoFile:hover{box-shadow:-3px -3px 6px rgba(251,238,208,.5),3px 3px 6px rgba(241,185,65,.5) !important;}.neoFile.isSelected{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5) !important;}.neoFile.is-active,.neoFile.active{box-shadow:inset 3px 3px 6px rgba(241,185,65,.5),inset -3px -3px 6px rgba(251,238,208,.5) !important;color:#181515 !important;}.neoInput{box-shadow:inset 2px 2px 4px rgba(241,185,65,.5),inset -2px -2px 4px rgba(251,238,208,.5) !important;background:#f6d287 !important;border:none !important;}.neoInput:focus{border:none !important;}.neoSelect>select{box-shadow:inset 2px 2px 4px rgba(241,185,65,.5),inset -2px -2px 4px rgba(251,238,208,.5) !important;background:#f6d287 !important;border:none !important;}.neoSelect>select:focus{border:none !important;}.gradientBackground{background:linear-gradient(to right bottom,#f7d794,#f5cd79);}.borderR{border-radius:14px;}.borderRSmall{border-radius:7px !important;}.borderRBig{border-radius:28px;}.bg{background:#f6d287;}.sameMarginBottom{margin-bottom:1rem !important;}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.fullwidth{width:100%;}@font-face{font-family:'Ubuntu';src:url(/fonts/ubuntu-light-webfont.woff2) format("woff2");font-weight:300;font-style:normal;}@font-face{font-family:'Ubuntu-Mono';src:url(/fonts/ubuntumono-regular-webfont.woff2) format("woff2");font-style:normal;}html{font-family:Ubuntu,sans-serif;}.menu-list li a{font-family:Ubuntu-Mono,'Noto Mono';}#editor{position:absolute;top:0;right:0;bottom:0;left:0;}.select:not(.is-multiple):not(.is-loading)::after{border-color:#f1b941;}.select:not(.is-multiple):not(.is-loading):hover::after{border-color:#be860e;}.ace-solarized-light{background:#f6d287;}.ace-solarized-light .ace_gutter{background:#f5cd79;}.ace-solarized-light .ace_gutter-active-line{border-radius:50px 0 0 50px;}.ace-solarized-light .ace_marker-layer .ace_active-line{border-radius:0 50px 50px 0;}.modal-content{border-radius:28px;}.modal-card-head,.modal-card-foot{background:#f6d287;}.modal-card-head{border:none;border-radius:0;}.modal-card-body{background:#f6d287;}.modal-card-foot{border:none;border-radius:0;}.blazored-modal{background-color:transparent;border-radius:0;border:none;padding:0;box-shadow:none;}.blazored-modal-container{left:0;top:0;}.blazored-modal-overlay{background:#f6d287;}.main{display:flex;flex-wrap:nowrap;align-items:start;width:100%;height:100vh;padding:2.5%;}.mainNav{overflow-y:auto;padding:14px;width:17%;margin-right:40px;}.mainPage{overflow-y:auto;padding:28px;width:calc(83% - 40px);align-self:stretch;}.filesWithEditor{display:grid;grid-template-areas:"filterFiles fileTitle" "files codeEditor" "filesActions editorActions";grid-gap:25px;height:100%;max-height:100%;min-height:10%;grid-template-rows:30px auto 30px;grid-template-columns:28% auto;width:100%;}.filesWithEditor .filterFiles{grid-area:filterFiles;}.filesWithEditor .fileTitle{grid-area:fileTitle;}.filesWithEditor .fileTitle .field,.filesWithEditor .fileTitle .control{height:100%;}.filesWithEditor .files{grid-area:files;display:block;min-height:10%;padding:4% 0;}.filesWithEditor .filesList{display:flex;flex-direction:column;align-items:stretch;height:100%;min-height:10%;width:auto;padding:4% 7% 4% 8%;overflow-y:auto;margin-right:4%;}.filesWithEditor .codeEditor{grid-area:codeEditor;min-height:0;height:100%;position:relative;display:flex;justify-content:center;align-items:center;}.filesWithEditor .codeEditor .editor{height:100%;margin:0;width:100%;}.filesWithEditor .filesActions{grid-area:filesActions;}.filesWithEditor .editorActions{grid-area:editorActions;}.menu-list>li>.neoFile{margin-bottom:4%;}.confFile{padding:4% 6%;margin-bottom:3%;}.confFile:last-child{margin-bottom:0;}.stripe{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-size:300%;background:radial-gradient(90% 90%,#f7d794,#f5cd79);} \ No newline at end of file