added support for default alias specification, alias auto registration, alias redirect, alias line break delimiters
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
@namespace Oqtane.Modules.Admin.Sites
|
||||
@using Oqtane.Interfaces
|
||||
@using System.Text.RegularExpressions
|
||||
@inherits ModuleBase
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject ITenantService TenantService
|
||||
@ -282,6 +283,7 @@ else
|
||||
{
|
||||
if (_tenantid != "-" && _name != string.Empty && _urls != string.Empty && _themetype != "-" && _containertype != "-" && _sitetemplatetype != "-")
|
||||
{
|
||||
_urls = Regex.Replace(_urls, @"\r\n?|\n", ",");
|
||||
var duplicates = new List<string>();
|
||||
var aliases = await AliasService.GetAliasesAsync();
|
||||
foreach (string name in _urls.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||
|
@ -43,7 +43,7 @@ else
|
||||
_sites = new List<Alias>();
|
||||
foreach (Alias alias in aliases)
|
||||
{
|
||||
if (!_sites.Exists(item => item.TenantId == alias.TenantId && item.SiteId == alias.SiteId))
|
||||
if (alias.IsDefault && !_sites.Exists(item => item.TenantId == alias.TenantId && item.SiteId == alias.SiteId))
|
||||
{
|
||||
_sites.Add(alias);
|
||||
}
|
||||
@ -52,16 +52,11 @@ else
|
||||
|
||||
private void Edit(string name)
|
||||
{
|
||||
if (name.Equals("*"))
|
||||
{
|
||||
var uri = new Uri(NavigationManager.Uri);
|
||||
name = uri.Authority;
|
||||
}
|
||||
NavigationManager.NavigateTo(_scheme + name + "/admin/site/?reload");
|
||||
NavigationManager.NavigateTo(_scheme + name + "/admin/site", true);
|
||||
}
|
||||
|
||||
private void Browse(string name)
|
||||
{
|
||||
NavigationManager.NavigateTo(_scheme + name + "/?reload");
|
||||
NavigationManager.NavigateTo(_scheme + name, true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user