From 0de2250ada872e1f57e9462a44ce994483f94a4d Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Tue, 1 Oct 2019 15:39:51 -0400 Subject: [PATCH] Fixed issue #107 --- Oqtane.Client/Modules/HelloWorld/Index.razor | 50 ------------------- .../Themes/Controls/ControlPanel.razor | 2 +- 2 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 Oqtane.Client/Modules/HelloWorld/Index.razor diff --git a/Oqtane.Client/Modules/HelloWorld/Index.razor b/Oqtane.Client/Modules/HelloWorld/Index.razor deleted file mode 100644 index 677dba61..00000000 --- a/Oqtane.Client/Modules/HelloWorld/Index.razor +++ /dev/null @@ -1,50 +0,0 @@ -@namespace YourCompany.Module.HelloWorld -@inherits ModuleBase -@inject ISettingService SettingService - -
- @if (UserSecurity.IsAuthorized(PageState.User, "Edit", ModuleState.Permissions)) - { -
- - - - -
- } -
- @if (!string.IsNullOrEmpty(url2)) - { -
- } -
-
-
- -@code { - string url1 = ""; // use https://www.oqtane.org/Portals/0/Images/helloworld.png - string url2 = ""; - - protected override async Task OnInitializedAsync() - { - Dictionary settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId); - url2 = SettingService.GetSetting(settings, "url", ""); - } - - private async Task Save() - { - if (!string.IsNullOrEmpty(url1)) - { - Dictionary settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId); - SettingService.SetSetting(settings, "url", url1); - await SettingService.UpdateModuleSettingsAsync(settings, ModuleState.ModuleId); - ModuleInstance.AddModuleMessage("Url Saved", MessageType.Success); - url2 = url1; - StateHasChanged(); - } - else - { - ModuleInstance.AddModuleMessage("You Must Enter A Url", MessageType.Warning); - } - } -} diff --git a/Oqtane.Client/Themes/Controls/ControlPanel.razor b/Oqtane.Client/Themes/Controls/ControlPanel.razor index a48e7ab4..72d73d2d 100644 --- a/Oqtane.Client/Themes/Controls/ControlPanel.razor +++ b/Oqtane.Client/Themes/Controls/ControlPanel.razor @@ -86,7 +86,6 @@