This commit is contained in:
		| @ -19,7 +19,7 @@ | ||||
| </div> | ||||
|  | ||||
| @code { | ||||
|     var List<Page> _pages; | ||||
|     private List<Page> _pages; | ||||
|      | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; | ||||
|  | ||||
|  | ||||
| @ -165,12 +165,14 @@ | ||||
|     private List<Theme> _themeList; | ||||
|     private List<Page> _pageList; | ||||
|     private string _name; | ||||
|     private string _title; | ||||
|     private string _path = string.Empty; | ||||
|     private string _parentid; | ||||
|     private string _insert = ">>"; | ||||
|     private List<Page> _children; | ||||
|     private int _childid = -1; | ||||
|     private string _isnavigation = "True"; | ||||
|     private string _url; | ||||
|     private string _ispersonalizable = "False"; | ||||
|     private string _mode = "view"; | ||||
|     private string _themetype = string.Empty; | ||||
|  | ||||
| @ -187,6 +187,7 @@ | ||||
|     private List<Page> _pageList; | ||||
|     private int _pageId; | ||||
|     private string _name; | ||||
|     private string _title; | ||||
|     private string _path; | ||||
|     private string _currentparentid; | ||||
|     private string _parentid; | ||||
| @ -194,6 +195,7 @@ | ||||
|     private List<Page> _children; | ||||
|     private int _childid = -1; | ||||
|     private string _isnavigation; | ||||
|     private string _url; | ||||
|     private string _ispersonalizable; | ||||
|     private string _mode; | ||||
|     private string _themetype; | ||||
| @ -230,12 +232,12 @@ | ||||
|                 _name = page.Name; | ||||
|                 _title = page.Title; | ||||
|                 _path = page.Path; | ||||
|                  | ||||
|  | ||||
|                 if (_path.Contains("/")) | ||||
|                 { | ||||
|                     _path = _path.Substring(_path.LastIndexOf("/") + 1); | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 if (page.ParentId == null) | ||||
|                 { | ||||
|                     _parentid = string.Empty; | ||||
| @ -244,7 +246,7 @@ | ||||
|                 { | ||||
|                     _parentid = page.ParentId.ToString(); | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 _currentparentid = _parentid; | ||||
|                 _isnavigation = page.IsNavigation.ToString(); | ||||
|                 _url = page.Url; | ||||
| @ -335,10 +337,10 @@ | ||||
|                 page.Name = _name; | ||||
|                 page.Title = _title; | ||||
|                 if (_path == "" && _name.ToLower() != "home") | ||||
|                 if (_path == string.Empty && _name.ToLower() != "home") | ||||
|                 { | ||||
|                     _path = _name; | ||||
|                 } | ||||
|                     if (_path == string.Empty && _name.ToLower() != "home") | ||||
|                     { | ||||
|                         _path = _name; | ||||
|                     } | ||||
|                 if (_path.Contains("/")) | ||||
|                 { | ||||
|                     _path = _path.Substring(_path.LastIndexOf("/") + 1); | ||||
|  | ||||
| @ -3,7 +3,7 @@ | ||||
| @inject NavigationManager NavigationManager | ||||
| @inject IUserService UserService | ||||
|  | ||||
| @if  (_message != string.Empty) | ||||
| @if (_message != string.Empty) | ||||
| { | ||||
|     <ModuleMessage Message="@_message" Type="MessageType.Info" /> | ||||
| } | ||||
| @ -40,17 +40,16 @@ | ||||
|     private string _confirm = string.Empty; | ||||
|     private string _email = string.Empty; | ||||
|     private string _displayName = string.Empty; | ||||
|      | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous; | ||||
|  | ||||
|     public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous; | ||||
|  | ||||
|     private async Task Register() | ||||
|     { | ||||
|         try | ||||
|         { | ||||
|             _message = string.Empty; | ||||
|             _isEmailValid  = Utilities.IsValidEmail(_email); | ||||
|              | ||||
|             bool _isEmailValid = Utilities.IsValidEmail(_email); | ||||
|  | ||||
|             if (_username != "" && _password != "" && _confirm != "" && _isEmailValid) | ||||
|             { | ||||
|                 if (_password == _confirm) | ||||
| @ -97,3 +96,4 @@ | ||||
|     { | ||||
|         NavigationManager.NavigateTo(NavigateUrl(string.Empty)); | ||||
|     } | ||||
| } | ||||
| @ -226,15 +226,23 @@ | ||||
|     private List<Alias> _aliasList; | ||||
|     private string _urls = string.Empty; | ||||
|     private int _logofileid = -1; | ||||
|     private FileManager _filemanager; | ||||
|     private FileManager _logofilemanager; | ||||
|     private int _faviconfileid = -1; | ||||
|     private FileManager _faviconfilemanager; | ||||
|     private string _themetype; | ||||
|     private string _layouttype; | ||||
|     private string _containertype | ||||
|     private string _containertype; | ||||
|     private string _allowregistration; | ||||
|     private string _smtphost = string.Empty; | ||||
|     private string _smtpport = string.Empty; | ||||
|     private string _smtpssl = string.Empty; | ||||
|     private string _smtpusername = string.Empty; | ||||
|     private string _smtppassword = string.Empty; | ||||
|     private string _pwaisenabled; | ||||
|     private int _pwaappiconfileid = -1; | ||||
|     private FileManager _pwaappiconfilemanager; | ||||
|     private int _pwasplashiconfileid = -1; | ||||
|     private FileManager _pwasplashiconfilemanager; | ||||
|     private string _createdby; | ||||
|     private DateTime _createdon; | ||||
|     private string _modifiedby; | ||||
| @ -265,12 +273,12 @@ | ||||
|                 { | ||||
|                     _logofileid = site.LogoFileId.Value; | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 if (site.FaviconFileId != null) | ||||
|                 { | ||||
|                     _faviconfileid = site.FaviconFileId.Value; | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 _themetype = site.DefaultThemeType; | ||||
|                 _panelayouts = ThemeService.GetPaneLayoutTypes(_themeList, _themetype); | ||||
|                 _layouttype = site.DefaultLayoutType; | ||||
| @ -285,12 +293,12 @@ | ||||
|                 _smtppassword = SettingService.GetSetting(settings, "SMTPPassword", string.Empty); | ||||
|  | ||||
|                 _pwaisenabled = site.PwaIsEnabled.ToString(); | ||||
|                  | ||||
|  | ||||
|                 if (site.PwaAppIconFileId != null) | ||||
|                 { | ||||
|                     _pwaappiconfileid = site.PwaAppIconFileId.Value; | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 if (site.PwaSplashIconFileId != null) | ||||
|                 { | ||||
|                     _pwasplashiconfileid = site.PwaSplashIconFileId.Value; | ||||
| @ -361,7 +369,7 @@ | ||||
|                         unique = false; | ||||
|                     } | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 if (unique) | ||||
|                 { | ||||
|                     var site = await SiteService.GetSiteAsync(PageState.Site.SiteId, PageState.Alias); | ||||
| @ -369,12 +377,12 @@ | ||||
|                     { | ||||
|                         site.Name = _name; | ||||
|                         site.LogoFileId = null; | ||||
|                         var logofileid = _filemanager.GetFileId();    | ||||
|                         var logofileid = _logofilemanager.GetFileId(); | ||||
|                         if (logofileid != -1) | ||||
|                         { | ||||
|                             site.LogoFileId = logofileid; | ||||
|                         } | ||||
|                          | ||||
|  | ||||
|                         site.DefaultThemeType = _themetype; | ||||
|                         site.DefaultLayoutType = (_layouttype == null ? string.Empty : _layouttype); | ||||
|                         site.DefaultContainerType = _containertype; | ||||
| @ -382,13 +390,13 @@ | ||||
|                         site.IsDeleted = (_isdeleted == null ? true : Boolean.Parse(_isdeleted)); | ||||
|  | ||||
|                         site.PwaIsEnabled = (_pwaisenabled == null ? true : Boolean.Parse(_pwaisenabled)); | ||||
|                          | ||||
|  | ||||
|                         var pwaappiconfileid = _pwaappiconfilemanager.GetFileId(); | ||||
|                         if (pwaappiconfileid != -1) | ||||
|                         { | ||||
|                             site.PwaAppIconFileId = pwaappiconfileid; | ||||
|                         } | ||||
|                          | ||||
|  | ||||
|                         var pwasplashiconfileid = _pwasplashiconfilemanager.GetFileId(); | ||||
|                         if (pwasplashiconfileid != -1) | ||||
|                         { | ||||
| @ -406,7 +414,7 @@ | ||||
|                                 await AliasService.DeleteAliasAsync(alias.AliasId); | ||||
|                             } | ||||
|                         } | ||||
|                          | ||||
|  | ||||
|                         foreach (string name in names) | ||||
|                         { | ||||
|                             if (!_aliasList.Exists(item => item.Name == name)) | ||||
|  | ||||
| @ -101,7 +101,7 @@ | ||||
|         { | ||||
|             ShowProgressIndicator(); | ||||
|  | ||||
|             var connectionstring = string.Empty; | ||||
|             var connectionString = string.Empty; | ||||
|             if (type == "LocalDB") | ||||
|             { | ||||
|                 connectionString = "Data Source=" + server + ";AttachDbFilename=|DataDirectory|\\" + database + ".mdf;Initial Catalog=" + database + ";Integrated Security=SSPI;"; | ||||
|  | ||||
| @ -69,7 +69,6 @@ | ||||
|             { | ||||
|                 tenant.Name = name; | ||||
|                 tenant.DBConnectionString = connectionstring; | ||||
|                 tenant.DBSchema = schema; | ||||
|                  | ||||
|                 await TenantService.UpdateTenantAsync(tenant); | ||||
|                 await logger.LogInformation("Tenant Saved {TenantId}", tenantid); | ||||
|  | ||||
| @ -39,7 +39,7 @@ | ||||
|         _text = string.Empty; | ||||
|         if (!String.IsNullOrEmpty(CreatedBy) || CreatedOn != null) | ||||
|         { | ||||
|             _text += "<p style=\string.Empty + Style + "\">Created "; | ||||
|             _text += "<p style=\"" + Style + "\">Created "; | ||||
|              | ||||
|             if (!String.IsNullOrEmpty(CreatedBy)) | ||||
|             { | ||||
| @ -56,7 +56,7 @@ | ||||
|  | ||||
|         if (!String.IsNullOrEmpty(ModifiedBy) || ModifiedOn != null) | ||||
|         { | ||||
|             _text += "<p style=\string.Empty + Style + "\">Last modified "; | ||||
|             _text += "<p style=\"" + Style + "\">Last modified "; | ||||
|              | ||||
|             if (!String.IsNullOrEmpty(ModifiedBy)) | ||||
|             { | ||||
| @ -73,7 +73,7 @@ | ||||
|  | ||||
|         if (!String.IsNullOrEmpty(DeletedBy) || DeletedOn.HasValue) | ||||
|         { | ||||
|             _text += "<p style=\string.Empty + Style + "\">Deleted "; | ||||
|             _text += "<p style=\"" + Style + "\">Deleted "; | ||||
|              | ||||
|             if (!String.IsNullOrEmpty(DeletedBy)) | ||||
|             { | ||||
|  | ||||
| @ -225,7 +225,7 @@ | ||||
|     { | ||||
|         _message = string.Empty; | ||||
|         _fileid = int.Parse((string)e.Value); | ||||
|          | ||||
|  | ||||
|         await SetImage(); | ||||
|         StateHasChanged(); | ||||
|     } | ||||
| @ -245,9 +245,9 @@ | ||||
|                 var ratioY = (double)maxheight / (double)file.ImageHeight; | ||||
|                 var ratio = ratioX < ratioY ? ratioX : ratioY; | ||||
|  | ||||
|                 _image = "<img src=\string.Empty + ContentUrl(_fileid) + "\" alt=\string.Empty + file.Name + | ||||
|                     "\" width=\string.Empty + Convert.ToInt32(file.ImageWidth * ratio).ToString() + | ||||
|                     "\" height=\string.Empty + Convert.ToInt32(file.ImageHeight * ratio).ToString() + "\" />"; | ||||
|                 _image = "<img src=\"" + ContentUrl(_fileid) + "\" alt=\"" + file.Name + | ||||
|                     "\" width=\"" + Convert.ToInt32(file.ImageWidth * ratio).ToString() + | ||||
|                     "\" height=\"" + Convert.ToInt32(file.ImageHeight * ratio).ToString() + "\" />"; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| @ -269,13 +269,13 @@ | ||||
|                 { | ||||
|                     result = await FileService.UploadFilesAsync(_folderid, upload, _id); | ||||
|                 } | ||||
|                  | ||||
|  | ||||
|                 if (result == string.Empty) | ||||
|                 { | ||||
|                     await logger.LogInformation("File Upload Succeeded {Files}", upload); | ||||
|                     _message = "<br /><div class=\"alert alert-success\" role=\"alert\">File Upload Succeeded</div>"; | ||||
|                     await GetFiles(); | ||||
|                      | ||||
|  | ||||
|                     if (upload.Length == 1) | ||||
|                     { | ||||
|                         var file = _files.Where(item => item.Name == upload[0]).FirstOrDefault(); | ||||
| @ -308,7 +308,7 @@ | ||||
|     private async Task DeleteFile() | ||||
|     { | ||||
|         _message = string.Empty; | ||||
|          | ||||
|  | ||||
|         try | ||||
|         { | ||||
|             await FileService.DeleteFileAsync(_fileid); | ||||
|  | ||||
| @ -31,12 +31,12 @@ else | ||||
|         _openLabel = "<label"; | ||||
|         if (!string.IsNullOrEmpty(For)) | ||||
|         { | ||||
|             _openLabel += " for=\string.Empty + For + "\string.Empty; | ||||
|             _openLabel += " for=\"" + For + "\""; | ||||
|         } | ||||
|          | ||||
|         if (!string.IsNullOrEmpty(Class)) | ||||
|         { | ||||
|             _openLabel += " class=\string.Empty + Class + "\string.Empty; | ||||
|             _openLabel += " class=\"" + Class + "\""; | ||||
|         } | ||||
|          | ||||
|         _openLabel += ">"; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker