8 |
9 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ISettingsControl.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Oqtane.Interfaces
4 | {
5 | public interface ISettingsControl
6 | {
7 | Task UpdateSettings();
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/TimeZone.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | public class TimeZone
4 | {
5 | public string Id { get; set; }
6 |
7 | public string DisplayName { get; set; }
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/internal.module.template.json:
--------------------------------------------------------------------------------
1 | {
2 | "Title": "Default Module Template",
3 | "Type": "Internal",
4 | "Version": "10.0.0",
5 | "Namespace": "[Owner].Module.[Module]"
6 | }
7 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Enums/ResourceLoadBehavior.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared
2 | {
3 | public enum ResourceLoadBehavior
4 | {
5 | Once,
6 | Always,
7 | None,
8 | BlazorPageScript
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/OqtaneIgnoreAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Shared
4 | {
5 | [AttributeUsage(AttributeTargets.Class)]
6 | public class OqtaneIgnoreAttribute : Attribute
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.slnx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Enums/MessageType.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Modules
2 | {
3 | public enum MessageType
4 | {
5 | Success,
6 | Info,
7 | Warning,
8 | Error,
9 | Undefined
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Enums/SecurityAccessLevel.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared
2 | {
3 | public enum SecurityAccessLevel
4 | {
5 | Anonymous,
6 | View,
7 | Edit,
8 | Admin,
9 | Host
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/UserNames.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Oqtane.Shared {
6 | public class UserNames {
7 | public const string Host = "host";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/LayoutBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Themes
4 | {
5 | [Obsolete("This class is deprecated", false)]
6 | public abstract class LayoutBase : ThemeBase, ILayoutControl
7 | {
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Enums/LogFunction.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Enums
2 | {
3 | public enum LogFunction
4 | {
5 | Create,
6 | Read,
7 | Update,
8 | Delete,
9 | Security,
10 | Other
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/AuthenticationProviderTypes.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class AuthenticationProviderTypes {
3 | public const string OpenIDConnect = "oidc";
4 | public const string OAuth2 = "oauth2";
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/IEventSubscriber.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | public interface IEventSubscriber
6 | {
7 | void EntityChanged(SyncEvent syncEvent);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/ControllerRoutes.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class ControllerRoutes {
3 | public const string Default = "{alias}/api/[controller]";
4 | public const string ApiRoute = "api/[controller]";
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/TenantNames.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Oqtane.Shared {
6 | public class TenantNames {
7 | public const string Master = "Master";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Enums/LogLevel.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared
2 | {
3 | public enum LogLevel
4 | {
5 | Trace,
6 | Debug,
7 | Information,
8 | Warning,
9 | Error,
10 | Critical,
11 | None
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Enums/ResourceDeclaration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Shared
4 | {
5 | [Obsolete("ResourceDeclaration is deprecated", false)]
6 | public enum ResourceDeclaration
7 | {
8 | Local,
9 | Global
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IService.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Modules
2 | {
3 | ///
4 | /// Empty interface used to decorate module services for auto registration as scoped
5 | ///
6 | public interface IService
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/RenderModes.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class RenderModes {
3 | public const string Static = "Static";
4 | public const string Interactive = "Interactive";
5 | public const string Headless = "Headless";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Oqtane.Maui;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Server/Databases/Interfaces/IMultiDatabase.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Databases.Interfaces;
2 |
3 | namespace Oqtane.Repository.Databases.Interfaces
4 | {
5 | public interface IMultiDatabase
6 | {
7 | public IDatabase ActiveDatabase { get; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Application/Oqtane.Application.slnx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Oqtane.Maui;
4 |
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IClientService.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Modules
2 | {
3 | ///
4 | /// Empty interface used to decorate client module services for auto registration as scoped
5 | ///
6 | public interface IClientService
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ITransientService.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Modules
2 | {
3 | ///
4 | /// Empty interface used to decorate module services for auto registration as a transient
5 | ///
6 | public interface ITransientService
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SearchResults.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Models
4 | {
5 | public class SearchResults
6 | {
7 | public List Results { get; set; }
8 |
9 | public int TotalResults { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/IInstallable.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | public interface IInstallable
6 | {
7 | bool Install(Tenant tenant, string version);
8 |
9 | bool Uninstall(Tenant tenant);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Maui/wwwroot/js/app.js:
--------------------------------------------------------------------------------
1 | function subMenu(a) {
2 | event.preventDefault();
3 | event.stopPropagation();
4 |
5 | var li = a.parentElement, submenu = li.getElementsByTagName('ul')[0];
6 | submenu.style.display = submenu.style.display == "block" ? "none" : "block";
7 | return false;
8 | }
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/js/app.js:
--------------------------------------------------------------------------------
1 | function subMenu(a) {
2 | event.preventDefault();
3 | event.stopPropagation();
4 |
5 | var li = a.parentElement, submenu = li.getElementsByTagName('ul')[0];
6 | submenu.style.display = submenu.style.display == "block" ? "none" : "block";
7 | return false;
8 | }
--------------------------------------------------------------------------------
/Oqtane.Shared/Extensions/EnumerableExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace System.Collections
2 | {
3 | public static class EnumerableExtensions
4 | {
5 | public static bool IsNullOrEmpty(this IEnumerable source)
6 | => source == null || source.GetEnumerator().MoveNext() == false;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Oqtane.Maui/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Components.Forms
3 | @using Microsoft.AspNetCore.Components.Routing
4 | @using Microsoft.AspNetCore.Components.Web
5 | @using Microsoft.AspNetCore.Components.Web.Virtualization
6 | @using Microsoft.JSInterop
7 | @using Oqtane.Maui
8 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SearchResult.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | public class SearchResult : SearchContent
4 | {
5 | public float Score { get; set; }
6 |
7 | public string DisplayScore { get; set; }
8 |
9 | public string Snippet { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Android/Resources/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10.0.2.2
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/ExternalLoginProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Models
4 | {
5 | public class ExternalLoginProvider
6 | {
7 | public string Name { get; set; }
8 |
9 | public Dictionary Settings { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/Runtimes.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class Runtimes {
3 | public const string Server = "Server";
4 | public const string WebAssembly = "WebAssembly";
5 | public const string Auto = "Auto";
6 | public const string Hybrid = "Hybrid";
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/ISiteMigration.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | public interface ISiteMigration
6 | {
7 | void Up(Site site, Alias alias);
8 | void Down(Site site, Alias alias); // for future use (if necessary)
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/ThemeControl.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | public class ThemeControl
4 | {
5 | public string TypeName { get; set; }
6 | public string Name { get; set; }
7 | public string Thumbnail { get; set; }
8 | public string Panes { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/ISiteTemplate.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using System.Collections.Generic;
3 |
4 | namespace Oqtane.Infrastructure
5 | {
6 | public interface ISiteTemplate
7 | {
8 | string Name { get; }
9 |
10 | List CreateSite(Site site);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/PolicyNames.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared
2 | {
3 | // static PolicyNames are deprecated and replaced with dynamic policies
4 | public class PolicyNames
5 | {
6 | public const string ViewModule = "ViewModule";
7 | public const string EditModule = "EditModule";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Maui/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Maui;
2 |
3 | public partial class App : Application
4 | {
5 | public App()
6 | {
7 | InitializeComponent();
8 | }
9 |
10 | protected override Window CreateWindow(IActivationState activationState)
11 | {
12 | return new Window(new MainPage());
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/[Owner].Theme.[Theme].slnx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ITokenSource.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Oqtane.Interfaces
8 | {
9 | public interface ITokenSource
10 | {
11 | IDictionary GetTokens();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Controls/TextEditors/Radzen/RadzenTextEditorSetting.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Modules.Controls
2 | {
3 | public class RadzenEditorSetting
4 | {
5 | public string Theme { get; set; }
6 |
7 | public string Background { get; set; }
8 |
9 | public string ToolbarItems { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Updater/Oqtane.Updater.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | Oqtane
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Oqtane.Server/Modules/ISitemap.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Oqtane.Models;
3 |
4 | namespace Oqtane.Modules
5 | {
6 | public interface ISitemap
7 | {
8 | // You Must Set The "ServerManagerType" In Your IModule Interface
9 |
10 | List GetUrls(string alias, string path, Module module);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/ModelBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Models
4 | {
5 | public class ModelBase : IAuditable
6 | {
7 | public string CreatedBy { get; set; }
8 | public DateTime CreatedOn { get; set; }
9 | public string ModifiedBy { get; set; }
10 | public DateTime ModifiedOn { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/ServerState.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | public class ServerState
6 | {
7 | public string SiteKey { get; set; }
8 | public List Assemblies { get; set; } = new List();
9 | public bool IsInitialized { get; set; } = false;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Server/Modules/IPortable.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 |
3 | namespace Oqtane.Modules
4 | {
5 | public interface IPortable
6 | {
7 | // You Must Set The "ServerManagerType" In Your IModule Interface
8 |
9 | string ExportModule(Module module);
10 |
11 | void ImportModule(Module module, string content, string version);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IClientStartup.cs:
--------------------------------------------------------------------------------
1 |
2 | using Microsoft.Extensions.DependencyInjection;
3 |
4 | namespace Oqtane.Services
5 | {
6 | public interface IClientStartup
7 | {
8 | // This method gets called by the runtime. Use this method to add services to the container.
9 | void ConfigureServices(IServiceCollection services);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IImageService.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Services
2 | {
3 | public interface IImageService
4 | {
5 | public string[] GetAvailableFormats();
6 |
7 | public string CreateImage(string filepath, int width, int height, string mode, string position, string background, string rotate, string format, string imagepath);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Application/Client/Program.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Oqtane.Application.Client
4 | {
5 | internal class Program
6 | {
7 | static async Task Main(string[] args)
8 | {
9 | // defer client startup to Oqtane - do not modify
10 | await Oqtane.Client.Program.Main(args);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ISearchable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 | using Oqtane.Models;
5 |
6 | namespace Oqtane.Interfaces
7 | {
8 | public interface ISearchable
9 | {
10 | public Task> GetSearchContentsAsync(PageModule pageModule, DateTime lastIndexedOn);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SearchWord.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 |
4 | namespace Oqtane.Models
5 | {
6 | public class SearchWord
7 | {
8 | [Key]
9 | public int SearchWordId { get; set; }
10 |
11 | public string Word { get; set; }
12 |
13 | public DateTime CreatedOn { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Tizen/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Maui;
3 | using Microsoft.Maui.Hosting;
4 |
5 | namespace Oqtane.Maui;
6 |
7 | class Program : MauiApplication
8 | {
9 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10 |
11 | static void Main(string[] args)
12 | {
13 | var app = new Program();
14 | app.Run(args);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/Package/release.sh:
--------------------------------------------------------------------------------
1 | TargetFramework=$1
2 | ProjectName=$2
3 |
4 | find . -name "*.nupkg" -delete
5 | "..\..\oqtane.framework\oqtane.package\FixProps.exe"
6 | "..\..\[RootFolder]\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
7 | cp -f "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\"
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/enhancement-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Enhancement Request
3 | about: 'Suggest a product enhancement '
4 | title: "[ENH] "
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ### Oqtane Info
11 |
12 | Version - #.#.#
13 | Render Mode - Static
14 | Interactivity - Server
15 | Database - SQL Server
16 |
17 | ### Describe the enhancement
18 |
19 |
20 | ### Anything else?
21 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Package/release.sh:
--------------------------------------------------------------------------------
1 | TargetFramework=$1
2 | ProjectName=$2
3 |
4 | find . -name "*.nupkg" -delete
5 | "..\..\oqtane.framework\oqtane.package\FixProps.exe"
6 | "..\..\[RootFolder]\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
7 | cp -f "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\"
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/Package/release.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | set TargetFramework=%1
3 | set ProjectName=%2
4 |
5 | del "*.nupkg"
6 | "..\..\[RootFolder]\oqtane.package\FixProps.exe"
7 | "..\..\[RootFolder]\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
8 | XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\" /Y
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Package/release.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | set TargetFramework=%1
3 | set ProjectName=%2
4 |
5 | del "*.nupkg"
6 | "..\..\oqtane.framework\oqtane.package\FixProps.exe"
7 | "..\..\[RootFolder]\oqtane.package\nuget.exe" pack %ProjectName%.nuspec -Properties targetframework=%TargetFramework%;projectname=%ProjectName%
8 | XCOPY "*.nupkg" "..\..\[RootFolder]\Oqtane.Server\Packages\" /Y
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Interop.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.JSInterop;
2 | using System.Threading.Tasks;
3 |
4 | namespace [Owner].Module.[Module]
5 | {
6 | public class Interop
7 | {
8 | private readonly IJSRuntime _jsRuntime;
9 |
10 | public Interop(IJSRuntime jsRuntime)
11 | {
12 | _jsRuntime = jsRuntime;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/RoleNames.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class RoleNames {
3 | public const string Everyone = "All Users";
4 | public const string Host = "Host Users";
5 | public const string Admin = "Administrators";
6 | public const string Registered = "Registered Users";
7 | public const string Unauthenticated = "Unauthenticated Users";
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 |
4 | namespace Oqtane.Maui;
5 |
6 | [Application]
7 | public class MainApplication : MauiApplication
8 | {
9 | public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10 | : base(handle, ownership)
11 | {
12 | }
13 |
14 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Oqtane.Maui;
5 |
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Oqtane.Maui;
5 |
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/UserValidateResult.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Oqtane.Models
8 | {
9 | public class UserValidateResult
10 | {
11 | public bool Succeeded { get; set; }
12 |
13 | public IDictionary Errors { get; set; } = new Dictionary();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Client/IconResources.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane
2 | {
3 | ///
4 | /// Dummy class used to collect shared resource strings for this application
5 | ///
6 | ///
7 | /// This class is mostly used with IStringLocalizer and IHtmlLocalizer interfaces.
8 | /// The class must reside at the project root.
9 | ///
10 | public class IconResources
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Oqtane.Client/SharedResources.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane
2 | {
3 | ///
4 | /// Dummy class used to collect shared resource strings for this application
5 | ///
6 | ///
7 | /// This class is mostly used with IStringLocalizer and IHtmlLocalizer interfaces.
8 | /// The class must reside at the project root.
9 | ///
10 | public class SharedResources
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Oqtane.Client/TimeZoneResources.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane
2 | {
3 | ///
4 | /// Dummy class used to collect shared resource strings for this application
5 | ///
6 | ///
7 | /// This class is mostly used with IStringLocalizer and IHtmlLocalizer interfaces.
8 | /// The class must reside at the project root.
9 | ///
10 | public class TimeZoneResources
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/Interop.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.JSInterop;
2 | using System.Threading.Tasks;
3 |
4 | namespace [Owner].Module.[Module]
5 | {
6 | public class Interop
7 | {
8 | private readonly IJSRuntime _jsRuntime;
9 |
10 | public Interop(IJSRuntime jsRuntime)
11 | {
12 | _jsRuntime = jsRuntime;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Server/Extensions/PermissionExtension.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Text.Json;
4 | using Oqtane.Models;
5 |
6 | namespace Oqtane.Extensions
7 | {
8 | public static class PermissionExtension
9 | {
10 | public static string EncodePermissions(this IEnumerable permissions)
11 | {
12 | return JsonSerializer.Serialize(permissions);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Documentation/readme.md:
--------------------------------------------------------------------------------
1 | # Oqtane API Decorator Attributes
2 |
3 | This folder contains special attributes for the API Code Generator.
4 |
5 | The idea is that only items marked with special attributes are valid public APIs, and only these will be documented in the public docs
6 |
7 | As of 2020, all APIs are documented, and only these marked as `[PrivateApi]` will be excluded. In future, we may reverse this to only document things marked as `[PublicApi]`.
8 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Create a bug report to help us improve the product
4 | title: "[BUG] "
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ### Oqtane Info
11 |
12 | Version - #.#.#
13 | Render Mode - Static
14 | Interactivity - Server
15 | Database - SQL Server
16 |
17 | ### Describe the bug
18 |
19 |
20 | ### Expected Behavior
21 |
22 |
23 | ### Steps To Reproduce
24 |
25 |
26 | ### Anything else?
27 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/[Owner].Module.[Module].slnx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SearchContentProperty.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Microsoft.EntityFrameworkCore;
3 |
4 | namespace Oqtane.Models
5 | {
6 | public class SearchContentProperty
7 | {
8 | [Key]
9 | public int PropertyId { get; set; }
10 |
11 | public int SearchContentId { get; set; }
12 |
13 | public string Name { get; set; }
14 |
15 | public string Value { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace Oqtane.Maui;
6 |
7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8 | public class MainActivity : MauiAppCompatActivity
9 | {
10 | }
11 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/Sitemap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Models
4 | {
5 | ///
6 | /// Describes a Sitemap
7 | ///
8 | public class Sitemap
9 | {
10 | ///
11 | /// Url
12 | ///
13 | public string Url { get; set; }
14 |
15 | ///
16 | /// Url
17 | ///
18 | public DateTime ModifiedOn { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Oqtane.Client/Oqtane.Client.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/BlazorTheme/ThemeInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 |
4 | namespace Oqtane.Themes.BlazorTheme
5 | {
6 | [PrivateApi("Mark Build-In Theme-Info classes as private, since it's not very useful in the public docs")]
7 | public class ThemeInfo : ITheme
8 | {
9 | public Theme Theme => new Theme
10 | {
11 | Name = "Blazor Theme",
12 | Version = "1.0.0"
13 | };
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/ContainerBase.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components;
2 | using Oqtane.Models;
3 |
4 | namespace Oqtane.Themes
5 | {
6 | public abstract class ContainerBase : ThemeBase, IContainerControl
7 | {
8 | [CascadingParameter]
9 | protected Module ModuleState { get; set; }
10 |
11 | protected override bool ShouldRender()
12 | {
13 | return PageState?.RenderId == ModuleState?.RenderId;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Oqtane.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Oqtane
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/SyncEventActions.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared {
2 | public class SyncEventActions {
3 | // client actions for PageState management
4 | public const string Refresh = "Refresh";
5 | public const string Reload = "Reload";
6 |
7 | // server actions for raising Events
8 | public const string Create = "Create";
9 | public const string Update = "Update";
10 | public const string Delete = "Delete";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/PermissionNames.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Shared
2 | {
3 | public class PermissionNames
4 | {
5 | // UI permissions
6 | public const string View = "View";
7 | public const string Edit = "Edit";
8 | public const string Browse = "Browse";
9 | public const string Utilize = "Utilize";
10 |
11 | // API permissions
12 | public const string Read = "Read";
13 | public const string Write = "Write";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/IHostResources.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using System;
3 | using System.Collections.Generic;
4 |
5 | namespace Oqtane.Infrastructure
6 | {
7 | public interface IHostResources
8 | {
9 | [Obsolete("IHostResources is deprecated. Use module or theme scoped Resources in conjunction with ResourceLevel.Site instead.", false)]
10 | List Resources { get; } // identifies global resources for an application
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | TargetFramework=$1
4 | ProjectName=$2
5 |
6 | cp -f "../Client/bin/Debug/$TargetFramework/$ProjectName$.Client.Oqtane.dll" "../../[RootFolder]/Oqtane.Server/bin/Debug/$TargetFramework/"
7 | cp -f "../Client/bin/Debug/$TargetFramework/$ProjectName$.Client.Oqtane.pdb" "../../[RootFolder]/Oqtane.Server/bin/Debug/$TargetFramework/"
8 | cp -rf "../Client/wwwroot/"* "../../[RootFolder]/Oqtane.Server/wwwroot/_content/%ProjectName%/"
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/MigrationHistoryTable.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | public class MigrationHistoryTable
4 | {
5 | public string TableName { get; set; }
6 | public string TableSchema { get; set; }
7 | public string MigrationIdColumnName { get; set; }
8 | public string ProductVersionColumnName { get; set; }
9 | public string AppliedVersionColumnName { get; set; }
10 | public string AppliedDateColumnName { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/Models/[Module].cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using System.ComponentModel.DataAnnotations.Schema;
3 | using Oqtane.Models;
4 |
5 | namespace [Owner].Module.[Module].Models
6 | {
7 | [Table("[Owner][Module]")]
8 | public class [Module] : ModelBase
9 | {
10 | [Key]
11 | public int [Module]Id { get; set; }
12 | public int ModuleId { get; set; }
13 | public string Name { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ISearchService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 | using Oqtane.Models;
4 |
5 | namespace Oqtane.Services
6 | {
7 | public interface ISearchService
8 | {
9 | Task GetSearchResultsAsync(SearchQuery searchQuery);
10 |
11 | Task SaveSearchContentsAsync(List searchContents, Dictionary siteSettings);
12 |
13 | Task DeleteSearchContentsAsync(int siteId);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/Package/debug.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | set TargetFramework=%1
3 | set ProjectName=%2
4 |
5 | XCOPY "..\Client\bin\Debug\%TargetFramework%\%ProjectName%.Client.Oqtane.dll" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
6 | XCOPY "..\Client\bin\Debug\%TargetFramework%\%ProjectName%.Client.Oqtane.pdb" "..\..\[RootFolder]\Oqtane.Server\bin\Debug\%TargetFramework%\" /Y
7 | XCOPY "..\Client\wwwroot\*" "..\..\oqtane.framework\Oqtane.Server\wwwroot\_content\%ProjectName%\" /Y /S /I
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/_content/Placeholder.txt:
--------------------------------------------------------------------------------
1 | The _content folder should only contain static resources from shared razor component libraries (RCLs). Static resources can be extracted from shared RCL Nuget packages by executing a Publish task on the module's Server project to a local folder and copying the files from the _content folder which is created. Each shared RCL would have its own appropriately named subfolder within the module's _content folder.
2 |
3 | ie.
4 |
5 | /_content
6 | /Radzen.Blazor
7 | /css
8 | /fonts
9 |
--------------------------------------------------------------------------------
/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Shared/Models/[Module].cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using System.ComponentModel.DataAnnotations.Schema;
3 | using Oqtane.Models;
4 |
5 | namespace [Owner].Module.[Module].Models
6 | {
7 | [Table("[Owner][Module]")]
8 | public class [Module] : ModelBase
9 | {
10 | [Key]
11 | public int [Module]Id { get; set; }
12 | public int ModuleId { get; set; }
13 | public string Name { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/MigrationHistory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations.Schema;
3 | using Microsoft.EntityFrameworkCore;
4 |
5 | namespace Oqtane.Models
6 | {
7 | [Table("__EFMigrationsHistory")]
8 | [Keyless]
9 | public class MigrationHistory
10 | {
11 | public string MigrationId { get; set; }
12 | public string ProductVersion { get; set; }
13 | public DateTime AppliedDate { get; set; }
14 | public string AppliedVersion { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ISearchProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 | using Oqtane.Models;
4 |
5 | namespace Oqtane.Services
6 | {
7 | public interface ISearchProvider
8 | {
9 | string Name { get; }
10 |
11 | Task> GetSearchResultsAsync(SearchQuery searchQuery);
12 |
13 | Task SaveSearchContent(SearchContent searchContent, Dictionary siteSettings);
14 |
15 | Task DeleteSearchContent(int siteId);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Modules/HtmlText/Models/HtmlText.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using System.ComponentModel.DataAnnotations;
3 | using Oqtane.Documentation;
4 |
5 | namespace Oqtane.Modules.HtmlText.Models
6 | {
7 | [PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
8 | public class HtmlText : ModelBase
9 | {
10 | [Key]
11 | public int HtmlTextId { get; set; }
12 | public int ModuleId { get; set; }
13 | public string Content { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/Result.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | public class Result
4 | {
5 | public bool Success { get; set; }
6 |
7 | public string Message { get; set; }
8 |
9 | public Result() {}
10 |
11 | public Result(bool success)
12 | {
13 | Success = success;
14 | Message = "";
15 | }
16 |
17 | public Result(bool success, string message)
18 | {
19 | Success = success;
20 | Message = message;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SqlQuery.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Models
4 | {
5 | public class SqlQuery
6 | {
7 | ///
8 | /// Reference to the this belongs to
9 | ///
10 | public int TenantId { get; set; }
11 | public string DBType { get; set; }
12 | public string DBConnectionString { get; set; }
13 | public string Query { get; set; }
14 | public List> Results { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Modules/[Owner].Module.[Module]/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using Oqtane.Modules;
3 |
4 | namespace [Owner].Module.[Module]
5 | {
6 | public class ModuleInfo : IModule
7 | {
8 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
9 | {
10 | Name = "[Module]",
11 | Description = "[Description]",
12 | Version = "1.0.0",
13 | ServerManagerType = "[ServerManagerType]"
14 | };
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Application/Shared/Oqtane.Application.Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net10.0
5 | 1.0.0
6 | Oqtane.Application.Shared.Oqtane
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Oqtane.Package/readme.md:
--------------------------------------------------------------------------------
1 | # Oqtane Framework
2 |
3 | 
4 |
5 | Oqtane is an open source CMS and Application Framework that provides advanced functionality for developing web, mobile, and desktop applications on .NET. It leverages Blazor to compose a fully dynamic digital experience which can be hosted on Static Blazor, Blazor Server, Blazor WebAssembly, or Blazor Hybrid (via .NET MAUI).
6 |
7 | More information about Oqtane can be found at: [https://www.oqtane.org](https://www.oqtane.org)
8 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/BlazorTheme/Containers/Container.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Themes.BlazorTheme
2 | @inherits ContainerBase
3 |
4 | @if (ModuleState.Title != "-")
5 | {
6 |
7 |
8 |
9 |
10 |
11 |
12 | }
13 | else
14 | {
15 |
16 | }
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Oqtane.Server/Modules/HtmlText/Repository/IHtmlTextRepository.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Oqtane.Documentation;
3 |
4 | namespace Oqtane.Modules.HtmlText.Repository
5 | {
6 | [PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
7 | public interface IHtmlTextRepository
8 | {
9 | IEnumerable GetHtmlTexts(int moduleId);
10 | Models.HtmlText GetHtmlText(int htmlTextId);
11 | Models.HtmlText AddHtmlText(Models.HtmlText htmlText);
12 | void DeleteHtmlText(int htmlTextId);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Oqtane.Client/UI/ModuleInstance.placeholder.cs:
--------------------------------------------------------------------------------
1 | // This is just a placeholder file
2 | // It is necessary for the documentation to successfully build this project.
3 | // Reason is that docfx will run the .net compiler and find references
4 | // to this class in the project.
5 | // But since the real class is just a .razor file, ATM docfx will fail.
6 | //
7 | // Note added 2024-06-27 by @iJungleboy.
8 | // We hope that as .net and docfx improve, the razor-compiler will work in that scenario
9 | // as well, and this file can be removed.
10 |
11 | namespace Oqtane.UI;
12 |
13 | public partial class ModuleInstance;
14 |
--------------------------------------------------------------------------------
/Oqtane.Client/UI/RenderModeBoundary.placeholder.cs:
--------------------------------------------------------------------------------
1 | // This is just a placeholder file
2 | // It is necessary for the documentation to successfully build this project.
3 | // Reason is that docfx will run the .net compiler and find references
4 | // to this class in the project.
5 | // But since the real class is just a .razor file, ATM docfx will fail.
6 | //
7 | // Note added 2024-06-27 by @iJungleboy.
8 | // We hope that as .net and docfx improve, the razor-compiler will work in that scenario
9 | // as well, and this file can be removed.
10 |
11 | namespace Oqtane.UI;
12 |
13 | public partial class RenderModeBoundary;
14 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/SiteMigration/ExampleSiteMigration.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | [SiteMigration("localhost:44357", "01.00.00")]
6 | public class ExampleSiteMigration : ISiteMigration
7 | {
8 | void ISiteMigration.Up(Site site, Alias alias)
9 | {
10 | // execute some version-specific upgrade logic for the site here such as adding pages, modules, content, etc...
11 | }
12 |
13 | void ISiteMigration.Down(Site site, Alias alias)
14 | {
15 | // not implemented
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Head.razor:
--------------------------------------------------------------------------------
1 | @using Oqtane.Shared;
2 |
3 |
4 |
5 | @code {
6 | Type ComponentType = Type.GetType("Oqtane.UI.Head, Oqtane.Client");
7 | private IDictionary Parameters { get; set; }
8 |
9 | protected override void OnInitialized()
10 | {
11 | Parameters = new Dictionary();
12 | Parameters.Add(new KeyValuePair("RenderMode", RenderModes.Interactive));
13 | Parameters.Add(new KeyValuePair("Runtime", Runtimes.Hybrid));
14 | }
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/Sync.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Oqtane.Models
5 | {
6 | public class Sync
7 | {
8 | public DateTime SyncDate { get; set; }
9 | public List SyncEvents { get; set; }
10 | }
11 |
12 | public class SyncEvent : EventArgs
13 | {
14 | public int TenantId { get; set; }
15 | public int SiteId { get; set; }
16 | public string EntityName { get; set; }
17 | public int EntityId { get; set; }
18 | public string Action { get; set; }
19 | public DateTime ModifiedOn { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Oqtane.Server/Migrations/Framework/PrimaryKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq.Expressions;
3 | using Oqtane.Migrations.EntityBuilders;
4 |
5 | namespace Oqtane.Migrations
6 | {
7 | public readonly struct PrimaryKey where TEntityBuilder : BaseEntityBuilder
8 | {
9 | public PrimaryKey(string name, Expression> columns)
10 | {
11 | Name = name;
12 | Columns = columns;
13 | }
14 |
15 | public string Name { get; }
16 |
17 | public Expression> Columns { get;}
18 |
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Controls/TextEditors/Radzen/RadzenTextEditor.placeholder.cs:
--------------------------------------------------------------------------------
1 | // This is just a placeholder file
2 | // It is necessary for the documentation to successfully build this project.
3 | // Reason is that docfx will run the .net compiler and find references
4 | // to this class in the project.
5 | // But since the real class is just a .razor file, ATM docfx will fail.
6 | //
7 | // Note added 2025-09-23 by @tvatavuk.
8 | // We hope that as .net and docfx improve, the razor-compiler will work in that scenario
9 | // as well, and this file can be removed.
10 |
11 | namespace Oqtane.Modules.Controls;
12 | public partial class RadzenTextEditor;
13 |
--------------------------------------------------------------------------------
/Oqtane.Server/Security/PermissionRequirement.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Authorization;
2 |
3 | namespace Oqtane.Security
4 | {
5 | public class PermissionRequirement : IAuthorizationRequirement
6 | {
7 | public string EntityName { get; }
8 |
9 | public string PermissionName { get; }
10 |
11 | public string Roles { get; } // semi-colon delimited
12 |
13 | public PermissionRequirement(string entityName, string permissionName, string roles)
14 | {
15 | EntityName = entityName;
16 | PermissionName = permissionName;
17 | Roles = roles;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Startup/ClientStartup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using System.Linq;
3 | using Oqtane.Services;
4 | using [Owner].Module.[Module].Services;
5 |
6 | namespace [Owner].Module.[Module].Startup
7 | {
8 | public class ClientStartup : IClientStartup
9 | {
10 | public void ConfigureServices(IServiceCollection services)
11 | {
12 | if (!services.Any(s => s.ServiceType == typeof(I[Module]Service)))
13 | {
14 | services.AddScoped();
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Oqtane.Application/Server/wwwroot/Modules/Templates/Internal/Client/Startup/ClientStartup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 | using System.Linq;
3 | using Oqtane.Services;
4 | using [Owner].Module.[Module].Services;
5 |
6 | namespace [Owner].Module.[Module].Startup
7 | {
8 | public class ClientStartup : IClientStartup
9 | {
10 | public void ConfigureServices(IServiceCollection services)
11 | {
12 | if (!services.Any(s => s.ServiceType == typeof(I[Module]Service)))
13 | {
14 | services.AddScoped();
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Oqtane.Server/Components/_Placeholder.cs:
--------------------------------------------------------------------------------
1 | // This is just a placeholder file
2 | // It is necessary for the documentation to successfully build this project.
3 | // Reason is that docfx will run the .net compiler and find references
4 | // to this class in the project.
5 | // But since the real class is just a .razor file, ATM docfx will fail.
6 | //
7 | // Note added 2024-06-27 by @iJungleboy.
8 | // We hope that as .net and docfx improve, the razor-compiler will work in that scenario
9 | // as well, and this file can be removed.
10 |
11 | using Oqtane.Documentation;
12 |
13 | namespace Oqtane.Components;
14 |
15 | [PrivateApi]
16 | public class _Placeholder;
17 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/UserLogin.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | ///
4 | /// Passkey properties
5 | ///
6 | public class UserLogin
7 | {
8 | ///
9 | /// the login provider for this login
10 | ///
11 | public string Provider { get; set; }
12 |
13 | ///
14 | /// The key for this login
15 | ///
16 | public string Key { get; set; }
17 |
18 | ///
19 | /// The friendly name for the login provider
20 | ///
21 | public string Name { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/Controls/Theme/MenuVertical.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Themes.Controls
2 | @inherits MenuBase
3 |
4 | @if (MenuPages.Any())
5 | {
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/AliasAccessor.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Http;
2 | using Oqtane.Extensions;
3 | using Oqtane.Models;
4 |
5 | namespace Oqtane.Infrastructure
6 | {
7 | public interface IAliasAccessor
8 | {
9 | Alias Alias { get; }
10 | }
11 |
12 | public class AliasAccessor : IAliasAccessor
13 | {
14 | private readonly IHttpContextAccessor _httpContextAccessor;
15 |
16 | public AliasAccessor(IHttpContextAccessor httpContextAccessor)
17 | {
18 | _httpContextAccessor = httpContextAccessor;
19 | }
20 |
21 | public Alias Alias => _httpContextAccessor.HttpContext.GetAlias();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/ITextEditor.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Oqtane.Interfaces
4 | {
5 | ///
6 | /// Text editor interface.
7 | ///
8 | public interface ITextEditor
9 | {
10 | string Name { get; }
11 |
12 | ///
13 | /// initializes the editor with the initialize content.
14 | ///
15 | /// the initialize content.
16 | void Initialize(string content);
17 |
18 | ///
19 | /// get content from the editor.
20 | ///
21 | ///
22 | Task GetContent();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/Files/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 | using Oqtane.Shared;
4 |
5 | namespace Oqtane.Modules.Admin.Files
6 | {
7 | [PrivateApi("Mark this as private, since it's not very useful in the public docs")]
8 | public class ModuleInfo : IModule
9 | {
10 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
11 | {
12 | Name = "File Management",
13 | Description = "File Management",
14 | Version = Constants.Version,
15 | Categories = "Admin",
16 | ServerManagerType = "Oqtane.Modules.Admin.Files.Manager.FileManager, Oqtane.Server"
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Client/Modules/[Owner].Module.[Module]/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using Oqtane.Modules;
3 |
4 | namespace [Owner].Module.[Module]
5 | {
6 | public class ModuleInfo : IModule
7 | {
8 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
9 | {
10 | Name = "[Module]",
11 | Description = "[Description]",
12 | Version = "1.0.0",
13 | ServerManagerType = "[ServerManagerType]",
14 | ReleaseVersions = "1.0.0",
15 | Dependencies = "[Owner].Module.[Module].Shared.Oqtane",
16 | PackageName = "[Owner].Module.[Module]"
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/SearchResults/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 | using Oqtane.Shared;
4 |
5 | namespace Oqtane.Modules.Admin.SearchResults
6 | {
7 | [PrivateApi("Mark this as private, since it's not very useful in the public docs")]
8 | public class ModuleInfo : IModule
9 | {
10 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
11 | {
12 | Name = "Search Results",
13 | Description = "Search Results",
14 | Categories = "Admin",
15 | Version = Constants.Version,
16 | SettingsType = "Oqtane.Modules.Admin.SearchResults.Settings, Oqtane.Client"
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/Controls/Theme/MenuHorizontal.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Themes.Controls
2 |
3 | @inherits MenuBase
4 |
5 | @if (MenuPages.Any())
6 | {
7 |
8 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IDeletable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Models
4 | {
5 | ///
6 | /// Audit information for things than can be deleted.
7 | ///
8 | public interface IDeletable
9 | {
10 | ///
11 | /// who deleted this object.
12 | ///
13 | string DeletedBy { get; set; }
14 |
15 | ///
16 | /// Timestamp when it was deleted.
17 | ///
18 | DateTime? DeletedOn { get; set; }
19 |
20 | ///
21 | /// If something is deleted, this will be true.
22 | ///
23 | bool IsDeleted { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Documentation/WorkInProgressApi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Documentation
4 | {
5 | ///
6 | /// This attribute marks APIs to be publicly documented with a clear warning that it's work in progress.
7 | ///
8 | [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
9 | [PublicApi]
10 | public class WorkInProgressApi: Attribute
11 | {
12 | ///
13 | /// The `[WorkInProgressApi(some-comment)]` attributes must always have a comment why they are WIP.
14 | ///
15 | /// Reason why it's WIP, required
16 | public WorkInProgressApi(string comment) { }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/SearchContentWord.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 | using System.ComponentModel.DataAnnotations.Schema;
4 |
5 | namespace Oqtane.Models
6 | {
7 | public class SearchContentWord
8 | {
9 | [Key]
10 | public int SearchContentWordId { get; set; }
11 |
12 | public int SearchContentId { get; set; }
13 |
14 | public int SearchWordId { get; set; }
15 |
16 | public int Count { get; set; }
17 |
18 | public DateTime CreatedOn { get; set; }
19 |
20 | public DateTime ModifiedOn { get; set; }
21 |
22 | public SearchWord SearchWord { get; set; }
23 |
24 | public SearchContent SearchContent { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/ServiceActivator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Extensions.DependencyInjection;
3 |
4 | namespace Oqtane.Shared
5 | {
6 | public static class ServiceActivator
7 | {
8 | private static IServiceProvider _serviceProvider = null;
9 |
10 | public static void Configure(IServiceProvider serviceProvider)
11 | {
12 | _serviceProvider = serviceProvider;
13 | }
14 |
15 | public static IServiceScope GetScope(IServiceProvider serviceProvider = null)
16 | {
17 | var provider = serviceProvider ?? _serviceProvider;
18 |
19 | return provider?.GetRequiredService().CreateScope();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Oqtane.Maui/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Oqtane.Maui/MauiConstants.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Maui;
2 |
3 | public static class MauiConstants
4 | {
5 | // the API service url (used as fallback if not set in appsettings.json)
6 | public static string ApiUrl = "";
7 | //public static string ApiUrl = "http://localhost:44357/"; // for local development (Oqtane.Server must be already running for MAUI client to connect)
8 | //public static string apiurl = "http://localhost:44357/sitename/"; // local microsite example
9 | //public static string apiurl = "https://www.dnfprojects.com/"; // for testing remote site
10 |
11 | // specify if you wish to allow users to override the url via appsettings.json in the AppDataDirectory
12 | public static bool UseAppSettings = true;
13 | }
14 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/SiteMigrationAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Oqtane.Infrastructure
4 | {
5 | [AttributeUsage(AttributeTargets.Class)]
6 | public class SiteMigrationAttribute : Attribute
7 | {
8 | private string aliasname;
9 | private string version;
10 |
11 | public SiteMigrationAttribute(string AliasName, string Version)
12 | {
13 | aliasname = AliasName;
14 | version = Version;
15 | }
16 |
17 | public virtual string AliasName
18 | {
19 | get { return aliasname; }
20 | }
21 |
22 | public virtual string Version
23 | {
24 | get { return version; }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Oqtane.Application/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Linq
3 | @using System.Collections.Generic
4 | @using System.Net.Http
5 | @using System.Net.Http.Json
6 |
7 | @using Microsoft.AspNetCore.Components.Authorization
8 | @using Microsoft.AspNetCore.Components.Routing
9 | @using Microsoft.AspNetCore.Components.Web
10 | @using Microsoft.Extensions.Localization
11 | @using Microsoft.JSInterop
12 |
13 | @using Oqtane
14 | @using Oqtane.Models
15 | @using Oqtane.Modules
16 | @using Oqtane.Modules.Controls
17 | @using Oqtane.Providers
18 | @using Oqtane.Security
19 | @using Oqtane.Services
20 | @using Oqtane.Shared
21 | @using Oqtane.Themes
22 | @using Oqtane.Themes.Controls
23 | @using Oqtane.UI
24 | @using Oqtane.Enums
25 | @using Oqtane.Interfaces
--------------------------------------------------------------------------------
/Oqtane.Maui/Resources/Raw/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories). Deployment of the asset to your application
3 | is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
4 |
5 |
6 |
7 | These files will be deployed with you package and will be accessible using Essentials:
8 |
9 | async Task LoadMauiAsset()
10 | {
11 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
12 | using var reader = new StreamReader(stream);
13 |
14 | var contents = reader.ReadToEnd();
15 | }
16 |
--------------------------------------------------------------------------------
/Oqtane.Client/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:44358/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "Oqtane": {
12 | "commandName": "Project",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | },
17 | "applicationUrl": "http://localhost:44358/"
18 | },
19 | "IIS Express": {
20 | "commandName": "IISExpress",
21 | "launchBrowser": true,
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Oqtane.Shared/Shared/SearchUtils.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Shared
4 | {
5 | public sealed class SearchUtils
6 | {
7 | public static List GetKeywords(string keywords)
8 | {
9 | var keywordsList = new List();
10 | if(!string.IsNullOrEmpty(keywords))
11 | {
12 | foreach (var keyword in keywords.Split(' '))
13 | {
14 | if (!string.IsNullOrWhiteSpace(keyword.Trim()))
15 | {
16 | keywordsList.Add(keyword.Trim().ToLower());
17 | }
18 | }
19 | }
20 |
21 | return keywordsList;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/Controls/Theme/MenuItemsBase.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | using Microsoft.AspNetCore.Components;
5 |
6 | using Oqtane.Models;
7 | using Oqtane.UI;
8 |
9 | namespace Oqtane.Themes.Controls
10 | {
11 | public abstract class MenuItemsBase : MenuBase
12 | {
13 | [Parameter()]
14 | public Page ParentPage { get; set; }
15 |
16 | [Parameter()]
17 | public IEnumerable Pages { get; set; }
18 |
19 | protected IEnumerable GetChildPages()
20 | {
21 | return Pages
22 | .Where(e => e.ParentId == ParentPage?.PageId)
23 | .OrderBy(e => e.Order)
24 | .AsEnumerable();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Oqtane.Server/Security/AutoValidateAntiforgeryTokenAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.AspNetCore.Mvc.Filters;
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace Oqtane.Security
6 | {
7 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
8 | public class AutoValidateAntiforgeryTokenAttribute : Attribute, IFilterFactory, IOrderedFilter
9 | {
10 | public int Order { get; set; } = 1000;
11 |
12 | public bool IsReusable => true;
13 |
14 | public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
15 | {
16 | return serviceProvider.GetRequiredService();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Linq
3 | @using System.Collections.Generic
4 | @using System.Net.Http
5 | @using System.Net.Http.Json
6 |
7 | @using Microsoft.AspNetCore.Components.Authorization
8 | @using Microsoft.AspNetCore.Components.Routing
9 | @using Microsoft.AspNetCore.Components.Web
10 | @using Microsoft.Extensions.Localization
11 | @using Microsoft.JSInterop
12 |
13 | @using Oqtane.Models
14 | @using Oqtane.Modules
15 | @using Oqtane.Modules.Controls
16 | @using Oqtane.Providers
17 | @using Oqtane.Security
18 | @using Oqtane.Services
19 | @using Oqtane.Shared
20 | @using Oqtane.Themes
21 | @using Oqtane.Themes.Controls
22 | @using Oqtane.UI
23 | @using Oqtane.Enums
24 | @using Oqtane.Interfaces
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Modules/Templates/External/Shared/[Owner].Module.[Module].Shared.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net10.0
5 | 1.0.0
6 | [Owner].Module.[Module]
7 | [Owner]
8 | [Owner]
9 | [Description]
10 | [Owner]
11 | [Owner].Module.[Module].Shared.Oqtane
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | [SharedReference]
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/HtmlText/Services/IHtmlTextService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading.Tasks;
3 | using Oqtane.Documentation;
4 |
5 | namespace Oqtane.Modules.HtmlText.Services
6 | {
7 | [PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
8 | public interface IHtmlTextService
9 | {
10 | Task> GetHtmlTextsAsync(int moduleId);
11 |
12 | Task GetHtmlTextAsync(int moduleId);
13 |
14 | Task GetHtmlTextAsync(int htmlTextId, int moduleId);
15 |
16 | Task AddHtmlTextAsync(Models.HtmlText htmltext);
17 |
18 | Task DeleteHtmlTextAsync(int htmlTextId, int moduleId);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Oqtane.Server/Extensions/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Oqtane.Extensions
4 | {
5 | public static class DictionaryExtensions
6 | {
7 | public static TValue GetValue(this Dictionary dictionary, TKey key, TValue defaultValue, bool nullOrEmptyValueIsValid = false)
8 | {
9 | if (dictionary != null && key != null && dictionary.ContainsKey(key))
10 | {
11 | if (nullOrEmptyValueIsValid || (dictionary[key] != null && !string.IsNullOrEmpty(dictionary[key].ToString())))
12 | {
13 | return dictionary[key];
14 | }
15 | }
16 | return defaultValue;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Server/wwwroot/Themes/Templates/External/Client/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Linq
3 | @using System.Collections.Generic
4 | @using System.Net.Http
5 | @using System.Net.Http.Json
6 |
7 | @using Microsoft.AspNetCore.Components.Authorization
8 | @using Microsoft.AspNetCore.Components.Routing
9 | @using Microsoft.AspNetCore.Components.Web
10 | @using Microsoft.Extensions.Localization
11 | @using Microsoft.JSInterop
12 |
13 | @using Oqtane
14 | @using Oqtane.Client
15 | @using Oqtane.Models
16 | @using Oqtane.Modules
17 | @using Oqtane.Modules.Controls
18 | @using Oqtane.Providers
19 | @using Oqtane.Security
20 | @using Oqtane.Services
21 | @using Oqtane.Shared
22 | @using Oqtane.Themes
23 | @using Oqtane.Themes.Controls
24 | @using Oqtane.UI
25 | @using Oqtane.Enums
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Tizen/tizen-manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | appicon.xhigh.png
7 |
8 |
9 |
10 |
11 | http://tizen.org/privilege/internet
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/Error/Index.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Modules.Admin.Error
2 | @inherits ModuleBase
3 | @inject IModuleService ModuleService
4 | @inject IStringLocalizer Localizer
5 |
6 | @code {
7 | public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
8 |
9 | protected override async Task OnInitializedAsync()
10 | {
11 | Module module = await ModuleService.GetModuleAsync(ModuleState.ModuleId);
12 | if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
13 | {
14 | AddModuleMessage(string.Format(Localizer["Error.Module.Load"], module.ModuleDefinitionName), MessageType.Error);
15 | }
16 |
17 | await logger.LogCritical("Error Loading Module {Module}", module);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/Profiles/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 | using Oqtane.Shared;
4 |
5 | namespace Oqtane.Modules.Admin.Profiles
6 | {
7 | [PrivateApi("Mark this as private, since it's not very useful in the public docs")]
8 | public class ModuleInfo : IModule
9 | {
10 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
11 | {
12 | Name = "Profiles",
13 | Description = "Manage Profiles",
14 | Categories = "Admin",
15 | Version = Constants.Version,
16 | PermissionNames = $"{PermissionNames.View},{PermissionNames.Edit}," +
17 | $"{EntityNames.Profile}:{PermissionNames.Write}:{RoleNames.Admin}"
18 | };
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Oqtane.Server/Modules/HtmlText/Repository/HtmlTextContext.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore;
2 | using Oqtane.Documentation;
3 | using Oqtane.Repository;
4 | using Oqtane.Repository.Databases.Interfaces;
5 |
6 | // ReSharper disable MemberCanBePrivate.Global
7 | // ReSharper disable UnusedAutoPropertyAccessor.Global
8 |
9 | namespace Oqtane.Modules.HtmlText.Repository
10 | {
11 | [PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
12 | public class HtmlTextContext : DBContextBase, ITransientService, IMultiDatabase
13 | {
14 | public HtmlTextContext(IDBContextDependencies DBContextDependencies) : base(DBContextDependencies) { }
15 |
16 | public virtual DbSet HtmlText { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Oqtane.Server/Extensions/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Oqtane.Extensions
5 | {
6 | public static class StringExtensions
7 | {
8 | public static bool StartWithAnyOf(this string s, IEnumerable list)
9 | {
10 | if (s == null)
11 | {
12 | return false;
13 | }
14 |
15 | return list.Any(f => s.StartsWith(f));
16 | }
17 |
18 | public static string ReplaceMultiple(this string s, string[] oldValues, string newValue)
19 | {
20 | foreach(string value in oldValues)
21 | {
22 | s = s.Replace(value, newValue);
23 | }
24 | return s;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/Installation.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | ///
4 | /// Internal message used internally during installation.
5 | ///
6 | /// Each part of the installation will return the status / message when installing.
7 | ///
8 | public class Installation
9 | {
10 | ///
11 | /// Status if everything worked.
12 | ///
13 | public bool Success { get; set; }
14 |
15 | ///
16 | /// Message or error in case something failed.
17 | ///
18 | public string Message { get; set; }
19 |
20 | ///
21 | /// current alias value from server
22 | ///
23 | public Alias Alias { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Interfaces/IThemeControl.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Models;
2 | using System.Collections.Generic;
3 |
4 | namespace Oqtane.Themes
5 | {
6 | public interface IThemeControl
7 | {
8 | ///
9 | /// Friendly name for a theme
10 | ///
11 | string Name { get; }
12 |
13 | ///
14 | /// Screen shot of a theme - assumed to be in the ThemePath() folder
15 | ///
16 | string Thumbnail { get; }
17 |
18 | ///
19 | /// Comma delimited list of all panes in a theme
20 | ///
21 | string Panes { get; }
22 |
23 | ///
24 | /// Identifies all resources in a theme
25 | ///
26 | List Resources { get; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Oqtane.Maui/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | // To learn more about WinUI, the WinUI project structure,
4 | // and more about our project templates, see: http://aka.ms/winui-project-info.
5 |
6 | namespace Oqtane.Maui.WinUI;
7 |
8 | ///
9 | /// Provides application-specific behavior to supplement the default Application class.
10 | ///
11 | public partial class App : MauiWinUIApplication
12 | {
13 | ///
14 | /// Initializes the singleton application object. This is the first line of authored code
15 | /// executed, and as such is the logical equivalent of main() or WinMain().
16 | ///
17 | public App()
18 | {
19 | this.InitializeComponent();
20 | }
21 |
22 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/Oqtane.Server/Extensions/DbContextOptionsBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics.CodeAnalysis;
2 | using Microsoft.EntityFrameworkCore;
3 | using Microsoft.EntityFrameworkCore.Diagnostics;
4 | using Oqtane.Databases.Interfaces;
5 | // ReSharper disable ConvertToUsingDeclaration
6 |
7 | namespace Oqtane.Extensions
8 | {
9 | public static class DbContextOptionsBuilderExtensions
10 | {
11 | public static DbContextOptionsBuilder UseOqtaneDatabase([NotNull] this DbContextOptionsBuilder optionsBuilder, IDatabase database, string connectionString)
12 | {
13 | database.UseDatabase(optionsBuilder, connectionString)
14 | .ConfigureWarnings(warnings => warnings.Log(RelationalEventId.PendingModelChangesWarning));
15 |
16 | return optionsBuilder;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Oqtane.Server/Infrastructure/Interfaces/IServerStartup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Builder;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.Extensions.DependencyInjection;
4 |
5 | namespace Oqtane.Infrastructure
6 | {
7 | public interface IServerStartup
8 | {
9 | // This method gets called by the runtime. Use this method to add services to the container.
10 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
11 | void ConfigureServices(IServiceCollection services);
12 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
13 | void Configure(IApplicationBuilder app, IWebHostEnvironment env);
14 | void ConfigureMvc(IMvcBuilder mvcBuilder);
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/Oqtane.Server/Controllers/SiteTemplateController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Authorization;
3 | using Microsoft.AspNetCore.Mvc;
4 | using Oqtane.Models;
5 | using Oqtane.Repository;
6 | using Oqtane.Shared;
7 |
8 | namespace Oqtane.Controllers
9 | {
10 | [Route(ControllerRoutes.ApiRoute)]
11 | public class SiteTemplateController : Controller
12 | {
13 | private readonly ISiteTemplateRepository _siteTemplates;
14 |
15 | public SiteTemplateController(ISiteTemplateRepository siteTemplates)
16 | {
17 | _siteTemplates = siteTemplates;
18 | }
19 |
20 | // GET: api/
21 | [HttpGet]
22 | public IEnumerable Get()
23 | {
24 | return _siteTemplates.GetSiteTemplates();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/Roles/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 | using Oqtane.Shared;
4 |
5 | namespace Oqtane.Modules.Admin.Roles
6 | {
7 | [PrivateApi("Mark this as private, since it's not very useful in the public docs")]
8 | public class ModuleInfo : IModule
9 | {
10 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
11 | {
12 | Name = "Roles",
13 | Description = "Manage Roles",
14 | Categories = "Admin",
15 | Version = Constants.Version,
16 | PermissionNames = $"{PermissionNames.View},{PermissionNames.Edit}," +
17 | $"{EntityNames.Role}:{PermissionNames.Write}:{RoleNames.Admin}," +
18 | $"{EntityNames.UserRole}:{PermissionNames.Write}:{RoleNames.Admin}"
19 | };
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Oqtane.Client/Modules/Admin/Users/ModuleInfo.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Documentation;
2 | using Oqtane.Models;
3 | using Oqtane.Shared;
4 |
5 | namespace Oqtane.Modules.Admin.Users
6 | {
7 | [PrivateApi("Mark this as private, since it's not very useful in the public docs")]
8 | public class ModuleInfo : IModule
9 | {
10 | public ModuleDefinition ModuleDefinition => new ModuleDefinition
11 | {
12 | Name = "Users",
13 | Description = "Manage Users",
14 | Categories = "Admin",
15 | Version = Constants.Version,
16 | PermissionNames = $"{PermissionNames.View},{PermissionNames.Edit}," +
17 | $"{EntityNames.User}:{PermissionNames.Write}:{RoleNames.Admin}," +
18 | $"{EntityNames.UserRole}:{PermissionNames.Write}:{RoleNames.Admin}"
19 | };
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Oqtane.Server/Repository/TenantResolver.cs:
--------------------------------------------------------------------------------
1 | using Oqtane.Infrastructure;
2 | using Oqtane.Models;
3 |
4 | namespace Oqtane.Repository
5 | {
6 | // class deprecated and replaced by ITenantManager
7 | public interface ITenantResolver
8 | {
9 | Alias GetAlias();
10 | Tenant GetTenant();
11 | }
12 |
13 | public class TenantResolver : ITenantResolver
14 | {
15 | private readonly ITenantManager _tenantManager;
16 |
17 | public TenantResolver(ITenantManager tenantManager)
18 | {
19 | _tenantManager = tenantManager;
20 | }
21 |
22 | public Alias GetAlias()
23 | {
24 | return _tenantManager.GetAlias();
25 | }
26 |
27 | public Tenant GetTenant()
28 | {
29 | return _tenantManager.GetTenant();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Oqtane.Client/Themes/Controls/Theme/Logo.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Themes.Controls
2 | @inherits ThemeControlBase
3 |
4 | @if (PageState.Site.LogoFileId != null)
5 | {
6 |
7 |
8 |
9 |
10 |
11 | }
12 | else
13 | {
14 | if (UseSiteNameAsFallback)
15 | {
16 |
17 | @PageState.Site.Name
18 |
19 | }
20 | }
21 |
22 | @code {
23 | [Parameter]
24 | public bool UseSiteNameAsFallback { get; set; } = false; // indicates if the site name should be displayed in scenarios where a site does not have a logo defined
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/Oqtane.Shared/Models/Culture.cs:
--------------------------------------------------------------------------------
1 | namespace Oqtane.Models
2 | {
3 | ///
4 | /// Culture information describing a Culture
5 | ///
6 | public class Culture
7 | {
8 | ///
9 | /// Short code like `en` or `en-US`
10 | ///
11 | public string Name { get; set; }
12 |
13 | ///
14 | /// Nice name for the user, like `English (United States)`
15 | ///
16 | public string DisplayName { get; set; }
17 |
18 | ///
19 | /// Information if this is the default culture.
20 | ///
21 | ///
22 | /// Not sure if this is actually valid, as ATM there is no setting to configure a _default_ culture
23 | ///
24 | public bool IsDefault { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | net10.0
4 | Debug;Release
5 | 10.0.2
6 | Oqtane
7 | Shaun Walker
8 | .NET Foundation
9 | CMS and Application Framework for Blazor and .NET MAUI
10 | .NET Foundation
11 | https://www.oqtane.org
12 | https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE
13 | https://github.com/oqtane/oqtane.framework/releases/tag/v10.0.2
14 | https://github.com/oqtane/oqtane.framework
15 | Git
16 |
17 |
--------------------------------------------------------------------------------
/Oqtane.Client/Installer/Controls/SqliteConfig.razor:
--------------------------------------------------------------------------------
1 | @namespace Oqtane.Installer.Controls
2 | @implements Oqtane.Interfaces.IDatabaseConfigControl
3 |
4 |