diff --git a/Directory.Build.props b/Directory.Build.props index 223c5f9b..aff5bd3e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,8 @@ - net9.0 + net10.0 Debug;Release - 6.2.1 + 10.0.0 Oqtane Shaun Walker .NET Foundation @@ -10,7 +10,7 @@ .NET Foundation https://www.oqtane.org https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 https://github.com/oqtane/oqtane.framework Git diff --git a/Oqtane.Application/.template.config/template.json b/Oqtane.Application/.template.config/template.json index ebcd1b03..7f0e8ba9 100644 --- a/Oqtane.Application/.template.config/template.json +++ b/Oqtane.Application/.template.config/template.json @@ -18,11 +18,6 @@ }, "sourceName": "Oqtane.Application", "preferNameDirectory": true, - "guids": [ - "04B05448-788F-433D-92C0-FED35122D45A", - "AA8E58A1-CD09-4208-BF66-A8BB341FD669", - "18D73F73-D7BE-4388-85BA-FBD9AC96FCA2" - ], "symbols": { "Framework": { "type": "parameter", @@ -30,12 +25,12 @@ "datatype": "choice", "choices": [ { - "choice": "net9.0", - "description": "Target net9.0" + "choice": "net10.0", + "description": "Target net10.0" } ], - "replaces": "net9.0", - "defaultValue": "net9.0" + "replaces": "net10.0", + "defaultValue": "net10.0" }, "HttpPort": { "type": "parameter", @@ -80,7 +75,7 @@ }, "primaryOutputs": [ { - "path": "Oqtane.Application.sln" + "path": "Oqtane.Application.slnx" } ] } \ No newline at end of file diff --git a/Oqtane.Application/Client/Modules/MyModule/ModuleInfo.cs b/Oqtane.Application/Client/Modules/MyModule/ModuleInfo.cs deleted file mode 100644 index 4b87c85f..00000000 --- a/Oqtane.Application/Client/Modules/MyModule/ModuleInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Oqtane.Models; -using Oqtane.Modules; - -namespace Oqtane.Application.MyModule -{ - public class ModuleInfo : IModule - { - public ModuleDefinition ModuleDefinition => new ModuleDefinition - { - Name = "MyModule", - Description = "Example module", - Version = "1.0.0", - ServerManagerType = "Oqtane.Application.Manager.MyModuleManager, Oqtane.Application.Server.Oqtane", - ReleaseVersions = "1.0.0", - Dependencies = "Oqtane.Application.Shared.Oqtane", - PackageName = "Oqtane.Application" - }; - } -} diff --git a/Oqtane.Application/Client/Oqtane.Application.Client.csproj b/Oqtane.Application/Client/Oqtane.Application.Client.csproj index c7bd2e5c..fdbfd650 100644 --- a/Oqtane.Application/Client/Oqtane.Application.Client.csproj +++ b/Oqtane.Application/Client/Oqtane.Application.Client.csproj @@ -1,22 +1,21 @@ - net9.0 - Exe + net10.0 1.0.0 Oqtane.Application.Client.Oqtane Default true false false + true - - - - - + + + + @@ -24,7 +23,7 @@ - + diff --git a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Edit.resx b/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Edit.resx deleted file mode 100644 index 168fb569..00000000 --- a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Edit.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Name: - - - Enter the name - - - Save - - - Cancel - - - Please Provide All Required Information - - - Error Saving MyModule - - - Error Loading MyModule - - \ No newline at end of file diff --git a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Index.resx b/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Index.resx deleted file mode 100644 index 89fab54a..00000000 --- a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Index.resx +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Name - - - Add MyModule - - - Edit - - - Delete - - - Delete MyModule - - - Are You Sure You Wish To Delete This MyModule? - - - No MyModules To Display - - - Error Loading MyModule - - - Error Deleting MyModule - - \ No newline at end of file diff --git a/Oqtane.Application/Client/Services/MyModuleService.cs b/Oqtane.Application/Client/Services/MyModuleService.cs deleted file mode 100644 index 3caf5bba..00000000 --- a/Oqtane.Application/Client/Services/MyModuleService.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; -using Oqtane.Services; -using Oqtane.Shared; - -namespace Oqtane.Application.Services -{ - public interface IMyModuleService - { - Task> GetMyModulesAsync(int ModuleId); - - Task GetMyModuleAsync(int MyModuleId, int ModuleId); - - Task AddMyModuleAsync(Models.MyModule MyModule); - - Task UpdateMyModuleAsync(Models.MyModule MyModule); - - Task DeleteMyModuleAsync(int MyModuleId, int ModuleId); - } - - public class MyModuleService : ServiceBase, IMyModuleService - { - public MyModuleService(HttpClient http, SiteState siteState) : base(http, siteState) { } - - private string Apiurl => CreateApiUrl("MyModule"); - - public async Task> GetMyModulesAsync(int ModuleId) - { - List Tasks = await GetJsonAsync>(CreateAuthorizationPolicyUrl($"{Apiurl}?moduleid={ModuleId}", EntityNames.Module, ModuleId), Enumerable.Empty().ToList()); - return Tasks.OrderBy(item => item.Name).ToList(); - } - - public async Task GetMyModuleAsync(int MyModuleId, int ModuleId) - { - return await GetJsonAsync(CreateAuthorizationPolicyUrl($"{Apiurl}/{MyModuleId}/{ModuleId}", EntityNames.Module, ModuleId)); - } - - public async Task AddMyModuleAsync(Models.MyModule MyModule) - { - return await PostJsonAsync(CreateAuthorizationPolicyUrl($"{Apiurl}", EntityNames.Module, MyModule.ModuleId), MyModule); - } - - public async Task UpdateMyModuleAsync(Models.MyModule MyModule) - { - return await PutJsonAsync(CreateAuthorizationPolicyUrl($"{Apiurl}/{MyModule.MyModuleId}", EntityNames.Module, MyModule.ModuleId), MyModule); - } - - public async Task DeleteMyModuleAsync(int MyModuleId, int ModuleId) - { - await DeleteAsync(CreateAuthorizationPolicyUrl($"{Apiurl}/{MyModuleId}/{ModuleId}", EntityNames.Module, ModuleId)); - } - } -} diff --git a/Oqtane.Application/Oqtane.Application.Template.nuspec b/Oqtane.Application/Oqtane.Application.Template.nuspec index 47d1af9d..e7097801 100644 --- a/Oqtane.Application/Oqtane.Application.Template.nuspec +++ b/Oqtane.Application/Oqtane.Application.Template.nuspec @@ -2,7 +2,7 @@ Oqtane.Application.Template - 6.2.1 + 10.0.0 Oqtane Application Template For Blazor Shaun Walker false diff --git a/Oqtane.Application/Oqtane.Application.sln b/Oqtane.Application/Oqtane.Application.sln deleted file mode 100644 index ea06ef57..00000000 --- a/Oqtane.Application/Oqtane.Application.sln +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35506.116 d17.12 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Application.Server", "Server\Oqtane.Application.Server.csproj", "{04B05448-788F-433D-92C0-FED35122D45A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Application.Client", "Client\Oqtane.Application.Client.csproj", "{AA8E58A1-CD09-4208-BF66-A8BB341FD669}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Oqtane.Application.Shared", "Shared\Oqtane.Application.Shared.csproj", "{18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {04B05448-788F-433D-92C0-FED35122D45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {04B05448-788F-433D-92C0-FED35122D45A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04B05448-788F-433D-92C0-FED35122D45A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {04B05448-788F-433D-92C0-FED35122D45A}.Release|Any CPU.Build.0 = Release|Any CPU - {AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA8E58A1-CD09-4208-BF66-A8BB341FD669}.Release|Any CPU.Build.0 = Release|Any CPU - {18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18D73F73-D7BE-4388-85BA-FBD9AC96FCA2}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Oqtane.Application/Oqtane.Application.slnx b/Oqtane.Application/Oqtane.Application.slnx new file mode 100644 index 00000000..fb193c28 --- /dev/null +++ b/Oqtane.Application/Oqtane.Application.slnx @@ -0,0 +1,5 @@ + + + + + diff --git a/Oqtane.Application/Server/Manager/MyModuleManager.cs b/Oqtane.Application/Server/Manager/MyModuleManager.cs deleted file mode 100644 index f2d8278e..00000000 --- a/Oqtane.Application/Server/Manager/MyModuleManager.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using Oqtane.Modules; -using Oqtane.Models; -using Oqtane.Infrastructure; -using Oqtane.Interfaces; -using Oqtane.Enums; -using Oqtane.Repository; -using Oqtane.Application.Repository; -using System.Threading.Tasks; - -namespace Oqtane.Application.Manager -{ - public class MyModuleManager : MigratableModuleBase, IInstallable, IPortable, ISearchable - { - private readonly IMyModuleRepository _MyModuleRepository; - private readonly IDBContextDependencies _DBContextDependencies; - - public MyModuleManager(IMyModuleRepository MyModuleRepository, IDBContextDependencies DBContextDependencies) - { - _MyModuleRepository = MyModuleRepository; - _DBContextDependencies = DBContextDependencies; - } - - public bool Install(Tenant tenant, string version) - { - return Migrate(new Context(_DBContextDependencies), tenant, MigrationType.Up); - } - - public bool Uninstall(Tenant tenant) - { - return Migrate(new Context(_DBContextDependencies), tenant, MigrationType.Down); - } - - public string ExportModule(Module module) - { - string content = ""; - List MyModules = _MyModuleRepository.GetMyModules(module.ModuleId).ToList(); - if (MyModules != null) - { - content = JsonSerializer.Serialize(MyModules); - } - return content; - } - - public void ImportModule(Module module, string content, string version) - { - List MyModules = null; - if (!string.IsNullOrEmpty(content)) - { - MyModules = JsonSerializer.Deserialize>(content); - } - if (MyModules != null) - { - foreach(var Task in MyModules) - { - _MyModuleRepository.AddMyModule(new Models.MyModule { ModuleId = module.ModuleId, Name = Task.Name }); - } - } - } - - public Task> GetSearchContentsAsync(PageModule pageModule, DateTime lastIndexedOn) - { - var searchContentList = new List(); - - foreach (var MyModule in _MyModuleRepository.GetMyModules(pageModule.ModuleId)) - { - if (MyModule.ModifiedOn >= lastIndexedOn) - { - searchContentList.Add(new SearchContent - { - EntityName = "MyModule", - EntityId = MyModule.MyModuleId.ToString(), - Title = MyModule.Name, - Body = MyModule.Name, - ContentModifiedBy = MyModule.ModifiedBy, - ContentModifiedOn = MyModule.ModifiedOn - }); - } - } - - return Task.FromResult(searchContentList); - } - } -} diff --git a/Oqtane.Application/Server/Migrations/01000000_InitializeModule.cs b/Oqtane.Application/Server/Migrations/01000000_InitializeModule.cs deleted file mode 100644 index 67bf16dd..00000000 --- a/Oqtane.Application/Server/Migrations/01000000_InitializeModule.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Oqtane.Databases.Interfaces; -using Oqtane.Migrations; -using Oqtane.Application.Migrations.EntityBuilders; -using Oqtane.Application.Repository; - -namespace Oqtane.Application.Migrations -{ - [DbContext(typeof(Context))] - [Migration("Oqtane.Application.01.00.00.00")] - public class InitializeModule : MultiDatabaseMigration - { - public InitializeModule(IDatabase database) : base(database) - { - } - - protected override void Up(MigrationBuilder migrationBuilder) - { - var myModuleEntityBuilder = new MyModuleEntityBuilder(migrationBuilder, ActiveDatabase); - myModuleEntityBuilder.Create(); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - var myModuleEntityBuilder = new MyModuleEntityBuilder(migrationBuilder, ActiveDatabase); - myModuleEntityBuilder.Drop(); - } - } -} diff --git a/Oqtane.Application/Server/Oqtane.Application.Server.csproj b/Oqtane.Application/Server/Oqtane.Application.Server.csproj index aaf443fa..4d6ad43b 100644 --- a/Oqtane.Application/Server/Oqtane.Application.Server.csproj +++ b/Oqtane.Application/Server/Oqtane.Application.Server.csproj @@ -1,20 +1,30 @@  - net9.0 + net10.0 1.0.0 Oqtane.Application.Server.Oqtane true none false false + true + true - - - - + + + + + + + + + + + + @@ -23,7 +33,7 @@ - + diff --git a/Oqtane.Application/Server/Program.cs b/Oqtane.Application/Server/Program.cs index 55a18e50..a4eaab1b 100644 --- a/Oqtane.Application/Server/Program.cs +++ b/Oqtane.Application/Server/Program.cs @@ -1,9 +1,13 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore; +using System; +using System.IO; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Cors.Infrastructure; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; -using Oqtane.Infrastructure; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Oqtane.Extensions; +using Oqtane.Infrastructure; +using Oqtane.Shared; namespace Oqtane.Application.Server { @@ -11,32 +15,41 @@ namespace Oqtane.Application.Server { public static void Main(string[] args) { - // defer server startup to Oqtane - do not modify - var host = BuildWebHost(args); - var databaseManager = host.Services.GetService(); + var builder = WebApplication.CreateBuilder(args); + + AppDomain.CurrentDomain.SetData(Constants.DataDirectory, Path.Combine(builder.Environment.ContentRootPath, "Data")); + + var configurationBuilder = new ConfigurationBuilder() + .SetBasePath(builder.Environment.ContentRootPath) + .AddJsonFile("appsettings.json", false, true) + .AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", true, true) + .AddEnvironmentVariables(); + var configuration = configurationBuilder.Build(); + + builder.Services.AddOqtane(configuration, builder.Environment); + + var app = builder.Build(); + + var corsService = app.Services.GetRequiredService(); + var corsPolicyProvider = app.Services.GetRequiredService(); + var syncManager = app.Services.GetRequiredService(); + + app.UseOqtane(configuration, builder.Environment, corsService, corsPolicyProvider, syncManager); + + var databaseManager = app.Services.GetService(); var install = databaseManager.Install(); if (!string.IsNullOrEmpty(install.Message)) { - var filelogger = host.Services.GetRequiredService>(); + var filelogger = app.Services.GetRequiredService>(); if (filelogger != null) { - filelogger.LogError($"[Oqtane.Application.Server.Program.Main] {install.Message}"); + filelogger.LogError($"[Oqtane.Server.Program.Main] {install.Message}"); } } else { - host.Run(); + app.Run(); } } - - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseConfiguration(new ConfigurationBuilder() - .AddCommandLine(args) - .AddEnvironmentVariables() - .Build()) - .UseStartup() - .ConfigureLocalizationSettings() - .Build(); } } diff --git a/Oqtane.Application/Server/Repository/Context.cs b/Oqtane.Application/Server/Repository/Context.cs deleted file mode 100644 index adbcfe95..00000000 --- a/Oqtane.Application/Server/Repository/Context.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Oqtane.Modules; -using Oqtane.Repository; -using Oqtane.Repository.Databases.Interfaces; - -namespace Oqtane.Application.Repository -{ - public class Context : DBContextBase, ITransientService, IMultiDatabase - { - public virtual DbSet MyModule { get; set; } - - public Context(IDBContextDependencies DBContextDependencies) : base(DBContextDependencies) - { - // ContextBase handles multi-tenant database connections - } - - protected override void OnModelCreating(ModelBuilder builder) - { - base.OnModelCreating(builder); - - builder.Entity().ToTable(ActiveDatabase.RewriteName("MyModule")); - } - } -} diff --git a/Oqtane.Application/Server/Repository/MyModuleRepository.cs b/Oqtane.Application/Server/Repository/MyModuleRepository.cs deleted file mode 100644 index 0912fad3..00000000 --- a/Oqtane.Application/Server/Repository/MyModuleRepository.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using System.Linq; -using System.Collections.Generic; -using Oqtane.Modules; - -namespace Oqtane.Application.Repository -{ - public interface IMyModuleRepository - { - IEnumerable GetMyModules(int ModuleId); - Models.MyModule GetMyModule(int MyModuleId); - Models.MyModule GetMyModule(int MyModuleId, bool tracking); - Models.MyModule AddMyModule(Models.MyModule MyModule); - Models.MyModule UpdateMyModule(Models.MyModule MyModule); - void DeleteMyModule(int MyModuleId); - } - - public class MyModuleRepository : IMyModuleRepository, ITransientService - { - private readonly IDbContextFactory _factory; - - public MyModuleRepository(IDbContextFactory factory) - { - _factory = factory; - } - - public IEnumerable GetMyModules(int ModuleId) - { - using var db = _factory.CreateDbContext(); - return db.MyModule.Where(item => item.ModuleId == ModuleId).ToList(); - } - - public Models.MyModule GetMyModule(int MyModuleId) - { - return GetMyModule(MyModuleId, true); - } - - public Models.MyModule GetMyModule(int MyModuleId, bool tracking) - { - using var db = _factory.CreateDbContext(); - if (tracking) - { - return db.MyModule.Find(MyModuleId); - } - else - { - return db.MyModule.AsNoTracking().FirstOrDefault(item => item.MyModuleId == MyModuleId); - } - } - - public Models.MyModule AddMyModule(Models.MyModule MyModule) - { - using var db = _factory.CreateDbContext(); - db.MyModule.Add(MyModule); - db.SaveChanges(); - return MyModule; - } - - public Models.MyModule UpdateMyModule(Models.MyModule MyModule) - { - using var db = _factory.CreateDbContext(); - db.Entry(MyModule).State = EntityState.Modified; - db.SaveChanges(); - return MyModule; - } - - public void DeleteMyModule(int MyModuleId) - { - using var db = _factory.CreateDbContext(); - Models.MyModule MyModule = db.MyModule.Find(MyModuleId); - db.MyModule.Remove(MyModule); - db.SaveChanges(); - } - } -} diff --git a/Oqtane.Application/Server/Startup.cs b/Oqtane.Application/Server/Startup.cs deleted file mode 100644 index 71f5bd19..00000000 --- a/Oqtane.Application/Server/Startup.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.IO; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Oqtane.Extensions; -using Oqtane.Infrastructure; -using Oqtane.Shared; -using Microsoft.AspNetCore.Cors.Infrastructure; - -namespace Oqtane.Application.Server -{ - public class Startup - { - private readonly IConfigurationRoot _configuration; - private readonly IWebHostEnvironment _environment; - - public Startup(IWebHostEnvironment environment) - { - AppDomain.CurrentDomain.SetData(Constants.DataDirectory, Path.Combine(environment.ContentRootPath, "Data")); - - var builder = new ConfigurationBuilder() - .SetBasePath(environment.ContentRootPath) - .AddJsonFile("appsettings.json", false, true) - .AddJsonFile($"appsettings.{environment.EnvironmentName}.json", true, true) - .AddEnvironmentVariables(); - - _configuration = builder.Build(); - _environment = environment; - } - - public void ConfigureServices(IServiceCollection services) - { - // defer server startup to Oqtane - do not modify - services.AddOqtane(_configuration, _environment); - } - - public void Configure(IApplicationBuilder app, IConfigurationRoot configuration, IWebHostEnvironment environment, ICorsService corsService, ICorsPolicyProvider corsPolicyProvider, ISyncManager sync) - { - // defer server startup to Oqtane - do not modify - app.UseOqtane(configuration, environment, corsService, corsPolicyProvider, sync); - } - } -} diff --git a/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Application.MyModule/Module.js b/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Application.MyModule/Module.js deleted file mode 100644 index ec30da43..00000000 --- a/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Application.MyModule/Module.js +++ /dev/null @@ -1,5 +0,0 @@ -/* Module Script */ -var App = App || {}; - -App.MyModule = { -}; \ No newline at end of file diff --git a/Oqtane.Application/Client/Modules/MyModule/Edit.razor b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Edit.razor similarity index 61% rename from Oqtane.Application/Client/Modules/MyModule/Edit.razor rename to Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Edit.razor index 3e9caa2a..59badca4 100644 --- a/Oqtane.Application/Client/Modules/MyModule/Edit.razor +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Edit.razor @@ -1,10 +1,10 @@ @using Oqtane.Modules.Controls -@using Oqtane.Application.Services -@using Oqtane.Application.Models +@using [Owner].Module.[Module].Services +@using [Owner].Module.[Module].Models -@namespace Oqtane.Application.MyModule +@namespace [Owner].Module.[Module] @inherits ModuleBase -@inject IMyModuleService MyModuleService +@inject I[Module]Service [Module]Service @inject NavigationManager NavigationManager @inject IStringLocalizer Localizer @@ -31,12 +31,7 @@ public override string Actions => "Add,Edit"; - public override string Title => "Manage MyModule"; - - public override List Resources => new List() - { - new Stylesheet(ModulePath() + "Module.css") - }; + public override string Title => "Manage [Module]"; private ElementReference form; private bool validated = false; @@ -55,20 +50,20 @@ if (PageState.Action == "Edit") { _id = Int32.Parse(PageState.QueryString["id"]); - MyModule MyModule = await MyModuleService.GetMyModuleAsync(_id, ModuleState.ModuleId); - if (MyModule != null) + [Module] [Module] = await [Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); + if ([Module] != null) { - _name = MyModule.Name; - _createdby = MyModule.CreatedBy; - _createdon = MyModule.CreatedOn; - _modifiedby = MyModule.ModifiedBy; - _modifiedon = MyModule.ModifiedOn; + _name = [Module].Name; + _createdby = [Module].CreatedBy; + _createdon = [Module].CreatedOn; + _modifiedby = [Module].ModifiedBy; + _modifiedon = [Module].ModifiedOn; } } } catch (Exception ex) { - await logger.LogError(ex, "Error Loading MyModule {MyModuleId} {Error}", _id, ex.Message); + await logger.LogError(ex, "Error Loading [Module] {[Module]Id} {Error}", _id, ex.Message); AddModuleMessage(Localizer["Message.LoadError"], MessageType.Error); } } @@ -83,18 +78,18 @@ { if (PageState.Action == "Add") { - MyModule MyModule = new MyModule(); - MyModule.ModuleId = ModuleState.ModuleId; - MyModule.Name = _name; - MyModule = await MyModuleService.AddMyModuleAsync(MyModule); - await logger.LogInformation("MyModule Added {MyModule}", MyModule); + [Module] [Module] = new [Module](); + [Module].ModuleId = ModuleState.ModuleId; + [Module].Name = _name; + [Module] = await [Module]Service.Add[Module]Async([Module]); + await logger.LogInformation("[Module] Added {[Module]}", [Module]); } else { - MyModule MyModule = await MyModuleService.GetMyModuleAsync(_id, ModuleState.ModuleId); - MyModule.Name = _name; - await MyModuleService.UpdateMyModuleAsync(MyModule); - await logger.LogInformation("MyModule Updated {MyModule}", MyModule); + [Module] [Module] = await [Module]Service.Get[Module]Async(_id, ModuleState.ModuleId); + [Module].Name = _name; + await [Module]Service.Update[Module]Async([Module]); + await logger.LogInformation("[Module] Updated {[Module]}", [Module]); } NavigationManager.NavigateTo(NavigateUrl()); } @@ -105,7 +100,7 @@ } catch (Exception ex) { - await logger.LogError(ex, "Error Saving MyModule {Error}", ex.Message); + await logger.LogError(ex, "Error Saving [Module] {Error}", ex.Message); AddModuleMessage(Localizer["Message.SaveError"], MessageType.Error); } } diff --git a/Oqtane.Application/Client/Modules/MyModule/Index.razor b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Index.razor similarity index 56% rename from Oqtane.Application/Client/Modules/MyModule/Index.razor rename to Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Index.razor index fc3744d5..af8a4839 100644 --- a/Oqtane.Application/Client/Modules/MyModule/Index.razor +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Index.razor @@ -1,32 +1,32 @@ -@using Oqtane.Application.Services -@using Oqtane.Application.Models +@using [Owner].Module.[Module].Services +@using [Owner].Module.[Module].Models -@namespace Oqtane.Application.MyModule +@namespace [Owner].Module.[Module] @inherits ModuleBase -@inject IMyModuleService MyModuleService +@inject I[Module]Service [Module]Service @inject NavigationManager NavigationManager @inject IStringLocalizer Localizer -@if (_MyModules == null) +@if (_[Module]s == null) {

Loading...

} else { - +

- @if (@_MyModules.Count != 0) + @if (@_[Module]s.Count != 0) { - +
    @Localizer["Name"]
- - + + @context.Name
@@ -38,39 +38,41 @@ else } @code { + public override string RenderMode => RenderModes.Static; + public override List Resources => new List() { new Stylesheet(ModulePath() + "Module.css"), new Script(ModulePath() + "Module.js") }; - List _MyModules; + List<[Module]> _[Module]s; protected override async Task OnInitializedAsync() { try { - _MyModules = await MyModuleService.GetMyModulesAsync(ModuleState.ModuleId); + _[Module]s = await [Module]Service.Get[Module]sAsync(ModuleState.ModuleId); } catch (Exception ex) { - await logger.LogError(ex, "Error Loading MyModule {Error}", ex.Message); + await logger.LogError(ex, "Error Loading [Module] {Error}", ex.Message); AddModuleMessage(Localizer["Message.LoadError"], MessageType.Error); } } - private async Task Delete(MyModule MyModule) + private async Task Delete([Module] [Module]) { try { - await MyModuleService.DeleteMyModuleAsync(MyModule.MyModuleId, ModuleState.ModuleId); - await logger.LogInformation("MyModule Deleted {MyModule}", MyModule); - _MyModules = await MyModuleService.GetMyModulesAsync(ModuleState.ModuleId); + await [Module]Service.Delete[Module]Async([Module].[Module]Id, ModuleState.ModuleId); + await logger.LogInformation("[Module] Deleted {[Module]}", [Module]); + _[Module]s = await [Module]Service.Get[Module]sAsync(ModuleState.ModuleId); StateHasChanged(); } catch (Exception ex) { - await logger.LogError(ex, "Error Deleting MyModule {MyModule} {Error}", MyModule, ex.Message); + await logger.LogError(ex, "Error Deleting [Module] {[Module]} {Error}", [Module], ex.Message); AddModuleMessage(Localizer["Message.DeleteError"], MessageType.Error); } } diff --git a/Oqtane.Application/Client/Interop.cs b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Interop.cs similarity index 87% rename from Oqtane.Application/Client/Interop.cs rename to Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Interop.cs index 5edf3aa5..bcb7d729 100644 --- a/Oqtane.Application/Client/Interop.cs +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Interop.cs @@ -1,7 +1,7 @@ using Microsoft.JSInterop; using System.Threading.Tasks; -namespace Oqtane.Application +namespace [Owner].Module.[Module] { public class Interop { diff --git a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/ModuleInfo.cs b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/ModuleInfo.cs new file mode 100644 index 00000000..15c96b86 --- /dev/null +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/ModuleInfo.cs @@ -0,0 +1,16 @@ +using Oqtane.Models; +using Oqtane.Modules; + +namespace [Owner].Module.[Module] +{ + public class ModuleInfo : IModule + { + public ModuleDefinition ModuleDefinition => new ModuleDefinition + { + Name = "[Module]", + Description = "[Description]", + Version = "1.0.0", + ServerManagerType = "[ServerManagerType]" + }; + } +} diff --git a/Oqtane.Application/Client/Modules/MyModule/Settings.razor b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Settings.razor similarity index 74% rename from Oqtane.Application/Client/Modules/MyModule/Settings.razor rename to Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Settings.razor index facaecae..624dee2a 100644 --- a/Oqtane.Application/Client/Modules/MyModule/Settings.razor +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Settings.razor @@ -1,4 +1,4 @@ -@namespace Oqtane.Application.MyModule +@namespace [Owner].Module.[Module] @inherits ModuleBase @inject ISettingService SettingService @inject IStringLocalizer Localizer @@ -13,8 +13,8 @@ @code { - private string resourceType = "Oqtane.Application.MyModule.Settings, Oqtane.Application.Client.Oqtane"; // for localization - public override string Title => "MyModdule Settings"; + private string resourceType = "[Owner].Module.[Module].Settings, [Owner].Module.[Module].Client.Oqtane"; // for localization + public override string Title => "[Module] Settings"; string _value; @@ -35,8 +35,8 @@ { try { - Dictionary settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId); - SettingService.SetSetting(settings, "SettingName", _value); + var settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId); + settings = SettingService.SetSetting(settings, "SettingName", _value); await SettingService.UpdateModuleSettingsAsync(settings, ModuleState.ModuleId); } catch (Exception ex) diff --git a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Edit.resx b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Edit.resx new file mode 100644 index 00000000..eebd66cd --- /dev/null +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Edit.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name: + + + Enter the name + + + Save + + + Cancel + + + Error Loading [Module] + + + Please Provide All Required Information + + + Error Saving [Module] + + \ No newline at end of file diff --git a/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Index.resx b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Index.resx new file mode 100644 index 00000000..721a853a --- /dev/null +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Index.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Name + + + Add [Module] + + + Edit + + + Delete + + + Delete [Module] + + + Are You Sure You Wish To Delete This [Module]? + + + No [Module]s To Display + + + Error Loading [Module] + + + Error Deleting [Module] + + \ No newline at end of file diff --git a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Settings.resx b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Settings.resx similarity index 99% rename from Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Settings.resx rename to Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Settings.resx index 83dc88f9..ba0390d8 100644 --- a/Oqtane.Application/Client/Resources/Oqtane.Application.MyModule/Settings.resx +++ b/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Resources/[Owner].Module.[Module]/Settings.resx @@ -1,4 +1,4 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ContainerSettings.resx b/Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ContainerSettings.resx similarity index 99% rename from Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ContainerSettings.resx rename to Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ContainerSettings.resx index aea7d1ba..9c3b2d80 100644 --- a/Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ContainerSettings.resx +++ b/Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ContainerSettings.resx @@ -1,4 +1,4 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ThemeSettings.resx b/Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ThemeSettings.resx similarity index 99% rename from Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ThemeSettings.resx rename to Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ThemeSettings.resx index fe0965fd..1359d4be 100644 --- a/Oqtane.Application/Client/Resources/Oqtane.Application.MyTheme/ThemeSettings.resx +++ b/Oqtane.Application/Server/wwwroot/Themes/Templates/Internal/Client/Resources/[Owner].Theme.[Theme]/ThemeSettings.resx @@ -1,4 +1,4 @@ - + - - + $(TargetFrameworks);net10.0-windows10.0.19041.0 + + Exe - Oqtane.Maui + Oqtane.Maui true true enable @@ -19,32 +18,31 @@ com.oqtane.maui - 6.2.1 + 10.0.0 1 - - None + + None - 15.0 - 15.0 - 24.0 - 10.0.17763.0 - 10.0.17763.0 - 6.5 - + 15.0 + 15.0 + 24.0 + 10.0.17763.0 + 10.0.17763.0 + - + - + - + - + @@ -55,24 +53,24 @@ - - - - - - - - - - + + + + + + + + + + - - - ..\Oqtane.Server\bin\Debug\net9.0\Oqtane.Client.dll - - - ..\Oqtane.Server\bin\Debug\net9.0\Oqtane.Shared.dll - - + + + ..\Oqtane.Server\bin\Debug\net10.0\Oqtane.Client.dll + + + ..\Oqtane.Server\bin\Debug\net10.0\Oqtane.Shared.dll + +
diff --git a/Oqtane.Package/FixProps.exe b/Oqtane.Package/FixProps.exe index 58d79183..e2c449ec 100644 Binary files a/Oqtane.Package/FixProps.exe and b/Oqtane.Package/FixProps.exe differ diff --git a/Oqtane.Package/Oqtane.Client.nuspec b/Oqtane.Package/Oqtane.Client.nuspec index e719802b..6fea68b2 100644 --- a/Oqtane.Package/Oqtane.Client.nuspec +++ b/Oqtane.Package/Oqtane.Client.nuspec @@ -2,7 +2,7 @@ Oqtane.Client - 6.2.1 + 10.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,24 +12,24 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 readme.md icon.png oqtane - - - - - - - + + + + + + + - - + + diff --git a/Oqtane.Package/Oqtane.Framework.nuspec b/Oqtane.Package/Oqtane.Framework.nuspec index c4d8b054..2a1dabff 100644 --- a/Oqtane.Package/Oqtane.Framework.nuspec +++ b/Oqtane.Package/Oqtane.Framework.nuspec @@ -2,7 +2,7 @@ Oqtane.Framework - 6.2.1 + 10.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -11,8 +11,8 @@ .NET Foundation false MIT - https://github.com/oqtane/oqtane.framework/releases/download/v6.2.1/Oqtane.Framework.6.2.1.Upgrade.zip - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/download/v10.0.0/Oqtane.Framework.10.0.0.Upgrade.zip + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 readme.md icon.png oqtane framework diff --git a/Oqtane.Package/Oqtane.Server.nuspec b/Oqtane.Package/Oqtane.Server.nuspec index 7a436eae..789f9215 100644 --- a/Oqtane.Package/Oqtane.Server.nuspec +++ b/Oqtane.Package/Oqtane.Server.nuspec @@ -2,7 +2,7 @@ Oqtane.Server - 6.2.1 + 10.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,49 +12,45 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 readme.md icon.png oqtane - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - + + + + + - + - - - - - - - + + + + + + + diff --git a/Oqtane.Package/Oqtane.Shared.nuspec b/Oqtane.Package/Oqtane.Shared.nuspec index cb148f19..9e68e8ca 100644 --- a/Oqtane.Package/Oqtane.Shared.nuspec +++ b/Oqtane.Package/Oqtane.Shared.nuspec @@ -2,7 +2,7 @@ Oqtane.Shared - 6.2.1 + 10.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,24 +12,21 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 readme.md icon.png oqtane - - - - + + + - - - - + + diff --git a/Oqtane.Package/Oqtane.Updater.nuspec b/Oqtane.Package/Oqtane.Updater.nuspec index 0acd762e..597f5617 100644 --- a/Oqtane.Package/Oqtane.Updater.nuspec +++ b/Oqtane.Package/Oqtane.Updater.nuspec @@ -2,7 +2,7 @@ Oqtane.Updater - 6.2.1 + 10.0.0 Shaun Walker .NET Foundation Oqtane Framework @@ -12,13 +12,13 @@ false MIT https://github.com/oqtane/oqtane.framework - https://github.com/oqtane/oqtane.framework/releases/tag/v6.2.1 + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.0 readme.md icon.png oqtane - + diff --git a/Oqtane.Package/install.ps1 b/Oqtane.Package/install.ps1 index 70f1001b..a59e4412 100644 --- a/Oqtane.Package/install.ps1 +++ b/Oqtane.Package/install.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.2.1.Install.zip" -Force +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net10.0\publish\*" -DestinationPath "Oqtane.Framework.10.0.0.Install.zip" -Force diff --git a/Oqtane.Package/release.cmd b/Oqtane.Package/release.cmd index f32f8178..cc12b123 100644 --- a/Oqtane.Package/release.cmd +++ b/Oqtane.Package/release.cmd @@ -1,29 +1,30 @@ -dotnet build -c Release ..\Oqtane.sln +dotnet build -c Release ..\Oqtane.slnx +FixProps.exe nuget.exe pack Oqtane.Client.nuspec nuget.exe pack Oqtane.Server.nuspec nuget.exe pack Oqtane.Shared.nuspec nuget.exe pack Oqtane.Framework.nuspec dotnet publish ..\Oqtane.Server\Oqtane.Server.csproj /p:Configuration=Release -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\Content" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\wwwroot\Content" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\android-arm" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\android-arm64" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\android-x64" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\android-x86" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\ios-arm" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\ios-arm64" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\iossimulator-arm64" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\iossimulator-x64" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\runtimes\iossimulator-x86" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\wwwroot\Modules\Templates" -rmdir /Q /S "..\Oqtane.Server\bin\Release\net9.0\publish\wwwroot\Themes\Templates" -del "..\Oqtane.Server\bin\Release\net9.0\publish\appsettings.json" -ren "..\Oqtane.Server\bin\Release\net9.0\publish\appsettings.release.json" "appsettings.json" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\Content" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\wwwroot\Content" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\android-arm" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\android-arm64" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\android-x64" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\android-x86" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\ios-arm" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\ios-arm64" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\iossimulator-arm64" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\iossimulator-x64" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\runtimes\iossimulator-x86" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\wwwroot\Modules\Templates" +rmdir /Q /S "..\Oqtane.Server\bin\Release\net10.0\publish\wwwroot\Themes\Templates" +del "..\Oqtane.Server\bin\Release\net10.0\publish\appsettings.json" +ren "..\Oqtane.Server\bin\Release\net10.0\publish\appsettings.release.json" "appsettings.json" C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\install.ps1" -del "..\Oqtane.Server\bin\Release\net9.0\publish\appsettings.json" -del "..\Oqtane.Server\bin\Release\net9.0\publish\web.config" +del "..\Oqtane.Server\bin\Release\net10.0\publish\appsettings.json" +del "..\Oqtane.Server\bin\Release\net10.0\publish\web.config" C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe ".\upgrade.ps1" -dotnet build -c Release ..\Oqtane.Updater.sln +dotnet build -c Release ..\Oqtane.Updater.slnx dotnet publish ..\Oqtane.Updater\Oqtane.Updater.csproj /p:Configuration=Release nuget.exe pack Oqtane.Updater.nuspec nuget.exe pack ..\Oqtane.Application\Oqtane.Application.Template.nuspec -NoDefaultExcludes diff --git a/Oqtane.Package/upgrade.ps1 b/Oqtane.Package/upgrade.ps1 index cc87a261..5979f4d7 100644 --- a/Oqtane.Package/upgrade.ps1 +++ b/Oqtane.Package/upgrade.ps1 @@ -1 +1 @@ -Compress-Archive -Path "..\Oqtane.Server\bin\Release\net9.0\publish\*" -DestinationPath "Oqtane.Framework.6.2.1.Upgrade.zip" -Force +Compress-Archive -Path "..\Oqtane.Server\bin\Release\net10.0\publish\*" -DestinationPath "Oqtane.Framework.10.0.0.Upgrade.zip" -Force diff --git a/Oqtane.Server/Components/App.razor b/Oqtane.Server/Components/App.razor index a4e1f4ab..7382976b 100644 --- a/Oqtane.Server/Components/App.razor +++ b/Oqtane.Server/Components/App.razor @@ -197,10 +197,6 @@ { _scripts += CreatePWAScript(alias, site, route); } - @if (_renderMode == RenderModes.Static) - { - _scripts += CreateScrollPositionScript(); - } // set culture if not specified string cultureCookie = Context.Request.Cookies[Shared.CookieRequestCultureProvider.DefaultCookieName]; @@ -510,25 +506,6 @@ "" + Environment.NewLine; } - private string CreateScrollPositionScript() - { - return Environment.NewLine + - "" + Environment.NewLine; - } - private void AddScript(Resource resource, Alias alias) { var script = CreateScript(resource, alias); diff --git a/Oqtane.Server/Controllers/ModuleDefinitionController.cs b/Oqtane.Server/Controllers/ModuleDefinitionController.cs index 486af9fc..139da8e2 100644 --- a/Oqtane.Server/Controllers/ModuleDefinitionController.cs +++ b/Oqtane.Server/Controllers/ModuleDefinitionController.cs @@ -1,20 +1,20 @@ +using System; using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; -using Oqtane.Models; -using Oqtane.Shared; -using Microsoft.AspNetCore.Authorization; using System.IO; -using System.Reflection; using System.Linq; +using System.Net; +using System.Reflection; +using System.Text.Json; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.DependencyInjection; using Oqtane.Enums; using Oqtane.Infrastructure; +using Oqtane.Models; using Oqtane.Repository; using Oqtane.Security; -using System; -using Microsoft.Extensions.DependencyInjection; -using System.Text.Json; -using System.Net; +using Oqtane.Shared; namespace Oqtane.Controllers { @@ -132,8 +132,8 @@ namespace Oqtane.Controllers if (moduleDefinition.Template.ToLower().Contains("internal")) { rootPath = Utilities.PathCombine(rootFolder.FullName, Path.DirectorySeparatorChar.ToString()); - moduleDefinition.ServerManagerType = moduleDefinition.ModuleDefinitionName + ".Manager." + moduleDefinition.Name + "Manager, Oqtane.Server"; - moduleDefinition.ModuleDefinitionName = moduleDefinition.ModuleDefinitionName + ", Oqtane.Client"; + moduleDefinition.ServerManagerType = moduleDefinition.ModuleDefinitionName + ".Manager." + moduleDefinition.Name + "Manager, " + moduleDefinition.Owner + ".Server.Oqtane"; + moduleDefinition.ModuleDefinitionName = moduleDefinition.ModuleDefinitionName + ", " + moduleDefinition.Owner + ".Client.Oqtane"; } else { @@ -270,9 +270,10 @@ namespace Oqtane.Controllers foreach (string directory in Directory.GetDirectories(templatePath)) { string name = directory.Replace(templatePath, ""); - if (System.IO.File.Exists(Path.Combine(directory, "template.json"))) + var manifest = Directory.GetFiles(directory, "*.json"); + if (manifest.Any()) { - var template = JsonSerializer.Deserialize