diff --git a/Oqtane.Client/Installer/Installer.razor b/Oqtane.Client/Installer/Installer.razor index eb0c96b1..a3812b22 100644 --- a/Oqtane.Client/Installer/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -101,6 +101,11 @@
+
+
+ @Localizer["Register"] +
+
@code { @@ -114,6 +119,7 @@ private string _hostPassword = string.Empty; private string _confirmPassword = string.Empty; private string _hostEmail = string.Empty; + private bool _register = true; private string _message = string.Empty; private string _loadingDisplay = "display: none;"; @@ -169,7 +175,7 @@ connectionString = databaseConfigControl.GetConnectionString(); } - if (connectionString != "" && _hostUsername != "" && _hostPassword.Length >= 6 && _hostPassword == _confirmPassword && _hostEmail != "") + if (connectionString != "" && _hostUsername != "" && _hostPassword.Length >= 6 && _hostPassword == _confirmPassword && _hostEmail != "" && _hostEmail.Contains("@")) { _loadingDisplay = ""; StateHasChanged(); @@ -188,7 +194,8 @@ HostName = UserNames.Host, TenantName = TenantNames.Master, IsNewTenant = true, - SiteName = Constants.DefaultSite + SiteName = Constants.DefaultSite, + Register = _register }; var installation = await InstallationService.Install(config); diff --git a/Oqtane.Client/Modules/Admin/SystemInfo/Index.razor b/Oqtane.Client/Modules/Admin/SystemInfo/Index.razor index 173d9e2b..333f47d7 100644 --- a/Oqtane.Client/Modules/Admin/SystemInfo/Index.razor +++ b/Oqtane.Client/Modules/Admin/SystemInfo/Index.razor @@ -56,6 +56,12 @@ +
+
+ @Localizer["Register"] +
+
+

@Localizer["Access.ApiFramework"]  @@ -183,4 +189,20 @@ await logger.LogError(ex, "Error Restarting Application"); } } + + private async Task RegisterChecked(ChangeEventArgs e) + { + try + { + if ((bool)e.Value) + { + await InstallationService.RegisterAsync(PageState.User.Email); + AddModuleMessage(Localizer["Success.Register"], MessageType.Success); + } + } + catch (Exception ex) + { + await logger.LogError(ex, "Error On Register"); + } + } } \ No newline at end of file diff --git a/Oqtane.Client/Resources/Installer/Installer.resx b/Oqtane.Client/Resources/Installer/Installer.resx index f0bb6212..16a4ef42 100644 --- a/Oqtane.Client/Resources/Installer/Installer.resx +++ b/Oqtane.Client/Resources/Installer/Installer.resx @@ -1,4 +1,4 @@ - +