Central management of resources ( ie. stylesheets and scripts )
This commit is contained in:
		
							
								
								
									
										8
									
								
								Oqtane.Shared/Enums/ResourceType.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Oqtane.Shared/Enums/ResourceType.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,8 @@ | ||||
| namespace Oqtane.Shared | ||||
| { | ||||
|     public enum ResourceType | ||||
|     { | ||||
|         Stylesheet, | ||||
|         Script | ||||
|     } | ||||
| } | ||||
| @ -1,7 +1,11 @@ | ||||
| namespace Oqtane.Themes | ||||
| using Oqtane.Models; | ||||
| using System.Collections.Generic; | ||||
|  | ||||
| namespace Oqtane.Themes | ||||
| { | ||||
|     public interface IThemeControl | ||||
|     { | ||||
|         string Panes { get; } // identifies all panes in a theme ( delimited by ";" ) - assumed to be a layout if no panes specified | ||||
|         List<Resource> Resources { get; } // identifies all resources in a theme | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel.DataAnnotations.Schema; | ||||
|  | ||||
| namespace Oqtane.Models | ||||
| @ -33,6 +34,8 @@ namespace Oqtane.Models | ||||
|         [NotMapped] | ||||
|         public string Panes { get; set; } | ||||
|         [NotMapped] | ||||
|         public List<Resource> Resources { get; set; } | ||||
|         [NotMapped] | ||||
|         public string Permissions { get; set; } | ||||
|         [NotMapped] | ||||
|         public int Level { get; set; } | ||||
|  | ||||
							
								
								
									
										12
									
								
								Oqtane.Shared/Models/Resource.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								Oqtane.Shared/Models/Resource.cs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | ||||
| using Oqtane.Shared; | ||||
|  | ||||
| namespace Oqtane.Models | ||||
| { | ||||
|     public class Resource | ||||
|     { | ||||
|         public ResourceType ResourceType { get; set; } | ||||
|         public string Url { get; set; } | ||||
|         public string Integrity { get; set; } | ||||
|         public string CrossOrigin { get; set; } | ||||
|     } | ||||
| } | ||||
| @ -1,4 +1,6 @@ | ||||
| namespace Oqtane.Models | ||||
| using System.Collections.Generic; | ||||
|  | ||||
| namespace Oqtane.Models | ||||
| { | ||||
|     public class Theme | ||||
|     { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker