Merge remote-tracking branch 'oqtane/dev' into dev
This commit is contained in:
commit
096dfea1a6
@ -1,6 +1,7 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
@inject IStringLocalizer<SqlServerConfig> Localizer
|
||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="server" HelpText="Enter the database server" ResourceKey="Server">Server:</Label>
|
||||
@ -38,6 +39,15 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="encryption" HelpText="Specify if you are using an encrypted database connection. It is highly recommended to use encryption in a production environment." ResourceKey="Encryption">Encryption:</Label>
|
||||
<div class="col-sm-9">
|
||||
<select id="encryption" class="form-select custom-select" @bind="@_encryption">
|
||||
<option value="true">@SharedLocalizer["True"]</option>
|
||||
<option value="false">@SharedLocalizer["False"]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private string _server = String.Empty;
|
||||
@ -45,6 +55,7 @@
|
||||
private string _security = "integrated";
|
||||
private string _uid = String.Empty;
|
||||
private string _pwd = String.Empty;
|
||||
private string _encryption = "false";
|
||||
|
||||
public string GetConnectionString()
|
||||
{
|
||||
@ -61,15 +72,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!String.IsNullOrEmpty(_uid) && !String.IsNullOrEmpty(_pwd))
|
||||
{
|
||||
connectionString += $"User ID={_uid};Password={_pwd};";
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionString = String.Empty;
|
||||
}
|
||||
connectionString += $"User ID={_uid};Password={_pwd};";
|
||||
}
|
||||
connectionString += $"Encrypt={_encryption};";
|
||||
|
||||
return connectionString;
|
||||
}
|
||||
|
@ -11,13 +11,14 @@
|
||||
|
||||
<Pager Items="@PageState.Pages.Where(item => !item.IsDeleted)">
|
||||
<Header>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th>@SharedLocalizer["Name"]</th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th>@SharedLocalizer["Name"]</th>
|
||||
</Header>
|
||||
<Row>
|
||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.PageId.ToString())" ResourceKey="EditPage" /></td>
|
||||
<td><ActionDialog Header="Delete Page" Message="@string.Format(Localizer["Confirm.Page.Delete"], context.Name)" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeletePage(context))" ResourceKey="DeletePage" /></td>
|
||||
<td><button type="button" class="btn btn-secondary" @onclick="@(async () => Browse(context))">@Localizer["Browse"]</button></td>
|
||||
<td>@(new string('-', context.Level * 2))@(context.Name)</td>
|
||||
</Row>
|
||||
</Pager>
|
||||
@ -42,4 +43,8 @@
|
||||
AddModuleMessage(Localizer["Error.Page.Delete"], MessageType.Error);
|
||||
}
|
||||
}
|
||||
protected string Browse(Page page)
|
||||
{
|
||||
return string.IsNullOrEmpty(page.Url) ? NavigateUrl(page.Path) : page.Url;
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,9 @@
|
||||
[Parameter]
|
||||
public string Style { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string DateTimeFormat { get; set; } = "MMM dd yyyy HH:mm:ss";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
_text = string.Empty;
|
||||
@ -49,7 +52,7 @@
|
||||
|
||||
if (CreatedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["On"]} <b>{CreatedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["On"]} <b>{CreatedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
@ -66,7 +69,7 @@
|
||||
|
||||
if (ModifiedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
@ -83,7 +86,7 @@
|
||||
|
||||
if (DeletedOn != null)
|
||||
{
|
||||
_text += $" {Localizer["On"]} <b>{DeletedOn.Value.ToString("MMM dd yyyy HH:mm:ss")}</b>";
|
||||
_text += $" {Localizer["On"]} <b>{DeletedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||
}
|
||||
|
||||
_text += "</p>";
|
||||
|
@ -153,4 +153,10 @@
|
||||
<data name="Integrated" xml:space="preserve">
|
||||
<value>Integrated</value>
|
||||
</data>
|
||||
<data name="Encryption,Text" xml:space="preserve">
|
||||
<value>Encryption:</value>
|
||||
</data>
|
||||
<data name="Encryption.HelpText" xml:space="preserve">
|
||||
<value>Specify if you are using an encrypted database connection. It is highly recommended to use encryption in a production environment.</value>
|
||||
</data>
|
||||
</root>
|
@ -129,4 +129,7 @@
|
||||
<data name="DeletePage.Header" xml:space="preserve">
|
||||
<value>Delete Page</value>
|
||||
</data>
|
||||
<data name="Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
</root>
|
@ -297,4 +297,7 @@
|
||||
<data name="Runtime.Text" xml:space="preserve">
|
||||
<value>Runtime: </value>
|
||||
</data>
|
||||
<data name="Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
</root>
|
@ -1,7 +1,7 @@
|
||||
@namespace Oqtane.Themes.BlazorTheme
|
||||
@namespace Oqtane.Themes.BlazorTheme
|
||||
@inherits ContainerBase
|
||||
<div class="container">
|
||||
<div class="row px-4">
|
||||
<div class="row p-4">
|
||||
<div class="d-flex flex-nowrap">
|
||||
<ModuleActions /><h2><ModuleTitle /></h2>
|
||||
</div>
|
||||
|
@ -1,23 +1,26 @@
|
||||
@namespace Oqtane.Themes.BlazorTheme
|
||||
@inherits ThemeBase
|
||||
|
||||
|
||||
<div class="breadcrumbs">
|
||||
<Breadcrumbs />
|
||||
</div>
|
||||
|
||||
<div class="sidebar">
|
||||
<nav class="navbar">
|
||||
<Logo /><Menu Orientation="Vertical" />
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<div class="top-row px-4">
|
||||
<div class="ms-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||
<div class="row flex-xl-nowrap gx-0">
|
||||
<div class="sidebar">
|
||||
<nav class="navbar">
|
||||
<Logo /><Menu Orientation="Vertical" />
|
||||
</nav>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row px-4">
|
||||
<Pane Name="@PaneNames.Admin" />
|
||||
|
||||
<div class="main g-0">
|
||||
<div class="top-row px-4">
|
||||
<div class="ms-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row px-4">
|
||||
<Pane Name="@PaneNames.Admin" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="6.0.0-rc.2.21480.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0-rc.2.21480.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0-rc.2.21480.10" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.0-preview2.21264.2" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.0-preview3.21293.2" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-rc.2.21480.5">
|
||||
|
@ -124,6 +124,7 @@
|
||||
@media (min-width: 768px) {
|
||||
app {
|
||||
flex-direction: row;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.app-logo {
|
||||
|
@ -20,10 +20,10 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
|
||||
<PackageReference Include="bunit.web" Version="1.0.0-beta-10" />
|
||||
<PackageReference Include="bunit.xunit" Version="1.0.0-beta-10" />
|
||||
<PackageReference Include="xunit.core" Version="2.4.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageReference Include="bunit.web" Version="1.3.35-preview" />
|
||||
<PackageReference Include="bunit.xunit" Version="1.0.0-preview-02" />
|
||||
<PackageReference Include="xunit.core" Version="2.4.2-pre.12" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
Reference in New Issue
Block a user