diff --git a/.gitignore b/.gitignore index 04ce32b7..fd007ecc 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,4 @@ Oqtane.Server/wwwroot/Themes/* !Oqtane.Server/wwwroot/Themes/Oqtane.Themes.* !Oqtane.Server/wwwroot/Themes/Templates Oqtane.Server/wwwroot/Themes/Templates/* -Oqtane.Server/wwwroot/Themes/Templates/External +!Oqtane.Server/wwwroot/Themes/Templates/External diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 00000000..d979cd70 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,17 @@ + + + net10.0 + Debug;Release + 10.0.3 + Oqtane + Shaun Walker + .NET Foundation + CMS and Application Framework for Blazor and .NET MAUI + .NET Foundation + https://www.oqtane.org + https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE + https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.3 + https://github.com/oqtane/oqtane.framework + Git + + \ No newline at end of file diff --git a/Oqtane.Application/.template.config/template.json b/Oqtane.Application/.template.config/template.json index a0191d09..7f0e8ba9 100644 --- a/Oqtane.Application/.template.config/template.json +++ b/Oqtane.Application/.template.config/template.json @@ -7,13 +7,75 @@ "Blazor", "Oqtane" ], + "name": "Oqtane Application Template", + "shortName": "oqtane-app", + "defaultName": "MyCompany.MyProject", + "identity": "Oqtane.Application.Template", "tags": { "language": "C#", - "type": "project" + "type": "solution", + "editorTreatAs":"solution" }, - "identity": "Oqtane.Application.Template", - "name": "Oqtane Application Solution For Blazor", - "shortName": "oqtane-app", "sourceName": "Oqtane.Application", - "preferNameDirectory": true + "preferNameDirectory": true, + "symbols": { + "Framework": { + "type": "parameter", + "description": "The target framework for the project", + "datatype": "choice", + "choices": [ + { + "choice": "net10.0", + "description": "Target net10.0" + } + ], + "replaces": "net10.0", + "defaultValue": "net10.0" + }, + "HttpPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTP endpoint in launchSettings.json." + }, + "HttpPortGenerated": { + "type": "generated", + "generator": "port" + }, + "HttpPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "HttpPort", + "fallbackVariableName": "HttpPortGenerated" + }, + "replaces": "44358" + }, + "HttpsPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTPS endpoint in launchSettings.json." + }, + "HttpsPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 44300, + "high": 44399 + } + }, + "HttpsPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "HttpsPort", + "fallbackVariableName": "HttpsPortGenerated" + }, + "replaces": "44359" + } + }, + "primaryOutputs": [ + { + "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 50b9b31e..f37eac86 100644 --- a/Oqtane.Application/Client/Oqtane.Application.Client.csproj +++ b/Oqtane.Application/Client/Oqtane.Application.Client.csproj @@ -1,21 +1,29 @@ - - net9.0 - 1.0.0 - Oqtane.Application.Client.Oqtane - true - Default - false - true - + + net10.0 + 1.0.0 + Oqtane.Application.Client.Oqtane + Default + true + false + false + true + - - - + + + + + + - - - + + + + + + + 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 47fabbf3..3a66ba87 100644 --- a/Oqtane.Application/Oqtane.Application.Template.nuspec +++ b/Oqtane.Application/Oqtane.Application.Template.nuspec @@ -2,7 +2,7 @@ Oqtane.Application.Template - 6.2.0 + 10.0.3 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/README.md b/Oqtane.Application/README.md index a6880aff..0a6927de 100644 --- a/Oqtane.Application/README.md +++ b/Oqtane.Application/README.md @@ -5,15 +5,18 @@ This is a Visual Studio Project Template designed for Oqtane development project ``` dotnet new install Oqtane.Application.Template dotnet new oqtane-app -o MyCompany.MyProject +cd MyCompany.MyProject +dotnet build +cd Server +dotnet run +browse to Url ``` When using this approach you do not need to have a local copy of the oqtane.framework source code - you simply utilize Oqtane as a standard application dependency. -The solution contains an AppHost project which must be identified as the Startup project. It is responsible for loading the development environment and launching the Oqtane framework. - -The solution also contains Build, Client, Server, and Shared folders which is where you you would implement your custom functionality. An example module and theme are included for reference, and you can add additional modules and themes within the same projects by following the standard Oqtane folder/namespace conventions. +The solution also contains Client, Server, and Shared folders which is where you you would implement your custom functionality. An example module and theme are included for reference, and you can add additional modules and themes within the same projects by following the standard Oqtane folder/namespace conventions. *Known Issues* -- do not use the term "Oqtane" in your output name or else you will experience namespace conflicts +- do not use the term "Oqtane" or "Module" in your output name or else you will experience namespace conflicts 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 79d6749a..5719d905 100644 --- a/Oqtane.Application/Server/Oqtane.Application.Server.csproj +++ b/Oqtane.Application/Server/Oqtane.Application.Server.csproj @@ -1,18 +1,39 @@  - - net9.0 - 1.0.0 - Oqtane.Application.Server.Oqtane - + + net10.0 + 1.0.0 + Oqtane.Application.Server.Oqtane + true + none + false + false + true + true + - - - - + + + + + + + + - - - + + + + + + + + + + + + + + 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/Properties/launchSettings.json b/Oqtane.Application/Server/Properties/launchSettings.json index dc8793f7..f56a17f7 100644 --- a/Oqtane.Application/Server/Properties/launchSettings.json +++ b/Oqtane.Application/Server/Properties/launchSettings.json @@ -6,7 +6,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5000", + "applicationUrl": "http://localhost:44358", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -16,7 +16,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "applicationUrl": "https://localhost:44359;http://localhost:44358", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } 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/Server/wwwroot/Modules/Oqtane.Modules.Admin.Login/Module.css b/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Modules.Admin.Login/Module.css deleted file mode 100644 index 086b246b..00000000 --- a/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Modules.Admin.Login/Module.css +++ /dev/null @@ -1,5 +0,0 @@ -/* Login Module Custom Styles */ - -.Oqtane-Modules-Admin-Login { - width: 200px; -} diff --git a/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Modules.HtmlText/Module.css b/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Modules.HtmlText/Module.css deleted file mode 100644 index 5a93c043..00000000 --- a/Oqtane.Application/Server/wwwroot/Modules/Oqtane.Modules.HtmlText/Module.css +++ /dev/null @@ -1 +0,0 @@ -/* HtmlText Module Custom Styles */ \ 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 2405a206..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.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 @@ - + - - -Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 - By P.J. Onori -Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf deleted file mode 100644 index fab60486..00000000 Binary files a/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.woff deleted file mode 100644 index f9309988..00000000 Binary files a/Oqtane.Application/Server/wwwroot/css/open-iconic/font/fonts/open-iconic.woff and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/css/texteditors/radzen/radzentexteditor.css b/Oqtane.Application/Server/wwwroot/css/texteditors/radzen/radzentexteditor.css deleted file mode 100644 index e142053b..00000000 --- a/Oqtane.Application/Server/wwwroot/css/texteditors/radzen/radzentexteditor.css +++ /dev/null @@ -1,22 +0,0 @@ -.rz-text-editor { - outline: none !important; -} - -.rz-html-editor-dropdown-items, -.rz-popup, -.rz-editor-dialog-wrapper { - z-index: 9999 !important; -} - -.rz-html-editor-dropdown-items .rz-html-editor-dropdown-item, -.rz-html-editor-dropdown-items .rz-html-editor-dropdown-item > * { - color: var(--rz-editor-button-color); -} -.rz-text-editor .rz-html-editor-dropdown .rz-html-editor-dropdown-value, -.rz-text-editor .rz-html-editor-dropdown .rz-html-editor-dropdown-trigger, -.rz-text-editor .rz-html-editor-colorpicker .rz-html-editor-color { - color: var(--rz-editor-button-color); -} -.rz-text-editor .rz-colorpicker.rz-state-disabled { - border: none !important; -} \ No newline at end of file diff --git a/Oqtane.Application/Server/wwwroot/favicon.ico b/Oqtane.Application/Server/wwwroot/favicon.ico deleted file mode 100644 index 550d600e..00000000 Binary files a/Oqtane.Application/Server/wwwroot/favicon.ico and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/icon.png b/Oqtane.Application/Server/wwwroot/icon.png deleted file mode 100644 index 1ac7cee0..00000000 Binary files a/Oqtane.Application/Server/wwwroot/icon.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/checked.png b/Oqtane.Application/Server/wwwroot/images/checked.png deleted file mode 100644 index a4100c70..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/checked.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/error.png b/Oqtane.Application/Server/wwwroot/images/error.png deleted file mode 100644 index 0095d2f1..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/error.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/help.png b/Oqtane.Application/Server/wwwroot/images/help.png deleted file mode 100644 index f380be58..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/help.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/logo-black.png b/Oqtane.Application/Server/wwwroot/images/logo-black.png deleted file mode 100644 index 9463cbf0..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/logo-black.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/logo-white.png b/Oqtane.Application/Server/wwwroot/images/logo-white.png deleted file mode 100644 index 94454bf6..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/logo-white.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/null.png b/Oqtane.Application/Server/wwwroot/images/null.png deleted file mode 100644 index d0f50939..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/null.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/images/unchecked.png b/Oqtane.Application/Server/wwwroot/images/unchecked.png deleted file mode 100644 index 566e60a8..00000000 Binary files a/Oqtane.Application/Server/wwwroot/images/unchecked.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/js/app.js b/Oqtane.Application/Server/wwwroot/js/app.js deleted file mode 100644 index 2c5d837e..00000000 --- a/Oqtane.Application/Server/wwwroot/js/app.js +++ /dev/null @@ -1,8 +0,0 @@ -function subMenu(a) { - event.preventDefault(); - event.stopPropagation(); - - var li = a.parentElement, submenu = li.getElementsByTagName('ul')[0]; - submenu.style.display = submenu.style.display == "block" ? "none" : "block"; - return false; -} \ No newline at end of file diff --git a/Oqtane.Application/Server/wwwroot/js/interop.js b/Oqtane.Application/Server/wwwroot/js/interop.js deleted file mode 100644 index fecc4c99..00000000 --- a/Oqtane.Application/Server/wwwroot/js/interop.js +++ /dev/null @@ -1,520 +0,0 @@ -var Oqtane = Oqtane || {}; - -Oqtane.Interop = { - setCookie: function (name, value, days, secure, sameSite) { - var d = new Date(); - d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000)); - var expires = "expires=" + d.toUTCString(); - var cookieString = name + "=" + value + ";" + expires + ";path=/"; - if (secure) { - cookieString += "; secure"; - } - if (sameSite === "Lax" || sameSite === "Strict" || sameSite === "None") { - cookieString += "; SameSite=" + sameSite; - } - document.cookie = cookieString; - }, - setCookieString: function (cookieString) { - document.cookie = cookieString; - }, - getCookie: function (name) { - name = name + "="; - var decodedCookie = decodeURIComponent(document.cookie); - var ca = decodedCookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) === ' ') { - c = c.substring(1); - } - if (c.indexOf(name) === 0) { - return c.substring(name.length, c.length); - } - } - return ""; - }, - updateTitle: function (title) { - if (document.title !== title) { - document.title = title; - } - }, - includeMeta: function (id, attribute, name, content) { - var meta = document.querySelector("meta[" + attribute + "=\"" + CSS.escape(name) + "\"]"); - if (meta === null) { - meta = document.createElement("meta"); - meta.setAttribute(attribute, name); - if (id !== "") { - meta.id = id; - } - meta.content = content; - document.head.appendChild(meta); - } - else { - if (id !== "") { - meta.setAttribute("id", id); - } - if (meta.content !== content) { - meta.setAttribute("content", content); - } - } - }, - includeLink: function (id, rel, href, type, integrity, crossorigin, insertbefore) { - var link = document.querySelector("link[href=\"" + CSS.escape(href) + "\"]"); - if (link === null) { - link = document.createElement("link"); - if (id !== "") { - link.id = id; - } - link.rel = rel; - if (type !== "") { - link.type = type; - } - link.href = href; - if (integrity !== "") { - link.integrity = integrity; - } - if (crossorigin !== "") { - link.crossOrigin = crossorigin; - } - if (insertbefore === "") { - document.head.appendChild(link); - } - else { - var sibling = document.getElementById(insertbefore); - sibling.parentNode.insertBefore(link, sibling); - } - } - else { - if (link.id !== id) { - link.setAttribute('id', id); - } - if (link.rel !== rel) { - link.setAttribute('rel', rel); - } - if (type !== "") { - if (link.type !== type) { - link.setAttribute('type', type); - } - } else { - link.removeAttribute('type'); - } - if (link.href !== this.getAbsoluteUrl(href)) { - link.removeAttribute('integrity'); - link.removeAttribute('crossorigin'); - link.setAttribute('href', href); - } - if (integrity !== "") { - if (link.integrity !== integrity) { - link.setAttribute('integrity', integrity); - } - } else { - link.removeAttribute('integrity'); - } - if (crossorigin !== "") { - if (link.crossOrigin !== crossorigin) { - link.setAttribute('crossorigin', crossorigin); - } - } else { - link.removeAttribute('crossorigin'); - } - } - }, - includeLinks: function (links) { - for (let i = 0; i < links.length; i++) { - this.includeLink(links[i].id, links[i].rel, links[i].href, links[i].type, links[i].integrity, links[i].crossorigin, links[i].insertbefore); - } - }, - includeScript: function (id, src, integrity, crossorigin, type, content, location, dataAttributes) { - var script; - if (src !== "") { - script = document.querySelector("script[src=\"" + CSS.escape(src) + "\"]"); - } - else { - if (id !== "") { - script = document.getElementById(id); - } else { - const scripts = document.querySelectorAll("script:not([src])"); - for (let i = 0; i < scripts.length; i++) { - if (scripts[i].textContent.includes(content)) { - script = scripts[i]; - } - } - } - } - if (script !== null) { - script.remove(); - script = null; - } - if (script === null) { - script = document.createElement("script"); - if (id !== "") { - script.id = id; - } - if (type !== "") { - script.type = type; - } - if (src !== "") { - script.src = src; - if (integrity !== "") { - script.integrity = integrity; - } - if (crossorigin !== "") { - script.crossOrigin = crossorigin; - } - } - else { - script.innerHTML = content; - } - if (dataAttributes !== null) { - for (var key in dataAttributes) { - script.setAttribute(key, dataAttributes[key]); - } - } - - try { - this.addScript(script, location); - } catch (error) { - if (src !== "") { - console.error("Failed to load external script: ${src}", error); - } else { - console.error("Failed to load inline script: ${content}", error); - } - } - } - }, - addScript: function (script, location) { - return new Promise((resolve, reject) => { - script.async = false; - script.defer = false; - - script.onload = () => resolve(); - script.onerror = (error) => reject(error); - - if (location === 'head') { - document.head.appendChild(script); - } else { - document.body.appendChild(script); - } - }); - }, - includeScripts: async function (scripts) { - const bundles = []; - for (let s = 0; s < scripts.length; s++) { - if (scripts[s].bundle === '') { - scripts[s].bundle = scripts[s].href; - } - if (!bundles.includes(scripts[s].bundle)) { - bundles.push(scripts[s].bundle); - } - } - const promises = []; - for (let b = 0; b < bundles.length; b++) { - const urls = []; - for (let s = 0; s < scripts.length; s++) { - if (scripts[s].bundle === bundles[b]) { - urls.push(scripts[s].href); - } - } - promises.push(new Promise((resolve, reject) => { - if (loadjs.isDefined(bundles[b])) { - loadjs.ready(bundles[b], () => { - resolve(true); - }); - } - else { - loadjs(urls, bundles[b], { - async: false, - returnPromise: true, - before: function (path, element) { - for (let s = 0; s < scripts.length; s++) { - if (path === scripts[s].href) { - if (scripts[s].integrity !== '') { - element.integrity = scripts[s].integrity; - } - if (scripts[s].crossorigin !== '') { - element.crossOrigin = scripts[s].crossorigin; - } - if (scripts[s].type !== '') { - element.type = scripts[s].type; - } - if (scripts[s].dataAttributes !== null) { - for (var key in scripts[s].dataAttributes) { - element.setAttribute(key, scripts[s].dataAttributes[key]); - } - } - if (scripts[s].location === 'body') { - document.body.appendChild(element); - return false; // return false to bypass default DOM insertion mechanism - } - } - } - } - }) - .then(function () { resolve(true) }) - .catch(function (pathsNotFound) { reject(false) }); - } - })); - } - if (promises.length !== 0) { - await Promise.all(promises); - } - }, - getAbsoluteUrl: function (url) { - var a = document.createElement('a'); - getAbsoluteUrl = function (url) { - a.href = url; - return a.href; - } - return getAbsoluteUrl(url); - }, - removeElementsById: function (prefix, first, last) { - var elements = document.querySelectorAll('[id^=' + prefix + ']'); - for (var i = elements.length - 1; i >= 0; i--) { - var element = elements[i]; - if (element.id.startsWith(prefix) && (first === '' || element.id >= first) && (last === '' || element.id <= last)) { - element.parentNode.removeChild(element); - } - } - }, - getElementByName: function (name) { - var elements = document.getElementsByName(name); - if (elements.length) { - return elements[0].value; - } else { - return ""; - } - }, - submitForm: function (path, fields) { - const form = document.createElement('form'); - form.method = 'post'; - form.action = path; - - for (const key in fields) { - if (fields.hasOwnProperty(key)) { - const hiddenField = document.createElement('input'); - hiddenField.type = 'hidden'; - hiddenField.name = key; - hiddenField.value = fields[key]; - form.appendChild(hiddenField); - } - } - - document.body.appendChild(form); - form.submit(); - }, - getFiles: function (id) { - var files = []; - var fileinput = document.getElementById(id); - if (fileinput !== null) { - for (var i = 0; i < fileinput.files.length; i++) { - files.push(fileinput.files[i].name + ":" + fileinput.files[i].size); - } - } - return files; - }, - uploadFiles: async function (posturl, folder, id, antiforgerytoken, jwt, chunksize, anonymizeuploadfilenames) { - var success = true; - var fileinput = document.getElementById('FileInput_' + id); - var progressinfo = document.getElementById('ProgressInfo_' + id); - var progressbar = document.getElementById('ProgressBar_' + id); - - var totalSize = 0; - for (var i = 0; i < fileinput.files.length; i++) { - totalSize += fileinput.files[i].size; - } - let uploadSize = 0; - - if (!chunksize || chunksize < 1) { - chunksize = 1; // 1 MB default - } - - if (progressinfo !== null && progressbar !== null) { - progressinfo.setAttribute('style', 'display: inline;'); - if (fileinput.files.length > 1) { - progressinfo.innerHTML = fileinput.files[0].name + ', ...'; - } - else { - progressinfo.innerHTML = fileinput.files[0].name; - } - progressbar.setAttribute('style', 'width: 100%; display: inline;'); - progressbar.value = 0; - } - - const uploadFile = (file) => { - const chunkSize = chunksize * (1024 * 1024); - const totalParts = Math.ceil(file.size / chunkSize); - let partCount = 0; - - let filename = file.name; - if (anonymizeuploadfilenames) { - filename = crypto.randomUUID() + '.' + filename.split('.').pop(); - } - - const uploadPart = () => { - const start = partCount * chunkSize; - const end = Math.min(start + chunkSize, file.size); - const chunk = file.slice(start, end); - - return new Promise((resolve, reject) => { - - let formdata = new FormData(); - formdata.append('__RequestVerificationToken', antiforgerytoken); - formdata.append('folder', folder); - formdata.append('formfile', chunk, filename); - - var credentials = 'same-origin'; - var headers = new Headers(); - headers.append('PartCount', partCount + 1); - headers.append('TotalParts', totalParts); - if (jwt !== "") { - headers.append('Authorization', 'Bearer ' + jwt); - credentials = 'include'; - } - - return fetch(posturl, { - method: 'POST', - headers: headers, - credentials: credentials, - body: formdata - }) - .then(response => { - if (!response.ok) { - if (progressinfo !== null) { - progressinfo.innerHTML = 'Error: ' + response.statusText; - } - throw new Error('Failed'); - } - return; - }) - .then(data => { - partCount++; - if (progressbar !== null) { - uploadSize += chunk.size; - var percent = Math.ceil((uploadSize / totalSize) * 100); - progressbar.value = (percent / 100); - } - if (partCount < totalParts) { - uploadPart().then(resolve).catch(reject); - } - else { - resolve(data); - } - }) - .catch(error => { - reject(error); - }); - }); - }; - - return uploadPart(); - }; - - try { - for (const file of fileinput.files) { - await uploadFile(file); - } - } catch (error) { - success = false; - } - - fileinput.value = ''; - return success; - }, - refreshBrowser: function (verify, wait) { - async function attemptReload (verify) { - if (verify) { - await fetch(''); - } - window.location.reload(); - } - attemptReload(verify); - setInterval(attemptReload, wait * 1000); - }, - redirectBrowser: function (url, wait) { - setInterval(function () { - window.location.href = url; - }, wait * 1000); - }, - formValid: function (formRef) { - return formRef.checkValidity(); - }, - setElementAttribute: function (id, attribute, value) { - var element = document.getElementById(id); - if (element !== null) { - element.setAttribute(attribute, value); - } - }, - scrollTo: function (top, left, behavior) { - const modal = document.querySelector('.modal'); - if (modal) { - modal.scrollTo({ - top: top, - left: left, - behavior: behavior - }); - } else { - window.scrollTo({ - top: top, - left: left, - behavior: behavior - }); - } - }, - scrollToId: function (id) { - var element = document.getElementById(id); - if (element instanceof HTMLElement) { - element.scrollIntoView({ - behavior: "smooth", - block: "start", - inline: "nearest" - }); - } - }, - getCaretPosition: function (id) { - var element = document.getElementById(id); - return element.selectionStart; - }, - manageIndexedDBItems: async function (action, key, value) { - var idb = indexedDB.open("oqtane", 1); - - idb.onupgradeneeded = function () { - let db = idb.result; - db.createObjectStore("items"); - } - - if (action.startsWith("get")) { - let request = new Promise((resolve) => { - idb.onsuccess = function () { - let transaction = idb.result.transaction("items", "readonly"); - let collection = transaction.objectStore("items"); - let result; - if (action === "get") { - result = collection.get(key); - } - if (action === "getallkeys") { - result = collection.getAllKeys(); - } - - result.onsuccess = function (e) { - resolve(result.result); - } - } - }); - - let result = await request; - - return result; - } - else { - idb.onsuccess = function () { - let transaction = idb.result.transaction("items", "readwrite"); - let collection = transaction.objectStore("items"); - if (action === "put") { - collection.put(value, key); - } - if (action === "delete") { - collection.delete(key); - } - } - } - } -}; diff --git a/Oqtane.Application/Server/wwwroot/js/loadjs.min.js b/Oqtane.Application/Server/wwwroot/js/loadjs.min.js deleted file mode 100644 index b2165fc3..00000000 --- a/Oqtane.Application/Server/wwwroot/js/loadjs.min.js +++ /dev/null @@ -1 +0,0 @@ -loadjs=function(){var h=function(){},c={},u={},f={};function o(e,n){if(e){var r=f[e];if(u[e]=n,r)for(;r.length;)r[0](e,n),r.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function d(r,t,s,i){var c,o,e=document,n=s.async,u=(s.numRetries||0)+1,f=s.before||h,l=r.replace(/[\?|#].*$/,""),a=r.replace(/^(css|img)!/,"");i=i||0,/(^css!|\.css$)/.test(l)?((o=e.createElement("link")).rel="stylesheet",o.href=a,(c="hideFocus"in o)&&o.relList&&(c=0,o.rel="preload",o.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(l)?(o=e.createElement("img")).src=a:((o=e.createElement("script")).src=r,o.async=void 0===n||n),!(o.onload=o.onerror=o.onbeforeload=function(e){var n=e.type[0];if(c)try{o.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((i+=1) { - var newScript = document.createElement('script'); - - // replicate attributes and content - for (let i = 0; i < script.attributes.length; i++) { - if (script.attributes[i].name !== 'data-reload') { - newScript.setAttribute(script.attributes[i].name, script.attributes[i].value); - } - } - newScript.nonce = script.nonce; // must be referenced explicitly - newScript.innerHTML = script.innerHTML; - - // dynamically injected scripts cannot be async or deferred - newScript.async = false; - newScript.defer = false; - - newScript.onload = () => resolve(); - newScript.onerror = (error) => reject(error); - - // inject script element in head to force execution in Blazor - document.head.appendChild(newScript); - - // remove data-reload attribute - script.removeAttribute('data-reload'); - }); -} \ No newline at end of file diff --git a/Oqtane.Application/Server/wwwroot/loading.gif b/Oqtane.Application/Server/wwwroot/loading.gif deleted file mode 100644 index cc70a7a8..00000000 Binary files a/Oqtane.Application/Server/wwwroot/loading.gif and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/oqtane-black.png b/Oqtane.Application/Server/wwwroot/oqtane-black.png deleted file mode 100644 index 942ef8c0..00000000 Binary files a/Oqtane.Application/Server/wwwroot/oqtane-black.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/oqtane-glow.png b/Oqtane.Application/Server/wwwroot/oqtane-glow.png deleted file mode 100644 index 03942d55..00000000 Binary files a/Oqtane.Application/Server/wwwroot/oqtane-glow.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/oqtane-white.png b/Oqtane.Application/Server/wwwroot/oqtane-white.png deleted file mode 100644 index fa7950bc..00000000 Binary files a/Oqtane.Application/Server/wwwroot/oqtane-white.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/oqtane.ico b/Oqtane.Application/Server/wwwroot/oqtane.ico deleted file mode 100644 index 0e569015..00000000 Binary files a/Oqtane.Application/Server/wwwroot/oqtane.ico and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/oqtane.png b/Oqtane.Application/Server/wwwroot/oqtane.png deleted file mode 100644 index be8f48c9..00000000 Binary files a/Oqtane.Application/Server/wwwroot/oqtane.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/package.png b/Oqtane.Application/Server/wwwroot/package.png deleted file mode 100644 index ccc6f290..00000000 Binary files a/Oqtane.Application/Server/wwwroot/package.png and /dev/null differ diff --git a/Oqtane.Application/Server/wwwroot/service-worker.js b/Oqtane.Application/Server/wwwroot/service-worker.js deleted file mode 100644 index 0c55c1b1..00000000 --- a/Oqtane.Application/Server/wwwroot/service-worker.js +++ /dev/null @@ -1,2 +0,0 @@ -// always fetch from the network and do not enable offline support -self.addEventListener('fetch', () => { }); \ No newline at end of file diff --git a/Oqtane.Application/Server/wwwroot/users.txt b/Oqtane.Application/Server/wwwroot/users.txt deleted file mode 100644 index b1d55c74..00000000 --- a/Oqtane.Application/Server/wwwroot/users.txt +++ /dev/null @@ -1 +0,0 @@ -Email Username DisplayName Roles FirstName LastName Street City Region Country PostalCode Phone diff --git a/Oqtane.Application/Shared/Models/MyModule.cs b/Oqtane.Application/Shared/Models/MyModule.cs deleted file mode 100644 index b5e1e382..00000000 --- a/Oqtane.Application/Shared/Models/MyModule.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using Oqtane.Models; - -namespace Oqtane.Application.Models -{ - public class MyModule : IAuditable - { - [Key] - public int MyModuleId { get; set; } - public int ModuleId { get; set; } - public string Name { get; set; } - - public string CreatedBy { get; set; } - public DateTime CreatedOn { get; set; } - public string ModifiedBy { get; set; } - public DateTime ModifiedOn { get; set; } - } -} diff --git a/Oqtane.Application/Shared/Oqtane.Application.Shared.csproj b/Oqtane.Application/Shared/Oqtane.Application.Shared.csproj index a10df1dc..0d94a35a 100644 --- a/Oqtane.Application/Shared/Oqtane.Application.Shared.csproj +++ b/Oqtane.Application/Shared/Oqtane.Application.Shared.csproj @@ -1,13 +1,17 @@ - - net9.0 - 1.0.0 - Oqtane.Application.Shared.Oqtane - + + net10.0 + 1.0.0 + Oqtane.Application.Shared.Oqtane + - - - + + + + + + + diff --git a/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs b/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs index 96d68d37..82186385 100644 --- a/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs +++ b/Oqtane.Client/Extensions/OqtaneServiceCollectionExtensions.cs @@ -56,6 +56,7 @@ namespace Microsoft.Extensions.DependencyInjection services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); services.AddScoped(); // providers diff --git a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor index 9ca81674..c04f97e8 100644 --- a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor +++ b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor @@ -13,7 +13,7 @@ { string url = NavigateUrl(p.Path);
- +

@((MarkupString)SharedLocalizer[p.Name].ToString().Replace(" ", "
"))
@@ -24,13 +24,19 @@ } @code { - private List _pages; + Dictionary _attributes { get; set; } = new(); + private List _pages; public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View; public override string RenderMode => RenderModes.Static; protected override void OnInitialized() { + if (PageState.RenderMode == RenderModes.Static && !PageState.Site.EnhancedNavigation) + { + _attributes.Add("data-enhance-nav", "true"); // Admin Dashboard utilizes enhanced navigation + } + var admin = PageState.Pages.FirstOrDefault(item => item.Path == "admin"); if (admin != null) { diff --git a/Oqtane.Client/Modules/Admin/Login/Index.razor b/Oqtane.Client/Modules/Admin/Login/Index.razor index 66562e6c..773f52a8 100644 --- a/Oqtane.Client/Modules/Admin/Login/Index.razor +++ b/Oqtane.Client/Modules/Admin/Login/Index.razor @@ -14,79 +14,133 @@ } else { - @if (!twofactor) - { -
-
-
- -
- -
-
- @if (!string.IsNullOrEmpty(_location)) + @if (_type == "External") {
- +
- +
+ @if (!string.IsNullOrEmpty(_location)) + { +
+ +
+ +
+
+ } } @@ -80,9 +84,10 @@ private string _description = string.Empty; private List