Merge pull request #67 from oqtane/dev

sync
This commit is contained in:
Shaun Walker 2020-11-19 15:02:16 -05:00 committed by GitHub
commit 34fb41fac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 18 deletions

View File

@ -107,13 +107,9 @@
SiteState.Alias = alias; // set state for services
lastsyncdate = alias.SyncDate;
// process any sync events for site or page
// process any sync events for site
if (reload != Reload.Site && alias.SyncEvents.Any())
{
if (PageState != null && alias.SyncEvents.Exists(item => item.EntityName == EntityNames.Page && item.EntityId == PageState.Page.PageId))
{
reload = Reload.Page;
}
if (alias.SyncEvents.Exists(item => item.EntityName == EntityNames.Site && item.EntityId == alias.SiteId))
{
reload = Reload.Site;
@ -155,7 +151,7 @@
}
}
if (PageState == null || reload >= Reload.Site)
if (PageState == null || reload == Reload.Site)
{
pages = await PageService.GetPagesAsync(site.SiteId);
}
@ -207,7 +203,6 @@
action = segments[actionPos];
}
}
}
// check if path has moduleid and action specification ie. pagename/*/moduleid/action/
@ -223,7 +218,6 @@
{
path = path.Replace(segments[modIdPos - 1] + "/" + segments[modIdPos] + "/" + segments[actionPos] + "/", "");
}
}
if (urlParametersPos > 0)
@ -234,7 +228,7 @@
// remove trailing slash so it can be used as a key for Pages
if (path.EndsWith("/")) path = path.Substring(0, path.Length - 1);
if (PageState == null || reload >= Reload.Page)
if (PageState == null || reload == Reload.Site)
{
page = pages.Where(item => item.Path == path).FirstOrDefault();
}
@ -254,7 +248,6 @@
if (page != null && page.Path != path)
{
page = pages.Where(item => item.Path == path).FirstOrDefault();
reload = Reload.Page;
editmode = false;
}
@ -270,12 +263,7 @@
{
page = await ProcessPage(page, site, user);
if (PageState != null && (PageState.ModuleId != moduleid || PageState.Action != action))
{
reload = Reload.Page;
}
if (PageState == null || reload >= Reload.Site)
if (PageState == null || reload == Reload.Site)
{
modules = await ModuleService.GetModulesAsync(site.SiteId);
}
@ -283,6 +271,7 @@
{
modules = PageState.Modules;
}
(page, modules) = ProcessModules(page, modules, moduleid, action, (!string.IsNullOrEmpty(page.DefaultContainerType)) ? page.DefaultContainerType : site.DefaultContainerType);
_pagestate = new PageState

View File

@ -18,7 +18,7 @@ Please note that this project is owned by the .NET Foundation and is governed by
- Install the latest edition (v16.8 or higher) of [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) (Community, Professional, or Enterprise Editions) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.
- Download a release or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution.
- Download a release or Clone the Oqtane source code to your local system. Open the **Oqtane.sln** solution file and Build the solution. Make sure you specify Oqtane.Server as the Startup Project and then Run the application.
**Using Version 1:**
@ -26,7 +26,7 @@ Please note that this project is owned by the .NET Foundation and is governed by
- Install [Visual Studio 2019](https://visualstudio.microsoft.com/vs) (Community, Professional, or Enterprise Editions) with the **ASP.NET and web development** workload enabled. Oqtane works with ALL editions of Visual Studio from Community to Enterprise. If you do not have a SQL Server installation available already and you wish to use LocalDB for development, you must also install the **.NET desktop development workload**.
- Download a release or Clone the Oqtane source code from a v1.x Tag to your local system. Open the **Oqtane.sln** solution file and Build the solution.
- Download a release or Clone the Oqtane source code from a v1.x Tag to your local system. Open the **Oqtane.sln** solution file and Build the solution. Make sure you specify Oqtane.Server as the Startup Project and then Run the application.
**Installing an official release:**