add RenderMode to IModuleControl
This commit is contained in:
parent
156d39490e
commit
abd235f332
|
@ -50,6 +50,8 @@ namespace Oqtane.Modules
|
|||
|
||||
public virtual List<Resource> Resources { get; set; }
|
||||
|
||||
public virtual string RenderMode { get { return RenderModes.Interactive; } }
|
||||
|
||||
// url parameters
|
||||
public virtual string UrlParametersTemplate { get; set; }
|
||||
|
||||
|
|
|
@ -478,6 +478,8 @@
|
|||
{
|
||||
// retrieve module component resources
|
||||
var moduleobject = Activator.CreateInstance(moduletype) as IModuleControl;
|
||||
module.RenderMode = moduleobject.RenderMode;
|
||||
|
||||
page.Resources = ManagePageResources(page.Resources, moduleobject.Resources, ResourceLevel.Module, alias, "Modules", moduletype.Namespace);
|
||||
if (action.ToLower() == "settings" && module.ModuleDefinition != null)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ else
|
|||
{
|
||||
Parameters = new Dictionary<string, object>();
|
||||
Parameters.Add(new KeyValuePair<string, object>("AntiForgeryToken", ""));
|
||||
Parameters.Add(new KeyValuePair<string, object>("RenderMode", RenderModes.Hybrid));
|
||||
Parameters.Add(new KeyValuePair<string, object>("RenderMode", RenderModes.Interactive));
|
||||
Parameters.Add(new KeyValuePair<string, object>("Runtime", Runtimes.Hybrid));
|
||||
Parameters.Add(new KeyValuePair<string, object>("VisitorId", -1));
|
||||
Parameters.Add(new KeyValuePair<string, object>("RemoteIPAddress", ""));
|
||||
|
|
|
@ -30,5 +30,10 @@ namespace Oqtane.Modules
|
|||
/// Identifies all resources in a module
|
||||
/// </summary>
|
||||
List<Resource> Resources { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the required render mode for the module control ie. Static,Interactive
|
||||
/// </summary>
|
||||
string RenderMode { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,8 @@ namespace Oqtane.Models
|
|||
public string Actions { get; set; }
|
||||
[NotMapped]
|
||||
public bool UseAdminContainer { get; set; }
|
||||
[NotMapped]
|
||||
public string RenderMode{ get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -3,6 +3,5 @@ namespace Oqtane.Shared {
|
|||
public const string Static = "Static";
|
||||
public const string Interactive = "Interactive";
|
||||
public const string Headless = "Headless";
|
||||
public const string Hybrid = "Hybrid"; // used at runtime by .NET MAUI clients
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user