Merge pull request #95 from sbwalker/master
utilize _Imports.razor to simplify module declarations
This commit is contained in:
commit
94d01df526
|
@ -1,7 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@inject IInstallationService InstallationService
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Services
|
|
||||||
@inject IInstallationService InstallationService
|
|
||||||
|
|
||||||
@if (Initialized)
|
@if (Initialized)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Dashboard
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models;
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Dashboard
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@namespace Oqtane.Modules.Admin.Login
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Microsoft.JSInterop
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Providers
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Admin.Login
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IJSRuntime jsRuntime
|
@inject IJSRuntime jsRuntime
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IFileService FileService
|
@inject IFileService FileService
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IModuleDefinitionService ModuleDefinitionService
|
@inject IModuleDefinitionService ModuleDefinitionService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.ModuleDefinitions
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IModuleDefinitionService ModuleDefinitionService
|
@inject IModuleDefinitionService ModuleDefinitionService
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.ModuleSettings
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.ModuleSettings
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IThemeService ThemeService
|
@inject IThemeService ThemeService
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Pages
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Pages
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Pages
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Pages
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Pages
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Pages
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Pages
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Admin.Pages
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
|
|
||||||
@if (PageState.Pages != null)
|
@if (PageState.Pages != null)
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Profile
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@namespace Oqtane.Modules.Admin.Profile
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Register
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@namespace Oqtane.Modules.Admin.Register
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Roles
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.Roles
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Sites
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Sites
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject ITenantService TenantService
|
@inject ITenantService TenantService
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Sites
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.Sites
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
|
|
||||||
@inject ISiteService SiteService
|
@inject ISiteService SiteService
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Tenants
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Admin.Tenants
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject ITenantService TenantService
|
@inject ITenantService TenantService
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Tenants
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.Tenants
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject ITenantService TenantService
|
@inject ITenantService TenantService
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Admin.Themes
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Admin.Themes
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IFileService FileService
|
@inject IFileService FileService
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Themes
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@namespace Oqtane.Modules.Admin.Themes
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IThemeService ThemeService
|
@inject IThemeService ThemeService
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Admin.Users
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Admin.Users
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IUserRoleService UserRoleService
|
@inject IUserRoleService UserRoleService
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Modules.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Modules
|
@namespace Oqtane.Modules.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
|
|
||||||
@if (text != "")
|
@if (text != "")
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Controls
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
|
|
||||||
@if (multiple)
|
@if (multiple)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Controls
|
||||||
@using Oqtane.Modules
|
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
|
|
||||||
@if (Message != "")
|
@if (Message != "")
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Modules
|
@namespace Oqtane.Modules.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@typeparam TableItem
|
@typeparam TableItem
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Controls
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Security
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IRoleService RoleService
|
@inject IRoleService RoleService
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Modules.Controls
|
||||||
@namespace Oqtane.Modules.Controls
|
|
||||||
|
|
||||||
<img src="@src" title="@title" disabled=@Disabled @onclick="SetValue" />
|
<img src="@src" title="@title" disabled=@Disabled @onclick="SetValue" />
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@namespace Oqtane.Modules.Counter
|
@namespace Oqtane.Modules.Counter
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
Current count: @currentCount
|
Current count: @currentCount
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Oqtane.Modules;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Oqtane.Modules.Counter
|
namespace Oqtane.Modules.Counter
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Services
|
|
||||||
@namespace Oqtane.Modules.HelloWorld
|
|
||||||
@inherits ModuleBase
|
|
||||||
@inject ISettingService SettingService
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<div>
|
|
||||||
<label for="Url" class="control-label">Image Url: </label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="text" name="Url" class="form-control" placeholder="Image Url" @bind="@url" />
|
|
||||||
</div>
|
|
||||||
<button type="button" class="btn btn-primary" @onclick="Save">Save</button>
|
|
||||||
<div>
|
|
||||||
@if (!string.IsNullOrEmpty(url))
|
|
||||||
{
|
|
||||||
<br />
|
|
||||||
<img src="@url" />
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
string url = "";
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
Dictionary<string, string> settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId);
|
|
||||||
url = SettingService.GetSetting(settings, "url", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Save()
|
|
||||||
{
|
|
||||||
Dictionary<string, string> settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId);
|
|
||||||
SettingService.SetSetting(settings, "url", url);
|
|
||||||
await SettingService.UpdateModuleSettingsAsync(settings, ModuleState.ModuleId);
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,11 +1,5 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@using Oqtane.Modules.HtmlText.Services
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Modules.HtmlText.Services
|
|
||||||
@using Oqtane.Modules.HtmlText.Models
|
@using Oqtane.Modules.HtmlText.Models
|
||||||
@using System.Net.Http;
|
|
||||||
@using Oqtane.Shared;
|
|
||||||
@namespace Oqtane.Modules.HtmlText
|
@namespace Oqtane.Modules.HtmlText
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@using Oqtane.Modules.HtmlText.Services
|
||||||
@using Oqtane.Modules.HtmlText.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.HtmlText.Models
|
@using Oqtane.Modules.HtmlText.Models
|
||||||
@using System.Net.Http;
|
|
||||||
@using Oqtane.Modules.Controls
|
|
||||||
@using Oqtane.Shared;
|
|
||||||
@namespace Oqtane.Modules.HtmlText
|
@namespace Oqtane.Modules.HtmlText
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Oqtane.Modules;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Oqtane.Modules.HtmlText
|
namespace Oqtane.Modules.HtmlText
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Modules.Weather.Services
|
@using Oqtane.Modules.Weather.Services
|
||||||
@namespace Oqtane.Modules.Weather
|
@namespace Oqtane.Modules.Weather
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Oqtane.Modules;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Oqtane.Modules.Weather
|
namespace Oqtane.Modules.Weather
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Models
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
|
|
||||||
<CascadingValue Value="@ModuleState">
|
<CascadingValue Value="@ModuleState">
|
||||||
@DynamicComponent
|
@DynamicComponent
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IInstallationService InstallationService
|
@inject IInstallationService InstallationService
|
||||||
@inject ISiteService SiteService
|
@inject ISiteService SiteService
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Oqtane.Shared
|
namespace Oqtane.Shared
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Models
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
|
|
||||||
@DynamicComponent
|
@DynamicComponent
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
@using System
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@using System.Linq
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
@inject IModuleService ModuleService
|
@inject IModuleService ModuleService
|
||||||
@inject IModuleDefinitionService ModuleDefinitionService
|
@inject IModuleDefinitionService ModuleDefinitionService
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using System
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
|
|
||||||
@DynamicComponent
|
@DynamicComponent
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,4 @@
|
||||||
@using System
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Modules
|
|
||||||
@using System.Linq
|
|
||||||
@using System.Collections.Generic
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject SiteState SiteState
|
@inject SiteState SiteState
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Shared
|
@namespace Oqtane.Shared
|
||||||
@using Oqtane.Modules
|
|
||||||
@using Microsoft.JSInterop
|
|
||||||
@namespace Oqtane.Shared
|
|
||||||
@inject IJSRuntime jsRuntime
|
@inject IJSRuntime jsRuntime
|
||||||
|
|
||||||
@DynamicComponent
|
@DynamicComponent
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Shared
|
@namespace Oqtane.Themes
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@namespace Oqtane.Themes
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
<div id="modal" class="modal" style="display: block">
|
<div id="modal" class="modal" style="display: block">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Themes
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ThemeControlBase
|
@inherits ThemeControlBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Themes
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Providers
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Microsoft.JSInterop
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ThemeControlBase
|
@inherits ThemeControlBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Oqtane.Themes
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ThemeControlBase
|
@inherits ThemeControlBase
|
||||||
|
|
||||||
@((MarkupString)logo)
|
@((MarkupString)logo)
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Routing
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Themes
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models;
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ThemeControlBase
|
@inherits ThemeControlBase
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Oqtane.Themes
|
|
||||||
@using Oqtane.Services
|
|
||||||
@using Oqtane.Models
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@using Oqtane.Security
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Oqtane.Themes
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
|
|
||||||
@title
|
@title
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Microsoft.AspNetCore.Components.Authorization
|
@namespace Oqtane.Themes.Controls
|
||||||
@using Microsoft.AspNetCore.Components.Web
|
|
||||||
@using Oqtane.Themes
|
|
||||||
@namespace Oqtane.Themes.Controls
|
|
||||||
@inherits ThemeControlBase
|
@inherits ThemeControlBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Themes.Controls
|
@namespace Oqtane.Themes
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme1
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme1
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme1
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme1
|
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -11,7 +8,7 @@
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
<h1>@PageState.Page.Name - Theme #1</h1> <div class="ml-md-auto"><Profile /> <Login /> <ControlPanel /></div>
|
<h1>@PageState.Page.Name - Theme #1</h1> <div class="ml-md-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme2
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme2
|
|
||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme2
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme2
|
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -11,7 +8,7 @@
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
<h1>@PageState.Page.Name - Theme #2</h1> <div class="ml-md-auto"><Profile /> <Login /> <ControlPanel /></div>
|
<h1>@PageState.Page.Name - Theme #2</h1> <div class="ml-md-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme3
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme3
|
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme3
|
||||||
@using Oqtane.Themes.Controls
|
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme3
|
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -11,7 +8,7 @@
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
<h1>@PageState.Page.Name - Theme #3</h1> <div class="ml-md-auto"><Profile /> <Login /> <ControlPanel /></div>
|
<h1>@PageState.Page.Name - Theme #3</h1> <div class="ml-md-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<PaneLayout />
|
<PaneLayout />
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
@using Oqtane.Themes
|
@namespace Oqtane.Themes.Theme3
|
||||||
@using Oqtane.Shared
|
|
||||||
@namespace Oqtane.Themes.Theme3
|
|
||||||
@inherits ThemeBase
|
@inherits ThemeBase
|
||||||
|
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
|
19
Oqtane.Client/_Imports.razor
Normal file
19
Oqtane.Client/_Imports.razor
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
@using System
|
||||||
|
@using System.Linq
|
||||||
|
@using System.Collections.Generic
|
||||||
|
@using System.Net.Http
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@using Microsoft.JSInterop
|
||||||
|
|
||||||
|
@using Oqtane.Models
|
||||||
|
@using Oqtane.Modules
|
||||||
|
@using Oqtane.Modules.Controls
|
||||||
|
@using Oqtane.Providers
|
||||||
|
@using Oqtane.Security
|
||||||
|
@using Oqtane.Services
|
||||||
|
@using Oqtane.Shared
|
||||||
|
@using Oqtane.Themes
|
||||||
|
@using Oqtane.Themes.Controls
|
|
@ -146,13 +146,12 @@ app {
|
||||||
|
|
||||||
/* Control Panel */
|
/* Control Panel */
|
||||||
.overlay {
|
.overlay {
|
||||||
/* Height & width depends on how you want to reveal the overlay (see JS below) */
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 0;
|
width: 0;
|
||||||
position: fixed; /* Stay in place */
|
position: fixed; /* Stay in place */
|
||||||
z-index: 1; /* Sit on top */
|
z-index: 1; /* Sit on top */
|
||||||
left: 0;
|
right: 0; /* Position at right side of screen */
|
||||||
top: 0;
|
top: 0; /* Position at top of screen */
|
||||||
background-color: rgb(0,0,0); /* Black fallback color */
|
background-color: rgb(0,0,0); /* Black fallback color */
|
||||||
background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
|
background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
|
||||||
overflow-x: hidden; /* Disable horizontal scroll */
|
overflow-x: hidden; /* Disable horizontal scroll */
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace Oqtane.Repository
|
||||||
{
|
{
|
||||||
username = accessor.HttpContext.User.Identity.Name;
|
username = accessor.HttpContext.User.Identity.Name;
|
||||||
}
|
}
|
||||||
DateTime date = DateTime.Now;
|
DateTime date = DateTime.UtcNow;
|
||||||
|
|
||||||
var created = ChangeTracker.Entries()
|
var created = ChangeTracker.Entries()
|
||||||
.Where(x => x.State == EntityState.Added);
|
.Where(x => x.State == EntityState.Added);
|
||||||
|
|
|
@ -43,6 +43,10 @@ namespace Oqtane.Repository
|
||||||
db.ModuleDefinition.Add(moduledef);
|
db.ModuleDefinition.Add(moduledef);
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
moduledefs.Remove(moduledef); // remove module definition from list
|
||||||
|
}
|
||||||
moduledefinition.ModuleDefinitionId = moduledef.ModuleDefinitionId;
|
moduledefinition.ModuleDefinitionId = moduledef.ModuleDefinitionId;
|
||||||
moduledefinition.SiteId = SiteId;
|
moduledefinition.SiteId = SiteId;
|
||||||
moduledefinition.Permissions = Permissions.EncodePermissions(moduledefinition.ModuleDefinitionId, permissions);
|
moduledefinition.Permissions = Permissions.EncodePermissions(moduledefinition.ModuleDefinitionId, permissions);
|
||||||
|
@ -52,6 +56,12 @@ namespace Oqtane.Repository
|
||||||
moduledefinition.ModifiedOn = moduledef.ModifiedOn;
|
moduledefinition.ModifiedOn = moduledef.ModifiedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// any remaining module definitions are orphans
|
||||||
|
foreach (ModuleDefinition moduledefinition in moduledefs)
|
||||||
|
{
|
||||||
|
db.ModuleDefinition.Remove(moduledefinition); // delete
|
||||||
|
}
|
||||||
|
|
||||||
return ModuleDefinitions;
|
return ModuleDefinitions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ app {
|
||||||
width: 0;
|
width: 0;
|
||||||
position: fixed; /* Stay in place */
|
position: fixed; /* Stay in place */
|
||||||
z-index: 1; /* Sit on top */
|
z-index: 1; /* Sit on top */
|
||||||
left: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
background-color: rgb(0,0,0); /* Black fallback color */
|
background-color: rgb(0,0,0); /* Black fallback color */
|
||||||
background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
|
background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user