Compare commits
275 Commits
Author | SHA1 | Date | |
---|---|---|---|
8b80f72313 | |||
06ebce31ca | |||
59db8ba997 | |||
df37d4aa7f | |||
fd9935c800 | |||
c057430488 | |||
767fa78e22 | |||
a0e289dcd6 | |||
c62d147254 | |||
f739bee353 | |||
db4dfb69fb | |||
9729a5ef16 | |||
6f12818352 | |||
75fc318da0 | |||
acf71cc2c2 | |||
42efe10473 | |||
b77e72880b | |||
297c1524b4 | |||
6140743769 | |||
d5ca700828 | |||
a7e1fe76c3 | |||
f6c55279d1 | |||
826f4835bb | |||
119a28def1 | |||
c1ffb8bc33 | |||
60cc9d14af | |||
7cf4f8fdaa | |||
1b84e83061 | |||
b0d2ee8760 | |||
2022432d35 | |||
c0ed335d84 | |||
4964562866 | |||
f78dc443ad | |||
56b47db778 | |||
2d4bf17b28 | |||
3b1819c68d | |||
575bbdb53b | |||
2fa7482028 | |||
e5062317e2 | |||
543f4fa3c2 | |||
49cdf69815 | |||
04196a1a19 | |||
b8622b8708 | |||
a2feca0ba3 | |||
ae6c6a75b2 | |||
bd987e9531 | |||
24d69fd820 | |||
9e2fa8d7f1 | |||
74ba2f7283 | |||
7603b5c63f | |||
03566afe66 | |||
3c2e314e2d | |||
1fcf08b5cd | |||
c13db89ed4 | |||
e68ae9e8a6 | |||
fb252d6db3 | |||
df959353d6 | |||
fbc443483d | |||
00f1dbc3dd | |||
c6021ff012 | |||
7a8cfcee35 | |||
c15586a1c4 | |||
be1d124e78 | |||
6fabf84d05 | |||
3299275da2 | |||
5539243bf3 | |||
c3d330f500 | |||
8c9e886136 | |||
cfde9944f8 | |||
b35d778abe | |||
1e9ee81df3 | |||
545d5730b6 | |||
28e645f9ca | |||
5b5c8a4beb | |||
6178be974a | |||
7771c3159b | |||
fc1e9c5d71 | |||
359de5b85e | |||
68dc4904cf | |||
057fd02e26 | |||
5c86ef6682 | |||
7c14bd799f | |||
edac046fcd | |||
8b23b386f7 | |||
e9bed59032 | |||
54077be32c | |||
30ad442dd1 | |||
b0c677d5a7 | |||
abe1b93e3c | |||
fd699cbb73 | |||
6f93ca11de | |||
916663b493 | |||
dbf2cddd87 | |||
d3c248cf5c | |||
bd93a94bb7 | |||
a46836e2a6 | |||
a1d88b4faa | |||
29741c0ec8 | |||
0b5fb92452 | |||
65782e87c1 | |||
6403df3330 | |||
c6a8f5305a | |||
d354e63267 | |||
836b174d15 | |||
4435f25ee6 | |||
4ab4bf4a3a | |||
d2f1d3c86c | |||
98257de005 | |||
5ea5c6ff7d | |||
441324d354 | |||
44f093b2fa | |||
38a16d1ae2 | |||
6b9de40442 | |||
d9c9eb9799 | |||
e88c8eee0f | |||
a6ca843ced | |||
6967a5cc14 | |||
e0ebf70907 | |||
53d0202f3b | |||
8daf38654d | |||
17337440f2 | |||
8e5e79a799 | |||
5c1cf14303 | |||
f2ad796104 | |||
886df69058 | |||
703aa95e60 | |||
7919e14d90 | |||
c8ef191660 | |||
840b656d1c | |||
d28516b6b1 | |||
5797bf549c | |||
e1ea721ea9 | |||
5ed1284baf | |||
e507023a03 | |||
2b328b9bb2 | |||
d155e13399 | |||
6993d4782d | |||
9267efce01 | |||
8c88cec863 | |||
b4b9976567 | |||
3cbd820d9c | |||
edd77b0222 | |||
c0991df9a2 | |||
26921c899e | |||
a1e5912d37 | |||
037f1ec887 | |||
89ab44590b | |||
4a20be8b34 | |||
32a401ba67 | |||
138c01aef8 | |||
3e54bc9c77 | |||
9966fc4651 | |||
c9ed5ec98f | |||
1f4ae5dbfb | |||
d0d3cc8faa | |||
7513ae28f0 | |||
c151c6f55a | |||
d491aeeba6 | |||
ab93d0acea | |||
f40f3f934f | |||
4d57adb393 | |||
e91db18677 | |||
9a88d65ff7 | |||
211d8c7f19 | |||
763cdca114 | |||
0d56d35646 | |||
d1e80cb86a | |||
2e116489c8 | |||
a94daa1216 | |||
ad57d665cc | |||
db2c42f0f4 | |||
b713cf86c7 | |||
11d02ccf44 | |||
54f3c8beac | |||
2ed51bf1f3 | |||
9f859f024c | |||
d47175df8a | |||
d6a80d36b1 | |||
a857e3f31e | |||
918dfb05cd | |||
f22e0c4384 | |||
daa08626ae | |||
45592e6acd | |||
6944eb3392 | |||
85f20aca58 | |||
ca8d8b3587 | |||
74921a0686 | |||
be4296f288 | |||
836de56276 | |||
ef60ac3836 | |||
bdd1ba05e8 | |||
f0a22d5517 | |||
417c8d7874 | |||
5a111cdb2a | |||
ef2f779f71 | |||
f0fd0db7bb | |||
b4ab45d2e7 | |||
73c4bcee30 | |||
d4daf098e1 | |||
95de1fff69 | |||
96480b4382 | |||
14ae553557 | |||
4de809e275 | |||
a383382529 | |||
d2b3061ed9 | |||
073b10929a | |||
6a2cfcab34 | |||
00c85ae7d3 | |||
d1b1e88389 | |||
5679ff5df9 | |||
3f28b39da0 | |||
ee21536742 | |||
6fafeedeb9 | |||
d86c53858e | |||
0a22f80942 | |||
fb247197e8 | |||
261ed05fa3 | |||
f5ce48a7c2 | |||
82d128974c | |||
34ae731959 | |||
030a92d048 | |||
a327358b7a | |||
9bd078d3e9 | |||
412405e22c | |||
2b20b34a74 | |||
f269a07463 | |||
d9948e8ee0 | |||
ddb2fe4b03 | |||
471f7184fb | |||
92ea5da358 | |||
09f1d3ca15 | |||
3729b8eac2 | |||
ca5f345414 | |||
15cf1e8a53 | |||
da74b0ece1 | |||
f50fe6f22f | |||
542eec2a9e | |||
4c5460fc9e | |||
394b8f1ce6 | |||
abeeda1a2b | |||
9e6ea3f486 | |||
2777a0946c | |||
7f43c2659a | |||
a4fa11c881 | |||
8230e51c05 | |||
6e62d4791c | |||
ce8abdb8cd | |||
941bb7edaa | |||
1acbdf8b9e | |||
530804c847 | |||
b00b426e9c | |||
128f1753c0 | |||
1922629d27 | |||
283a03a7cc | |||
cdab26a97b | |||
5d3311c46b | |||
7cbc21671b | |||
d14d820e25 | |||
b567d02df2 | |||
dbb58541f2 | |||
5a42caf4f8 | |||
c2acd010ce | |||
4a8bcc6f71 | |||
89e4dc7a08 | |||
c344eedb12 | |||
0aeb1a62b9 | |||
316e0f5a68 | |||
6f9314f76f | |||
6ef21795ba | |||
e44855493e | |||
101a3c8af5 | |||
8fbbbce4ec | |||
1de8bb850f | |||
25d09186fe | |||
9552b7c6f9 |
14
Oqtane.Client/IconResources.cs
Normal file
14
Oqtane.Client/IconResources.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
namespace Oqtane
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Dummy class used to collect shared resource strings for this application
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// This class is mostly used with IStringLocalizer and IHtmlLocalizer interfaces.
|
||||||
|
/// The class must reside at the project root.
|
||||||
|
/// </remarks>
|
||||||
|
public class IconResources
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
@namespace Oqtane.Installer.Controls
|
@namespace Oqtane.Installer.Controls
|
||||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||||
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="server" HelpText="Enter the database server" ResourceKey="Server">Server:</Label>
|
<Label Class="col-sm-3" For="server" HelpText="Enter the database server" ResourceKey="Server">Server:</Label>
|
||||||
@ -28,7 +29,10 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="pwd" type="password" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
<div class="input-group">
|
||||||
|
<input id="pwd" type="@_passwordType" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="@TogglePassword" tabindex="-1">@_togglePassword</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -38,6 +42,13 @@
|
|||||||
private string _database = "Oqtane-" + DateTime.UtcNow.ToString("yyyyMMddHHmm");
|
private string _database = "Oqtane-" + DateTime.UtcNow.ToString("yyyyMMddHHmm");
|
||||||
private string _uid = String.Empty;
|
private string _uid = String.Empty;
|
||||||
private string _pwd = String.Empty;
|
private string _pwd = String.Empty;
|
||||||
|
private string _passwordType = "password";
|
||||||
|
private string _togglePassword = string.Empty;
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
|
||||||
public string GetConnectionString()
|
public string GetConnectionString()
|
||||||
{
|
{
|
||||||
@ -55,4 +66,18 @@
|
|||||||
|
|
||||||
return connectionString;
|
return connectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TogglePassword()
|
||||||
|
{
|
||||||
|
if (_passwordType == "password")
|
||||||
|
{
|
||||||
|
_passwordType = "text";
|
||||||
|
_togglePassword = SharedLocalizer["HidePassword"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_passwordType = "password";
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
@namespace Oqtane.Installer.Controls
|
@namespace Oqtane.Installer.Controls
|
||||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||||
@inject IStringLocalizer<PostgreSQLConfig> Localizer
|
@inject IStringLocalizer<PostgreSQLConfig> Localizer
|
||||||
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="server" HelpText="Enter the database server" ResourceKey="Server">Server:</Label>
|
<Label Class="col-sm-3" For="server" HelpText="Enter the database server" ResourceKey="Server">Server:</Label>
|
||||||
@ -40,7 +41,10 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="pwd" type="password" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
<div class="input-group">
|
||||||
|
<input id="pwd" type="@_passwordType" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="@TogglePassword" tabindex="-1">@_togglePassword</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@ -52,6 +56,13 @@
|
|||||||
private string _security = "integrated";
|
private string _security = "integrated";
|
||||||
private string _uid = String.Empty;
|
private string _uid = String.Empty;
|
||||||
private string _pwd = String.Empty;
|
private string _pwd = String.Empty;
|
||||||
|
private string _passwordType = "password";
|
||||||
|
private string _togglePassword = string.Empty;
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
|
||||||
public string GetConnectionString()
|
public string GetConnectionString()
|
||||||
{
|
{
|
||||||
@ -80,4 +91,18 @@
|
|||||||
|
|
||||||
return connectionString;
|
return connectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TogglePassword()
|
||||||
|
{
|
||||||
|
if (_passwordType == "password")
|
||||||
|
{
|
||||||
|
_passwordType = "text";
|
||||||
|
_togglePassword = SharedLocalizer["HidePassword"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_passwordType = "password";
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -35,7 +35,10 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
<Label Class="col-sm-3" For="pwd" HelpText="Enter the password to use for the database" ResourceKey="Pwd">Password:</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="pwd" type="password" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
<div class="input-group">
|
||||||
|
<input id="pwd" type="@_passwordType" class="form-control" @bind="@_pwd" autocomplete="new-password" />
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="@TogglePassword" tabindex="-1">@_togglePassword</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@ -67,9 +70,16 @@
|
|||||||
private string _security = "integrated";
|
private string _security = "integrated";
|
||||||
private string _uid = String.Empty;
|
private string _uid = String.Empty;
|
||||||
private string _pwd = String.Empty;
|
private string _pwd = String.Empty;
|
||||||
|
private string _passwordType = "password";
|
||||||
|
private string _togglePassword = string.Empty;
|
||||||
private string _encryption = "false";
|
private string _encryption = "false";
|
||||||
private string _trustservercertificate = "false";
|
private string _trustservercertificate = "false";
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
|
||||||
public string GetConnectionString()
|
public string GetConnectionString()
|
||||||
{
|
{
|
||||||
var connectionString = String.Empty;
|
var connectionString = String.Empty;
|
||||||
@ -92,4 +102,18 @@
|
|||||||
|
|
||||||
return connectionString;
|
return connectionString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TogglePassword()
|
||||||
|
{
|
||||||
|
if (_passwordType == "password")
|
||||||
|
{
|
||||||
|
_passwordType = "text";
|
||||||
|
_togglePassword = SharedLocalizer["HidePassword"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_passwordType = "password";
|
||||||
|
_togglePassword = SharedLocalizer["ShowPassword"];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -12,11 +12,12 @@
|
|||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
{
|
{
|
||||||
string url = NavigateUrl(p.Path);
|
string url = NavigateUrl(p.Path);
|
||||||
<div class="col-md-2 mx-auto text-center mb-3">
|
<p class="col-md-2 mx-auto text-center mb-3">
|
||||||
<NavLink class="nav-link text-primary" href="@url" Match="NavLinkMatch.All">
|
<NavLink class="nav-link text-primary" href="@url" Match="NavLinkMatch.All">
|
||||||
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@SharedLocalizer[p.Name]
|
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>
|
||||||
|
<p class="lead">@((MarkupString)SharedLocalizer[p.Name].ToString().Replace(" ", "<br />"))</p>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</div>
|
</p>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,12 +66,6 @@
|
|||||||
|
|
||||||
public override string Title => "File Management";
|
public override string Title => "File Management";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="imagesizes" HelpText="Enter a list of image sizes which can be generated dynamically from uploaded images (ie. 200x200,x200,200x)" ResourceKey="ImageSizes">Image Sizes: </Label>
|
<Label Class="col-sm-3" For="imagesizes" HelpText="Enter a list of image sizes which can be generated dynamically from uploaded images (ie. 200x200,400x400). Use * to indicate the folder supports all image sizes." ResourceKey="ImageSizes">Image Sizes: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="imagesizes" class="form-control" @bind="@_imagesizes" maxlength="512" />
|
<input id="imagesizes" class="form-control" @bind="@_imagesizes" maxlength="512" />
|
||||||
</div>
|
</div>
|
||||||
@ -67,6 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
@if (!_isSystem)
|
@if (!_isSystem)
|
||||||
{
|
{
|
||||||
@ -79,8 +80,7 @@
|
|||||||
@((MarkupString)" ")
|
@((MarkupString)" ")
|
||||||
<ActionDialog Header="Delete Folder" Message="Are You Sure You Wish To Delete This Folder?" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFolder())" ResourceKey="DeleteFolder" />
|
<ActionDialog Header="Delete Folder" Message="Are You Sure You Wish To Delete This Folder?" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFolder())" ResourceKey="DeleteFolder" />
|
||||||
}
|
}
|
||||||
<br />
|
<br /><br />
|
||||||
<br />
|
|
||||||
@if (PageState.QueryString.ContainsKey("id"))
|
@if (PageState.QueryString.ContainsKey("id"))
|
||||||
{
|
{
|
||||||
<AuditInfo CreatedBy="@_createdBy" CreatedOn="@_createdOn" ModifiedBy="@_modifiedBy" ModifiedOn="@_modifiedOn"></AuditInfo>
|
<AuditInfo CreatedBy="@_createdBy" CreatedOn="@_createdOn" ModifiedBy="@_modifiedBy" ModifiedOn="@_modifiedOn"></AuditInfo>
|
||||||
@ -112,11 +112,6 @@
|
|||||||
|
|
||||||
public override string Title => "Folder Management";
|
public override string Title => "Folder Management";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -8,27 +8,28 @@
|
|||||||
|
|
||||||
@if (_files != null)
|
@if (_files != null)
|
||||||
{
|
{
|
||||||
<div class="container">
|
<div class="row">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="col-md mb-1">
|
||||||
<div class="col-sm-2">
|
<ActionLink Action="Edit" Text="Add Folder" Class="btn btn-secondary" ResourceKey="AddFolder" />
|
||||||
<label class="control-label">@Localizer["Folder"] </label>
|
</div>
|
||||||
</div>
|
<div class="col-md-8 mb-1">
|
||||||
<div class="col-sm-6">
|
<div class="input-group">
|
||||||
|
<span class="input-group-text">@Localizer["Folder"]:</span>
|
||||||
<select class="form-select" @onchange="(e => FolderChanged(e))">
|
<select class="form-select" @onchange="(e => FolderChanged(e))">
|
||||||
@foreach (Folder folder in _folders)
|
@foreach (Folder folder in _folders)
|
||||||
{
|
{
|
||||||
<option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
|
<option value="@(folder.FolderId)">@(new string('-', folder.Level * 2))@(folder.Name)</option>
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<ActionLink Action="Edit" Text="Edit Folder" Class="btn btn-secondary" Parameters="@($"id=" + _folderId.ToString())" ResourceKey="EditFolder" />
|
<ActionLink Action="Edit" Text="Edit Folder" Class="btn btn-secondary" Parameters="@($"id=" + _folderId.ToString())" ResourceKey="EditFolder" />
|
||||||
<ActionLink Action="Edit" Text="Add Folder" Class="btn btn-secondary" ResourceKey="AddFolder" />
|
|
||||||
<ActionLink Action="Add" Text="Upload Files" Parameters="@($"id=" + _folderId.ToString())" ResourceKey="UploadFiles" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md mb-1 text-end">
|
||||||
|
<ActionLink Action="Add" Text="Upload Files" Parameters="@($"id=" + _folderId.ToString())" ResourceKey="UploadFiles" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Pager Items="@_files">
|
|
||||||
|
<Pager Items="@_files" SearchProperties="Name">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<input id="starting" type="date" class="form-control" @bind="@_startDate" />
|
<input id="starting" type="date" class="form-control" @bind="@_startDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input id="starting" type="text" class="form-control" placeholder="hh:mm" @bind="@_startTime" />
|
<input id="starting" type="time" class="form-control" placeholder="hh:mm" @bind="@_startTime" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<input id="ending" type="date" class="form-control" @bind="@_endDate" />
|
<input id="ending" type="date" class="form-control" @bind="@_endDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input id="ending" type="text" class="form-control" placeholder="hh:mm" @bind="@_endTime" />
|
<input id="ending" type="time" class="form-control" placeholder="hh:mm" @bind="@_endTime" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<input id="next" type="date" class="form-control" @bind="@_nextDate" />
|
<input id="next" type="date" class="form-control" @bind="@_nextDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<input id="next" type="text" class="form-control" placeholder="hh:mm" @bind="@_nextTime" />
|
<input id="next" type="time" class="form-control" placeholder="hh:mm" @bind="@_nextTime" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -97,22 +97,22 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private ElementReference form;
|
private ElementReference form;
|
||||||
private bool validated = false;
|
private bool validated = false;
|
||||||
private int _jobId;
|
private int _jobId;
|
||||||
private string _name = string.Empty;
|
private string _name = string.Empty;
|
||||||
private string _jobType = string.Empty;
|
private string _jobType = string.Empty;
|
||||||
private string _isEnabled = "True";
|
private string _isEnabled = "True";
|
||||||
private string _interval = string.Empty;
|
private string _interval = string.Empty;
|
||||||
private string _frequency = string.Empty;
|
private string _frequency = string.Empty;
|
||||||
private DateTime? _startDate = null;
|
private DateTime? _startDate = null;
|
||||||
private string _startTime = string.Empty;
|
private DateTime? _startTime = null;
|
||||||
private DateTime? _endDate = null;
|
private DateTime? _endDate = null;
|
||||||
private string _endTime = string.Empty;
|
private DateTime? _endTime = null;
|
||||||
private string _retentionHistory = string.Empty;
|
private string _retentionHistory = string.Empty;
|
||||||
private DateTime? _nextDate = null;
|
private DateTime? _nextDate = null;
|
||||||
private string _nextTime = string.Empty;
|
private DateTime? _nextTime = null;
|
||||||
private string createdby;
|
private string createdby;
|
||||||
private DateTime createdon;
|
private DateTime createdon;
|
||||||
private string modifiedby;
|
private string modifiedby;
|
||||||
private DateTime modifiedon;
|
private DateTime modifiedon;
|
||||||
@ -132,11 +132,14 @@
|
|||||||
_isEnabled = job.IsEnabled.ToString();
|
_isEnabled = job.IsEnabled.ToString();
|
||||||
_interval = job.Interval.ToString();
|
_interval = job.Interval.ToString();
|
||||||
_frequency = job.Frequency;
|
_frequency = job.Frequency;
|
||||||
(_startDate, _startTime) = Utilities.UtcAsLocalDateAndTime(job.StartDate);
|
_startDate = Utilities.UtcAsLocalDate(job.StartDate);
|
||||||
(_endDate, _endTime) = Utilities.UtcAsLocalDateAndTime(job.EndDate);
|
_startTime = Utilities.UtcAsLocalDateTime(job.StartDate);
|
||||||
_retentionHistory = job.RetentionHistory.ToString();
|
_endDate = Utilities.UtcAsLocalDate(job.EndDate);
|
||||||
(_nextDate, _nextTime) = Utilities.UtcAsLocalDateAndTime(job.NextExecution);
|
_endTime = Utilities.UtcAsLocalDateTime(job.EndDate);
|
||||||
createdby = job.CreatedBy;
|
_retentionHistory = job.RetentionHistory.ToString();
|
||||||
|
_nextDate = Utilities.UtcAsLocalDate(job.NextExecution);
|
||||||
|
_nextTime = Utilities.UtcAsLocalDateTime(job.NextExecution);
|
||||||
|
createdby = job.CreatedBy;
|
||||||
createdon = job.CreatedOn;
|
createdon = job.CreatedOn;
|
||||||
modifiedby = job.ModifiedBy;
|
modifiedby = job.ModifiedBy;
|
||||||
modifiedon = job.ModifiedOn;
|
modifiedon = job.ModifiedOn;
|
||||||
|
@ -15,7 +15,7 @@ else
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<Pager Items="@_jobs">
|
<Pager Items="@_jobs" SearchProperties="Name">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -14,7 +14,7 @@ else
|
|||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Add Language" ResourceKey="AddLanguage" />
|
<ActionLink Action="Add" Text="Add Language" ResourceKey="AddLanguage" />
|
||||||
|
|
||||||
<Pager Items="@_languages">
|
<Pager Items="@_languages" SearchProperties="Name,Code">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>@SharedLocalizer["Name"]</th>
|
<th>@SharedLocalizer["Name"]</th>
|
||||||
@ -146,7 +146,7 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_package = await PackageService.GetPackageAsync(Constants.PackageId + "." + code, version);
|
_package = await PackageService.GetPackageAsync(Constants.PackageId + "." + code, version, false);
|
||||||
if (_package != null)
|
if (_package != null)
|
||||||
{
|
{
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
@ -168,7 +168,7 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(_package.PackageId, _package.Version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(_package.PackageId, _package.Version);
|
||||||
await logger.LogInformation("Language Package {Name} {Version} Downloaded Successfully", _package.PackageId, _package.Version);
|
await logger.LogInformation("Language Package {Name} {Version} Downloaded Successfully", _package.PackageId, _package.Version);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Language.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Language.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
_package = null;
|
_package = null;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IUserService UserService
|
@inject IUserService UserService
|
||||||
|
@inject ISettingService SettingService
|
||||||
@inject IServiceProvider ServiceProvider
|
@inject IServiceProvider ServiceProvider
|
||||||
@inject IStringLocalizer<Index> Localizer
|
@inject IStringLocalizer<Index> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
@ -92,23 +93,23 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
|
||||||
|
|
||||||
if (PageState.Site.Settings.ContainsKey("LoginOptions:AllowSiteLogin") && !string.IsNullOrEmpty(PageState.Site.Settings["LoginOptions:AllowSiteLogin"]))
|
|
||||||
{
|
|
||||||
_allowsitelogin = bool.Parse(PageState.Site.Settings["LoginOptions:AllowSiteLogin"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PageState.Site.Settings.ContainsKey("ExternalLogin:ProviderType") && !string.IsNullOrEmpty(PageState.Site.Settings["ExternalLogin:ProviderType"]))
|
|
||||||
{
|
|
||||||
_allowexternallogin = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PageState.QueryString.ContainsKey("returnurl"))
|
if (PageState.QueryString.ContainsKey("returnurl"))
|
||||||
{
|
{
|
||||||
_returnUrl = PageState.QueryString["returnurl"];
|
_returnUrl = PageState.QueryString["returnurl"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_allowexternallogin = (SettingService.GetSetting(PageState.Site.Settings, "ExternalLogin:ProviderType", "") != "") ? true : false;
|
||||||
|
_allowsitelogin = bool.Parse(SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:AllowSiteLogin", "true"));
|
||||||
|
|
||||||
|
if (_allowexternallogin && !_allowsitelogin)
|
||||||
|
{
|
||||||
|
// redirect to external login
|
||||||
|
NavigationManager.NavigateTo(Utilities.TenantUrl(PageState.Alias, "/pages/external?returnurl=" + _returnUrl), true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
|
|
||||||
if (PageState.QueryString.ContainsKey("name"))
|
if (PageState.QueryString.ContainsKey("name"))
|
||||||
{
|
{
|
||||||
_username = PageState.QueryString["name"];
|
_username = PageState.QueryString["name"];
|
||||||
@ -167,7 +168,7 @@
|
|||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (firstRender && PageState.User == null)
|
if (firstRender && PageState.User == null && _allowsitelogin)
|
||||||
{
|
{
|
||||||
await username.FocusAsync();
|
await username.FocusAsync();
|
||||||
}
|
}
|
||||||
@ -206,8 +207,7 @@
|
|||||||
if (hybrid)
|
if (hybrid)
|
||||||
{
|
{
|
||||||
// hybrid apps utilize an interactive login
|
// hybrid apps utilize an interactive login
|
||||||
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider
|
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
|
||||||
.GetService(typeof(IdentityAuthenticationStateProvider));
|
|
||||||
authstateprovider.NotifyAuthenticationChanged();
|
authstateprovider.NotifyAuthenticationChanged();
|
||||||
NavigationManager.NavigateTo(NavigateUrl(WebUtility.UrlDecode(_returnUrl), true));
|
NavigationManager.NavigateTo(NavigateUrl(WebUtility.UrlDecode(_returnUrl), true));
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((PageState.Site.Settings.ContainsKey("LoginOptions:TwoFactor") && PageState.Site.Settings["LoginOptions:TwoFactor"] == "required") || user.TwoFactorRequired)
|
if (SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:TwoFactor", "false") == "required" || user.TwoFactorRequired)
|
||||||
{
|
{
|
||||||
twofactor = true;
|
twofactor = true;
|
||||||
validated = false;
|
validated = false;
|
||||||
|
@ -1,203 +0,0 @@
|
|||||||
@namespace Oqtane.Modules.Admin.ModuleCreator
|
|
||||||
@inherits ModuleBase
|
|
||||||
@using System.Text.RegularExpressions
|
|
||||||
@inject NavigationManager NavigationManager
|
|
||||||
@inject IModuleDefinitionService ModuleDefinitionService
|
|
||||||
@inject IModuleService ModuleService
|
|
||||||
@inject ISettingService SettingService
|
|
||||||
@inject IStringLocalizer<Index> Localizer
|
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
|
||||||
|
|
||||||
@if (string.IsNullOrEmpty(_moduledefinitionname) && _templates != null)
|
|
||||||
{
|
|
||||||
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="owner" HelpText="Enter the name of the organization who is developing this module. It should not contain spaces or punctuation." ResourceKey="OwnerName">Owner Name: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input id="owner" class="form-control" @bind="@_owner" required />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="module" HelpText="Enter a name for this module. It should not contain spaces or punctuation." ResourceKey="ModuleName">Module Name: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input id="module" class="form-control" @bind="@_module" required />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="description" HelpText="Enter a short description for the module" ResourceKey="Description">Description: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<textarea id="description" class="form-control" @bind="@_description" rows="3" ></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="template" HelpText="Select a module template. Templates are located in the wwwroot/Modules/Templates folder on the server." ResourceKey="Template">Template: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<select id="template" class="form-select" @onchange="(e => TemplateChanged(e))" required>
|
|
||||||
<option value="-"><@Localizer["Template.Select"]></option>
|
|
||||||
@foreach (Template template in _templates)
|
|
||||||
{
|
|
||||||
<option value="@template.Name">@template.Title</option>
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="reference" HelpText="Select a framework reference version" ResourceKey="FrameworkReference">Framework Reference: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<select id="reference" class="form-select" @bind="@_reference" required>
|
|
||||||
@foreach (string version in _versions)
|
|
||||||
{
|
|
||||||
if (Version.Parse(version).CompareTo(Version.Parse(_minversion)) >= 0)
|
|
||||||
{
|
|
||||||
<option value="@(version)">@(version)</option>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
<option value="local">@SharedLocalizer["LocalVersion"]</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@if (!string.IsNullOrEmpty(_location))
|
|
||||||
{
|
|
||||||
<div class="row mb-1 align-items-center">
|
|
||||||
<Label Class="col-sm-3" For="location" HelpText="Location where the module will be created" ResourceKey="Location">Location: </Label>
|
|
||||||
<div class="col-sm-9">
|
|
||||||
<input id="module" class="form-control" @bind="@_location" readonly />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<button type="button" class="btn btn-success" @onclick="CreateModule">@Localizer["Module.Create"]</button>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<button type="button" class="btn btn-success" @onclick="ActivateModule">@Localizer["Module.Activate"]</button>
|
|
||||||
}
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private ElementReference form;
|
|
||||||
private bool validated = false;
|
|
||||||
private string _moduledefinitionname = string.Empty;
|
|
||||||
private string _owner = string.Empty;
|
|
||||||
private string _module = string.Empty;
|
|
||||||
private string _description = string.Empty;
|
|
||||||
private List<Template> _templates;
|
|
||||||
private string _template = "-";
|
|
||||||
private string[] _versions;
|
|
||||||
private string _reference = "local";
|
|
||||||
private string _minversion = "2.0.0";
|
|
||||||
private string _location = string.Empty;
|
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
|
|
||||||
|
|
||||||
protected override void OnInitialized()
|
|
||||||
{
|
|
||||||
_moduledefinitionname = SettingService.GetSetting(ModuleState.Settings, "ModuleDefinitionName", "");
|
|
||||||
if (string.IsNullOrEmpty(_moduledefinitionname))
|
|
||||||
{
|
|
||||||
AddModuleMessage(Localizer["Info.Module.Creator"], MessageType.Info);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddModuleMessage(Localizer["Info.Module.Activate"], MessageType.Info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_templates = await ModuleDefinitionService.GetModuleDefinitionTemplatesAsync();
|
|
||||||
_versions = Constants.ReleaseVersions.Split(',').Where(item => Version.Parse(item).CompareTo(Version.Parse("2.0.0")) >= 0).ToArray();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error Loading Module Creator");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task CreateModule()
|
|
||||||
{
|
|
||||||
validated = true;
|
|
||||||
var interop = new Interop(JSRuntime);
|
|
||||||
if (await interop.FormValid(form))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (IsValid(_owner) && IsValid(_module) && _owner != _module && _template != "-")
|
|
||||||
{
|
|
||||||
var moduleDefinition = new ModuleDefinition { Owner = _owner, Name = _module, Description = _description, Template = _template, Version = _reference };
|
|
||||||
moduleDefinition = await ModuleDefinitionService.CreateModuleDefinitionAsync(moduleDefinition);
|
|
||||||
|
|
||||||
var settings = await SettingService.GetModuleSettingsAsync(ModuleState.ModuleId);
|
|
||||||
settings = SettingService.SetSetting(settings, "ModuleDefinitionName", moduleDefinition.ModuleDefinitionName);
|
|
||||||
await SettingService.UpdateModuleSettingsAsync(settings, ModuleState.ModuleId);
|
|
||||||
|
|
||||||
GetLocation();
|
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Module.Create"], NavigateUrl("admin/system")), MessageType.Success);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddModuleMessage(Localizer["Message.Require.ValidName"], MessageType.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error Creating Module");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task ActivateModule()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(_moduledefinitionname))
|
|
||||||
{
|
|
||||||
Module module = await ModuleService.GetModuleAsync(ModuleState.ModuleId);
|
|
||||||
module.ModuleDefinitionName = _moduledefinitionname;
|
|
||||||
await ModuleService.UpdateModuleAsync(module);
|
|
||||||
NavigationManager.NavigateTo(NavigateUrl(), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error Activating Module");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsValid(string name)
|
|
||||||
{
|
|
||||||
// must contain letters, underscores and digits and first character must be letter or underscore
|
|
||||||
return !string.IsNullOrEmpty(name) && name.ToLower() != "module" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_]*$");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void TemplateChanged(ChangeEventArgs e)
|
|
||||||
{
|
|
||||||
_template = (string)e.Value;
|
|
||||||
_minversion = "2.0.0";
|
|
||||||
if (_template != "-")
|
|
||||||
{
|
|
||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
|
||||||
_minversion = template.Version;
|
|
||||||
}
|
|
||||||
GetLocation();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GetLocation()
|
|
||||||
{
|
|
||||||
_location = string.Empty;
|
|
||||||
if (_owner != "" && _module != "" && _template != "-")
|
|
||||||
{
|
|
||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
|
||||||
_location = template.Location + _owner + ".Module." + _module;
|
|
||||||
|
|
||||||
}
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
using Oqtane.Documentation;
|
|
||||||
using Oqtane.Models;
|
|
||||||
|
|
||||||
namespace Oqtane.Modules.Admin.ModuleCreator
|
|
||||||
{
|
|
||||||
[PrivateApi("Mark this as private, since it's not very useful in the public docs")]
|
|
||||||
public class ModuleInfo : IModule
|
|
||||||
{
|
|
||||||
public ModuleDefinition ModuleDefinition => new ModuleDefinition
|
|
||||||
{
|
|
||||||
Name = "Module Creator",
|
|
||||||
Description = "Enables software developers to quickly create modules by automating many of the initial module creation tasks",
|
|
||||||
Version = "1.0.0",
|
|
||||||
Categories = "Developer"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,7 +8,7 @@
|
|||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
<TabStrip>
|
<TabStrip>
|
||||||
<TabPanel Name="Download" ResourceKey="Download">
|
<TabPanel Name="Download" ResourceKey="Download" Heading="Download">
|
||||||
<div class="row justify-content-center mb-3">
|
<div class="row justify-content-center mb-3">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="form-check form-check-inline">
|
<div class="form-check form-check-inline">
|
||||||
@ -28,6 +28,7 @@
|
|||||||
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
||||||
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
||||||
|
<button type="button" class="btn btn-primary ms-2" @onclick="Refresh"><span class="@Icons.Reload" aria-hidden="true"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +48,10 @@
|
|||||||
<select class="form-select" value="@_sort" @onchange="(e => SortChanged(e))">
|
<select class="form-select" value="@_sort" @onchange="(e => SortChanged(e))">
|
||||||
<option value="popularity">@SharedLocalizer["Search.Popularity"]</option>
|
<option value="popularity">@SharedLocalizer["Search.Popularity"]</option>
|
||||||
<option value="alphabetical">@SharedLocalizer["Search.Alphabetical"]</option>
|
<option value="alphabetical">@SharedLocalizer["Search.Alphabetical"]</option>
|
||||||
<option value="downloads">@SharedLocalizer["Search.Downloads"]</option>
|
@if (_price == "free")
|
||||||
|
{
|
||||||
|
<option value="downloads">@SharedLocalizer["Search.Downloads"]</option>
|
||||||
|
}
|
||||||
<option value="recent">@SharedLocalizer["Search.RecentlyReleased"]</option>
|
<option value="recent">@SharedLocalizer["Search.RecentlyReleased"]</option>
|
||||||
@if (_price == "paid")
|
@if (_price == "paid")
|
||||||
{
|
{
|
||||||
@ -56,29 +60,39 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Pager Format="Grid" Items="@_packages" DisplayPages="1" PageSize="9" Toolbar="Both" Class="container-fluid px-0" RowClass="row g-0" ColumnClass="col-lg-4 col-md-6">
|
<Pager Format="Grid" Items="@_packages" DisplayPages="1" PageSize="9" Toolbar="Both" Class="container-fluid px-0" RowClass="row g-0" ColumnClass="col-lg-4 col-md-6" CurrentPage="@_page.ToString()" OnPageChange="OnPageChange">
|
||||||
<Row>
|
<Row>
|
||||||
<div class="m-2 p-2 d-flex justify-content-center">
|
<div class="m-2 p-2 d-flex justify-content-center">
|
||||||
<div class="container-fluid px-0">
|
<div class="container-fluid px-0">
|
||||||
<div class="row g-0">
|
<div class="row g-0 mb-2">
|
||||||
<div class="col-6">
|
<div class="col-4">
|
||||||
@if (context.LogoFileId != null)
|
<a href="@context.ProductUrl" target="_blank">
|
||||||
|
@if (context.LogoUrl != null)
|
||||||
{
|
{
|
||||||
<img src="@GetLogo(context.LogoFileId.Value)" class="img-fluid" alt="@context.Name" />
|
<img src="@context.LogoUrl" class="img-fluid" alt="@context.Name" />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<img src="/package.png" class="img-fluid" alt="@context.Name" />
|
<img src="/package.png" class="img-fluid" alt="@context.Name" />
|
||||||
}
|
}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-end">
|
<div class="col-8 text-end">
|
||||||
<small>@SharedLocalizer["Search.Version"]:</small> <strong>@context.Version</strong>
|
<small>@SharedLocalizer["Search.Version"]:</small> <strong>@context.Version</strong>
|
||||||
<br /><small>@SharedLocalizer["Search.Downloads"]:</small> <strong>@(String.Format("{0:n0}", context.Downloads))</strong>
|
|
||||||
<br /><small>@SharedLocalizer["Search.Released"]:</small> <strong>@context.ReleaseDate.ToString("MM/dd/yyyy")</strong>
|
<br /><small>@SharedLocalizer["Search.Released"]:</small> <strong>@context.ReleaseDate.ToString("MM/dd/yyyy")</strong>
|
||||||
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
||||||
{
|
{
|
||||||
<br /><small>@SharedLocalizer["Search.Source"]:</small> <strong>@(new Uri(context.PackageUrl).Host)</strong>
|
<br /><small>@SharedLocalizer["Search.Source"]:</small> <strong>@(new Uri(context.PackageUrl).Host)</strong>
|
||||||
}
|
}
|
||||||
|
@if (context.Price == null)
|
||||||
|
{
|
||||||
|
<br /><small>@SharedLocalizer["Search.Downloads"]:</small> <strong>@(String.Format("{0:n0}", context.Downloads))</strong>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<br /><small>@SharedLocalizer["From"]:</small> <strong>@context.Price.Value.ToString("$#,##0.00")</strong>
|
||||||
|
@((MarkupString)(context.TrialPeriod > 0 ? " <strong>(" + context.TrialPeriod + " Day Trial)</strong>" : ""))
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
@ -86,11 +100,6 @@
|
|||||||
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_blank">@context.Name</a></h3><br />
|
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_blank">@context.Name</a></h3><br />
|
||||||
<small>@SharedLocalizer["Search.By"]:</small> <strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
|
<small>@SharedLocalizer["Search.By"]:</small> <strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
|
||||||
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
|
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
|
||||||
@if (context.Price != null && !string.IsNullOrEmpty(context.PaymentUrl))
|
|
||||||
{
|
|
||||||
<small>@SharedLocalizer["Search.Price"]:</small> <strong>@context.Price.Value.ToString("$#,##0.00")</strong>
|
|
||||||
@((MarkupString)(context.TrialPeriod > 0 ? " <strong>(" + context.TrialPeriod + " Day Trial)</strong>" : ""))
|
|
||||||
}
|
|
||||||
<br />
|
<br />
|
||||||
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
||||||
{
|
{
|
||||||
@ -162,6 +171,7 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool _initialized = false;
|
private bool _initialized = false;
|
||||||
|
private int _page = 1;
|
||||||
private List<Package> _packages;
|
private List<Package> _packages;
|
||||||
private string _price = "free";
|
private string _price = "free";
|
||||||
private string _sort = "popularity";
|
private string _sort = "popularity";
|
||||||
@ -208,43 +218,34 @@
|
|||||||
HideProgressIndicator();
|
HideProgressIndicator();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetLogo(int fileid)
|
|
||||||
{
|
|
||||||
var url = ImageUrl(fileid, 100, 100);
|
|
||||||
url = (!string.IsNullOrEmpty(PageState.Alias.Path)) ? url.Substring(PageState.Alias.Path.Length + 1) : url;
|
|
||||||
return Constants.PackageRegistryUrl + url;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void PriceChanged(string price)
|
private async void PriceChanged(string price)
|
||||||
{
|
{
|
||||||
_price = price;
|
_price = price;
|
||||||
|
_sort = "popularity";
|
||||||
await LoadModuleDefinitions();
|
await LoadModuleDefinitions();
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Search()
|
private async Task Search()
|
||||||
{
|
{
|
||||||
try
|
await LoadModuleDefinitions();
|
||||||
{
|
|
||||||
await LoadModuleDefinitions();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error On Search");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Reset()
|
private async Task Reset()
|
||||||
{
|
{
|
||||||
try
|
_page = 1;
|
||||||
{
|
_search = "";
|
||||||
_search = "";
|
await LoadModuleDefinitions();
|
||||||
await LoadModuleDefinitions();
|
}
|
||||||
}
|
|
||||||
catch (Exception ex)
|
private async Task Refresh()
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error On Reset");
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnPageChange(int page)
|
||||||
|
{
|
||||||
|
_page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SortChanged(ChangeEventArgs e)
|
private async void SortChanged(ChangeEventArgs e)
|
||||||
@ -264,7 +265,7 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var package = await PackageService.GetPackageAsync(packageid, version);
|
var package = await PackageService.GetPackageAsync(packageid, version, false);
|
||||||
if (package != null)
|
if (package != null)
|
||||||
{
|
{
|
||||||
_productname = package.Name;
|
_productname = package.Name;
|
||||||
@ -293,7 +294,7 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(_packageid, _packageversion, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(_packageid, _packageversion);
|
||||||
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _packageid, _packageversion);
|
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _packageid, _packageversion);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Module.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Module.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
_productname = "";
|
_productname = "";
|
||||||
|
@ -89,7 +89,10 @@
|
|||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
AddModuleMessage(Localizer["Info.Module.Development"], MessageType.Info);
|
if (!NavigationManager.BaseUri.Contains("localhost:"))
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Info.Module.Development"], MessageType.Info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
@ -115,10 +118,18 @@
|
|||||||
{
|
{
|
||||||
if (IsValid(_owner) && IsValid(_module) && _owner != _module && _template != "-")
|
if (IsValid(_owner) && IsValid(_module) && _owner != _module && _template != "-")
|
||||||
{
|
{
|
||||||
var moduleDefinition = new ModuleDefinition { Owner = _owner, Name = _module, Description = _description, Template = _template, Version = _reference };
|
if (IsValidXML(_description))
|
||||||
moduleDefinition = await ModuleDefinitionService.CreateModuleDefinitionAsync(moduleDefinition);
|
{
|
||||||
GetLocation();
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Module.Create"], NavigateUrl("admin/system")), MessageType.Success);
|
var moduleDefinition = new ModuleDefinition { Owner = _owner, Name = _module, Description = _description, Template = _template, Version = _reference, ModuleDefinitionName = template.Namespace };
|
||||||
|
moduleDefinition = await ModuleDefinitionService.CreateModuleDefinitionAsync(moduleDefinition);
|
||||||
|
GetLocation();
|
||||||
|
AddModuleMessage(string.Format(Localizer["Success.Module.Create"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Require.ValidDescription"], MessageType.Warning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -139,7 +150,13 @@
|
|||||||
private bool IsValid(string name)
|
private bool IsValid(string name)
|
||||||
{
|
{
|
||||||
// must contain letters, underscores and digits and first character must be letter or underscore
|
// must contain letters, underscores and digits and first character must be letter or underscore
|
||||||
return !string.IsNullOrEmpty(name) && name.ToLower() != "module" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_]*$");
|
return !string.IsNullOrEmpty(name) && name.ToLower() != "module" && !name.ToLower().Contains("oqtane") && Regex.IsMatch(name, "^[A-Za-z_][A-Za-z0-9_]*$");
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsValidXML(string description)
|
||||||
|
{
|
||||||
|
// must contain letters, digits, or spaces
|
||||||
|
return Regex.IsMatch(description, "^[A-Za-z0-9 .,!?]+$");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TemplateChanged(ChangeEventArgs e)
|
private void TemplateChanged(ChangeEventArgs e)
|
||||||
@ -151,7 +168,7 @@
|
|||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
_minversion = template.Version;
|
_minversion = template.Version;
|
||||||
}
|
}
|
||||||
GetLocation();
|
GetLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetLocation()
|
private void GetLocation()
|
||||||
@ -160,8 +177,14 @@
|
|||||||
if (_owner != "" && _module != "" && _template != "-")
|
if (_owner != "" && _module != "" && _template != "-")
|
||||||
{
|
{
|
||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
_location = template.Location + _owner + "." + _module;
|
if (!string.IsNullOrEmpty(template.Namespace))
|
||||||
|
{
|
||||||
|
_location = template.Location + template.Namespace.Replace("[Owner]", _owner).Replace("[Module]", _module);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_location = template.Location + _owner + ".Module." + _module;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
@if (_initialized)
|
@if (_initialized)
|
||||||
{
|
{
|
||||||
<TabStrip>
|
<TabStrip>
|
||||||
<TabPanel Name="Definition" ResourceKey="Definition">
|
<TabPanel Name="Definition" ResourceKey="Definition" Heading="Definition">
|
||||||
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -59,9 +59,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="packagename" HelpText="The unique name of the package from which this module was installed" ResourceKey="PackageName">Package Name: </Label>
|
<Label Class="col-sm-3" For="packagename" HelpText="The unique name of the package from which this module was installed. This value must be specified within the module's IModule interface specification." ResourceKey="PackageName">Package Name: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
@if (!string.IsNullOrEmpty(_packagename))
|
||||||
|
{
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
||||||
|
@if (string.IsNullOrEmpty(_packageurl))
|
||||||
|
{
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="ValidatePackage">@Localizer["Validate"]</button>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<a href="@_packageurl" target="_blank" class="btn btn-primary">@SharedLocalizer["Download"]</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -85,13 +102,14 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="license" HelpText="The module license terms" ResourceKey="License">License: </Label>
|
<Label Class="col-sm-3" For="license" HelpText="The module license terms" ResourceKey="License">License: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea id="license" class="form-control" @bind="@_license" rows="5" disabled></textarea>
|
@if (_license.StartsWith("http") || _license.StartsWith("/") || _license.StartsWith("~"))
|
||||||
</div>
|
{
|
||||||
</div>
|
<a href="@_license.Replace("~", PageState?.Alias.BaseUrl + "/Modules/" + Utilities.GetTypeName(_moduledefinitionname))" class="btn btn-info" style="text-decoration: none !important" target="_new">@Localizer["View License"]</a>
|
||||||
<div class="row mb-1 align-items-center">
|
}
|
||||||
<Label Class="col-sm-3" For="runtimes" HelpText="The Blazor runtimes which this module supports" ResourceKey="Runtimes">Runtimes: </Label>
|
else
|
||||||
<div class="col-sm-9">
|
{
|
||||||
<input id="runtimes" class="form-control" @bind="@_runtimes" disabled />
|
<textarea id="license" class="form-control" @bind="@_license" rows="5" disabled></textarea>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -103,7 +121,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
<AuditInfo CreatedBy="@_createdby" CreatedOn="@_createdon" ModifiedBy="@_modifiedby" ModifiedOn="@_modifiedon"></AuditInfo>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Permissions" ResourceKey="Permissions">
|
<TabPanel Name="Permissions" ResourceKey="Permissions" Heading="Permissions">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<PermissionGrid EntityName="@EntityNames.ModuleDefinition" PermissionNames="@PermissionNames.Utilize" PermissionList="@_permissions" @ref="_permissionGrid" />
|
<PermissionGrid EntityName="@EntityNames.ModuleDefinition" PermissionNames="@PermissionNames.Utilize" PermissionList="@_permissions" @ref="_permissionGrid" />
|
||||||
@ -113,7 +131,7 @@
|
|||||||
<button type="button" class="btn btn-success" @onclick="SaveModuleDefinition">@SharedLocalizer["Save"]</button>
|
<button type="button" class="btn btn-success" @onclick="SaveModuleDefinition">@SharedLocalizer["Save"]</button>
|
||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Translations" ResourceKey="Translations">
|
<TabPanel Name="Translations" ResourceKey="Translations" Heading="Translations">
|
||||||
@if (_languages != null && _languages.Count > 0)
|
@if (_languages != null && _languages.Count > 0)
|
||||||
{
|
{
|
||||||
<Pager Items="@_languages">
|
<Pager Items="@_languages">
|
||||||
@ -190,7 +208,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success" @onclick="DownloadPackage">@SharedLocalizer["Accept"]</button>
|
<button type="button" class="btn btn-success" @onclick="DownloadTranslation">@SharedLocalizer["Accept"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="HideModal">@SharedLocalizer["Cancel"]</button>
|
<button type="button" class="btn btn-secondary" @onclick="HideModal">@SharedLocalizer["Cancel"]</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -212,11 +230,11 @@
|
|||||||
private string _moduledefinitionname = "";
|
private string _moduledefinitionname = "";
|
||||||
private string _version;
|
private string _version;
|
||||||
private string _packagename = "";
|
private string _packagename = "";
|
||||||
|
private string _packageurl = "";
|
||||||
private string _owner = "";
|
private string _owner = "";
|
||||||
private string _url = "";
|
private string _url = "";
|
||||||
private string _contact = "";
|
private string _contact = "";
|
||||||
private string _license = "";
|
private string _license = "";
|
||||||
private string _runtimes = "";
|
|
||||||
private List<Permission> _permissions = null;
|
private List<Permission> _permissions = null;
|
||||||
private string _createdby;
|
private string _createdby;
|
||||||
private DateTime _createdon;
|
private DateTime _createdon;
|
||||||
@ -252,7 +270,6 @@
|
|||||||
_url = moduleDefinition.Url;
|
_url = moduleDefinition.Url;
|
||||||
_contact = moduleDefinition.Contact;
|
_contact = moduleDefinition.Contact;
|
||||||
_license = moduleDefinition.License;
|
_license = moduleDefinition.License;
|
||||||
_runtimes = moduleDefinition.Runtimes;
|
|
||||||
_permissions = moduleDefinition.PermissionList;
|
_permissions = moduleDefinition.PermissionList;
|
||||||
_createdby = moduleDefinition.CreatedBy;
|
_createdby = moduleDefinition.CreatedBy;
|
||||||
_createdon = moduleDefinition.CreatedOn;
|
_createdon = moduleDefinition.CreatedOn;
|
||||||
@ -365,7 +382,7 @@
|
|||||||
var version = _packages.Where(item => item.PackageId == packagename).FirstOrDefault().Version;
|
var version = _packages.Where(item => item.PackageId == packagename).FirstOrDefault().Version;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_package = await PackageService.GetPackageAsync(packagename, version);
|
_package = await PackageService.GetPackageAsync(packagename, version, false);
|
||||||
if (_package != null)
|
if (_package != null)
|
||||||
{
|
{
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
@ -376,27 +393,51 @@
|
|||||||
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error Getting Package {PackageId} {Version}", packagename, version);
|
await logger.LogError(ex, "Error Getting Package {PackageId} {Version}", packagename, version);
|
||||||
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task DownloadTranslation()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await PackageService.DownloadPackageAsync(_package.PackageId, _package.Version);
|
||||||
|
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _package.PackageId, _package.Version);
|
||||||
|
AddModuleMessage(string.Format(Localizer["Success.Translation.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
|
_package = null;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Downloading Package {PackageId} {Version}", _packagename, _version);
|
||||||
|
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ValidatePackage()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var package = await PackageService.GetPackageAsync(_packagename, _version, true);
|
||||||
|
if (package == null || string.IsNullOrEmpty(package.PackageUrl))
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Validate"], MessageType.Warning);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_packageurl = package.PackageUrl;
|
||||||
|
AddModuleMessage(Localizer["Message.Download"], MessageType.Info);
|
||||||
|
}
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Downloading Package {PackageId} {Version}", _packagename, _version);
|
||||||
|
AddModuleMessage(Localizer["Error.Validate"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async Task DownloadPackage()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await PackageService.DownloadPackageAsync(_package.PackageId, _package.Version, Constants.PackagesFolder);
|
|
||||||
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _package.PackageId, _package.Version);
|
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Translation.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
|
||||||
_package = null;
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error Downloading Package {PackageId} {Version}", _packagename, _version);
|
|
||||||
AddModuleMessage(Localizer["Error.Translation.Download"], MessageType.Error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Pager Items="@_moduleDefinitions.Where(item => item.Categories.Contains(_category))">
|
<Pager Items="@_moduleDefinitions">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
@ -99,47 +99,57 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private List<ModuleDefinition> _moduleDefinitions;
|
private List<ModuleDefinition> _allModuleDefinitions;
|
||||||
private List<Package> _packages;
|
private List<ModuleDefinition> _moduleDefinitions;
|
||||||
private List<string> _categories = new List<string>();
|
private List<Package> _packages;
|
||||||
private string _category = "Common";
|
private List<string> _categories = new List<string>();
|
||||||
|
private string _category = "Common";
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_moduleDefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
|
_allModuleDefinitions = await ModuleDefinitionService.GetModuleDefinitionsAsync(PageState.Site.SiteId);
|
||||||
_packages = await PackageService.GetPackagesAsync("module");
|
_categories = _allModuleDefinitions.SelectMany(m => m.Categories.Split(',')).Distinct().ToList();
|
||||||
_categories = _moduleDefinitions.SelectMany(m => m.Categories.Split(',')).Distinct().ToList();
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
if (_moduleDefinitions == null)
|
if (_moduleDefinitions == null)
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error Loading Modules {Error}", ex.Message);
|
await logger.LogError(ex, "Error Loading Modules {Error}", ex.Message);
|
||||||
AddModuleMessage(Localizer["Error.Module.Load"], MessageType.Error);
|
AddModuleMessage(Localizer["Error.Module.Load"], MessageType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string PurchaseLink(string packagename)
|
private async Task LoadModuleDefinitions()
|
||||||
{
|
{
|
||||||
string link = "";
|
_moduleDefinitions = _allModuleDefinitions.Where(item => item.Categories.Contains(_category)).ToList();
|
||||||
if (!string.IsNullOrEmpty(packagename) && _packages != null)
|
_packages = await PackageService.GetPackageUpdatesAsync("module");
|
||||||
{
|
}
|
||||||
var package = _packages.Where(item => item.PackageId == packagename).FirstOrDefault();
|
|
||||||
if (package != null)
|
private string PurchaseLink(string packagename)
|
||||||
{
|
{
|
||||||
if (package.ExpiryDate != null && package.ExpiryDate.Value.Date != DateTime.MaxValue.Date)
|
string link = "";
|
||||||
{
|
if (!string.IsNullOrEmpty(packagename) && _packages != null)
|
||||||
link += "<span>" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</span><br />";
|
{
|
||||||
if (!string.IsNullOrEmpty(package.PaymentUrl))
|
var package = _packages.Where(item => item.PackageId == packagename).FirstOrDefault();
|
||||||
{
|
if (package != null)
|
||||||
link += " <a class=\"btn btn-primary\" style=\"text-decoration: none !important\" href=\"" + package.PaymentUrl + "\" target=\"_new\">" + SharedLocalizer["Extend"] + "</a>";
|
{
|
||||||
}
|
if (package.ExpiryDate != null && package.ExpiryDate.Value.Date != DateTime.MaxValue.Date)
|
||||||
}
|
{
|
||||||
|
if (string.IsNullOrEmpty(package.PaymentUrl))
|
||||||
|
{
|
||||||
|
link = "<span>" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</span>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
link = "<a class=\"btn btn-primary\" style=\"text-decoration: none !important\" href=\"" + package.PaymentUrl + "\" target=\"_new\">" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return link;
|
return link;
|
||||||
@ -176,7 +186,7 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(packagename, version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(packagename, version);
|
||||||
await logger.LogInformation("Module Downloaded {ModuleDefinitionName} {Version}", packagename, version);
|
await logger.LogInformation("Module Downloaded {ModuleDefinitionName} {Version}", packagename, version);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Module.Install"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Module.Install"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
}
|
}
|
||||||
@ -202,9 +212,9 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CategoryChanged(ChangeEventArgs e)
|
private async Task CategoryChanged(ChangeEventArgs e)
|
||||||
{
|
{
|
||||||
_category = (string)e.Value;
|
_category = (string)e.Value;
|
||||||
StateHasChanged();
|
await LoadModuleDefinitions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,12 +22,6 @@
|
|||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||||
public override string Title => "Export Content";
|
public override string Title => "Export Content";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task ExportModule()
|
private async Task ExportModule()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -28,11 +28,6 @@
|
|||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||||
public override string Title => "Import Content";
|
public override string Title => "Import Content";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
private async Task ImportModule()
|
private async Task ImportModule()
|
||||||
{
|
{
|
||||||
validated = true;
|
validated = true;
|
||||||
|
@ -26,6 +26,17 @@
|
|||||||
<input id="title" type="text" class="form-control" @bind="@_title" required />
|
<input id="title" type="text" class="form-control" @bind="@_title" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="pane" HelpText="The pane where the module will be displayed" ResourceKey="Pane">Pane: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select class="form-select" @bind="@_pane">
|
||||||
|
@foreach (string pane in PageState.Page.Panes)
|
||||||
|
{
|
||||||
|
<option value="@pane">@pane Pane</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="container" HelpText="Select the module's container" ResourceKey="Container">Container: </Label>
|
<Label Class="col-sm-3" For="container" HelpText="Select the module's container" ResourceKey="Container">Container: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@ -112,6 +123,7 @@
|
|||||||
private List<ThemeControl> _containers = new List<ThemeControl>();
|
private List<ThemeControl> _containers = new List<ThemeControl>();
|
||||||
private string _module;
|
private string _module;
|
||||||
private string _title;
|
private string _title;
|
||||||
|
private string _pane;
|
||||||
private string _containerType;
|
private string _containerType;
|
||||||
private string _allPages = "false";
|
private string _allPages = "false";
|
||||||
private string _permissionNames = "";
|
private string _permissionNames = "";
|
||||||
@ -130,89 +142,86 @@
|
|||||||
private string modifiedby;
|
private string modifiedby;
|
||||||
private DateTime modifiedon;
|
private DateTime modifiedon;
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
_module = ModuleState.ModuleDefinition.Name;
|
_module = ModuleState.ModuleDefinition.Name;
|
||||||
_title = ModuleState.Title;
|
_title = ModuleState.Title;
|
||||||
|
_pane = ModuleState.Pane;
|
||||||
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, PageState.Page.ThemeType);
|
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, PageState.Page.ThemeType);
|
||||||
_containerType = ModuleState.ContainerType;
|
_containerType = ModuleState.ContainerType;
|
||||||
_allPages = ModuleState.AllPages.ToString();
|
_allPages = ModuleState.AllPages.ToString();
|
||||||
_permissions = ModuleState.PermissionList;
|
_permissions = ModuleState.PermissionList;
|
||||||
_pageId = ModuleState.PageId.ToString();
|
_pageId = ModuleState.PageId.ToString();
|
||||||
createdby = ModuleState.CreatedBy;
|
createdby = ModuleState.CreatedBy;
|
||||||
createdon = ModuleState.CreatedOn;
|
createdon = ModuleState.CreatedOn;
|
||||||
modifiedby = ModuleState.ModifiedBy;
|
modifiedby = ModuleState.ModifiedBy;
|
||||||
modifiedon = ModuleState.ModifiedOn;
|
modifiedon = ModuleState.ModifiedOn;
|
||||||
|
|
||||||
if (ModuleState.ModuleDefinition != null)
|
if (ModuleState.ModuleDefinition != null)
|
||||||
{
|
{
|
||||||
_permissionNames = ModuleState.ModuleDefinition?.PermissionNames;
|
_permissionNames = ModuleState.ModuleDefinition?.PermissionNames;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(ModuleState.ModuleDefinition.SettingsType))
|
if (!string.IsNullOrEmpty(ModuleState.ModuleDefinition.SettingsType))
|
||||||
{
|
{
|
||||||
// module settings type explicitly declared in IModule interface
|
// module settings type explicitly declared in IModule interface
|
||||||
_moduleSettingsType = Type.GetType(ModuleState.ModuleDefinition.SettingsType);
|
_moduleSettingsType = Type.GetType(ModuleState.ModuleDefinition.SettingsType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// legacy support - module settings type determined by convention ( ie. existence of a "Settings.razor" component in module )
|
// legacy support - module settings type determined by convention ( ie. existence of a "Settings.razor" component in module )
|
||||||
_moduleSettingsType = Type.GetType(ModuleState.ModuleDefinition.ControlTypeTemplate.Replace(Constants.ActionToken, PageState.Action), false, true);
|
_moduleSettingsType = Type.GetType(ModuleState.ModuleDefinition.ControlTypeTemplate.Replace(Constants.ActionToken, PageState.Action), false, true);
|
||||||
}
|
}
|
||||||
if (_moduleSettingsType != null)
|
if (_moduleSettingsType != null)
|
||||||
{
|
{
|
||||||
var moduleobject = Activator.CreateInstance(_moduleSettingsType) as IModuleControl;
|
var moduleobject = Activator.CreateInstance(_moduleSettingsType) as IModuleControl;
|
||||||
if (!string.IsNullOrEmpty(moduleobject.Title))
|
if (!string.IsNullOrEmpty(moduleobject.Title))
|
||||||
{
|
{
|
||||||
_moduleSettingsTitle = moduleobject.Title;
|
_moduleSettingsTitle = moduleobject.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModuleSettingsComponent = builder =>
|
ModuleSettingsComponent = builder =>
|
||||||
{
|
{
|
||||||
builder.OpenComponent(0, _moduleSettingsType);
|
builder.OpenComponent(0, _moduleSettingsType);
|
||||||
builder.AddComponentReferenceCapture(1, inst => { _moduleSettings = Convert.ChangeType(inst, _moduleSettingsType); });
|
builder.AddComponentReferenceCapture(1, inst => { _moduleSettings = Convert.ChangeType(inst, _moduleSettingsType); });
|
||||||
builder.CloseComponent();
|
builder.CloseComponent();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddModuleMessage(string.Format(Localizer["Error.Module.Load"], ModuleState.ModuleDefinitionName), MessageType.Error);
|
AddModuleMessage(string.Format(Localizer["Error.Module.Load"], ModuleState.ModuleDefinitionName), MessageType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
var theme = PageState.Site.Themes.FirstOrDefault(item => item.Containers.Any(themecontrol => themecontrol.TypeName.Equals(_containerType)));
|
var theme = PageState.Site.Themes.FirstOrDefault(item => item.Containers.Any(themecontrol => themecontrol.TypeName.Equals(_containerType)));
|
||||||
if (theme != null && !string.IsNullOrEmpty(theme.ContainerSettingsType))
|
if (theme != null && !string.IsNullOrEmpty(theme.ContainerSettingsType))
|
||||||
{
|
{
|
||||||
_containerSettingsType = Type.GetType(theme.ContainerSettingsType);
|
_containerSettingsType = Type.GetType(theme.ContainerSettingsType);
|
||||||
if (_containerSettingsType != null)
|
if (_containerSettingsType != null)
|
||||||
{
|
{
|
||||||
ContainerSettingsComponent = builder =>
|
ContainerSettingsComponent = builder =>
|
||||||
{
|
{
|
||||||
builder.OpenComponent(0, _containerSettingsType);
|
builder.OpenComponent(0, _containerSettingsType);
|
||||||
builder.AddComponentReferenceCapture(1, inst => { _containerSettings = Convert.ChangeType(inst, _containerSettingsType); });
|
builder.AddComponentReferenceCapture(1, inst => { _containerSettings = Convert.ChangeType(inst, _containerSettingsType); });
|
||||||
builder.CloseComponent();
|
builder.CloseComponent();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task SaveModule()
|
private async Task SaveModule()
|
||||||
{
|
{
|
||||||
validated = true;
|
validated = true;
|
||||||
var interop = new Interop(JSRuntime);
|
var interop = new Interop(JSRuntime);
|
||||||
if (await interop.FormValid(form))
|
if (await interop.FormValid(form))
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(_title))
|
if (!string.IsNullOrEmpty(_title))
|
||||||
{
|
{
|
||||||
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
var pagemodule = await PageModuleService.GetPageModuleAsync(ModuleState.PageModuleId);
|
||||||
pagemodule.PageId = int.Parse(_pageId);
|
pagemodule.PageId = int.Parse(_pageId);
|
||||||
pagemodule.Title = _title;
|
pagemodule.Title = _title;
|
||||||
pagemodule.ContainerType = (_containerType != "-") ? _containerType : string.Empty;
|
pagemodule.Pane = _pane;
|
||||||
if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Page.DefaultContainerType)
|
pagemodule.ContainerType = (_containerType != "-") ? _containerType : string.Empty;
|
||||||
|
if (!string.IsNullOrEmpty(pagemodule.ContainerType) && pagemodule.ContainerType == PageState.Page.DefaultContainerType)
|
||||||
{
|
{
|
||||||
pagemodule.ContainerType = string.Empty;
|
pagemodule.ContainerType = string.Empty;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
@inject IThemeService ThemeService
|
@inject IThemeService ThemeService
|
||||||
|
@inject ISystemService SystemService
|
||||||
@inject IStringLocalizer<Add> Localizer
|
@inject IStringLocalizer<Add> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
@ -39,9 +40,9 @@
|
|||||||
<Label Class="col-sm-3" For="insert" HelpText="Select the location where you would like the page to be inserted in relation to other pages" ResourceKey="Insert">Insert: </Label>
|
<Label Class="col-sm-3" For="insert" HelpText="Select the location where you would like the page to be inserted in relation to other pages" ResourceKey="Insert">Insert: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select id="insert" class="form-select" @bind="@_insert" required>
|
<select id="insert" class="form-select" @bind="@_insert" required>
|
||||||
<option value="<<">@Localizer["AtBeginning"]</option>
|
|
||||||
@if (_children != null && _children.Count > 0)
|
@if (_children != null && _children.Count > 0)
|
||||||
{
|
{
|
||||||
|
<option value="<<">@Localizer["AtBeginning"]</option>
|
||||||
<option value="<">@Localizer["Before"]</option>
|
<option value="<">@Localizer["Before"]</option>
|
||||||
<option value=">">@Localizer["After"]</option>
|
<option value=">">@Localizer["After"]</option>
|
||||||
}
|
}
|
||||||
@ -111,8 +112,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-8">
|
||||||
<input id="icon" class="form-control" @bind="@_icon" />
|
<InputList Value="@_icon" ValueChanged="IconChanged" DataList="@_icons" ResourceKey="Icon" ResourceType="@_iconresources" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<i class="@_icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -227,6 +231,8 @@
|
|||||||
private RenderFragment ThemeSettingsComponent { get; set; }
|
private RenderFragment ThemeSettingsComponent { get; set; }
|
||||||
private bool _refresh = false;
|
private bool _refresh = false;
|
||||||
protected Page _parent = null;
|
protected Page _parent = null;
|
||||||
|
protected Dictionary<string, string> _icons;
|
||||||
|
private string _iconresources = "";
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
@ -241,6 +247,8 @@
|
|||||||
_parentid = _parent.PageId.ToString();
|
_parentid = _parent.PageId.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_icons = await SystemService.GetIconsAsync();
|
||||||
|
_iconresources = typeof(IconResources).FullName;
|
||||||
|
|
||||||
// if admin or user has edit access to parent page
|
// if admin or user has edit access to parent page
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) || (_parent != null && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, _parent.PermissionList)))
|
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin) || (_parent != null && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, _parent.PermissionList)))
|
||||||
@ -249,7 +257,14 @@
|
|||||||
_themes = ThemeService.GetThemeControls(PageState.Site.Themes);
|
_themes = ThemeService.GetThemeControls(PageState.Site.Themes);
|
||||||
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype);
|
_containers = ThemeService.GetContainerControls(PageState.Site.Themes, _themetype);
|
||||||
_containertype = PageState.Site.DefaultContainerType;
|
_containertype = PageState.Site.DefaultContainerType;
|
||||||
_children = PageState.Pages.Where(item => item.ParentId == null).ToList();
|
_children = new List<Page>();
|
||||||
|
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
|
||||||
|
{
|
||||||
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
|
{
|
||||||
|
_children.Add(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
ThemeSettings();
|
ThemeSettings();
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
@ -271,28 +286,15 @@
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_parentid = (string)e.Value;
|
_parentid = (string)e.Value;
|
||||||
_children = new List<Page>();
|
_children = new List<Page>();
|
||||||
if (_parentid == "-1")
|
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
|
||||||
{
|
{
|
||||||
foreach (Page p in PageState.Pages.Where(item => item.ParentId == null))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
{
|
{
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
_children.Add(p);
|
||||||
{
|
}
|
||||||
_children.Add(p);
|
}
|
||||||
}
|
StateHasChanged();
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (Page p in PageState.Pages.Where(item => item.ParentId == int.Parse(_parentid)))
|
|
||||||
{
|
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
|
||||||
{
|
|
||||||
_children.Add(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -482,4 +484,8 @@
|
|||||||
NavigationManager.NavigateTo(NavigateUrl());
|
NavigationManager.NavigateTo(NavigateUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void IconChanged(string NewIcon)
|
||||||
|
{
|
||||||
|
_icon = NewIcon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
@inject IPageModuleService PageModuleService
|
@inject IPageModuleService PageModuleService
|
||||||
@inject IThemeService ThemeService
|
@inject IThemeService ThemeService
|
||||||
|
@inject ISystemService SystemService
|
||||||
@inject IStringLocalizer<Edit> Localizer
|
@inject IStringLocalizer<Edit> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
@ -47,13 +48,16 @@
|
|||||||
{
|
{
|
||||||
<option value="="><@Localizer["ThisLocation.Keep"]></option>
|
<option value="="><@Localizer["ThisLocation.Keep"]></option>
|
||||||
}
|
}
|
||||||
<option value="<<">@Localizer["ToBeginning"]</option>
|
|
||||||
@if (_children != null && _children.Count > 0)
|
@if (_children != null && _children.Count > 0)
|
||||||
{
|
{
|
||||||
|
<option value="<<">@Localizer["ToBeginning"]</option>
|
||||||
<option value="<">@Localizer["Before"]</option>
|
<option value="<">@Localizer["Before"]</option>
|
||||||
<option value=">">@Localizer["After"]</option>
|
<option value=">">@Localizer["After"]</option>
|
||||||
}
|
}
|
||||||
<option value=">>">@Localizer["ToEnd"]</option>
|
@if (_parentid != _currentparentid)
|
||||||
|
{
|
||||||
|
<option value=">>">@Localizer["ToEnd"]</option>
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
@if (_children != null && _children.Count > 0 && (_insert == "<" || _insert == ">"))
|
@if (_children != null && _children.Count > 0 && (_insert == "<" || _insert == ">"))
|
||||||
{
|
{
|
||||||
@ -123,8 +127,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
<Label Class="col-sm-3" For="icon" HelpText="Optionally provide an icon class name for this page which will be displayed in the site navigation" ResourceKey="Icon">Icon: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-8">
|
||||||
<input id="icon" class="form-control" @bind="@_icon" maxlength="50" />
|
<InputList Value="@_icon" ValueChanged="IconChanged" DataList="@_icons" ResourceKey="Icon" ResourceType="@_iconresources" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<i class="@_icon"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -205,7 +212,7 @@
|
|||||||
<th>@Localizer["ModuleDefinition"]</th>
|
<th>@Localizer["ModuleDefinition"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="Settings" Text="Edit" ModuleId="@context.ModuleId" Security="SecurityAccessLevel.Edit" PermissionList="@context.PermissionList" ResourceKey="ModuleSettings" /></td>
|
<td><ActionLink Action="Settings" Text="Edit" Path="@_actualpath" ModuleId="@context.ModuleId" Security="SecurityAccessLevel.Edit" PermissionList="@context.PermissionList" ResourceKey="ModuleSettings" /></td>
|
||||||
<td><ActionDialog Header="Delete Module" Message="Are You Sure You Wish To Delete This Module?" Action="Delete" Security="SecurityAccessLevel.Edit" PermissionList="@context.PermissionList" Class="btn btn-danger" OnClick="@(async () => await DeleteModule(context))" ResourceKey="DeleteModule" /></td>
|
<td><ActionDialog Header="Delete Module" Message="Are You Sure You Wish To Delete This Module?" Action="Delete" Security="SecurityAccessLevel.Edit" PermissionList="@context.PermissionList" Class="btn btn-danger" OnClick="@(async () => await DeleteModule(context))" ResourceKey="DeleteModule" /></td>
|
||||||
<td>@context.Title</td>
|
<td>@context.Title</td>
|
||||||
<td>@context.ModuleDefinition?.Name</td>
|
<td>@context.ModuleDefinition?.Name</td>
|
||||||
@ -288,6 +295,7 @@
|
|||||||
private int _childid = -1;
|
private int _childid = -1;
|
||||||
private string _isnavigation;
|
private string _isnavigation;
|
||||||
private string _isclickable;
|
private string _isclickable;
|
||||||
|
private string _actualpath;
|
||||||
private string _path;
|
private string _path;
|
||||||
private string _url;
|
private string _url;
|
||||||
private string _ispersonalizable;
|
private string _ispersonalizable;
|
||||||
@ -312,14 +320,17 @@
|
|||||||
private bool _refresh = false;
|
private bool _refresh = false;
|
||||||
protected Page _page = null;
|
protected Page _page = null;
|
||||||
protected Page _parent = null;
|
protected Page _parent = null;
|
||||||
|
protected Dictionary<string, string> _icons;
|
||||||
|
private string _iconresources = "";
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_children = PageState.Pages.Where(item => item.ParentId == null).ToList();
|
|
||||||
_pageId = Int32.Parse(PageState.QueryString["id"]);
|
_pageId = Int32.Parse(PageState.QueryString["id"]);
|
||||||
_page = await PageService.GetPageAsync(_pageId);
|
_page = await PageService.GetPageAsync(_pageId);
|
||||||
|
_icons = await SystemService.GetIconsAsync();
|
||||||
|
_iconresources = Utilities.GetFullTypeName(typeof(IconResources).AssemblyQualifiedName);
|
||||||
|
|
||||||
if (_page != null && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, _page.PermissionList))
|
if (_page != null && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, _page.PermissionList))
|
||||||
{
|
{
|
||||||
@ -333,10 +344,19 @@
|
|||||||
_parentid = _page.ParentId.ToString();
|
_parentid = _page.ParentId.ToString();
|
||||||
_parent = PageState.Pages.FirstOrDefault(item => item.PageId == _page.ParentId);
|
_parent = PageState.Pages.FirstOrDefault(item => item.PageId == _page.ParentId);
|
||||||
}
|
}
|
||||||
|
_children = new List<Page>();
|
||||||
|
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
|
||||||
|
{
|
||||||
|
if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
|
{
|
||||||
|
_children.Add(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
_currentparentid = _parentid;
|
_currentparentid = _parentid;
|
||||||
_isnavigation = _page.IsNavigation.ToString();
|
_isnavigation = _page.IsNavigation.ToString();
|
||||||
_isclickable = _page.IsClickable.ToString();
|
_isclickable = _page.IsClickable.ToString();
|
||||||
_path = _page.Path;
|
_actualpath = _page.Path;
|
||||||
|
_path = _actualpath;
|
||||||
if (string.IsNullOrEmpty(_path))
|
if (string.IsNullOrEmpty(_path))
|
||||||
{
|
{
|
||||||
_path = "/";
|
_path = "/";
|
||||||
@ -355,7 +375,7 @@
|
|||||||
// appearance
|
// appearance
|
||||||
_title = _page.Title;
|
_title = _page.Title;
|
||||||
_themetype = _page.ThemeType;
|
_themetype = _page.ThemeType;
|
||||||
if (string.IsNullOrEmpty(_themetype) || ThemeService.GetTheme(PageState.Site.Themes, _themetype)?.ThemeName != ThemeService.GetTheme(PageState.Site.Themes, PageState.Site.DefaultThemeType)?.ThemeName)
|
if (string.IsNullOrEmpty(_themetype))
|
||||||
{
|
{
|
||||||
_themetype = PageState.Site.DefaultThemeType;
|
_themetype = PageState.Site.DefaultThemeType;
|
||||||
}
|
}
|
||||||
@ -407,34 +427,14 @@
|
|||||||
{
|
{
|
||||||
_parentid = (string)e.Value;
|
_parentid = (string)e.Value;
|
||||||
_children = new List<Page>();
|
_children = new List<Page>();
|
||||||
if (_parentid == "-1")
|
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
|
||||||
{
|
{
|
||||||
foreach (Page p in PageState.Pages.Where(item => item.ParentId == null))
|
if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
{
|
{
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
_children.Add(p);
|
||||||
{
|
|
||||||
_children.Add(p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
_insert = (_parentid == _currentparentid) ? "=" : ">>";
|
||||||
{
|
|
||||||
foreach (Page p in PageState.Pages.Where(item => item.ParentId == int.Parse(_parentid)))
|
|
||||||
{
|
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
|
||||||
{
|
|
||||||
_children.Add(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_parentid == _currentparentid)
|
|
||||||
{
|
|
||||||
_insert = "=";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_insert = ">>";
|
|
||||||
}
|
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@ -660,4 +660,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void IconChanged(string NewIcon)
|
||||||
|
{
|
||||||
|
_icon = NewIcon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Add Page" ResourceKey="AddPage" />
|
<ActionLink Action="Add" Text="Add Page" ResourceKey="AddPage" />
|
||||||
|
|
||||||
<Pager Items="@PageState.Pages.Where(item => !item.IsDeleted)">
|
<Pager Items="@PageState.Pages.Where(item => !item.IsDeleted)" SearchProperties="Name">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="description" HelpText="The help text displayed to the user for this profile item" ResourceKey="Description">Description: </Label>
|
<Label Class="col-sm-3" For="description" HelpText="The help text displayed to the user for this profile item" ResourceKey="Description">Description: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea id="description" class="form-control" @bind="@_description" rows="5" maxlength="256" required ></textarea>
|
<textarea id="description" class="form-control" @bind="@_description" rows="3" maxlength="256" required ></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -43,6 +43,12 @@
|
|||||||
<input id="length" class="form-control" @bind="@_maxlength" maxlength="4" required />
|
<input id="length" class="form-control" @bind="@_maxlength" maxlength="4" required />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="rows" HelpText="The number of rows for text entry (one is the default)" ResourceKey="Rows">Rows: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="rows" class="form-control" @bind="@_rows" maxlength="2" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="defaultVal" HelpText="The default value for this profile item" ResourceKey="DefaultValue">Default Value: </Label>
|
<Label Class="col-sm-3" For="defaultVal" HelpText="The default value for this profile item" ResourceKey="DefaultValue">Default Value: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@ -101,6 +107,7 @@
|
|||||||
private string _category = string.Empty;
|
private string _category = string.Empty;
|
||||||
private string _vieworder = "0";
|
private string _vieworder = "0";
|
||||||
private string _maxlength = "0";
|
private string _maxlength = "0";
|
||||||
|
private string _rows = "1";
|
||||||
private string _defaultvalue = string.Empty;
|
private string _defaultvalue = string.Empty;
|
||||||
private string _options = string.Empty;
|
private string _options = string.Empty;
|
||||||
private string _validation = string.Empty;
|
private string _validation = string.Empty;
|
||||||
@ -131,6 +138,7 @@
|
|||||||
_category = profile.Category;
|
_category = profile.Category;
|
||||||
_vieworder = profile.ViewOrder.ToString();
|
_vieworder = profile.ViewOrder.ToString();
|
||||||
_maxlength = profile.MaxLength.ToString();
|
_maxlength = profile.MaxLength.ToString();
|
||||||
|
_rows = profile.Rows.ToString();
|
||||||
_defaultvalue = profile.DefaultValue;
|
_defaultvalue = profile.DefaultValue;
|
||||||
_options = profile.Options;
|
_options = profile.Options;
|
||||||
_validation = profile.Validation;
|
_validation = profile.Validation;
|
||||||
@ -175,6 +183,7 @@
|
|||||||
profile.Category = _category;
|
profile.Category = _category;
|
||||||
profile.ViewOrder = int.Parse(_vieworder);
|
profile.ViewOrder = int.Parse(_vieworder);
|
||||||
profile.MaxLength = int.Parse(_maxlength);
|
profile.MaxLength = int.Parse(_maxlength);
|
||||||
|
profile.Rows = int.Parse(_rows);
|
||||||
profile.DefaultValue = _defaultvalue;
|
profile.DefaultValue = _defaultvalue;
|
||||||
profile.Options = _options;
|
profile.Options = _options;
|
||||||
profile.Validation = _validation;
|
profile.Validation = _validation;
|
||||||
|
@ -12,16 +12,22 @@ else
|
|||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Add Profile" Security="SecurityAccessLevel.Edit" ResourceKey="AddProfile" />
|
<ActionLink Action="Add" Text="Add Profile" Security="SecurityAccessLevel.Edit" ResourceKey="AddProfile" />
|
||||||
|
|
||||||
<Pager Items="@_profiles">
|
<Pager Items="@_profiles" SearchProperties="Title,Category">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>@SharedLocalizer["Name"]</th>
|
<th>@SharedLocalizer["Name"]</th>
|
||||||
|
<th>@Localizer["Title"]</th>
|
||||||
|
<th>@Localizer["Category"]</th>
|
||||||
|
<th>@Localizer["Order"]</th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.ProfileId.ToString())" Security="SecurityAccessLevel.Edit" ResourceKey="EditProfile" /></td>
|
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.ProfileId.ToString())" Security="SecurityAccessLevel.Edit" ResourceKey="EditProfile" /></td>
|
||||||
<td><ActionDialog Header="Delete Profile" Message="@string.Format(Localizer["Confirm.Profile.Delete"], context.Name)" Action="Delete" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(async () => await DeleteProfile(context.ProfileId))" ResourceKey="DeleteProfile" /></td>
|
<td><ActionDialog Header="Delete Profile" Message="@string.Format(Localizer["Confirm.Profile.Delete"], context.Name)" Action="Delete" Security="SecurityAccessLevel.Edit" Class="btn btn-danger" OnClick="@(async () => await DeleteProfile(context.ProfileId))" ResourceKey="DeleteProfile" /></td>
|
||||||
<td>@context.Name</td>
|
<td>@context.Name</td>
|
||||||
|
<td>@context.Title</td>
|
||||||
|
<td>@context.Category</td>
|
||||||
|
<td>@context.ViewOrder</td>
|
||||||
</Row>
|
</Row>
|
||||||
</Pager>
|
</Pager>
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<ModuleMessage Message="@Localizer["Info.Registration.Exists"]" Type="MessageType.Info" />
|
<ModuleMessage Message="@Localizer["Info.Registration.Exists"]" Type="MessageType.Info" />
|
||||||
</Authorized>
|
</Authorized>
|
||||||
<NotAuthorized>
|
<NotAuthorized>
|
||||||
<ModuleMessage Message="@_passwordconstruction" Type="MessageType.Info" />
|
<ModuleMessage Message="@_passwordrequirements" Type="MessageType.Info" />
|
||||||
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -69,6 +69,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private string _passwordrequirements;
|
||||||
private string _username = string.Empty;
|
private string _username = string.Empty;
|
||||||
private ElementReference form;
|
private ElementReference form;
|
||||||
private bool validated = false;
|
private bool validated = false;
|
||||||
@ -79,44 +80,16 @@ else
|
|||||||
private string _email = string.Empty;
|
private string _email = string.Empty;
|
||||||
private string _displayname = string.Empty;
|
private string _displayname = string.Empty;
|
||||||
|
|
||||||
//Password construction
|
|
||||||
private string _minimumlength;
|
|
||||||
private string _uniquecharacters;
|
|
||||||
private bool _requiredigit;
|
|
||||||
private bool _requireupper;
|
|
||||||
private bool _requirelower;
|
|
||||||
private bool _requirepunctuation;
|
|
||||||
private string _passwordconstruction;
|
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
|
_passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId);
|
||||||
|
|
||||||
_minimumlength = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredLength", "6");
|
|
||||||
_uniquecharacters = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredUniqueChars", "1");
|
|
||||||
_requiredigit = bool.Parse(SettingService.GetSetting(settings, "IdentityOptions:Password:RequireDigit", "true"));
|
|
||||||
_requireupper = bool.Parse(SettingService.GetSetting(settings, "IdentityOptions:Password:RequireUppercase", "true"));
|
|
||||||
_requirelower = bool.Parse(SettingService.GetSetting(settings, "IdentityOptions:Password:RequireLowercase", "true"));
|
|
||||||
_requirepunctuation = bool.Parse(SettingService.GetSetting(settings, "IdentityOptions:Password:RequireNonAlphanumeric", "true"));
|
|
||||||
|
|
||||||
// Replace the placeholders with the actual values of the variables
|
|
||||||
string digitRequirement = _requiredigit ? Localizer["Password.DigitRequirement"] + ", " : "";
|
|
||||||
string uppercaseRequirement = _requireupper ? Localizer["Password.UppercaseRequirement"] + ", " : "";
|
|
||||||
string lowercaseRequirement = _requirelower ? Localizer["Password.LowercaseRequirement"] + ", " : "";
|
|
||||||
string punctuationRequirement = _requirepunctuation ? Localizer["Password.PunctuationRequirement"] + ", " : "";
|
|
||||||
|
|
||||||
// Replace the placeholders with the actual values of the variables
|
|
||||||
string passwordValidationCriteriaTemplate = Localizer["Password.ValidationCriteria"];
|
|
||||||
_passwordconstruction = Localizer["Info.Registration.InvalidEmail"] + ". " + string.Format(passwordValidationCriteriaTemplate,
|
|
||||||
_minimumlength, _uniquecharacters, digitRequirement, uppercaseRequirement, lowercaseRequirement, punctuationRequirement);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Register()
|
private async Task Register()
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
<form @ref="form" class="@(validated ? "was-validated" : "needs-validation")" novalidate>
|
||||||
|
<ModuleMessage Message="@_passwordrequirements" Type="MessageType.Info" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="username" HelpText="Your username will be populated from the link you received in the password reset notification" ResourceKey="Username">Username: </Label>
|
<Label Class="col-sm-3" For="username" HelpText="Your username will be populated from the link you received in the password reset notification" ResourceKey="Username">Username: </Label>
|
||||||
@ -45,12 +46,14 @@
|
|||||||
private string _passwordtype = "password";
|
private string _passwordtype = "password";
|
||||||
private string _togglepassword = string.Empty;
|
private string _togglepassword = string.Empty;
|
||||||
private string _confirm = string.Empty;
|
private string _confirm = string.Empty;
|
||||||
|
private string _passwordrequirements;
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
|
_passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId);
|
||||||
|
|
||||||
if (PageState.QueryString.ContainsKey("name") && PageState.QueryString.ContainsKey("token"))
|
if (PageState.QueryString.ContainsKey("name") && PageState.QueryString.ContainsKey("token"))
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ else
|
|||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Add Role" Security="SecurityAccessLevel.Edit" ResourceKey="AddRole" />
|
<ActionLink Action="Add" Text="Add Role" Security="SecurityAccessLevel.Edit" ResourceKey="AddRole" />
|
||||||
|
|
||||||
<Pager Items="@_roles">
|
<Pager Items="@_roles" SearchProperties="Name">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -49,9 +49,18 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="sitemap" HelpText="The site map url for this site which can be submitted to search engines for indexing" ResourceKey="SiteMap">Site Map: </Label>
|
<Label Class="col-sm-3" For="sitemap" HelpText="The site map url for this site which can be submitted to search engines for indexing" ResourceKey="SiteMap">Site Map: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="sitemap" class="form-control" @bind="@_sitemap" required disabled />
|
<div class="input-group">
|
||||||
</div>
|
<input id="sitemap" class="form-control" @bind="@_sitemap" disabled />
|
||||||
|
<a href="@_sitemap" class="btn btn-secondary" target="_new">@Localizer["Browse"]</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="siteguid" HelpText="The Unique Identifier For The Site" ResourceKey="SiteGuid">ID: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="siteguid" class="form-control" @bind="@_siteguid" required disabled />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="version" HelpText="The site version (for site content migrations)" ResourceKey="Version">Version: </Label>
|
<Label Class="col-sm-3" For="version" HelpText="The site version (for site content migrations)" ResourceKey="Version">Version: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@ -257,7 +266,7 @@
|
|||||||
<td>
|
<td>
|
||||||
@if (_aliasid == -1)
|
@if (_aliasid == -1)
|
||||||
{
|
{
|
||||||
<ActionDialog Action="Delete" OnClick="@(async () => await DeleteAlias(context))" ResourceKey="DeleteModule" Class="btn btn-danger" Header="Delete Alias" Message="@string.Format(Localizer["Confirm.Alias.Delete", context.Name])" />
|
<ActionDialog Action="Delete" OnClick="@(async () => await DeleteAlias(context))" ResourceKey="DeleteAlias" Class="btn btn-danger" Header="Delete Alias" Message="@string.Format(Localizer["Confirm.Alias.Delete", context.Name])" />
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>@context.Name</td>
|
<td>@context.Name</td>
|
||||||
@ -348,6 +357,7 @@
|
|||||||
private string _homepageid = "-";
|
private string _homepageid = "-";
|
||||||
private string _isdeleted;
|
private string _isdeleted;
|
||||||
private string _sitemap = "";
|
private string _sitemap = "";
|
||||||
|
private string _siteguid = "";
|
||||||
private string _version = "";
|
private string _version = "";
|
||||||
private int _logofileid = -1;
|
private int _logofileid = -1;
|
||||||
private FileManager _logofilemanager;
|
private FileManager _logofilemanager;
|
||||||
@ -406,6 +416,7 @@
|
|||||||
}
|
}
|
||||||
_isdeleted = site.IsDeleted.ToString();
|
_isdeleted = site.IsDeleted.ToString();
|
||||||
_sitemap = PageState.Alias.Protocol + PageState.Alias.Name + "/pages/sitemap.xml";
|
_sitemap = PageState.Alias.Protocol + PageState.Alias.Name + "/pages/sitemap.xml";
|
||||||
|
_siteguid = site.SiteGuid;
|
||||||
_version = site.Version;
|
_version = site.Version;
|
||||||
|
|
||||||
// appearance
|
// appearance
|
||||||
@ -602,7 +613,7 @@
|
|||||||
|
|
||||||
// SMTP
|
// SMTP
|
||||||
var settings = await SettingService.GetSiteSettingsAsync(site.SiteId);
|
var settings = await SettingService.GetSiteSettingsAsync(site.SiteId);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
|
settings = SettingService.SetSetting(settings, "SMTPHost", _smtphost, true);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
|
settings = SettingService.SetSetting(settings, "SMTPPort", _smtpport, true);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
|
settings = SettingService.SetSetting(settings, "SMTPSSL", _smtpssl, true);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
|
settings = SettingService.SetSetting(settings, "SMTPUsername", _smtpusername, true);
|
||||||
@ -610,6 +621,7 @@
|
|||||||
settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
|
settings = SettingService.SetSetting(settings, "SMTPSender", _smtpsender, true);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
|
settings = SettingService.SetSetting(settings, "SMTPRelay", _smtprelay, true);
|
||||||
settings = SettingService.SetSetting(settings, "SMTPEnabled", _smtpenabled, true);
|
settings = SettingService.SetSetting(settings, "SMTPEnabled", _smtpenabled, true);
|
||||||
|
settings = SettingService.SetSetting(settings, "SiteGuid", _siteguid, true);
|
||||||
settings = SettingService.SetSetting(settings, "NotificationRetention", _retention, true);
|
settings = SettingService.SetSetting(settings, "NotificationRetention", _retention, true);
|
||||||
await SettingService.UpdateSiteSettingsAsync(settings, site.SiteId);
|
await SettingService.UpdateSiteSettingsAsync(settings, site.SiteId);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ else
|
|||||||
{
|
{
|
||||||
<ActionLink Action="Add" Text="Add Site" ResourceKey="AddSite" />
|
<ActionLink Action="Add" Text="Add Site" ResourceKey="AddSite" />
|
||||||
|
|
||||||
<Pager Items="@_sites">
|
<Pager Items="@_sites" SearchProperties="Name">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -133,12 +133,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="packageservice" HelpText="Specify If The Package Service Is Enabled For Installing Modules, Themes, And Translations" ResourceKey="PackageService">Enable Package Service? </Label>
|
<Label Class="col-sm-3" For="packageregistryurl" HelpText="Specify The Package Manager Service For Installing Modules, Themes, And Translations. If This Field Is Blank It Means The Package Manager Service Is Disabled For This Installation." ResourceKey="PackageManager">Package Manager: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select id="packageservice" class="form-select" @bind="@_packageservice">
|
<input id="packageregistryurl" class="form-control" @bind="@_packageregistryurl" />
|
||||||
<option value="true">@SharedLocalizer["True"]</option>
|
|
||||||
<option value="false">@SharedLocalizer["False"]</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -182,7 +179,7 @@
|
|||||||
private string _logginglevel = string.Empty;
|
private string _logginglevel = string.Empty;
|
||||||
private string _notificationlevel = string.Empty;
|
private string _notificationlevel = string.Empty;
|
||||||
private string _swagger = string.Empty;
|
private string _swagger = string.Empty;
|
||||||
private string _packageservice = string.Empty;
|
private string _packageregistryurl = string.Empty;
|
||||||
|
|
||||||
private string _log = string.Empty;
|
private string _log = string.Empty;
|
||||||
|
|
||||||
@ -213,7 +210,7 @@
|
|||||||
_logginglevel = systeminfo["Logging:LogLevel:Default"].ToString();
|
_logginglevel = systeminfo["Logging:LogLevel:Default"].ToString();
|
||||||
_notificationlevel = systeminfo["Logging:LogLevel:Notify"].ToString();
|
_notificationlevel = systeminfo["Logging:LogLevel:Notify"].ToString();
|
||||||
_swagger = systeminfo["UseSwagger"].ToString();
|
_swagger = systeminfo["UseSwagger"].ToString();
|
||||||
_packageservice = systeminfo["PackageService"].ToString();
|
_packageregistryurl = systeminfo["PackageRegistryUrl"].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
systeminfo = await SystemService.GetSystemInfoAsync("log");
|
systeminfo = await SystemService.GetSystemInfoAsync("log");
|
||||||
@ -232,7 +229,7 @@
|
|||||||
settings.Add("Logging:LogLevel:Default", _logginglevel);
|
settings.Add("Logging:LogLevel:Default", _logginglevel);
|
||||||
settings.Add("Logging:LogLevel:Notify", _notificationlevel);
|
settings.Add("Logging:LogLevel:Notify", _notificationlevel);
|
||||||
settings.Add("UseSwagger", _swagger);
|
settings.Add("UseSwagger", _swagger);
|
||||||
settings.Add("PackageService", _packageservice);
|
settings.Add("PackageRegistryUrl", _packageregistryurl);
|
||||||
await SystemService.UpdateSystemInfoAsync(settings);
|
await SystemService.UpdateSystemInfoAsync(settings);
|
||||||
AddModuleMessage(Localizer["Success.UpdateConfig.Restart"], MessageType.Success);
|
AddModuleMessage(Localizer["Success.UpdateConfig.Restart"], MessageType.Success);
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,11 @@
|
|||||||
<div class="row justify-content-center mb-3">
|
<div class="row justify-content-center mb-3">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Product</span>
|
<span class="input-group-text">@Localizer["Product"]</span>
|
||||||
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
<input id="search" class="form-control" placeholder="@SharedLocalizer["Search.Hint"]" @bind="@_search" />
|
||||||
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
||||||
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
||||||
|
<button type="button" class="btn btn-primary ms-2" @onclick="Refresh"><span class="@Icons.Reload" aria-hidden="true"></span></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -47,7 +48,10 @@
|
|||||||
<select class="form-select" value="@_sort" @onchange="(e => SortChanged(e))">
|
<select class="form-select" value="@_sort" @onchange="(e => SortChanged(e))">
|
||||||
<option value="popularity">@SharedLocalizer["Search.Popularity"]</option>
|
<option value="popularity">@SharedLocalizer["Search.Popularity"]</option>
|
||||||
<option value="alphabetical">@SharedLocalizer["Search.Alphabetical"]</option>
|
<option value="alphabetical">@SharedLocalizer["Search.Alphabetical"]</option>
|
||||||
<option value="downloads">@SharedLocalizer["Search.Downloads"]</option>
|
@if (_price == "free")
|
||||||
|
{
|
||||||
|
<option value="downloads">@SharedLocalizer["Search.Downloads"]</option>
|
||||||
|
}
|
||||||
<option value="recent">@SharedLocalizer["Search.RecentlyReleased"]</option>
|
<option value="recent">@SharedLocalizer["Search.RecentlyReleased"]</option>
|
||||||
@if (_price == "paid")
|
@if (_price == "paid")
|
||||||
{
|
{
|
||||||
@ -60,26 +64,34 @@
|
|||||||
<Row>
|
<Row>
|
||||||
<div class="m-2 p-2 d-flex justify-content-center">
|
<div class="m-2 p-2 d-flex justify-content-center">
|
||||||
<div class="container-fluid px-0">
|
<div class="container-fluid px-0">
|
||||||
<div class="row g-0">
|
<div class="row g-0 mb-2">
|
||||||
<div class="col-6">
|
<div class="col-4">
|
||||||
@if (context.LogoFileId != null)
|
<a href="@context.ProductUrl" target="_blank">
|
||||||
|
@if (context.LogoUrl != null)
|
||||||
{
|
{
|
||||||
<img src="@GetLogo(context.LogoFileId.Value)" class="img-fluid" alt="@context.Name" />
|
<img src="@context.LogoUrl" class="img-fluid" alt="@context.Name" />
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<img src="/package.png" class="img-fluid" alt="@context.Name" />
|
<img src="/package.png" class="img-fluid" alt="@context.Name" />
|
||||||
}
|
}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 text-end">
|
<div class="col-8 text-end">
|
||||||
<small>@SharedLocalizer["Search.Version"]:</small> <strong>@context.Version</strong>
|
<small>@SharedLocalizer["Search.Version"]:</small> <strong>@context.Version</strong>
|
||||||
<br /><small>@SharedLocalizer["Search.Downloads"]:</small> <strong>@(String.Format("{0:n0}", context.Downloads))</strong>
|
|
||||||
<br /><small>@SharedLocalizer["Search.Released"]:</small> <strong>@context.ReleaseDate.ToString("MM/dd/yyyy")</strong>
|
<br /><small>@SharedLocalizer["Search.Released"]:</small> <strong>@context.ReleaseDate.ToString("MM/dd/yyyy")</strong>
|
||||||
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
||||||
{
|
{
|
||||||
<br />
|
<br /><small>@SharedLocalizer["Search.Source"]:</small> <strong>@(new Uri(context.PackageUrl).Host)</strong>
|
||||||
|
}
|
||||||
<small>@SharedLocalizer["Search.Source"]:</small> <strong>@(new Uri(context.PackageUrl).Host)</strong>
|
@if (context.Price == null)
|
||||||
|
{
|
||||||
|
<br /><small>@SharedLocalizer["Search.Downloads"]:</small> <strong>@(String.Format("{0:n0}", context.Downloads))</strong>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<br /><small>@SharedLocalizer["From"]:</small> <strong>@context.Price.Value.ToString("$#,##0.00")</strong>
|
||||||
|
@((MarkupString)(context.TrialPeriod > 0 ? " <strong>(" + context.TrialPeriod + " Day Trial)</strong>" : ""))
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -88,11 +100,6 @@
|
|||||||
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_blank">@context.Name</a></h3><br />
|
<h3 style="display: inline;"><a href="@context.ProductUrl" target="_blank">@context.Name</a></h3><br />
|
||||||
<small>@SharedLocalizer["Search.By"]:</small> <strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
|
<small>@SharedLocalizer["Search.By"]:</small> <strong><a href="@context.OwnerUrl" target="new">@context.Owner</a></strong><br />
|
||||||
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
|
@(context.Description.Length > 400 ? (context.Description.Substring(0, 400) + "...") : context.Description)<br />
|
||||||
@if (context.Price != null && !string.IsNullOrEmpty(context.PaymentUrl))
|
|
||||||
{
|
|
||||||
<small>@SharedLocalizer["Search.Price"]:</small> <strong>@context.Price.Value.ToString("$#,##0.00")</strong>
|
|
||||||
@((MarkupString)(context.TrialPeriod > 0 ? " <strong>(" + context.TrialPeriod + " Day Trial)</strong>" : ""))
|
|
||||||
}
|
|
||||||
<br />
|
<br />
|
||||||
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
@if (!string.IsNullOrEmpty(context.PackageUrl))
|
||||||
{
|
{
|
||||||
@ -164,6 +171,7 @@
|
|||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool _initialized = false;
|
private bool _initialized = false;
|
||||||
|
private int _page = 1;
|
||||||
private List<Package> _packages;
|
private List<Package> _packages;
|
||||||
private string _price = "free";
|
private string _price = "free";
|
||||||
private string _sort = "popularity";
|
private string _sort = "popularity";
|
||||||
@ -210,43 +218,34 @@
|
|||||||
HideProgressIndicator();
|
HideProgressIndicator();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetLogo(int fileid)
|
|
||||||
{
|
|
||||||
var url = ImageUrl(fileid, 100, 100);
|
|
||||||
url = (!string.IsNullOrEmpty(PageState.Alias.Path)) ? url.Substring(PageState.Alias.Path.Length + 1) : url;
|
|
||||||
return Constants.PackageRegistryUrl + url;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void PriceChanged(string price)
|
private async void PriceChanged(string price)
|
||||||
{
|
{
|
||||||
_price = price;
|
_price = price;
|
||||||
|
_sort = "popularity";
|
||||||
await LoadThemes();
|
await LoadThemes();
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Search()
|
private async Task Search()
|
||||||
{
|
{
|
||||||
try
|
await LoadThemes();
|
||||||
{
|
|
||||||
await LoadThemes();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
await logger.LogError(ex, "Error On Search");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Reset()
|
private async Task Reset()
|
||||||
{
|
{
|
||||||
try
|
_page = 1;
|
||||||
{
|
_search = "";
|
||||||
_search = "";
|
await LoadThemes();
|
||||||
await LoadThemes();
|
}
|
||||||
}
|
|
||||||
catch (Exception ex)
|
private async Task Refresh()
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error On Reset");
|
await LoadThemes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnPageChange(int page)
|
||||||
|
{
|
||||||
|
_page = page;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void SortChanged(ChangeEventArgs e)
|
private async void SortChanged(ChangeEventArgs e)
|
||||||
@ -266,7 +265,7 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var package = await PackageService.GetPackageAsync(packageid, version);
|
var package = await PackageService.GetPackageAsync(packageid, version, false);
|
||||||
if (package != null)
|
if (package != null)
|
||||||
{
|
{
|
||||||
_productname = package.Name;
|
_productname = package.Name;
|
||||||
@ -295,7 +294,7 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(_packageid, _version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(_packageid, _version);
|
||||||
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _packageid, _version);
|
await logger.LogInformation("Package {PackageId} {Version} Downloaded Successfully", _packageid, _version);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Theme.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Theme.Download"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
_productname = "";
|
_productname = "";
|
||||||
|
@ -80,7 +80,10 @@
|
|||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
AddModuleMessage(Localizer["Info.Theme.CreatorIntent"], MessageType.Info);
|
if (!NavigationManager.BaseUri.Contains("localhost:"))
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Info.Theme.CreatorIntent"], MessageType.Info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
@ -102,7 +105,8 @@
|
|||||||
{
|
{
|
||||||
if (IsValid(_owner) && IsValid(_theme) && _owner != _theme && _template != "-")
|
if (IsValid(_owner) && IsValid(_theme) && _owner != _theme && _template != "-")
|
||||||
{
|
{
|
||||||
var theme = new Theme { Owner = _owner, Name = _theme, Template = _template, Version = _reference };
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
|
var theme = new Theme { Owner = _owner, Name = _theme, Template = _template, Version = _reference, ThemeName = template.Namespace };
|
||||||
theme = await ThemeService.CreateThemeAsync(theme);
|
theme = await ThemeService.CreateThemeAsync(theme);
|
||||||
GetLocation();
|
GetLocation();
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Theme.Create"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Theme.Create"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
@ -142,8 +146,14 @@
|
|||||||
if (_owner != "" && _theme != "" && _template != "-")
|
if (_owner != "" && _theme != "" && _template != "-")
|
||||||
{
|
{
|
||||||
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
var template = _templates.FirstOrDefault(item => item.Name == _template);
|
||||||
_location = template.Location + _owner + ".Theme." + _theme;
|
if (!string.IsNullOrEmpty(template.Namespace))
|
||||||
|
{
|
||||||
|
_location = template.Location + template.Namespace.Replace("[Owner]", _owner).Replace("[Theme]", _theme);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_location = template.Location + _owner + ".Theme." + _theme;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
@using System.Net
|
@using System.Net
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject IThemeService ThemeService
|
@inject IThemeService ThemeService
|
||||||
|
@inject IPackageService PackageService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IStringLocalizer<Edit> Localizer
|
@inject IStringLocalizer<Edit> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
@ -42,10 +43,27 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="packagename" HelpText="The unique name of the package from which this module was installed" ResourceKey="PackageName">Package Name: </Label>
|
<Label Class="col-sm-3" For="packagename" HelpText="The unique name of the package from which this theme was installed. This value must be specified within the theme's ITheme interface specification." ResourceKey="PackageName">Package Name: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
@if (!string.IsNullOrEmpty(_packagename))
|
||||||
</div>
|
{
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
||||||
|
@if (string.IsNullOrEmpty(_packageurl))
|
||||||
|
{
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="ValidatePackage">@Localizer["Validate"]</button>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<a href="@_packageurl" target="_blank" class="btn btn-primary">@SharedLocalizer["Download"]</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="packagename" class="form-control" @bind="@_packagename" disabled />
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="owner" HelpText="The owner or creator of the theme" ResourceKey="Owner">Owner: </Label>
|
<Label Class="col-sm-3" For="owner" HelpText="The owner or creator of the theme" ResourceKey="Owner">Owner: </Label>
|
||||||
@ -68,7 +86,14 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="license" HelpText="The license of the theme" ResourceKey="License">License: </Label>
|
<Label Class="col-sm-3" For="license" HelpText="The license of the theme" ResourceKey="License">License: </Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea id="license" class="form-control" @bind="@_license" rows="5" disabled></textarea>
|
@if (_license.StartsWith("http") || _license.StartsWith("/") || _license.StartsWith("~"))
|
||||||
|
{
|
||||||
|
<a href="@_license.Replace("~", PageState?.Alias.BaseUrl + "/Themes/" + Utilities.GetTypeName(_themeName))" class="btn btn-info" style="text-decoration: none !important" target="_new">@Localizer["View License"]</a>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<textarea id="license" class="form-control" @bind="@_license" rows="5" disabled></textarea>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -90,7 +115,8 @@
|
|||||||
private string _isenabled;
|
private string _isenabled;
|
||||||
private string _name;
|
private string _name;
|
||||||
private string _version;
|
private string _version;
|
||||||
private string _packagename;
|
private string _packagename = "";
|
||||||
|
private string _packageurl = "";
|
||||||
private string _owner = "";
|
private string _owner = "";
|
||||||
private string _url = "";
|
private string _url = "";
|
||||||
private string _contact = "";
|
private string _contact = "";
|
||||||
@ -159,4 +185,27 @@
|
|||||||
AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning);
|
AddModuleMessage(SharedLocalizer["Message.InfoRequired"], MessageType.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task ValidatePackage()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var package = await PackageService.GetPackageAsync(_packagename, _version, true);
|
||||||
|
if (package == null || string.IsNullOrEmpty(package.PackageUrl))
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Validate"], MessageType.Warning);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_packageurl = package.PackageUrl;
|
||||||
|
AddModuleMessage(Localizer["Message.Download"], MessageType.Info);
|
||||||
|
}
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Downloading Package {PackageId} {Version}", _packagename, _version);
|
||||||
|
AddModuleMessage(Localizer["Error.Validate"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ else
|
|||||||
<th> </th>
|
<th> </th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.ThemeId.ToString())" ResourceKey="EditModule" /></td>
|
<td><ActionLink Action="Edit" Parameters="@($"id=" + context.ThemeId.ToString())" ResourceKey="EditTheme" /></td>
|
||||||
<td>
|
<td>
|
||||||
@if (context.AssemblyName != Constants.ClientId)
|
@if (context.AssemblyName != Constants.ClientId)
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ else
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_themes = await ThemeService.GetThemesAsync();
|
_themes = await ThemeService.GetThemesAsync();
|
||||||
_packages = await PackageService.GetPackagesAsync("theme");
|
_packages = await PackageService.GetPackageUpdatesAsync("theme");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -101,10 +101,13 @@ else
|
|||||||
{
|
{
|
||||||
if (package.ExpiryDate != null && package.ExpiryDate.Value.Date != DateTime.MaxValue.Date)
|
if (package.ExpiryDate != null && package.ExpiryDate.Value.Date != DateTime.MaxValue.Date)
|
||||||
{
|
{
|
||||||
link += "<span>" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</span><br />";
|
if (string.IsNullOrEmpty(package.PaymentUrl))
|
||||||
if (!string.IsNullOrEmpty(package.PaymentUrl))
|
|
||||||
{
|
{
|
||||||
link += " <a class=\"btn btn-primary\" style=\"text-decoration: none !important\" href=\"" + package.PaymentUrl + "\" target=\"_new\">" + SharedLocalizer["Extend"] + "</a>";
|
link = "<span>" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</span>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
link = "<a class=\"btn btn-primary\" style=\"text-decoration: none !important\" href=\"" + package.PaymentUrl + "\" target=\"_new\">" + package.ExpiryDate.Value.Date.ToString("MMM dd, yyyy") + "</a>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,7 +146,7 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(packagename, version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(packagename, version);
|
||||||
await logger.LogInformation("Theme Downloaded {ThemeName} {Version}", packagename, version);
|
await logger.LogInformation("Theme Downloaded {ThemeName} {Version}", packagename, version);
|
||||||
AddModuleMessage(string.Format(Localizer["Success.Theme.Install"], NavigateUrl("admin/system")), MessageType.Success);
|
AddModuleMessage(string.Format(Localizer["Success.Theme.Install"], NavigateUrl("admin/system")), MessageType.Success);
|
||||||
}
|
}
|
||||||
|
@ -7,34 +7,38 @@
|
|||||||
@inject IStringLocalizer<Index> Localizer
|
@inject IStringLocalizer<Index> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
<TabStrip>
|
@if (_initialized)
|
||||||
<TabPanel Name="Download" ResourceKey="Download">
|
{
|
||||||
@if (_package != null && _upgradeavailable)
|
<TabStrip>
|
||||||
{
|
<TabPanel Name="Download" ResourceKey="Download">
|
||||||
<ModuleMessage Type="MessageType.Info" Message="Select The Download Button To Download The Framework Upgrade Package And Then Select Upgrade"></ModuleMessage>
|
@if (_package != null && _upgradeavailable)
|
||||||
<button type="button" class="btn btn-primary" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>@SharedLocalizer["Download"] @_package.Version</button>
|
{
|
||||||
<button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button>
|
<ModuleMessage Type="MessageType.Info" Message="Select The Download Button To Download The Framework Upgrade Package And Then Select Upgrade"></ModuleMessage>
|
||||||
}
|
<button type="button" class="btn btn-primary" @onclick=@(async () => await Download(Constants.PackageId, @_package.Version))>@SharedLocalizer["Download"] @_package.Version</button>
|
||||||
else
|
<button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button>
|
||||||
{
|
}
|
||||||
<ModuleMessage Type="MessageType.Info" Message=@Localizer["Message.Text"]></ModuleMessage>
|
else
|
||||||
}
|
{
|
||||||
</TabPanel>
|
<ModuleMessage Type="MessageType.Info" Message=@Localizer["Message.Text"]></ModuleMessage>
|
||||||
<TabPanel Name="Upload" ResourceKey="Upload">
|
}
|
||||||
<ModuleMessage Type="MessageType.Info" Message=@Localizer["MessgeUpgrade.Text"]></ModuleMessage>
|
</TabPanel>
|
||||||
<div class="container">
|
<TabPanel Name="Upload" ResourceKey="Upload">
|
||||||
<div class="row mb-1 align-items-center">
|
<ModuleMessage Type="MessageType.Info" Message=@Localizer["MessageUpgrade.Text"]></ModuleMessage>
|
||||||
<Label Class="col-sm-3" HelpText="Upload A Framework Package And Then Select Upgrade" ResourceKey="Framework">Framework: </Label>
|
<div class="container">
|
||||||
<div class="col-sm-9">
|
<div class="row mb-1 align-items-center">
|
||||||
<FileManager Folder="@Constants.PackagesFolder" />
|
<Label Class="col-sm-3" HelpText="Upload A Framework Package And Then Select Upgrade" ResourceKey="Framework">Framework: </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<FileManager Folder="@Constants.PackagesFolder" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button>
|
||||||
<button type="button" class="btn btn-success" @onclick="Upgrade">@SharedLocalizer["Upgrade"]</button>
|
</TabPanel>
|
||||||
</TabPanel>
|
</TabStrip>
|
||||||
</TabStrip>
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private bool _initialized = false;
|
||||||
private Package _package;
|
private Package _package;
|
||||||
private bool _upgradeavailable = false;
|
private bool _upgradeavailable = false;
|
||||||
|
|
||||||
@ -44,18 +48,26 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
List<Package> packages = await PackageService.GetPackagesAsync("framework", "", "", "");
|
if (NavigationManager.BaseUri.Contains("localhost:"))
|
||||||
if (packages != null)
|
|
||||||
{
|
{
|
||||||
_package = packages.Where(item => item.PackageId.StartsWith(Constants.PackageId)).FirstOrDefault();
|
AddModuleMessage(Localizer["Localhost.Text"], MessageType.Info);
|
||||||
if (_package != null)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<Package> packages = await PackageService.GetPackagesAsync("framework", "", "", "");
|
||||||
|
if (packages != null)
|
||||||
{
|
{
|
||||||
_upgradeavailable = (Version.Parse(_package.Version).CompareTo(Version.Parse(Constants.Version)) > 0);
|
_package = packages.Where(item => item.PackageId.StartsWith(Constants.PackageId)).FirstOrDefault();
|
||||||
}
|
if (_package != null)
|
||||||
else
|
{
|
||||||
{
|
_upgradeavailable = (Version.Parse(_package.Version).CompareTo(Version.Parse(Constants.Version)) > 0);
|
||||||
_package = new Package { Name = Constants.PackageId, Version = Constants.Version };
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_package = new Package { Name = Constants.PackageId, Version = Constants.Version };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
_initialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -85,8 +97,8 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await PackageService.DownloadPackageAsync(packageid, version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(packageid, version);
|
||||||
await PackageService.DownloadPackageAsync(Constants.UpdaterPackageId, version, Constants.PackagesFolder);
|
await PackageService.DownloadPackageAsync(Constants.UpdaterPackageId, version);
|
||||||
AddModuleMessage(Localizer["Success.Framework.Download"], MessageType.Success);
|
AddModuleMessage(Localizer["Success.Framework.Download"], MessageType.Success);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -28,7 +28,7 @@ else
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<Pager Items="@_urlMappings">
|
<Pager Items="@_urlMappings" SearchProperties="Url">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
|
@ -42,12 +42,6 @@
|
|||||||
|
|
||||||
public override string Title => "Send Notification";
|
public override string Title => "Send Notification";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task Send()
|
private async Task Send()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -23,6 +23,7 @@ else
|
|||||||
<TabPanel Name="Identity" ResourceKey="Identity">
|
<TabPanel Name="Identity" ResourceKey="Identity">
|
||||||
@if (profiles != null && settings != null)
|
@if (profiles != null && settings != null)
|
||||||
{
|
{
|
||||||
|
<ModuleMessage Message="@_passwordrequirements" Type="MessageType.Info" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="username" HelpText="Your username. Note that this field can not be modified." ResourceKey="Username"></Label>
|
<Label Class="col-sm-3" For="username" HelpText="Your username. Note that this field can not be modified." ResourceKey="Username"></Label>
|
||||||
@ -122,13 +123,27 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (p.IsRequired)
|
@if (p.Rows == 1)
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@ -267,6 +282,7 @@ else
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private string _passwordrequirements;
|
||||||
private string username = string.Empty;
|
private string username = string.Empty;
|
||||||
private string _password = string.Empty;
|
private string _password = string.Empty;
|
||||||
private string _passwordtype = "password";
|
private string _passwordtype = "password";
|
||||||
@ -280,9 +296,11 @@ else
|
|||||||
private int folderid = -1;
|
private int folderid = -1;
|
||||||
private int photofileid = -1;
|
private int photofileid = -1;
|
||||||
private File photo = null;
|
private File photo = null;
|
||||||
|
|
||||||
private List<Profile> profiles;
|
private List<Profile> profiles;
|
||||||
private Dictionary<string, string> settings;
|
private Dictionary<string, string> settings;
|
||||||
private string category = string.Empty;
|
private string category = string.Empty;
|
||||||
|
|
||||||
private string filter = "to";
|
private string filter = "to";
|
||||||
private List<Notification> notifications;
|
private List<Notification> notifications;
|
||||||
private string notificationSummary = string.Empty;
|
private string notificationSummary = string.Empty;
|
||||||
@ -293,12 +311,11 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId);
|
||||||
|
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
|
|
||||||
if (PageState.Site.Settings.ContainsKey("LoginOptions:TwoFactor") && !string.IsNullOrEmpty(PageState.Site.Settings["LoginOptions:TwoFactor"]))
|
allowtwofactor = (SettingService.GetSetting(PageState.Site.Settings, "LoginOptions:TwoFactor", "false") == "true");
|
||||||
{
|
|
||||||
allowtwofactor = (PageState.Site.Settings["LoginOptions:TwoFactor"] == "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PageState.User != null)
|
if (PageState.User != null)
|
||||||
{
|
{
|
||||||
@ -362,44 +379,47 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (username != string.Empty && email != string.Empty && ValidateProfiles())
|
if (username != string.Empty && email != string.Empty)
|
||||||
{
|
{
|
||||||
if (_password == confirm)
|
if (_password == confirm)
|
||||||
{
|
{
|
||||||
var user = PageState.User;
|
if (ValidateProfiles())
|
||||||
user.Username = username;
|
|
||||||
user.Password = _password;
|
|
||||||
user.TwoFactorRequired = bool.Parse(twofactor);
|
|
||||||
user.Email = email;
|
|
||||||
user.DisplayName = (displayname == string.Empty ? username : displayname);
|
|
||||||
user.PhotoFileId = filemanager.GetFileId();
|
|
||||||
if (user.PhotoFileId == -1)
|
|
||||||
{
|
{
|
||||||
user.PhotoFileId = null;
|
var user = PageState.User;
|
||||||
}
|
user.Username = username;
|
||||||
if (user.PhotoFileId != null)
|
user.Password = _password;
|
||||||
{
|
user.TwoFactorRequired = bool.Parse(twofactor);
|
||||||
photofileid = user.PhotoFileId.Value;
|
user.Email = email;
|
||||||
photo = await FileService.GetFileAsync(photofileid);
|
user.DisplayName = (displayname == string.Empty ? username : displayname);
|
||||||
}
|
user.PhotoFileId = filemanager.GetFileId();
|
||||||
else
|
if (user.PhotoFileId == -1)
|
||||||
{
|
{
|
||||||
photofileid = -1;
|
user.PhotoFileId = null;
|
||||||
photo = null;
|
}
|
||||||
}
|
if (user.PhotoFileId != null)
|
||||||
|
{
|
||||||
|
photofileid = user.PhotoFileId.Value;
|
||||||
|
photo = await FileService.GetFileAsync(photofileid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
photofileid = -1;
|
||||||
|
photo = null;
|
||||||
|
}
|
||||||
|
|
||||||
user = await UserService.UpdateUserAsync(user);
|
user = await UserService.UpdateUserAsync(user);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
|
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
|
||||||
await logger.LogInformation("User Profile Saved");
|
await logger.LogInformation("User Profile Saved");
|
||||||
|
|
||||||
AddModuleMessage(Localizer["Success.Profile.Update"], MessageType.Success);
|
AddModuleMessage(Localizer["Success.Profile.Update"], MessageType.Success);
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddModuleMessage(Localizer["Message.Password.Complexity"], MessageType.Error);
|
AddModuleMessage(Localizer["Message.Password.Complexity"], MessageType.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -423,7 +443,6 @@ else
|
|||||||
|
|
||||||
private bool ValidateProfiles()
|
private bool ValidateProfiles()
|
||||||
{
|
{
|
||||||
bool valid = true;
|
|
||||||
foreach (Profile profile in profiles)
|
foreach (Profile profile in profiles)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
||||||
@ -432,18 +451,24 @@ else
|
|||||||
}
|
}
|
||||||
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
||||||
{
|
{
|
||||||
if (valid == true && profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
||||||
{
|
{
|
||||||
valid = false;
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (valid == true && !string.IsNullOrEmpty(profile.Validation))
|
if (!string.IsNullOrEmpty(profile.Validation))
|
||||||
{
|
{
|
||||||
Regex regex = new Regex(profile.Validation);
|
Regex regex = new Regex(profile.Validation);
|
||||||
valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
||||||
|
if (!valid)
|
||||||
|
{
|
||||||
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return valid;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Cancel()
|
private void Cancel()
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<label class="col-sm-3">@Localizer["Message"] </label>
|
<label class="col-sm-3">@Localizer["Message"] </label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea class="form-control" @bind="@body" rows="5" readonly />
|
<textarea id="txtFrom" class="form-control" @bind="@body" rows="5" readonly />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -66,7 +66,7 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<label class="col-sm-3">@Localizer["Message"] </label>
|
<label class="col-sm-3">@Localizer["Message"] </label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<textarea class="form-control" @bind="@body" rows="5" readonly />
|
<textarea id="txtTo" class="form-control" @bind="@body" rows="5" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -93,7 +93,7 @@
|
|||||||
{
|
{
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">@Localizer["OriginalMessage"] </label>
|
<label class="control-label">@Localizer["OriginalMessage"] </label>
|
||||||
<textarea class="form-control" @bind="@reply" rows="5" readonly />
|
<textarea id="txtReply" class="form-control" @bind="@reply" rows="5" readonly />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -110,11 +110,6 @@
|
|||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View;
|
||||||
public override string Title => "View Notification";
|
public override string Title => "View Notification";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -12,11 +12,12 @@
|
|||||||
<TabPanel Name="Identity" ResourceKey="Identity">
|
<TabPanel Name="Identity" ResourceKey="Identity">
|
||||||
@if (profiles != null)
|
@if (profiles != null)
|
||||||
{
|
{
|
||||||
|
<ModuleMessage Message="@_passwordrequirements" Type="MessageType.Info" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="username" HelpText="A unique username for a user. Note that this field can not be modified once it is saved." ResourceKey="Username"></Label>
|
<Label Class="col-sm-3" For="username" HelpText="A unique username for a user. Note that this field can not be modified once it is saved." ResourceKey="Username"></Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="username" class="form-control" @bind="@username" />
|
<input id="username" class="form-control" @bind="@_username" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
@ -32,7 +33,7 @@
|
|||||||
<Label Class="col-sm-3" For="confirm" HelpText="Please enter the password again to confirm it matches with the value above" ResourceKey="Confirm"></Label>
|
<Label Class="col-sm-3" For="confirm" HelpText="Please enter the password again to confirm it matches with the value above" ResourceKey="Confirm"></Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="confirm" type="@_passwordtype" class="form-control" @bind="@confirm" autocomplete="new-password" required />
|
<input id="confirm" type="@_passwordtype" class="form-control" @bind="@_confirm" autocomplete="new-password" required />
|
||||||
<button type="button" class="btn btn-secondary" @onclick="@TogglePassword" tabindex="-1">@_togglepassword</button>
|
<button type="button" class="btn btn-secondary" @onclick="@TogglePassword" tabindex="-1">@_togglepassword</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,17 +41,25 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="email" HelpText="The email address where the user will receive notifications" ResourceKey="Email"></Label>
|
<Label Class="col-sm-3" For="email" HelpText="The email address where the user will receive notifications" ResourceKey="Email"></Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="email" class="form-control" @bind="@email" />
|
<input id="email" class="form-control" @bind="@_email" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="displayname" HelpText="The full name of the user" ResourceKey="DisplayName"></Label>
|
<Label Class="col-sm-3" For="displayname" HelpText="The full name of the user" ResourceKey="DisplayName"></Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input id="displayname" class="form-control" @bind="@displayname" />
|
<input id="displayname" class="form-control" @bind="@_displayname" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="notify" HelpText="Indicate if new users should receive an email notification" ResourceKey="Notify">Notify? </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select id="notify" class="form-select" @bind="@_notify" required>
|
||||||
|
<option value="True">@SharedLocalizer["Yes"]</option>
|
||||||
|
<option value="False">@SharedLocalizer["No"]</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Profile" ResourceKey="Profile">
|
<TabPanel Name="Profile" ResourceKey="Profile">
|
||||||
@ -71,18 +80,50 @@
|
|||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="@p.Name" HelpText="@p.Description">@p.Title</Label>
|
<Label Class="col-sm-3" For="@p.Name" HelpText="@p.Description">@p.Title</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@if (p.IsRequired)
|
@if (!string.IsNullOrEmpty(p.Options))
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
<select id="@p.Name" class="form-select" @onchange="@(e => ProfileChanged(e, p.Name))">
|
||||||
|
@foreach (var option in p.Options.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
|
||||||
|
{
|
||||||
|
@if (GetProfileValue(p.Name, "") == option || (GetProfileValue(p.Name, "") == "" && p.DefaultValue == option))
|
||||||
|
{
|
||||||
|
<option value="@option" selected>@option</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@option">@option</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</select>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
@if (p.Rows == 1)
|
||||||
|
{
|
||||||
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@ -94,13 +135,15 @@
|
|||||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private string username = string.Empty;
|
private string _passwordrequirements;
|
||||||
|
private string _username = string.Empty;
|
||||||
private string _password = string.Empty;
|
private string _password = string.Empty;
|
||||||
private string _passwordtype = "password";
|
private string _passwordtype = "password";
|
||||||
private string _togglepassword = string.Empty;
|
private string _togglepassword = string.Empty;
|
||||||
private string confirm = string.Empty;
|
private string _confirm = string.Empty;
|
||||||
private string email = string.Empty;
|
private string _email = string.Empty;
|
||||||
private string displayname = string.Empty;
|
private string _displayname = string.Empty;
|
||||||
|
private string _notify = "True";
|
||||||
private List<Profile> profiles;
|
private List<Profile> profiles;
|
||||||
private Dictionary<string, string> settings;
|
private Dictionary<string, string> settings;
|
||||||
private string category = string.Empty;
|
private string category = string.Empty;
|
||||||
@ -111,6 +154,7 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId);
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId);
|
profiles = await ProfileService.GetProfilesAsync(ModuleState.SiteId);
|
||||||
settings = new Dictionary<string, string>();
|
settings = new Dictionary<string, string>();
|
||||||
@ -136,30 +180,34 @@
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (username != string.Empty && _password != string.Empty && confirm != string.Empty && email != string.Empty && ValidateProfiles())
|
if (_username != string.Empty && _password != string.Empty && _confirm != string.Empty && _email != string.Empty)
|
||||||
{
|
{
|
||||||
if (_password == confirm)
|
if (_password == _confirm)
|
||||||
{
|
{
|
||||||
var user = new User();
|
if (ValidateProfiles())
|
||||||
user.SiteId = PageState.Site.SiteId;
|
|
||||||
user.Username = username;
|
|
||||||
user.Password = _password;
|
|
||||||
user.Email = email;
|
|
||||||
user.DisplayName = string.IsNullOrWhiteSpace(displayname) ? username : displayname;
|
|
||||||
user.PhotoFileId = null;
|
|
||||||
|
|
||||||
user = await UserService.AddUserAsync(user);
|
|
||||||
|
|
||||||
if (user != null)
|
|
||||||
{
|
{
|
||||||
await SettingService.UpdateUserSettingsAsync(settings, user.UserId);
|
var user = new User();
|
||||||
await logger.LogInformation("User Created {User}", user);
|
user.SiteId = PageState.Site.SiteId;
|
||||||
NavigationManager.NavigateTo(NavigateUrl());
|
user.Username = _username;
|
||||||
}
|
user.Password = _password;
|
||||||
else
|
user.Email = _email;
|
||||||
{
|
user.DisplayName = string.IsNullOrWhiteSpace(_displayname) ? _username : _displayname;
|
||||||
await logger.LogError("Error Adding User {Username} {Email}", username, email);
|
user.PhotoFileId = null;
|
||||||
AddModuleMessage(Localizer["Error.User.AddCheckPass"], MessageType.Error);
|
user.SuppressNotification = !bool.Parse(_notify);
|
||||||
|
|
||||||
|
user = await UserService.AddUserAsync(user);
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
{
|
||||||
|
await SettingService.UpdateUserSettingsAsync(settings, user.UserId);
|
||||||
|
await logger.LogInformation("User Created {User}", user);
|
||||||
|
NavigationManager.NavigateTo(NavigateUrl());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await logger.LogError("Error Adding User {Username} {Email}", _username, _email);
|
||||||
|
AddModuleMessage(Localizer["Error.User.AddCheckPass"], MessageType.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -174,14 +222,13 @@
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
await logger.LogError(ex, "Error Adding User {Username} {Email} {Error}", username, email, ex.Message);
|
await logger.LogError(ex, "Error Adding User {Username} {Email} {Error}", _username, _email, ex.Message);
|
||||||
AddModuleMessage(Localizer["Error.User.Add"], MessageType.Error);
|
AddModuleMessage(Localizer["Error.User.Add"], MessageType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ValidateProfiles()
|
private bool ValidateProfiles()
|
||||||
{
|
{
|
||||||
bool valid = true;
|
|
||||||
foreach (Profile profile in profiles)
|
foreach (Profile profile in profiles)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
||||||
@ -190,18 +237,24 @@
|
|||||||
}
|
}
|
||||||
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
||||||
{
|
{
|
||||||
if (valid == true && profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
||||||
{
|
{
|
||||||
valid = false;
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (valid == true && !string.IsNullOrEmpty(profile.Validation))
|
if (!string.IsNullOrEmpty(profile.Validation))
|
||||||
{
|
{
|
||||||
Regex regex = new Regex(profile.Validation);
|
Regex regex = new Regex(profile.Validation);
|
||||||
valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
||||||
|
if (!valid)
|
||||||
|
{
|
||||||
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return valid;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileChanged(ChangeEventArgs e, string SettingName)
|
private void ProfileChanged(ChangeEventArgs e, string SettingName)
|
||||||
|
@ -21,6 +21,7 @@ else
|
|||||||
<TabPanel Name="Identity" ResourceKey="Identity">
|
<TabPanel Name="Identity" ResourceKey="Identity">
|
||||||
@if (profiles != null)
|
@if (profiles != null)
|
||||||
{
|
{
|
||||||
|
<ModuleMessage Message="@_passwordrequirements" Type="MessageType.Info" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="username" HelpText="The unique username for a user. Note that this field can not be modified." ResourceKey="Username"></Label>
|
<Label Class="col-sm-3" For="username" HelpText="The unique username for a user. Note that this field can not be modified." ResourceKey="Username"></Label>
|
||||||
@ -124,13 +125,27 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@if (p.IsRequired)
|
@if (p.Rows == 1)
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
@if (p.IsRequired)
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<textarea id="@p.Name" class="form-control" maxlength="@p.MaxLength" rows="@p.Rows" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))"></textarea>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@ -149,6 +164,7 @@ else
|
|||||||
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon" DeletedBy="@deletedby" DeletedOn="@deletedon"></AuditInfo>
|
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon" DeletedBy="@deletedby" DeletedOn="@deletedon"></AuditInfo>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
private string _passwordrequirements;
|
||||||
private int userid;
|
private int userid;
|
||||||
private string username = string.Empty;
|
private string username = string.Empty;
|
||||||
private string _password = string.Empty;
|
private string _password = string.Empty;
|
||||||
@ -183,6 +199,7 @@ else
|
|||||||
{
|
{
|
||||||
if (PageState.QueryString.ContainsKey("id"))
|
if (PageState.QueryString.ContainsKey("id"))
|
||||||
{
|
{
|
||||||
|
_passwordrequirements = await UserService.GetPasswordRequirementsAsync(PageState.Site.SiteId);
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
|
profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
|
||||||
userid = Int32.Parse(PageState.QueryString["id"]);
|
userid = Int32.Parse(PageState.QueryString["id"]);
|
||||||
@ -237,35 +254,38 @@ else
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (username != string.Empty && email != string.Empty && ValidateProfiles())
|
if (username != string.Empty && email != string.Empty)
|
||||||
{
|
{
|
||||||
if (_password == confirm)
|
if (_password == confirm)
|
||||||
{
|
{
|
||||||
var user = await UserService.GetUserAsync(userid, PageState.Site.SiteId);
|
if (ValidateProfiles())
|
||||||
user.SiteId = PageState.Site.SiteId;
|
|
||||||
user.Username = username;
|
|
||||||
user.Password = _password;
|
|
||||||
user.Email = email;
|
|
||||||
user.DisplayName = string.IsNullOrWhiteSpace(displayname) ? username : displayname;
|
|
||||||
user.PhotoFileId = null;
|
|
||||||
user.PhotoFileId = filemanager.GetFileId();
|
|
||||||
if (user.PhotoFileId == -1)
|
|
||||||
{
|
{
|
||||||
|
var user = await UserService.GetUserAsync(userid, PageState.Site.SiteId);
|
||||||
|
user.SiteId = PageState.Site.SiteId;
|
||||||
|
user.Username = username;
|
||||||
|
user.Password = _password;
|
||||||
|
user.Email = email;
|
||||||
|
user.DisplayName = string.IsNullOrWhiteSpace(displayname) ? username : displayname;
|
||||||
user.PhotoFileId = null;
|
user.PhotoFileId = null;
|
||||||
}
|
user.PhotoFileId = filemanager.GetFileId();
|
||||||
|
if (user.PhotoFileId == -1)
|
||||||
|
{
|
||||||
|
user.PhotoFileId = null;
|
||||||
|
}
|
||||||
|
|
||||||
user.IsDeleted = (isdeleted == null ? true : Boolean.Parse(isdeleted));
|
user.IsDeleted = (isdeleted == null ? true : Boolean.Parse(isdeleted));
|
||||||
|
|
||||||
user = await UserService.UpdateUserAsync(user);
|
user = await UserService.UpdateUserAsync(user);
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
await SettingService.UpdateUserSettingsAsync(settings, user.UserId);
|
await SettingService.UpdateUserSettingsAsync(settings, user.UserId);
|
||||||
await logger.LogInformation("User Saved {User}", user);
|
await logger.LogInformation("User Saved {User}", user);
|
||||||
NavigationManager.NavigateTo(NavigateUrl());
|
NavigationManager.NavigateTo(NavigateUrl());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddModuleMessage(Localizer["Message.Password.Complexity"], MessageType.Error);
|
AddModuleMessage(Localizer["Message.Password.Complexity"], MessageType.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -287,7 +307,6 @@ else
|
|||||||
|
|
||||||
private bool ValidateProfiles()
|
private bool ValidateProfiles()
|
||||||
{
|
{
|
||||||
bool valid = true;
|
|
||||||
foreach (Profile profile in profiles)
|
foreach (Profile profile in profiles)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
if (string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)) && !string.IsNullOrEmpty(profile.DefaultValue))
|
||||||
@ -296,18 +315,24 @@ else
|
|||||||
}
|
}
|
||||||
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
if (!profile.IsPrivate || UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin))
|
||||||
{
|
{
|
||||||
if (valid == true && profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
if (profile.IsRequired && string.IsNullOrEmpty(SettingService.GetSetting(settings, profile.Name, string.Empty)))
|
||||||
{
|
{
|
||||||
valid = false;
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileRequired"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if (valid == true && !string.IsNullOrEmpty(profile.Validation))
|
if (!string.IsNullOrEmpty(profile.Validation))
|
||||||
{
|
{
|
||||||
Regex regex = new Regex(profile.Validation);
|
Regex regex = new Regex(profile.Validation);
|
||||||
valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
bool valid = regex.Match(SettingService.GetSetting(settings, profile.Name, string.Empty)).Success;
|
||||||
|
if (!valid)
|
||||||
|
{
|
||||||
|
AddModuleMessage(string.Format(SharedLocalizer["ProfileInvalid"], profile.Title), MessageType.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return valid;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileChanged(ChangeEventArgs e, string SettingName)
|
private void ProfileChanged(ChangeEventArgs e, string SettingName)
|
||||||
|
@ -17,27 +17,18 @@ else
|
|||||||
{
|
{
|
||||||
<TabStrip>
|
<TabStrip>
|
||||||
<TabPanel Name="Users" Heading="Users" ResourceKey="Users">
|
<TabPanel Name="Users" Heading="Users" ResourceKey="Users">
|
||||||
<div class="container">
|
<ActionLink Action="Add" Text="Add User" Security="SecurityAccessLevel.Edit" ResourceKey="AddUser" />
|
||||||
<div class="row mb-1 align-items-center">
|
<ActionLink Text="Import Users" Class="btn btn-secondary ms-2" Action="Users" Security="SecurityAccessLevel.Admin" ResourceKey="ImportUsers"/>
|
||||||
<div class="col-sm-4">
|
|
||||||
<ActionLink Action="Add" Text="Add User" Security="SecurityAccessLevel.Edit" ResourceKey="AddUser" />
|
<Pager Items="@users" RowClass="align-middle" SearchProperties="User.Username,User.Email,User.DisplayName">
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<input class="form-control" @bind="@_search" />
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4">
|
|
||||||
<button type="button" class="btn btn-secondary" @onclick="OnSearch">@SharedLocalizer["Search"]</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Pager Items="@users" RowClass="align-middle">
|
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th class="app-sort-th" @onclick="@(() => SortTable("Username"))">@Localizer["Username"]<i class="@(SetSortIcon("Username"))"></i></th>
|
<th class="app-sort-th link-primary text-decoration-underline" @onclick="@(() => SortTable("Username"))">@Localizer["Username"]<i class="@(SetSortIcon("Username"))"></i></th>
|
||||||
<th class="app-sort-th" @onclick="@(() => SortTable("DisplayName"))">@Localizer["Name"]<i class="@(SetSortIcon("DisplayName"))"></i></th>
|
<th class="app-sort-th link-primary text-decoration-underline" @onclick="@(() => SortTable("DisplayName"))">@Localizer["Name"]<i class="@(SetSortIcon("DisplayName"))"></i></th>
|
||||||
<th class="app-sort-th" @onclick="@(() => SortTable("LastLoginOn"))">@Localizer["LastLoginOn"]<i class="@(SetSortIcon("LastLoginOn"))"></i></th>
|
<th class="app-sort-th link-primary text-decoration-underline" @onclick="@(() => SortTable("Email"))">@Localizer["Email"]<i class="@(SetSortIcon("Email"))"></i></th>
|
||||||
|
<th class="app-sort-th link-primary text-decoration-underline" @onclick="@(() => SortTable("LastLoginOn"))">@Localizer["LastLoginOn"]<i class="@(SetSortIcon("LastLoginOn"))"></i></th>
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td>
|
<td>
|
||||||
@ -50,11 +41,12 @@ else
|
|||||||
<ActionLink Action="Roles" Parameters="@($"id=" + context.UserId.ToString())" Security="SecurityAccessLevel.Edit" ResourceKey="Roles" />
|
<ActionLink Action="Roles" Parameters="@($"id=" + context.UserId.ToString())" Security="SecurityAccessLevel.Edit" ResourceKey="Roles" />
|
||||||
</td>
|
</td>
|
||||||
<td>@context.User.Username</td>
|
<td>@context.User.Username</td>
|
||||||
<td>@((MarkupString)string.Format("<a href=\"mailto:{0}\">{1}</a>", @context.User.Email, @context.User.DisplayName))</td>
|
<td>@context.User.DisplayName</td>
|
||||||
|
<td>@((MarkupString)string.Format("<a href=\"mailto:{0}\">{1}</a>", @context.User.Email, @context.User.Email))</td>
|
||||||
<td>@((context.User.LastLoginOn != DateTime.MinValue) ? string.Format("{0:dd-MMM-yyyy HH:mm:ss}", context.User.LastLoginOn) : "")</td>
|
<td>@((context.User.LastLoginOn != DateTime.MinValue) ? string.Format("{0:dd-MMM-yyyy HH:mm:ss}", context.User.LastLoginOn) : "")</td>
|
||||||
</Row>
|
</Row>
|
||||||
</Pager>
|
</Pager>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Settings" Heading="Settings" ResourceKey="Settings" Security="SecurityAccessLevel.Admin">
|
<TabPanel Name="Settings" Heading="Settings" ResourceKey="Settings" Security="SecurityAccessLevel.Admin">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<Section Name="User" Heading="User Settings" ResourceKey="UserSettings">
|
<Section Name="User" Heading="User Settings" ResourceKey="UserSettings">
|
||||||
@ -259,7 +251,22 @@ else
|
|||||||
<input id="parameters" class="form-control" @bind="@_parameters" />
|
<input id="parameters" class="form-control" @bind="@_parameters" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 align-items-center">
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="authresponsetype" HelpText="Specify the authorization response type" ResourceKey="AuthResponseType">Authorization Response Type</Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select id="authresponsetype" class="form-select" @bind="@_authresponsetype" required>
|
||||||
|
<option value="code">@Localizer["AuthFlow.Code"]</option>
|
||||||
|
<option value="code id_token">@Localizer["AuthFlow.CodeIdToken"]</option>
|
||||||
|
<option value="code id_token token">@Localizer["AuthFlow.CodeIdTokenToken"]</option>
|
||||||
|
<option value="code token">@Localizer["AuthFlow.CodeToken"]</option>
|
||||||
|
<option value="id_token">@Localizer["AuthFlow.IdToken"]</option>
|
||||||
|
<option value="id_token token">@Localizer["AuthFlow.IdTokenToken"]</option>
|
||||||
|
<option value="token">@Localizer["AuthFlow.Token"]</option>
|
||||||
|
<option value="none">@Localizer["AuthFlow.None"]</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
<Label Class="col-sm-3" For="pkce" HelpText="Indicate if the provider supports Proof Key for Code Exchange (PKCE)" ResourceKey="PKCE">Use PKCE?</Label>
|
<Label Class="col-sm-3" For="pkce" HelpText="Indicate if the provider supports Proof Key for Code Exchange (PKCE)" ResourceKey="PKCE">Use PKCE?</Label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select id="pkce" class="form-select" @bind="@_pkce" required>
|
<select id="pkce" class="form-select" @bind="@_pkce" required>
|
||||||
@ -360,147 +367,128 @@ else
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<button type="button" class="btn btn-success" @onclick="SaveSiteSettings">@SharedLocalizer["Save"]</button>
|
<button type="button" class="btn btn-success" @onclick="SaveSiteSettings">@SharedLocalizer["Save"]</button>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</TabStrip>
|
</TabStrip>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private List<UserRole> allusers;
|
private List<UserRole> users;
|
||||||
private List<UserRole> users;
|
|
||||||
private string _search = "";
|
|
||||||
|
|
||||||
private string _allowregistration;
|
private string _allowregistration;
|
||||||
private string _allowsitelogin;
|
private string _allowsitelogin;
|
||||||
private string _twofactor;
|
private string _twofactor;
|
||||||
private string _cookiename;
|
private string _cookiename;
|
||||||
|
|
||||||
private string _minimumlength;
|
private string _minimumlength;
|
||||||
private string _uniquecharacters;
|
private string _uniquecharacters;
|
||||||
private string _requiredigit;
|
private string _requiredigit;
|
||||||
private string _requireupper;
|
private string _requireupper;
|
||||||
private string _requirelower;
|
private string _requirelower;
|
||||||
private string _requirepunctuation;
|
private string _requirepunctuation;
|
||||||
private string _maximumfailures;
|
private string _maximumfailures;
|
||||||
private string _lockoutduration;
|
private string _lockoutduration;
|
||||||
|
|
||||||
private string _providertype;
|
private string _providertype;
|
||||||
private string _providername;
|
private string _providername;
|
||||||
private string _authority;
|
private string _authority;
|
||||||
private string _metadataurl;
|
private string _metadataurl;
|
||||||
private string _authorizationurl;
|
private string _authorizationurl;
|
||||||
private string _tokenurl;
|
private string _tokenurl;
|
||||||
private string _userinfourl;
|
private string _userinfourl;
|
||||||
private string _clientid;
|
private string _clientid;
|
||||||
private string _clientsecret;
|
private string _clientsecret;
|
||||||
private string _clientsecrettype = "password";
|
private string _clientsecrettype = "password";
|
||||||
private string _toggleclientsecret = string.Empty;
|
private string _toggleclientsecret = string.Empty;
|
||||||
private string _scopes;
|
private string _scopes;
|
||||||
private string _parameters;
|
private string _parameters;
|
||||||
private string _pkce;
|
private string _pkce;
|
||||||
private string _redirecturl;
|
private string _authresponsetype;
|
||||||
private string _identifierclaimtype;
|
private string _redirecturl;
|
||||||
private string _emailclaimtype;
|
private string _identifierclaimtype;
|
||||||
private string _roleclaimtype;
|
private string _emailclaimtype;
|
||||||
private string _profileclaimtypes;
|
private string _roleclaimtype;
|
||||||
private string _domainfilter;
|
private string _profileclaimtypes;
|
||||||
private string _createusers;
|
private string _domainfilter;
|
||||||
|
private string _createusers;
|
||||||
|
|
||||||
private string _secret;
|
private string _secret;
|
||||||
private string _secrettype = "password";
|
private string _secrettype = "password";
|
||||||
private string _togglesecret = string.Empty;
|
private string _togglesecret = string.Empty;
|
||||||
private string _issuer;
|
private string _issuer;
|
||||||
private string _audience;
|
private string _audience;
|
||||||
private string _lifetime;
|
private string _lifetime;
|
||||||
private string _token;
|
private string _token;
|
||||||
|
|
||||||
private bool isSortedAscending;
|
private bool isSortedAscending;
|
||||||
private string activeSortColumn;
|
private string activeSortColumn;
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View;
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await LoadUserSettingsAsync();
|
await LoadUsersAsync(true);
|
||||||
await LoadUsersAsync(true);
|
|
||||||
|
|
||||||
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
|
var settings = await SettingService.GetSiteSettingsAsync(PageState.Site.SiteId);
|
||||||
_allowregistration = PageState.Site.AllowRegistration.ToString();
|
_allowregistration = PageState.Site.AllowRegistration.ToString();
|
||||||
_allowsitelogin = SettingService.GetSetting(settings, "LoginOptions:AllowSiteLogin", "true");
|
_allowsitelogin = SettingService.GetSetting(settings, "LoginOptions:AllowSiteLogin", "true");
|
||||||
|
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
|
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
|
||||||
{
|
{
|
||||||
_twofactor = SettingService.GetSetting(settings, "LoginOptions:TwoFactor", "false");
|
_twofactor = SettingService.GetSetting(settings, "LoginOptions:TwoFactor", "false");
|
||||||
_cookiename = SettingService.GetSetting(settings, "LoginOptions:CookieName", ".AspNetCore.Identity.Application");
|
_cookiename = SettingService.GetSetting(settings, "LoginOptions:CookieName", ".AspNetCore.Identity.Application");
|
||||||
|
|
||||||
_minimumlength = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredLength", "6");
|
_minimumlength = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredLength", "6");
|
||||||
_uniquecharacters = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredUniqueChars", "1");
|
_uniquecharacters = SettingService.GetSetting(settings, "IdentityOptions:Password:RequiredUniqueChars", "1");
|
||||||
_requiredigit = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireDigit", "true");
|
_requiredigit = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireDigit", "true");
|
||||||
_requireupper = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireUppercase", "true");
|
_requireupper = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireUppercase", "true");
|
||||||
_requirelower = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireLowercase", "true");
|
_requirelower = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireLowercase", "true");
|
||||||
_requirepunctuation = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireNonAlphanumeric", "true");
|
_requirepunctuation = SettingService.GetSetting(settings, "IdentityOptions:Password:RequireNonAlphanumeric", "true");
|
||||||
|
|
||||||
_maximumfailures = SettingService.GetSetting(settings, "IdentityOptions:Lockout:MaxFailedAccessAttempts", "5");
|
_maximumfailures = SettingService.GetSetting(settings, "IdentityOptions:Lockout:MaxFailedAccessAttempts", "5");
|
||||||
_lockoutduration = TimeSpan.Parse(SettingService.GetSetting(settings, "IdentityOptions:Lockout:DefaultLockoutTimeSpan", "00:05:00")).TotalMinutes.ToString();
|
_lockoutduration = TimeSpan.Parse(SettingService.GetSetting(settings, "IdentityOptions:Lockout:DefaultLockoutTimeSpan", "00:05:00")).TotalMinutes.ToString();
|
||||||
|
|
||||||
_providertype = SettingService.GetSetting(settings, "ExternalLogin:ProviderType", "");
|
_providertype = SettingService.GetSetting(settings, "ExternalLogin:ProviderType", "");
|
||||||
_providername = SettingService.GetSetting(settings, "ExternalLogin:ProviderName", "");
|
_providername = SettingService.GetSetting(settings, "ExternalLogin:ProviderName", "");
|
||||||
_authority = SettingService.GetSetting(settings, "ExternalLogin:Authority", "");
|
_authority = SettingService.GetSetting(settings, "ExternalLogin:Authority", "");
|
||||||
_metadataurl = SettingService.GetSetting(settings, "ExternalLogin:MetadataUrl", "");
|
_metadataurl = SettingService.GetSetting(settings, "ExternalLogin:MetadataUrl", "");
|
||||||
_authorizationurl = SettingService.GetSetting(settings, "ExternalLogin:AuthorizationUrl", "");
|
_authorizationurl = SettingService.GetSetting(settings, "ExternalLogin:AuthorizationUrl", "");
|
||||||
_tokenurl = SettingService.GetSetting(settings, "ExternalLogin:TokenUrl", "");
|
_tokenurl = SettingService.GetSetting(settings, "ExternalLogin:TokenUrl", "");
|
||||||
_userinfourl = SettingService.GetSetting(settings, "ExternalLogin:UserInfoUrl", "");
|
_userinfourl = SettingService.GetSetting(settings, "ExternalLogin:UserInfoUrl", "");
|
||||||
_clientid = SettingService.GetSetting(settings, "ExternalLogin:ClientId", "");
|
_clientid = SettingService.GetSetting(settings, "ExternalLogin:ClientId", "");
|
||||||
_clientsecret = SettingService.GetSetting(settings, "ExternalLogin:ClientSecret", "");
|
_clientsecret = SettingService.GetSetting(settings, "ExternalLogin:ClientSecret", "");
|
||||||
_toggleclientsecret = SharedLocalizer["ShowPassword"];
|
_toggleclientsecret = SharedLocalizer["ShowPassword"];
|
||||||
_scopes = SettingService.GetSetting(settings, "ExternalLogin:Scopes", "");
|
_scopes = SettingService.GetSetting(settings, "ExternalLogin:Scopes", "");
|
||||||
_parameters = SettingService.GetSetting(settings, "ExternalLogin:Parameters", "");
|
_parameters = SettingService.GetSetting(settings, "ExternalLogin:Parameters", "");
|
||||||
_pkce = SettingService.GetSetting(settings, "ExternalLogin:PKCE", "false");
|
_pkce = SettingService.GetSetting(settings, "ExternalLogin:PKCE", "false");
|
||||||
_redirecturl = PageState.Uri.Scheme + "://" + PageState.Alias.Name + "/signin-" + _providertype;
|
_authresponsetype = SettingService.GetSetting(settings, "ExternalLogin:AuthResponseType", "code");
|
||||||
_identifierclaimtype = SettingService.GetSetting(settings, "ExternalLogin:IdentifierClaimType", "sub");
|
_redirecturl = PageState.Uri.Scheme + "://" + PageState.Alias.Name + "/signin-" + _providertype;
|
||||||
_emailclaimtype = SettingService.GetSetting(settings, "ExternalLogin:EmailClaimType", "email");
|
_identifierclaimtype = SettingService.GetSetting(settings, "ExternalLogin:IdentifierClaimType", "sub");
|
||||||
_roleclaimtype = SettingService.GetSetting(settings, "ExternalLogin:RoleClaimType", "");
|
_emailclaimtype = SettingService.GetSetting(settings, "ExternalLogin:EmailClaimType", "email");
|
||||||
_profileclaimtypes = SettingService.GetSetting(settings, "ExternalLogin:ProfileClaimTypes", "");
|
_roleclaimtype = SettingService.GetSetting(settings, "ExternalLogin:RoleClaimType", "");
|
||||||
_domainfilter = SettingService.GetSetting(settings, "ExternalLogin:DomainFilter", "");
|
_profileclaimtypes = SettingService.GetSetting(settings, "ExternalLogin:ProfileClaimTypes", "");
|
||||||
_createusers = SettingService.GetSetting(settings, "ExternalLogin:CreateUsers", "true");
|
_domainfilter = SettingService.GetSetting(settings, "ExternalLogin:DomainFilter", "");
|
||||||
|
_createusers = SettingService.GetSetting(settings, "ExternalLogin:CreateUsers", "true");
|
||||||
|
|
||||||
_secret = SettingService.GetSetting(settings, "JwtOptions:Secret", "");
|
_secret = SettingService.GetSetting(settings, "JwtOptions:Secret", "");
|
||||||
_togglesecret = SharedLocalizer["ShowPassword"];
|
_togglesecret = SharedLocalizer["ShowPassword"];
|
||||||
_issuer = SettingService.GetSetting(settings, "JwtOptions:Issuer", PageState.Uri.Scheme + "://" + PageState.Alias.Name);
|
_issuer = SettingService.GetSetting(settings, "JwtOptions:Issuer", PageState.Uri.Scheme + "://" + PageState.Alias.Name);
|
||||||
_audience = SettingService.GetSetting(settings, "JwtOptions:Audience", "");
|
_audience = SettingService.GetSetting(settings, "JwtOptions:Audience", "");
|
||||||
_lifetime = SettingService.GetSetting(settings, "JwtOptions:Lifetime", "20");
|
_lifetime = SettingService.GetSetting(settings, "JwtOptions:Lifetime", "20");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task LoadUsersAsync(bool load)
|
private async Task LoadUsersAsync(bool load)
|
||||||
{
|
{
|
||||||
if (load)
|
if (load)
|
||||||
{
|
{
|
||||||
allusers = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
|
users = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Registered);
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
|
if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host))
|
||||||
{
|
{
|
||||||
var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
|
var hosts = await UserRoleService.GetUserRolesAsync(PageState.Site.SiteId, RoleNames.Host);
|
||||||
allusers.AddRange(hosts);
|
users.AddRange(hosts);
|
||||||
allusers = allusers.OrderBy(u => u.User.DisplayName).ToList();
|
users = users.OrderBy(u => u.User.DisplayName).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
users = allusers;
|
|
||||||
if (!string.IsNullOrEmpty(_search))
|
|
||||||
{
|
|
||||||
users = users.Where(item =>
|
|
||||||
(
|
|
||||||
item.User.Username.Contains(_search, StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
item.User.Email.Contains(_search, StringComparison.OrdinalIgnoreCase) ||
|
|
||||||
item.User.DisplayName.Contains(_search, StringComparison.OrdinalIgnoreCase)
|
|
||||||
)
|
|
||||||
).ToList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task OnSearch()
|
|
||||||
{
|
|
||||||
await UpdateUserSettingsAsync();
|
|
||||||
await LoadUsersAsync(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task DeleteUser(UserRole UserRole)
|
private async Task DeleteUser(UserRole UserRole)
|
||||||
@ -523,21 +511,6 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string settingSearch = "AU-search";
|
|
||||||
|
|
||||||
private async Task LoadUserSettingsAsync()
|
|
||||||
{
|
|
||||||
Dictionary<string, string> settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
|
|
||||||
_search = SettingService.GetSetting(settings, settingSearch, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task UpdateUserSettingsAsync()
|
|
||||||
{
|
|
||||||
Dictionary<string, string> settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
|
|
||||||
settings = SettingService.SetSetting(settings, settingSearch, _search);
|
|
||||||
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task SaveSiteSettings()
|
private async Task SaveSiteSettings()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -576,6 +549,7 @@ else
|
|||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:Scopes", _scopes, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:Scopes", _scopes, true);
|
||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:Parameters", _parameters, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:Parameters", _parameters, true);
|
||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:PKCE", _pkce, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:PKCE", _pkce, true);
|
||||||
|
settings = SettingService.SetSetting(settings, "ExternalLogin:AuthResponseType", _authresponsetype, true);
|
||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:IdentifierClaimType", _identifierclaimtype, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:IdentifierClaimType", _identifierclaimtype, true);
|
||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:EmailClaimType", _emailclaimtype, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:EmailClaimType", _emailclaimtype, true);
|
||||||
settings = SettingService.SetSetting(settings, "ExternalLogin:RoleClaimType", _roleclaimtype, true);
|
settings = SettingService.SetSetting(settings, "ExternalLogin:RoleClaimType", _roleclaimtype, true);
|
||||||
|
69
Oqtane.Client/Modules/Admin/Users/Users.razor
Normal file
69
Oqtane.Client/Modules/Admin/Users/Users.razor
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
@namespace Oqtane.Modules.Admin.Users
|
||||||
|
@inherits ModuleBase
|
||||||
|
@inject NavigationManager NavigationManager
|
||||||
|
@inject IUserService UserService
|
||||||
|
@inject IStringLocalizer<Users> Localizer
|
||||||
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="importfile" HelpText="Upload or select a tab delimited text file containing user information. The file must be in the Template format specified (Roles can be specified as a comma delimited list)." ResourceKey="ImportFile">Import File:</Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<FileManager Id="importfile" @ref="_filemanager" Filter="txt" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="notify" HelpText="Indicate if new users should receive an email notification" ResourceKey="Notify">Notify? </Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<select id="notify" class="form-select" @bind="@_notify" required>
|
||||||
|
<option value="True">@SharedLocalizer["Yes"]</option>
|
||||||
|
<option value="False">@SharedLocalizer["No"]</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<button type="button" class="btn btn-success" @onclick="ImportUsers">@Localizer["Import"]</button>
|
||||||
|
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@SharedLocalizer["Cancel"]</NavLink>
|
||||||
|
<a class="btn btn-info" href="/users.txt" target="_new">@Localizer["Template"]</a>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private FileManager _filemanager;
|
||||||
|
|
||||||
|
public override string Title => "Import Users";
|
||||||
|
|
||||||
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
|
||||||
|
|
||||||
|
private string _notify = "True";
|
||||||
|
|
||||||
|
private async Task ImportUsers()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var fileid = _filemanager.GetFileId();
|
||||||
|
if (fileid != -1)
|
||||||
|
{
|
||||||
|
ShowProgressIndicator();
|
||||||
|
var results = await UserService.ImportUsersAsync(PageState.Site.SiteId, fileid, bool.Parse(_notify));
|
||||||
|
if (bool.Parse(results["Success"]))
|
||||||
|
{
|
||||||
|
AddModuleMessage(string.Format(Localizer["Message.Import.Success"], results["Users"]), MessageType.Success);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Import.Failure"], MessageType.Error);
|
||||||
|
}
|
||||||
|
HideProgressIndicator();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddModuleMessage(Localizer["Message.Import.Validation"], MessageType.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await logger.LogError(ex, "Error Importing Users {Error}", ex.Message);
|
||||||
|
AddModuleMessage(Localizer["Error.Import"], MessageType.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
@namespace Oqtane.Modules.Controls
|
@namespace Oqtane.Modules.Controls
|
||||||
@using System.Text.Json
|
@using System.Text.Json
|
||||||
@inherits LocalizableComponent
|
@inherits LocalizableComponent
|
||||||
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
@if (_visible)
|
@if (_visible)
|
||||||
{
|
{
|
||||||
@ -20,7 +21,7 @@
|
|||||||
{
|
{
|
||||||
<button type="button" class="@Class" @onclick="Confirm">@((MarkupString)_iconSpan) @Text</button>
|
<button type="button" class="@Class" @onclick="Confirm">@((MarkupString)_iconSpan) @Text</button>
|
||||||
}
|
}
|
||||||
<button type="button" class="btn btn-secondary" @onclick="DisplayModal">@Localize("Cancel")</button>
|
<button type="button" class="btn btn-secondary" @onclick="DisplayModal">@SharedLocalizer["Cancel"]</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,116 +24,135 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private string _text = string.Empty;
|
private string _text = string.Empty;
|
||||||
private string _parameters = string.Empty;
|
private int _moduleId = -1;
|
||||||
private string _url = string.Empty;
|
private string _path = string.Empty;
|
||||||
private List<Permission> _permissions;
|
private string _parameters = string.Empty;
|
||||||
private bool _editmode = false;
|
private string _url = string.Empty;
|
||||||
private bool _authorized = false;
|
private List<Permission> _permissions;
|
||||||
private string _classname = "btn btn-primary";
|
private bool _editmode = false;
|
||||||
private string _style = string.Empty;
|
private bool _authorized = false;
|
||||||
private string _iconSpan = string.Empty;
|
private string _classname = "btn btn-primary";
|
||||||
|
private string _style = string.Empty;
|
||||||
|
private string _iconSpan = string.Empty;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Action { get; set; } // required
|
public string Action { get; set; } // required
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Text { get; set; } // optional - defaults to Action if not specified
|
public string Text { get; set; } // optional - defaults to Action if not specified
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Parameters { get; set; } // optional - querystring parameters should be in the form of "id=x&name=y"
|
public int ModuleId { get; set; } = -1; // optional - allows the link to target a specific moduleid
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public int ModuleId { get; set; } = -1; // optional - allows the link to target a specific moduleid
|
public string Path { get; set; } = null; // optional - allows the link to target a specific page
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Action OnClick { get; set; } = null; // optional - executes a method in the calling component
|
public string Parameters { get; set; } // optional - querystring parameters should be in the form of "id=x&name=y"
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public SecurityAccessLevel? Security { get; set; } // optional - can be used to explicitly specify SecurityAccessLevel
|
public Action OnClick { get; set; } = null; // optional - executes a method in the calling component
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Permissions { get; set; } // deprecated - use PermissionList instead
|
public SecurityAccessLevel? Security { get; set; } // optional - can be used to explicitly specify SecurityAccessLevel
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public List<Permission> PermissionList { get; set; } // optional - can be used to specify permissions
|
public string Permissions { get; set; } // deprecated - use PermissionList instead
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public bool Disabled { get; set; } // optional
|
public List<Permission> PermissionList { get; set; } // optional - can be used to specify permissions
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string EditMode { get; set; } // optional - specifies if an authorized user must be in edit mode to see the action - default is false.
|
public bool Disabled { get; set; } // optional
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Class { get; set; } // optional - defaults to primary if not specified
|
public string EditMode { get; set; } // optional - specifies if an authorized user must be in edit mode to see the action - default is false.
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Style { get; set; } // optional
|
public string Class { get; set; } // optional - defaults to primary if not specified
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string IconName { get; set; } // optional - specifies an icon for the link - default is no icon
|
public string Style { get; set; } // optional
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public bool IconOnly { get; set; } // optional - specifies only icon in link
|
public string IconName { get; set; } // optional - specifies an icon for the link - default is no icon
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string ReturnUrl { get; set; } // optional - used to set a url to redirect to
|
public bool IconOnly { get; set; } // optional - specifies only icon in link
|
||||||
|
|
||||||
protected override void OnInitialized()
|
[Parameter]
|
||||||
{
|
public string ReturnUrl { get; set; } // optional - used to set a url to redirect to
|
||||||
if (!string.IsNullOrEmpty(Permissions))
|
|
||||||
{
|
|
||||||
PermissionList = JsonSerializer.Deserialize<List<Permission>>(Permissions);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
|
|
||||||
_text = Action;
|
protected override void OnInitialized()
|
||||||
if (!string.IsNullOrEmpty(Text))
|
{
|
||||||
{
|
if (!string.IsNullOrEmpty(Permissions))
|
||||||
_text = Text;
|
{
|
||||||
}
|
PermissionList = JsonSerializer.Deserialize<List<Permission>>(Permissions);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (IconOnly && !string.IsNullOrEmpty(IconName))
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
_text = string.Empty;
|
base.OnParametersSet();
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Parameters))
|
_text = Action;
|
||||||
{
|
if (!string.IsNullOrEmpty(Text))
|
||||||
_parameters = Parameters;
|
{
|
||||||
}
|
_text = Text;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Class))
|
if (IconOnly && !string.IsNullOrEmpty(IconName))
|
||||||
{
|
{
|
||||||
_classname = Class;
|
_text = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Style))
|
_moduleId = ModuleState.ModuleId;
|
||||||
{
|
if (ModuleId != -1)
|
||||||
_style = Style;
|
{
|
||||||
}
|
_moduleId = ModuleId;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(EditMode))
|
_path = PageState.Page.Path;
|
||||||
{
|
if (Path != null)
|
||||||
_editmode = bool.Parse(EditMode);
|
{
|
||||||
}
|
_path = Path;
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(IconName))
|
if (!string.IsNullOrEmpty(Parameters))
|
||||||
{
|
{
|
||||||
if (!IconName.Contains(" "))
|
_parameters = Parameters;
|
||||||
{
|
}
|
||||||
IconName = "oi oi-" + IconName;
|
|
||||||
}
|
if (!string.IsNullOrEmpty(Class))
|
||||||
_iconSpan = $"<span class=\"{IconName}\"></span>{(IconOnly ? "" : " ")}";
|
{
|
||||||
}
|
_classname = Class;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Style))
|
||||||
|
{
|
||||||
|
_style = Style;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(EditMode))
|
||||||
|
{
|
||||||
|
_editmode = bool.Parse(EditMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(IconName))
|
||||||
|
{
|
||||||
|
if (!IconName.Contains(" "))
|
||||||
|
{
|
||||||
|
IconName = "oi oi-" + IconName;
|
||||||
|
}
|
||||||
|
_iconSpan = $"<span class=\"{IconName}\"></span>{(IconOnly ? "" : " ")}";
|
||||||
|
}
|
||||||
|
|
||||||
_permissions = (PermissionList == null) ? ModuleState.PermissionList : PermissionList;
|
_permissions = (PermissionList == null) ? ModuleState.PermissionList : PermissionList;
|
||||||
_text = Localize(nameof(Text), _text);
|
_text = Localize(nameof(Text), _text);
|
||||||
_url = (ModuleId == -1) ? EditUrl(Action, _parameters) : EditUrl(ModuleId, Action, _parameters);
|
|
||||||
|
_url = EditUrl(_path, _moduleId, Action, _parameters);
|
||||||
if (!string.IsNullOrEmpty(ReturnUrl))
|
if (!string.IsNullOrEmpty(ReturnUrl))
|
||||||
{
|
{
|
||||||
_url += ((_url.Contains("?")) ? "&" : "?") + $"returnurl={WebUtility.UrlEncode(ReturnUrl)}";
|
_url += ((_url.Contains("?")) ? "&" : "?") + $"returnurl={WebUtility.UrlEncode(ReturnUrl)}";
|
||||||
|
@ -64,12 +64,12 @@
|
|||||||
|
|
||||||
if (!String.IsNullOrEmpty(ModifiedBy))
|
if (!String.IsNullOrEmpty(ModifiedBy))
|
||||||
{
|
{
|
||||||
_text += $" {Localizer["by"]} <b>{ModifiedBy}</b>";
|
_text += $" {Localizer["By"]} <b>{ModifiedBy}</b>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ModifiedOn != null)
|
if (ModifiedOn != null)
|
||||||
{
|
{
|
||||||
_text += $" {Localizer["on"]} <b>{ModifiedOn.Value.ToString(DateTimeFormat)}</b>";
|
_text += $" {Localizer["On"]} <b>{ModifiedOn.Value.ToString(DateTimeFormat)}</b>";
|
||||||
}
|
}
|
||||||
|
|
||||||
_text += "</p>";
|
_text += "</p>";
|
||||||
|
@ -40,6 +40,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (GetFileId() != -1 && !UploadMultiple)
|
||||||
|
{
|
||||||
|
<input class="form-control" @bind="@_file.Name" disabled />
|
||||||
|
}
|
||||||
|
}
|
||||||
@if (ShowUpload && _haseditpermission)
|
@if (ShowUpload && _haseditpermission)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -55,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col mt-2 text-end">
|
<div class="col mt-2 text-end">
|
||||||
<button type="button" class="btn btn-success" @onclick="UploadFiles">@SharedLocalizer["Upload"]</button>
|
<button type="button" class="btn btn-success" @onclick="UploadFiles">@SharedLocalizer["Upload"]</button>
|
||||||
@if (GetFileId() != -1)
|
@if (GetFileId() != -1 && !UploadMultiple)
|
||||||
{
|
{
|
||||||
<button type="button" class="btn btn-danger mx-1" @onclick="DeleteFile">@SharedLocalizer["Delete"]</button>
|
<button type="button" class="btn btn-danger mx-1" @onclick="DeleteFile">@SharedLocalizer["Delete"]</button>
|
||||||
}
|
}
|
||||||
@ -157,6 +164,15 @@
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public EventCallback<int> OnDelete { get; set; } // optional - executes a method in the calling component when a file is deleted
|
public EventCallback<int> OnDelete { get; set; } // optional - executes a method in the calling component when a file is deleted
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
// create unique id for component
|
||||||
|
_guid = Guid.NewGuid().ToString("N");
|
||||||
|
_fileinputid = "FileInput_" + _guid;
|
||||||
|
_progressinfoid = "ProgressInfo_" + _guid;
|
||||||
|
_progressbarid = "ProgressBar_" + _guid;
|
||||||
|
}
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
// packages folder is a framework folder for uploading installable nuget packages
|
// packages folder is a framework folder for uploading installable nuget packages
|
||||||
@ -223,12 +239,6 @@
|
|||||||
|
|
||||||
await GetFiles();
|
await GetFiles();
|
||||||
|
|
||||||
// create unique id for component
|
|
||||||
_guid = Guid.NewGuid().ToString("N");
|
|
||||||
_fileinputid = "FileInput_" + _guid;
|
|
||||||
_progressinfoid = "ProgressInfo_" + _guid;
|
|
||||||
_progressbarid = "ProgressBar_" + _guid;
|
|
||||||
|
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +348,8 @@
|
|||||||
string restricted = "";
|
string restricted = "";
|
||||||
foreach (var upload in uploads)
|
foreach (var upload in uploads)
|
||||||
{
|
{
|
||||||
var extension = (upload.LastIndexOf(".") != -1) ? upload.Substring(upload.LastIndexOf(".") + 1) : "";
|
var filename = upload.Split(':')[0];
|
||||||
|
var extension = (filename.LastIndexOf(".") != -1) ? filename.Substring(filename.LastIndexOf(".") + 1) : "";
|
||||||
if (!Constants.UploadableFiles.Split(',').Contains(extension.ToLower()))
|
if (!Constants.UploadableFiles.Split(',').Contains(extension.ToLower()))
|
||||||
{
|
{
|
||||||
restricted += (restricted == "" ? "" : ",") + extension;
|
restricted += (restricted == "" ? "" : ",") + extension;
|
||||||
@ -365,24 +376,27 @@
|
|||||||
while (upload < uploads.Length && success)
|
while (upload < uploads.Length && success)
|
||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
// note that progressive retry will only wait a maximum of 15 seconds which may not be long enough for very large file uploads
|
var filename = uploads[upload].Split(':')[0];
|
||||||
|
var size = Int64.Parse(uploads[upload].Split(':')[1]);
|
||||||
|
var maxattempts = (int)Math.Ceiling(size / 500000.0) + 4; // 30 MB takes 1 minute at 5 Mbps (min 5 attempts)
|
||||||
|
|
||||||
int attempts = 0;
|
int attempts = 0;
|
||||||
while (attempts < 5 && !success)
|
while (attempts < maxattempts && !success)
|
||||||
{
|
{
|
||||||
attempts += 1;
|
attempts += 1;
|
||||||
Thread.Sleep(1000 * attempts); // progressive retry
|
Thread.Sleep(1000);
|
||||||
|
|
||||||
if (Folder == Constants.PackagesFolder)
|
if (Folder == Constants.PackagesFolder)
|
||||||
{
|
{
|
||||||
var files = await FileService.GetFilesAsync(folder);
|
var files = await FileService.GetFilesAsync(folder);
|
||||||
if (files != null && files.Any(item => item.Name == uploads[upload]))
|
if (files != null && files.Any(item => item.Name == filename))
|
||||||
{
|
{
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var file = await FileService.GetFileAsync(int.Parse(folder), uploads[upload]);
|
var file = await FileService.GetFileAsync(int.Parse(folder), filename);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
success = true;
|
success = true;
|
||||||
@ -398,8 +412,8 @@
|
|||||||
// reset progress indicators
|
// reset progress indicators
|
||||||
if (ShowProgress)
|
if (ShowProgress)
|
||||||
{
|
{
|
||||||
await interop.SetElementAttribute(_guid + "ProgressInfo", "style", "display: none;");
|
await interop.SetElementAttribute(_progressinfoid, "style", "display: none;");
|
||||||
await interop.SetElementAttribute(_guid + "ProgressBar", "style", "display: none;");
|
await interop.SetElementAttribute(_progressbarid, "style", "display: none;");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -430,11 +444,12 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// set FileId to first file in upload collection
|
// set FileId to first file in upload collection
|
||||||
var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0]);
|
var file = await FileService.GetFileAsync(int.Parse(folder), uploads[0].Split(":")[0]);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
FileId = file.FileId;
|
FileId = file.FileId;
|
||||||
await SetImage();
|
await SetImage();
|
||||||
|
await OnSelect.InvokeAsync(FileId);
|
||||||
await OnUpload.InvokeAsync(FileId);
|
await OnUpload.InvokeAsync(FileId);
|
||||||
}
|
}
|
||||||
await GetFiles();
|
await GetFiles();
|
||||||
@ -481,7 +496,8 @@
|
|||||||
await GetFiles();
|
await GetFiles();
|
||||||
FileId = -1;
|
FileId = -1;
|
||||||
await SetImage();
|
await SetImage();
|
||||||
StateHasChanged();
|
await OnSelect.InvokeAsync(FileId);
|
||||||
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
50
Oqtane.Client/Modules/Controls/InputList.razor
Normal file
50
Oqtane.Client/Modules/Controls/InputList.razor
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
@namespace Oqtane.Modules.Controls
|
||||||
|
@inherits LocalizableComponent
|
||||||
|
|
||||||
|
<input type="text" value="@Value" list="@_id" class="form-control" @onchange="(e => OnChange(e))" />
|
||||||
|
<datalist id="@_id" value="@Value">
|
||||||
|
@foreach(var kvp in DataList)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(kvp.Value))
|
||||||
|
{
|
||||||
|
<option value="@kvp.Key">@Localize(kvp.Value, kvp.Value)</option>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<option value="@kvp.Key">@Localize(kvp.Key, kvp.Key)</option>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</datalist>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private string _id;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
[EditorRequired]
|
||||||
|
[Parameter]
|
||||||
|
public Dictionary<string, string> DataList { get; set; }
|
||||||
|
|
||||||
|
[EditorRequired]
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<string> ValueChanged { get; set; }
|
||||||
|
|
||||||
|
protected override void OnInitialized()
|
||||||
|
{
|
||||||
|
// create unique id for component
|
||||||
|
_id = "DataList_" + Guid.NewGuid().ToString("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnChange(ChangeEventArgs e)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(e.Value.ToString()))
|
||||||
|
{
|
||||||
|
Value = e.Value.ToString();
|
||||||
|
if (ValueChanged.HasDelegate)
|
||||||
|
{
|
||||||
|
ValueChanged.InvokeAsync(Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,20 @@
|
|||||||
@namespace Oqtane.Modules.Controls
|
@namespace Oqtane.Modules.Controls
|
||||||
@inherits ModuleControlBase
|
@inherits ModuleControlBase
|
||||||
@inject IStringLocalizerFactory LocalizerFactory
|
@inject IStringLocalizerFactory LocalizerFactory
|
||||||
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
@typeparam TableItem
|
@typeparam TableItem
|
||||||
|
|
||||||
@if (ItemList != null)
|
@if (ItemList != null)
|
||||||
{
|
{
|
||||||
|
@if (!string.IsNullOrEmpty(SearchProperties))
|
||||||
|
{
|
||||||
|
<div class="input-group my-3">
|
||||||
|
<input id="search" class="form-control" placeholder=@string.Format(Localizer["SearchPlaceholder"], FormatSearchProperties()) @bind="@_search" />
|
||||||
|
<button type="button" class="btn btn-primary" @onclick="Search">@SharedLocalizer["Search"]</button>
|
||||||
|
<button type="button" class="btn btn-secondary" @onclick="Reset">@SharedLocalizer["Reset"]</button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if ((Toolbar == "Top" || Toolbar == "Both") && _pages > 0 && Items.Count() > _maxItems)
|
@if ((Toolbar == "Top" || Toolbar == "Both") && _pages > 0 && Items.Count() > _maxItems)
|
||||||
{
|
{
|
||||||
<ul class="pagination justify-content-center my-2">
|
<ul class="pagination justify-content-center my-2">
|
||||||
@ -175,6 +185,9 @@
|
|||||||
private int _startPage = 0;
|
private int _startPage = 0;
|
||||||
private int _endPage = 0;
|
private int _endPage = 0;
|
||||||
private int _columns = 0;
|
private int _columns = 0;
|
||||||
|
private string _search = "";
|
||||||
|
|
||||||
|
private IEnumerable<TableItem> AllItems;
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public string Format { get; set; } // Table or Grid
|
public string Format { get; set; } // Table or Grid
|
||||||
@ -221,6 +234,9 @@
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public Action<int> OnPageChange { get; set; } // a method to be executed in the calling component when the page changes
|
public Action<int> OnPageChange { get; set; } // a method to be executed in the calling component when the page changes
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string SearchProperties { get; set; } // comma delimited list of property names to include in search
|
||||||
|
|
||||||
private IEnumerable<TableItem> ItemList { get; set; }
|
private IEnumerable<TableItem> ItemList { get; set; }
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
@ -276,6 +292,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(SearchProperties))
|
||||||
|
{
|
||||||
|
AllItems = Items; // only used in search
|
||||||
|
if (!string.IsNullOrEmpty(_search))
|
||||||
|
{
|
||||||
|
Search();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(PageSize))
|
if (!string.IsNullOrEmpty(PageSize))
|
||||||
{
|
{
|
||||||
_maxItems = int.Parse(PageSize);
|
_maxItems = int.Parse(PageSize);
|
||||||
@ -323,10 +348,10 @@
|
|||||||
{
|
{
|
||||||
_endPage = _pages;
|
_endPage = _pages;
|
||||||
}
|
}
|
||||||
ItemList = Items.Skip((_page - 1) * _maxItems).Take(_maxItems);
|
ItemList = Items.Skip((_page - 1) * _maxItems).Take(_maxItems);
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
OnPageChange?.Invoke(_page);
|
OnPageChange?.Invoke(_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateList(int page)
|
public void UpdateList(int page)
|
||||||
{
|
{
|
||||||
@ -369,4 +394,75 @@
|
|||||||
|
|
||||||
UpdateList(_page);
|
UpdateList(_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Search()
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(_search))
|
||||||
|
{
|
||||||
|
Items = AllItems.Where(item =>
|
||||||
|
{
|
||||||
|
var values = SearchProperties.Split(',')
|
||||||
|
.Select(itemType => GetPropertyValue(item, itemType))
|
||||||
|
.Where(value => value != null)
|
||||||
|
.Select(value => value.ToString().ToLower());
|
||||||
|
|
||||||
|
return values.Any(value => value.Contains(_search.ToLower()));
|
||||||
|
}).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Items = AllItems;
|
||||||
|
}
|
||||||
|
_pages = (int)Math.Ceiling(Items.Count() / (decimal)_maxItems);
|
||||||
|
UpdateList(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private object GetPropertyValue(object obj, string propertyName)
|
||||||
|
{
|
||||||
|
var index = propertyName.IndexOf(".");
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
var propertyInfo = obj.GetType().GetProperty(propertyName.Substring(0, index));
|
||||||
|
if (propertyInfo != null)
|
||||||
|
{
|
||||||
|
return GetPropertyValue(propertyInfo.GetValue(obj), propertyName.Substring(index + 1));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var propertyInfo = obj.GetType().GetProperty(propertyName);
|
||||||
|
if (propertyInfo != null)
|
||||||
|
{
|
||||||
|
return propertyInfo.GetValue(obj);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Reset()
|
||||||
|
{
|
||||||
|
_search = "";
|
||||||
|
Items = AllItems;
|
||||||
|
_pages = (int)Math.Ceiling(Items.Count() / (decimal)_maxItems);
|
||||||
|
UpdateList(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private string FormatSearchProperties()
|
||||||
|
{
|
||||||
|
var properties = new List<string>();
|
||||||
|
foreach (var property in SearchProperties.Split(',', StringSplitOptions.RemoveEmptyEntries))
|
||||||
|
{
|
||||||
|
var index = property.LastIndexOf(".");
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
properties.Add(property.Substring(index + 1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
properties.Add(property);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return string.Join(",", properties);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div class="row" style="margin-bottom: 50px;">
|
<div class="row" style="margin-bottom: 50px;">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<TabStrip>
|
<TabStrip>
|
||||||
<TabPanel Name="Rich" Heading="Rich Text Editor">
|
<TabPanel Name="Rich" Heading="Rich Text Editor" ResourceKey="RichTextEditor">
|
||||||
@if (_richfilemanager)
|
@if (_richfilemanager)
|
||||||
{
|
{
|
||||||
<FileManager @ref="_fileManager" Filter="@Constants.ImageFiles" />
|
<FileManager @ref="_fileManager" Filter="@Constants.ImageFiles" />
|
||||||
|
@ -68,12 +68,6 @@
|
|||||||
private List<Models.HtmlText> _htmltexts;
|
private List<Models.HtmlText> _htmltexts;
|
||||||
private string _view = "";
|
private string _view = "";
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
|
||||||
{
|
|
||||||
base.OnParametersSet();
|
|
||||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -9,6 +9,7 @@ using Oqtane.UI;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Dynamic;
|
||||||
|
|
||||||
namespace Oqtane.Modules
|
namespace Oqtane.Modules
|
||||||
{
|
{
|
||||||
@ -280,13 +281,17 @@ namespace Oqtane.Modules
|
|||||||
|
|
||||||
public void SetModuleTitle(string title)
|
public void SetModuleTitle(string title)
|
||||||
{
|
{
|
||||||
var obj = new { PageModuleId = ModuleState.PageModuleId, Title = title };
|
dynamic obj = new ExpandoObject();
|
||||||
|
obj.PageModuleId = ModuleState.PageModuleId;
|
||||||
|
obj.Title = title;
|
||||||
SiteState.Properties.ModuleTitle = obj;
|
SiteState.Properties.ModuleTitle = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetModuleVisibility(bool visible)
|
public void SetModuleVisibility(bool visible)
|
||||||
{
|
{
|
||||||
var obj = new { PageModuleId = ModuleState.PageModuleId, Visible = visible };
|
dynamic obj = new ExpandoObject();
|
||||||
|
obj.PageModuleId = ModuleState.PageModuleId;
|
||||||
|
obj.Visible = visible;
|
||||||
SiteState.Properties.ModuleVisibility = obj;
|
SiteState.Properties.ModuleVisibility = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Version>4.0.2</Version>
|
<Version>4.0.6</Version>
|
||||||
<Product>Oqtane</Product>
|
<Product>Oqtane</Product>
|
||||||
<Authors>Shaun Walker</Authors>
|
<Authors>Shaun Walker</Authors>
|
||||||
<Company>.NET Foundation</Company>
|
<Company>.NET Foundation</Company>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<Copyright>.NET Foundation</Copyright>
|
<Copyright>.NET Foundation</Copyright>
|
||||||
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
<PackageProjectUrl>https://www.oqtane.org</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/oqtane/oqtane.framework/blob/dev/LICENSE</PackageLicenseUrl>
|
||||||
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.2</PackageReleaseNotes>
|
<PackageReleaseNotes>https://github.com/oqtane/oqtane.framework/releases/tag/v4.0.6</PackageReleaseNotes>
|
||||||
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
<RepositoryUrl>https://github.com/oqtane/oqtane.framework</RepositoryUrl>
|
||||||
<RepositoryType>Git</RepositoryType>
|
<RepositoryType>Git</RepositoryType>
|
||||||
<RootNamespace>Oqtane</RootNamespace>
|
<RootNamespace>Oqtane</RootNamespace>
|
||||||
|
789
Oqtane.Client/Resources/IconResources.resx
Normal file
789
Oqtane.Client/Resources/IconResources.resx
Normal file
@ -0,0 +1,789 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Icon.AccountLogin" xml:space="preserve">
|
||||||
|
<value>Account Login</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.AccountLogout" xml:space="preserve">
|
||||||
|
<value>Account Logout</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ActionRedo" xml:space="preserve">
|
||||||
|
<value>Action Redo</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ActionUndo" xml:space="preserve">
|
||||||
|
<value>Action Undo</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.AlignCenter" xml:space="preserve">
|
||||||
|
<value>Align Center</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.AlignLeft" xml:space="preserve">
|
||||||
|
<value>Align Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.AlignRight" xml:space="preserve">
|
||||||
|
<value>Align Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Aperture" xml:space="preserve">
|
||||||
|
<value>Aperture</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowBottom" xml:space="preserve">
|
||||||
|
<value>Arrow Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowCircleBottom" xml:space="preserve">
|
||||||
|
<value>Arrow Circle Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowCircleLeft" xml:space="preserve">
|
||||||
|
<value>Arrow Circle Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowCircleRight" xml:space="preserve">
|
||||||
|
<value>Arrow Circle Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowCircleTop" xml:space="preserve">
|
||||||
|
<value>Arrow Circle Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowLeft" xml:space="preserve">
|
||||||
|
<value>Arrow Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowRight" xml:space="preserve">
|
||||||
|
<value>Arrow Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowThickBottom" xml:space="preserve">
|
||||||
|
<value>Arrow Thick Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowThickLeft" xml:space="preserve">
|
||||||
|
<value>Arrow Thick Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowThickRight" xml:space="preserve">
|
||||||
|
<value>Arrow Thick Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowThickTop" xml:space="preserve">
|
||||||
|
<value>Arrow Thick Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ArrowTop" xml:space="preserve">
|
||||||
|
<value>Arrow Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.AudioSpectrum" xml:space="preserve">
|
||||||
|
<value>Audio Spectrum</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Audio" xml:space="preserve">
|
||||||
|
<value>Audio</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Badge" xml:space="preserve">
|
||||||
|
<value>Badge</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Ban" xml:space="preserve">
|
||||||
|
<value>Ban</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.BarChart" xml:space="preserve">
|
||||||
|
<value>Bar Chart</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Basket" xml:space="preserve">
|
||||||
|
<value>Basket</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.BatteryEmpty" xml:space="preserve">
|
||||||
|
<value>Battery Empty</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.BatteryFull" xml:space="preserve">
|
||||||
|
<value>Battery Full</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Beaker" xml:space="preserve">
|
||||||
|
<value>Beaker</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bell" xml:space="preserve">
|
||||||
|
<value>Bell</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bluetooth" xml:space="preserve">
|
||||||
|
<value>Bluetooth</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bold" xml:space="preserve">
|
||||||
|
<value>Bold</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bolt" xml:space="preserve">
|
||||||
|
<value>Bolt</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Book" xml:space="preserve">
|
||||||
|
<value>Book</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bookmark" xml:space="preserve">
|
||||||
|
<value>Bookmark</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Box" xml:space="preserve">
|
||||||
|
<value>Box</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Briefcase" xml:space="preserve">
|
||||||
|
<value>Briefcase</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.BritishPound" xml:space="preserve">
|
||||||
|
<value>British Pound</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Browser" xml:space="preserve">
|
||||||
|
<value>Browser</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Brush" xml:space="preserve">
|
||||||
|
<value>Brush</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bug" xml:space="preserve">
|
||||||
|
<value>Bug</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Bullhorn" xml:space="preserve">
|
||||||
|
<value>Bullhorn</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Calculator" xml:space="preserve">
|
||||||
|
<value>Calculator</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Calendar" xml:space="preserve">
|
||||||
|
<value>Calendar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CameraSlr" xml:space="preserve">
|
||||||
|
<value>Camera Slr</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CaretBottom" xml:space="preserve">
|
||||||
|
<value>Caret Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CaretLeft" xml:space="preserve">
|
||||||
|
<value>Caret Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CaretRight" xml:space="preserve">
|
||||||
|
<value>Caret Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CaretTop" xml:space="preserve">
|
||||||
|
<value>Caret Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Cart" xml:space="preserve">
|
||||||
|
<value>Cart</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Chat" xml:space="preserve">
|
||||||
|
<value>Chat</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Check" xml:space="preserve">
|
||||||
|
<value>Check</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ChevronBottom" xml:space="preserve">
|
||||||
|
<value>Chevron Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ChevronLeft" xml:space="preserve">
|
||||||
|
<value>Chevron Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ChevronRight" xml:space="preserve">
|
||||||
|
<value>Chevron Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ChevronTop" xml:space="preserve">
|
||||||
|
<value>Chevron Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CircleCheck" xml:space="preserve">
|
||||||
|
<value>Circle Check</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CircleX" xml:space="preserve">
|
||||||
|
<value>Circle X</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Clipboard" xml:space="preserve">
|
||||||
|
<value>Clipboard</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Clock" xml:space="preserve">
|
||||||
|
<value>Clock</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CloudDownload" xml:space="preserve">
|
||||||
|
<value>Cloud Download</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CloudUpload" xml:space="preserve">
|
||||||
|
<value>Cloud Upload</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Cloud" xml:space="preserve">
|
||||||
|
<value>Cloud</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Cloudy" xml:space="preserve">
|
||||||
|
<value>Cloudy</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Code" xml:space="preserve">
|
||||||
|
<value>Code</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Cog" xml:space="preserve">
|
||||||
|
<value>Cog</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CollapseDown" xml:space="preserve">
|
||||||
|
<value>Collapse Down</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CollapseLeft" xml:space="preserve">
|
||||||
|
<value>Collapse Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CollapseRight" xml:space="preserve">
|
||||||
|
<value>Collapse Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CollapseUp" xml:space="preserve">
|
||||||
|
<value>Collapse Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Command" xml:space="preserve">
|
||||||
|
<value>Command</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CommentSquare" xml:space="preserve">
|
||||||
|
<value>Comment Square</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Compass" xml:space="preserve">
|
||||||
|
<value>Compass</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Contrast" xml:space="preserve">
|
||||||
|
<value>Contrast</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Copywriting" xml:space="preserve">
|
||||||
|
<value>Copywriting</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.CreditCard" xml:space="preserve">
|
||||||
|
<value>Credit Card</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Crop" xml:space="preserve">
|
||||||
|
<value>Crop</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Dashboard" xml:space="preserve">
|
||||||
|
<value>Dashboard</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DataTransferDownload" xml:space="preserve">
|
||||||
|
<value>Data Transfer Download</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DataTransferUpload" xml:space="preserve">
|
||||||
|
<value>Data Transfer Upload</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Delete" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Dial" xml:space="preserve">
|
||||||
|
<value>Dial</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Document" xml:space="preserve">
|
||||||
|
<value>Document</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Dollar" xml:space="preserve">
|
||||||
|
<value>Dollar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DoubleQuoteSansLeft" xml:space="preserve">
|
||||||
|
<value>Double Quote Sans Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DoubleQuoteSansRight" xml:space="preserve">
|
||||||
|
<value>Double Quote Sans Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DoubleQuoteSerifLeft" xml:space="preserve">
|
||||||
|
<value>Double Quote Serif Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.DoubleQuoteSerifRight" xml:space="preserve">
|
||||||
|
<value>Double Quote Serif Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Droplet" xml:space="preserve">
|
||||||
|
<value>Droplet</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Eject" xml:space="preserve">
|
||||||
|
<value>Eject</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Elevator" xml:space="preserve">
|
||||||
|
<value>Elevator</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Ellipses" xml:space="preserve">
|
||||||
|
<value>Ellipses</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.EnvelopeClosed" xml:space="preserve">
|
||||||
|
<value>Envelope Closed</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.EnvelopeOpen" xml:space="preserve">
|
||||||
|
<value>Envelope Open</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Euro" xml:space="preserve">
|
||||||
|
<value>Euro</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Excerpt" xml:space="preserve">
|
||||||
|
<value>Excerpt</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ExpandDown" xml:space="preserve">
|
||||||
|
<value>Expand Down</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ExpandLeft" xml:space="preserve">
|
||||||
|
<value>Expand Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ExpandRight" xml:space="preserve">
|
||||||
|
<value>Expand Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ExpandUp" xml:space="preserve">
|
||||||
|
<value>Expand Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ExternalLink" xml:space="preserve">
|
||||||
|
<value>External Link</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Eye" xml:space="preserve">
|
||||||
|
<value>Eye</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Eyedropper" xml:space="preserve">
|
||||||
|
<value>Eyedropper</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.File" xml:space="preserve">
|
||||||
|
<value>File</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Fire" xml:space="preserve">
|
||||||
|
<value>Fire</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Flag" xml:space="preserve">
|
||||||
|
<value>Flag</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Flash" xml:space="preserve">
|
||||||
|
<value>Flash</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Folder" xml:space="preserve">
|
||||||
|
<value>Folder</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Fork" xml:space="preserve">
|
||||||
|
<value>Fork</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.FullscreenEnter" xml:space="preserve">
|
||||||
|
<value>Fullscreen Enter</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.FullscreenExit" xml:space="preserve">
|
||||||
|
<value>Fullscreen Exit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Globe" xml:space="preserve">
|
||||||
|
<value>Globe</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Graph" xml:space="preserve">
|
||||||
|
<value>Graph</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.GridFourUp" xml:space="preserve">
|
||||||
|
<value>Grid Four Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.GridThreeUp" xml:space="preserve">
|
||||||
|
<value>Grid Three Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.GridTwoUp" xml:space="preserve">
|
||||||
|
<value>Grid Two Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.HardDrive" xml:space="preserve">
|
||||||
|
<value>Hard Drive</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Header" xml:space="preserve">
|
||||||
|
<value>Header</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Headphones" xml:space="preserve">
|
||||||
|
<value>Headphones</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Heart" xml:space="preserve">
|
||||||
|
<value>Heart</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Home" xml:space="preserve">
|
||||||
|
<value>Home</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Image" xml:space="preserve">
|
||||||
|
<value>Image</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Inbox" xml:space="preserve">
|
||||||
|
<value>Inbox</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Infinity" xml:space="preserve">
|
||||||
|
<value>Infinity</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Info" xml:space="preserve">
|
||||||
|
<value>Info</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Italic" xml:space="preserve">
|
||||||
|
<value>Italic</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.JustifyCenter" xml:space="preserve">
|
||||||
|
<value>Justify Center</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.JustifyLeft" xml:space="preserve">
|
||||||
|
<value>Justify Left</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.JustifyRight" xml:space="preserve">
|
||||||
|
<value>Justify Right</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Key" xml:space="preserve">
|
||||||
|
<value>Key</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Laptop" xml:space="preserve">
|
||||||
|
<value>Laptop</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Layers" xml:space="preserve">
|
||||||
|
<value>Layers</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Lightbulb" xml:space="preserve">
|
||||||
|
<value>Lightbulb</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LinkBroken" xml:space="preserve">
|
||||||
|
<value>Link Broken</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LinkIntact" xml:space="preserve">
|
||||||
|
<value>Link Intact</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ListRich" xml:space="preserve">
|
||||||
|
<value>List Rich</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.List" xml:space="preserve">
|
||||||
|
<value>List</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Location" xml:space="preserve">
|
||||||
|
<value>Location</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LockLocked" xml:space="preserve">
|
||||||
|
<value>Lock Locked</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LockUnlocked" xml:space="preserve">
|
||||||
|
<value>Lock Unlocked</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LoopCircular" xml:space="preserve">
|
||||||
|
<value>Loop Circular</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.LoopSquare" xml:space="preserve">
|
||||||
|
<value>Loop Square</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Loop" xml:space="preserve">
|
||||||
|
<value>Loop</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MagnifyingGlass" xml:space="preserve">
|
||||||
|
<value>Magnifying Glass</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MapMarker" xml:space="preserve">
|
||||||
|
<value>Map Marker</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Map" xml:space="preserve">
|
||||||
|
<value>Map</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaPause" xml:space="preserve">
|
||||||
|
<value>Media Pause</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaPlay" xml:space="preserve">
|
||||||
|
<value>Media Play</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaRecord" xml:space="preserve">
|
||||||
|
<value>Media Record</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaSkipBackward" xml:space="preserve">
|
||||||
|
<value>Media Skip Backward</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaSkipForward" xml:space="preserve">
|
||||||
|
<value>Media Skip Forward</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaStepBackward" xml:space="preserve">
|
||||||
|
<value>Media Step Backward</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaStepForward" xml:space="preserve">
|
||||||
|
<value>Media Step Forward</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MediaStop" xml:space="preserve">
|
||||||
|
<value>Media Stop</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MedicalCross" xml:space="preserve">
|
||||||
|
<value>Medical Cross</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Menu" xml:space="preserve">
|
||||||
|
<value>Menu</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Microphone" xml:space="preserve">
|
||||||
|
<value>Microphone</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Minus" xml:space="preserve">
|
||||||
|
<value>Minus</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Monitor" xml:space="preserve">
|
||||||
|
<value>Monitor</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Moon" xml:space="preserve">
|
||||||
|
<value>Moon</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Move" xml:space="preserve">
|
||||||
|
<value>Move</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.MusicalNote" xml:space="preserve">
|
||||||
|
<value>Musical Note</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Paperclip" xml:space="preserve">
|
||||||
|
<value>Paperclip</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Pencil" xml:space="preserve">
|
||||||
|
<value>Pencil</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.People" xml:space="preserve">
|
||||||
|
<value>People</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Person" xml:space="preserve">
|
||||||
|
<value>Person</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Phone" xml:space="preserve">
|
||||||
|
<value>Phone</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.PieChart" xml:space="preserve">
|
||||||
|
<value>Pie Chart</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Pin" xml:space="preserve">
|
||||||
|
<value>Pin</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.PlayCircle" xml:space="preserve">
|
||||||
|
<value>Play Circle</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Plus" xml:space="preserve">
|
||||||
|
<value>Plus</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.PowerStandby" xml:space="preserve">
|
||||||
|
<value>Power Standby</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Print" xml:space="preserve">
|
||||||
|
<value>Print</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Project" xml:space="preserve">
|
||||||
|
<value>Project</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Pulse" xml:space="preserve">
|
||||||
|
<value>Pulse</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.PuzzlePiece" xml:space="preserve">
|
||||||
|
<value>Puzzle Piece</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.QuestionMark" xml:space="preserve">
|
||||||
|
<value>Question Mark</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Rain" xml:space="preserve">
|
||||||
|
<value>Rain</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Random" xml:space="preserve">
|
||||||
|
<value>Random</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Reload" xml:space="preserve">
|
||||||
|
<value>Reload</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ResizeBoth" xml:space="preserve">
|
||||||
|
<value>Resize Both</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ResizeHeight" xml:space="preserve">
|
||||||
|
<value>Resize Height</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ResizeWidth" xml:space="preserve">
|
||||||
|
<value>Resize Width</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.RssAlt" xml:space="preserve">
|
||||||
|
<value>Rss Alt</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Rss" xml:space="preserve">
|
||||||
|
<value>Rss</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Script" xml:space="preserve">
|
||||||
|
<value>Script</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ShareBoxed" xml:space="preserve">
|
||||||
|
<value>Share Boxed</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Share" xml:space="preserve">
|
||||||
|
<value>Share</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Shield" xml:space="preserve">
|
||||||
|
<value>Shield</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Signal" xml:space="preserve">
|
||||||
|
<value>Signal</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Signpost" xml:space="preserve">
|
||||||
|
<value>Signpost</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.SortAscending" xml:space="preserve">
|
||||||
|
<value>Sort Ascending</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.SortDescending" xml:space="preserve">
|
||||||
|
<value>Sort Descending</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Spreadsheet" xml:space="preserve">
|
||||||
|
<value>Spreadsheet</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Star" xml:space="preserve">
|
||||||
|
<value>Star</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Sun" xml:space="preserve">
|
||||||
|
<value>Sun</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Tablet" xml:space="preserve">
|
||||||
|
<value>Tablet</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Tag" xml:space="preserve">
|
||||||
|
<value>Tag</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Tags" xml:space="preserve">
|
||||||
|
<value>Tags</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Target" xml:space="preserve">
|
||||||
|
<value>Target</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Task" xml:space="preserve">
|
||||||
|
<value>Task</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Terminal" xml:space="preserve">
|
||||||
|
<value>Terminal</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Text" xml:space="preserve">
|
||||||
|
<value>Text</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ThumbDown" xml:space="preserve">
|
||||||
|
<value>Thumb Down</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ThumbUp" xml:space="preserve">
|
||||||
|
<value>Thumb Up</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Timer" xml:space="preserve">
|
||||||
|
<value>Timer</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Transfer" xml:space="preserve">
|
||||||
|
<value>Transfer</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Trash" xml:space="preserve">
|
||||||
|
<value>Trash</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Underline" xml:space="preserve">
|
||||||
|
<value>Underline</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VerticalAlignBottom" xml:space="preserve">
|
||||||
|
<value>Vertical Align Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VerticalAlignCenter" xml:space="preserve">
|
||||||
|
<value>Vertical Align Center</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VerticalAlignTop" xml:space="preserve">
|
||||||
|
<value>Vertical Align Top</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Video" xml:space="preserve">
|
||||||
|
<value>Video</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VolumeHigh" xml:space="preserve">
|
||||||
|
<value>Volume High</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VolumeLow" xml:space="preserve">
|
||||||
|
<value>Volume Low</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.VolumeOff" xml:space="preserve">
|
||||||
|
<value>Volume Off</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Warning" xml:space="preserve">
|
||||||
|
<value>Warning</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Wifi" xml:space="preserve">
|
||||||
|
<value>Wifi</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Wrench" xml:space="preserve">
|
||||||
|
<value>Wrench</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.X" xml:space="preserve">
|
||||||
|
<value>X</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.Yen" xml:space="preserve">
|
||||||
|
<value>Yen</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ZoomIn" xml:space="preserve">
|
||||||
|
<value>Zoom In</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon.ZoomOut" xml:space="preserve">
|
||||||
|
<value>Zoom Out</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -150,7 +150,7 @@
|
|||||||
<data name="Description.Text" xml:space="preserve">
|
<data name="Description.Text" xml:space="preserve">
|
||||||
<value>Description:</value>
|
<value>Description:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="File Management" xml:space="preserve">
|
||||||
<value>File Management</value>
|
<value>File Management</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -178,7 +178,7 @@
|
|||||||
<value>Capacity:</value>
|
<value>Capacity:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ImageSizes.HelpText" xml:space="preserve">
|
<data name="ImageSizes.HelpText" xml:space="preserve">
|
||||||
<value>Enter a list of image sizes which can be generated dynamically from uploaded images (ie. 200x200,x200,200x)</value>
|
<value>Enter a list of image sizes which can be generated dynamically from uploaded images (ie. 200x200,400x400). Use * to indicate the folder supports all image sizes.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ImageSizes.Text" xml:space="preserve">
|
<data name="ImageSizes.Text" xml:space="preserve">
|
||||||
<value>Image Sizes:</value>
|
<value>Image Sizes:</value>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<data name="Public" xml:space="preserve">
|
<data name="Public" xml:space="preserve">
|
||||||
<value>Public</value>
|
<value>Public</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Folder Management" xml:space="preserve">
|
||||||
<value>Folder Management</value>
|
<value>Folder Management</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -124,7 +124,7 @@
|
|||||||
<value>Error Loading Packages</value>
|
<value>Error Loading Packages</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Success.Module.Download" xml:space="preserve">
|
<data name="Success.Module.Download" xml:space="preserve">
|
||||||
<value>Module Package Saved Successfully. You Must <a href={0}>Restart</a> Your Application To Complete The Installation.</value>
|
<value>Module Package Downloaded Successfully. You Must <a href={0}>Restart</a> Your Application To Complete The Installation.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Error.Module.Download" xml:space="preserve">
|
<data name="Error.Module.Download" xml:space="preserve">
|
||||||
<value>Error Downloading Module</value>
|
<value>Error Downloading Module</value>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
<data name="Upload.Heading" xml:space="preserve">
|
<data name="Upload.Heading" xml:space="preserve">
|
||||||
<value>Upload</value>
|
<value>Upload</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Product.Text" xml:space="preserve">
|
<data name="Product" xml:space="preserve">
|
||||||
<value>Product</value>
|
<value>Product</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -132,6 +132,9 @@
|
|||||||
<data name="Message.Require.ValidName" xml:space="preserve">
|
<data name="Message.Require.ValidName" xml:space="preserve">
|
||||||
<value>You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template</value>
|
<value>You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Message.Require.ValidDescription" xml:space="preserve">
|
||||||
|
<value>You Must Provide A Valid Description (ie. No Punctuation)</value>
|
||||||
|
</data>
|
||||||
<data name="OwnerName.HelpText" xml:space="preserve">
|
<data name="OwnerName.HelpText" xml:space="preserve">
|
||||||
<value>Enter the name of the organization who is developing this module. It should not contain spaces or punctuation.</value>
|
<value>Enter the name of the organization who is developing this module. It should not contain spaces or punctuation.</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
<value>Information</value>
|
<value>Information</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageName.HelpText" xml:space="preserve">
|
<data name="PackageName.HelpText" xml:space="preserve">
|
||||||
<value>The unique name of the package from which this module was installed</value>
|
<value>The unique name of the package from which this module was installed. This value must be specified within the module's IModule interface specification.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageName.Text" xml:space="preserve">
|
<data name="PackageName.Text" xml:space="preserve">
|
||||||
<value>Package Name:</value>
|
<value>Package Name:</value>
|
||||||
@ -225,4 +225,19 @@
|
|||||||
<data name="IsEnabled.Text" xml:space="preserve">
|
<data name="IsEnabled.Text" xml:space="preserve">
|
||||||
<value>Enabled?</value>
|
<value>Enabled?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="View License" xml:space="preserve">
|
||||||
|
<value>View License</value>
|
||||||
|
</data>
|
||||||
|
<data name="Error.Validate" xml:space="preserve">
|
||||||
|
<value>Error Validating Package</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.Download" xml:space="preserve">
|
||||||
|
<value>Package Version Has Been Verified. Please Select The Download Button To Obtain The Package.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.Validate" xml:space="preserve">
|
||||||
|
<value>This Package Version Has Not Been Registered In The Oqtane Marketplace Or You Do Not Have The Right To Use It From This Installation</value>
|
||||||
|
</data>
|
||||||
|
<data name="Validate" xml:space="preserve">
|
||||||
|
<value>Validate</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -132,7 +132,7 @@
|
|||||||
<data name="Success.Content.Export" xml:space="preserve">
|
<data name="Success.Content.Export" xml:space="preserve">
|
||||||
<value>Content Exported Successfully</value>
|
<value>Content Exported Successfully</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Export Content" xml:space="preserve">
|
||||||
<value>Export Content</value>
|
<value>Export Content</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -138,7 +138,7 @@
|
|||||||
<data name="Message.Required.ImportContent" xml:space="preserve">
|
<data name="Message.Required.ImportContent" xml:space="preserve">
|
||||||
<value>You Must Enter Some Content To Import</value>
|
<value>You Must Enter Some Content To Import</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Import Content" xml:space="preserve">
|
||||||
<value>Import Content</value>
|
<value>Import Content</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -156,7 +156,13 @@
|
|||||||
<data name="Module.Text" xml:space="preserve">
|
<data name="Module.Text" xml:space="preserve">
|
||||||
<value>Module:</value>
|
<value>Module:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Module Settings" xml:space="preserve">
|
||||||
<value>Module Settings</value>
|
<value>Module Settings</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Pane.HelpText" xml:space="preserve">
|
||||||
|
<value>The pane where the module will be displayed</value>
|
||||||
|
</data>
|
||||||
|
<data name="Pane.Text" xml:space="preserve">
|
||||||
|
<value>Pane:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -138,4 +138,13 @@
|
|||||||
<data name="EditProfile.Text" xml:space="preserve">
|
<data name="EditProfile.Text" xml:space="preserve">
|
||||||
<value>Edit</value>
|
<value>Edit</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Category" xml:space="preserve">
|
||||||
|
<value>Category</value>
|
||||||
|
</data>
|
||||||
|
<data name="Order" xml:space="preserve">
|
||||||
|
<value>Order</value>
|
||||||
|
</data>
|
||||||
|
<data name="Title" xml:space="preserve">
|
||||||
|
<value>Title</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -136,7 +136,7 @@
|
|||||||
<value>User Account Created. Please Check Your Email For Verification Instructions.</value>
|
<value>User Account Created. Please Check Your Email For Verification Instructions.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Error.User.AddInfo" xml:space="preserve">
|
<data name="Error.User.AddInfo" xml:space="preserve">
|
||||||
<value>Error Adding User. Please Ensure Password Meets Complexity Requirements And Username Is Not Already In Use.</value>
|
<value>Error Adding User. Please Ensure Password Meets Complexity Requirements And Username And Email Is Not Already In Use.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Message.Password.NoMatch" xml:space="preserve">
|
<data name="Message.Password.NoMatch" xml:space="preserve">
|
||||||
<value>Passwords Entered Do Not Match</value>
|
<value>Passwords Entered Do Not Match</value>
|
||||||
@ -177,19 +177,4 @@
|
|||||||
<data name="Username.Text" xml:space="preserve">
|
<data name="Username.Text" xml:space="preserve">
|
||||||
<value>Username:</value>
|
<value>Username:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Password.ValidationCriteria" xml:space="preserve">
|
|
||||||
<value>Passwords Must Have A Minimum Length Of {0} Characters, Including At Least {1} Unique Character(s), {2}{3}{4}{5} To Satisfy Password Compexity Requirements For This Site.</value>
|
|
||||||
</data>
|
|
||||||
<data name="Password.DigitRequirement" xml:space="preserve">
|
|
||||||
<value>At Least One Digit</value>
|
|
||||||
</data>
|
|
||||||
<data name="Password.LowercaseRequirement" xml:space="preserve">
|
|
||||||
<value>At Least One Lowercase Letter</value>
|
|
||||||
</data>
|
|
||||||
<data name="Password.PunctuationRequirement" xml:space="preserve">
|
|
||||||
<value>At Least One Punctuation Mark</value>
|
|
||||||
</data>
|
|
||||||
<data name="Password.UppercaseRequirement" xml:space="preserve">
|
|
||||||
<value>At Least One Uppercase Letter</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
@ -312,6 +312,9 @@
|
|||||||
<data name="Database.HelpText" xml:space="preserve">
|
<data name="Database.HelpText" xml:space="preserve">
|
||||||
<value>The type of database</value>
|
<value>The type of database</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DeleteSite.Header" xml:space="preserve">
|
||||||
|
<value>Delete Site</value>
|
||||||
|
</data>
|
||||||
<data name="DeleteSite.Text" xml:space="preserve">
|
<data name="DeleteSite.Text" xml:space="preserve">
|
||||||
<value>Delete Site</value>
|
<value>Delete Site</value>
|
||||||
</data>
|
</data>
|
||||||
@ -381,4 +384,22 @@
|
|||||||
<data name="Version.Text" xml:space="preserve">
|
<data name="Version.Text" xml:space="preserve">
|
||||||
<value>Version:</value>
|
<value>Version:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DeleteAlias.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
|
<data name="DeleteAlias.Header" xml:space="preserve">
|
||||||
|
<value>Delete Alias</value>
|
||||||
|
</data>
|
||||||
|
<data name="SiteGuid.HelpText" xml:space="preserve">
|
||||||
|
<value>The Unique Identifier For The Site</value>
|
||||||
|
</data>
|
||||||
|
<data name="SiteGuid.Text" xml:space="preserve">
|
||||||
|
<value>ID:</value>
|
||||||
|
</data>
|
||||||
|
<data name="Retention.HelpText" xml:space="preserve">
|
||||||
|
<value>Number of days of notifications to retain</value>
|
||||||
|
</data>
|
||||||
|
<data name="Retention.Text" xml:space="preserve">
|
||||||
|
<value>Retention (Days):</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -213,17 +213,17 @@
|
|||||||
<data name="Log.Heading" xml:space="preserve">
|
<data name="Log.Heading" xml:space="preserve">
|
||||||
<value>Log</value>
|
<value>Log</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Register" xml:space="preserve">
|
<data name="Register" xml:space="preserve">
|
||||||
<value>Please Register Me For Major Product Updates And Security Bulletins</value>
|
<value>Please Register Me For Major Product Updates And Security Bulletins</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Success.Register" xml:space="preserve">
|
<data name="Success.Register" xml:space="preserve">
|
||||||
<value>You Have Been Successfully Registered For Updates</value>
|
<value>You Have Been Successfully Registered For Updates</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageService.HelpText" xml:space="preserve">
|
<data name="PackageManager.HelpText" xml:space="preserve">
|
||||||
<value>Specify If The Package Service Is Enabled For Installing Modules, Themes, And Translations</value>
|
<value>Specify The Package Manager Service For Installing Modules, Themes, And Translations. If This Field Is Blank It Means The Package Manager Service Is Disabled For This Installation.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageService.Text" xml:space="preserve">
|
<data name="PackageManager.Text" xml:space="preserve">
|
||||||
<value>Package Service Enabled?</value>
|
<value>Package Manager:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Swagger.HelpText" xml:space="preserve">
|
<data name="Swagger.HelpText" xml:space="preserve">
|
||||||
<value>Specify If Swagger Is Enabled For Your Server API</value>
|
<value>Specify If Swagger Is Enabled For Your Server API</value>
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
<value>Theme: </value>
|
<value>Theme: </value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Success.Theme.Download" xml:space="preserve">
|
<data name="Success.Theme.Download" xml:space="preserve">
|
||||||
<value>Theme Package Saved Successfully. You Must <a href={0}>Restart</a> Your Application To Complete The Installation.</value>
|
<value>Theme Package Downloaded Successfully. You Must <a href={0}>Restart</a> Your Application To Complete The Installation.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Error.Theme.Download" xml:space="preserve">
|
<data name="Error.Theme.Download" xml:space="preserve">
|
||||||
<value>Error Downloading Theme</value>
|
<value>Error Downloading Theme</value>
|
||||||
@ -141,4 +141,7 @@
|
|||||||
<data name="Upload.Heading" xml:space="preserve">
|
<data name="Upload.Heading" xml:space="preserve">
|
||||||
<value>Upload</value>
|
<value>Upload</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Product" xml:space="preserve">
|
||||||
|
<value>Product</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -163,7 +163,7 @@
|
|||||||
<value>The license of the theme</value>
|
<value>The license of the theme</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageName.HelpText" xml:space="preserve">
|
<data name="PackageName.HelpText" xml:space="preserve">
|
||||||
<value>The unique name of the package from which this module was installed</value>
|
<value>The unique name of the package from which this theme was installed. This value must be specified within the themee's ITheme interface specification.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PackageName.Text" xml:space="preserve">
|
<data name="PackageName.Text" xml:space="preserve">
|
||||||
<value>Package Name:</value>
|
<value>Package Name:</value>
|
||||||
@ -177,4 +177,19 @@
|
|||||||
<data name="IsEnabled.Text" xml:space="preserve">
|
<data name="IsEnabled.Text" xml:space="preserve">
|
||||||
<value>Enabled?</value>
|
<value>Enabled?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="View License" xml:space="preserve">
|
||||||
|
<value>View License</value>
|
||||||
|
</data>
|
||||||
|
<data name="Error.Validate" xml:space="preserve">
|
||||||
|
<value>Error Validating Package</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.Download" xml:space="preserve">
|
||||||
|
<value>Package Version Has Been Verified. Please Select The Download Button To Obtain The Package.</value>
|
||||||
|
</data>
|
||||||
|
<data name="Message.Validate" xml:space="preserve">
|
||||||
|
<value>This Package Version Has Not Been Registered In The Oqtane Marketplace Or You Do Not Have The Right To Use It From This Installation</value>
|
||||||
|
</data>
|
||||||
|
<data name="Validate" xml:space="preserve">
|
||||||
|
<value>Validate</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -138,6 +138,9 @@
|
|||||||
<data name="DeleteTheme.Header" xml:space="preserve">
|
<data name="DeleteTheme.Header" xml:space="preserve">
|
||||||
<value>Delete Theme</value>
|
<value>Delete Theme</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DeleteTheme.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
<data name="CreateTheme.Text" xml:space="preserve">
|
<data name="CreateTheme.Text" xml:space="preserve">
|
||||||
<value>Create Theme</value>
|
<value>Create Theme</value>
|
||||||
</data>
|
</data>
|
||||||
@ -147,6 +150,9 @@
|
|||||||
<data name="ViewTheme.Text" xml:space="preserve">
|
<data name="ViewTheme.Text" xml:space="preserve">
|
||||||
<value>View</value>
|
<value>View</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EditTheme.Text" xml:space="preserve">
|
||||||
|
<value>Edit</value>
|
||||||
|
</data>
|
||||||
<data name="Enabled" xml:space="preserve">
|
<data name="Enabled" xml:space="preserve">
|
||||||
<value>Enabled?</value>
|
<value>Enabled?</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -144,7 +144,10 @@
|
|||||||
<data name="Message.Text" xml:space="preserve">
|
<data name="Message.Text" xml:space="preserve">
|
||||||
<value>Framework Is Already Up To Date</value>
|
<value>Framework Is Already Up To Date</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="MessgeUpgrade.Text" xml:space="preserve">
|
<data name="MessageUpgrade.Text" xml:space="preserve">
|
||||||
<value>Upload A Framework Package (Oqtane.Framework.version.nupkg) And Then Select Upgrade</value>
|
<value>Upload A Framework Package (Oqtane.Framework.version.nupkg) And Then Select Upgrade</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Localhost.Text" xml:space="preserve">
|
||||||
|
<value>You Cannot Perform A System Update In A Development Environment</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -141,7 +141,7 @@
|
|||||||
<data name="Subject.Text" xml:space="preserve">
|
<data name="Subject.Text" xml:space="preserve">
|
||||||
<value>Subject: </value>
|
<value>Subject: </value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Send Notification" xml:space="preserve">
|
||||||
<value>Send Notification</value>
|
<value>Send Notification</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -228,4 +228,10 @@
|
|||||||
<data name="Profile.Heading" xml:space="preserve">
|
<data name="Profile.Heading" xml:space="preserve">
|
||||||
<value>Profile</value>
|
<value>Profile</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ViewNotification.Text" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="DeleteNotification.Text" xml:space="preserve">
|
||||||
|
<value>Delete</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -144,7 +144,7 @@
|
|||||||
<data name="OriginalMessage" xml:space="preserve">
|
<data name="OriginalMessage" xml:space="preserve">
|
||||||
<value>Original Message</value>
|
<value>Original Message</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="View Notification" xml:space="preserve">
|
||||||
<value>View Notification</value>
|
<value>View Notification</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -118,7 +118,7 @@
|
|||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="Error.User.AddCheckPass" xml:space="preserve">
|
<data name="Error.User.AddCheckPass" xml:space="preserve">
|
||||||
<value>Error Adding User. Please Ensure Password Meets Complexity Requirements And Username Is Not Already In Use.</value>
|
<value>Error Adding User. Please Ensure Password Meets Complexity Requirements And Username And Email Is Not Already In Use.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Message.Password.NoMatch" xml:space="preserve">
|
<data name="Message.Password.NoMatch" xml:space="preserve">
|
||||||
<value>Passwords Entered Do Not Match</value>
|
<value>Passwords Entered Do Not Match</value>
|
||||||
@ -171,4 +171,10 @@
|
|||||||
<data name="Password.Placeholder" xml:space="preserve">
|
<data name="Password.Placeholder" xml:space="preserve">
|
||||||
<value>Password</value>
|
<value>Password</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Notify.HelpText" xml:space="preserve">
|
||||||
|
<value>Indicate if new users should receive an email notification</value>
|
||||||
|
</data>
|
||||||
|
<data name="Notify.Text" xml:space="preserve">
|
||||||
|
<value>Notify?</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -390,10 +390,49 @@
|
|||||||
<data name="RoleClaimType.Text" xml:space="preserve">
|
<data name="RoleClaimType.Text" xml:space="preserve">
|
||||||
<value>Role Claim:</value>
|
<value>Role Claim:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ProfileClaimTypes.HelpText" xml:space="preserve">
|
<data name="ProfileClaimTypes.HelpText" xml:space="preserve">
|
||||||
<value>Optionally provide a comma delimited list of user profile claims provided by the identity provider, as well as mappings to your user profile definition. For example if the identity provider includes a 'given_name' claim and you have a 'FirstName' user profile definition you should specify 'given_name:FirstName'.</value>
|
<value>Optionally provide a comma delimited list of user profile claims provided by the identity provider, as well as mappings to your user profile definition. For example if the identity provider includes a 'given_name' claim and you have a 'FirstName' user profile definition you should specify 'given_name:FirstName'.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ProfileClaimTypes.Text" xml:space="preserve">
|
<data name="ProfileClaimTypes.Text" xml:space="preserve">
|
||||||
<value>User Profile Claims:</value>
|
<value>User Profile Claims:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Username" xml:space="preserve">
|
||||||
|
<value>User Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="Email" xml:space="preserve">
|
||||||
|
<value>Email</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImportUsers.Text" xml:space="preserve">
|
||||||
|
<value>Import Users</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.Code" xml:space="preserve">
|
||||||
|
<value>code</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.CodeIdToken" xml:space="preserve">
|
||||||
|
<value>code id_token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.CodeIdTokenToken" xml:space="preserve">
|
||||||
|
<value>code id_token token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.CodeToken" xml:space="preserve">
|
||||||
|
<value>code token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.IdToken" xml:space="preserve">
|
||||||
|
<value>id_token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.IdTokenToken" xml:space="preserve">
|
||||||
|
<value>id_token token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.None" xml:space="preserve">
|
||||||
|
<value>none</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthFlow.Token" xml:space="preserve">
|
||||||
|
<value>token</value>
|
||||||
|
</data>
|
||||||
|
<data name="AuthResponseType" xml:space="preserve">
|
||||||
|
<value>Authorization Response Type</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -117,61 +117,34 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="Template.Text" xml:space="preserve">
|
<data name="ImportFile.HelpText" xml:space="preserve">
|
||||||
<value>Template: </value>
|
<value>Upload or select a tab delimited text file containing user information. The file must be in the Template format specified (Roles can be specified as a comma delimited list).</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Template.Select" xml:space="preserve">
|
<data name="ImportFile.Text" xml:space="preserve">
|
||||||
<value>Select Template</value>
|
<value>Import File:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Module.Create" xml:space="preserve">
|
<data name="Error.Import" xml:space="preserve">
|
||||||
<value>Create Module</value>
|
<value>Error Importing Users</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Module.Activate" xml:space="preserve">
|
<data name="Import" xml:space="preserve">
|
||||||
<value>Activate Module</value>
|
<value>Import</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Info.Module.Creator" xml:space="preserve">
|
<data name="Message.Import.Failure" xml:space="preserve">
|
||||||
<value>Please Note That The Module Creator Is Only Intended To Be Used In A Development Environment</value>
|
<value>User Import Failed. Please Review Your Event Log For More Detailed Information.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Info.Module.Activate" xml:space="preserve">
|
<data name="Message.Import.Success" xml:space="preserve">
|
||||||
<value>Once You Have Compiled The Module And Restarted The Application You Can Activate The Module Below</value>
|
<value>User Import Successful. {0} Users Imported.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Success.Module.Create" xml:space="preserve">
|
<data name="Message.Import.Validation" xml:space="preserve">
|
||||||
<value>The Source Code For Your Module Has Been Created At The Location Specified Below And Must Be Compiled In Order To Make It Functional. Once It Has Been Compiled You Must <a href={0}>Restart</a> Your Application To Apply These Changes.</value>
|
<value>You Must Specify A User File For Import</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Message.Require.ValidName" xml:space="preserve">
|
<data name="Template" xml:space="preserve">
|
||||||
<value>You Must Provide A Valid Owner Name And Module Name ( ie. No Punctuation Or Spaces And The Values Cannot Be The Same ) And Choose A Template</value>
|
<value>Template</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OwnerName.HelpText" xml:space="preserve">
|
<data name="Notify.HelpText" xml:space="preserve">
|
||||||
<value>Enter the name of the organization who is developing this module. It should not contain spaces or punctuation.</value>
|
<value>Indicate if new users should receive an email notification</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleName.HelpText" xml:space="preserve">
|
<data name="Notify.Text" xml:space="preserve">
|
||||||
<value>Enter a name for this module. It should not contain spaces or punctuation.</value>
|
<value>Notify?</value>
|
||||||
</data>
|
|
||||||
<data name="Description.HelpText" xml:space="preserve">
|
|
||||||
<value>Enter a short description for the module</value>
|
|
||||||
</data>
|
|
||||||
<data name="Template.HelpText" xml:space="preserve">
|
|
||||||
<value>Select a module template. Templates are located in the wwwroot/Modules/Templates folder on the server.</value>
|
|
||||||
</data>
|
|
||||||
<data name="FrameworkReference.HelpText" xml:space="preserve">
|
|
||||||
<value>Select a framework reference version</value>
|
|
||||||
</data>
|
|
||||||
<data name="Location.HelpText" xml:space="preserve">
|
|
||||||
<value>Location where the module will be created</value>
|
|
||||||
</data>
|
|
||||||
<data name="OwnerName.Text" xml:space="preserve">
|
|
||||||
<value>Owner Name: </value>
|
|
||||||
</data>
|
|
||||||
<data name="ModuleName.Text" xml:space="preserve">
|
|
||||||
<value>Module Name: </value>
|
|
||||||
</data>
|
|
||||||
<data name="Description.Text" xml:space="preserve">
|
|
||||||
<value>Description: </value>
|
|
||||||
</data>
|
|
||||||
<data name="FrameworkReference.Text" xml:space="preserve">
|
|
||||||
<value>Framework Reference: </value>
|
|
||||||
</data>
|
|
||||||
<data name="Location.Text" xml:space="preserve">
|
|
||||||
<value>Location: </value>
|
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -120,4 +120,7 @@
|
|||||||
<data name="PageOfPages" xml:space="preserve">
|
<data name="PageOfPages" xml:space="preserve">
|
||||||
<value>Page {0} of {1}</value>
|
<value>Page {0} of {1}</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SearchPlaceholder" xml:space="preserve">
|
||||||
|
<value>Search: {0}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -129,4 +129,25 @@
|
|||||||
<data name="Message.Username.DontExist" xml:space="preserve">
|
<data name="Message.Username.DontExist" xml:space="preserve">
|
||||||
<value>User Does Not Exist With Name Specified</value>
|
<value>User Does Not Exist With Name Specified</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ModuleDefinition" xml:space="preserve">
|
||||||
|
<value>Module</value>
|
||||||
|
</data>
|
||||||
|
<data name="Page" xml:space="preserve">
|
||||||
|
<value>Page</value>
|
||||||
|
</data>
|
||||||
|
<data name="Folder" xml:space="preserve">
|
||||||
|
<value>Folder</value>
|
||||||
|
</data>
|
||||||
|
<data name="View" xml:space="preserve">
|
||||||
|
<value>View</value>
|
||||||
|
</data>
|
||||||
|
<data name="Edit" xml:space="preserve">
|
||||||
|
<value>Edit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Utilize" xml:space="preserve">
|
||||||
|
<value>Utilize</value>
|
||||||
|
</data>
|
||||||
|
<data name="Browse" xml:space="preserve">
|
||||||
|
<value>Browse</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -156,7 +156,7 @@
|
|||||||
<data name="Message.Content.Restored" xml:space="preserve">
|
<data name="Message.Content.Restored" xml:space="preserve">
|
||||||
<value>Version Restored</value>
|
<value>Version Restored</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
<data name="Edit Html/Text" xml:space="preserve">
|
||||||
<value>Edit Html/Text</value>
|
<value>Edit Html/Text</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Restore.Header" xml:space="preserve">
|
<data name="Restore.Header" xml:space="preserve">
|
||||||
@ -168,4 +168,16 @@
|
|||||||
<data name="View.Text" xml:space="preserve">
|
<data name="View.Text" xml:space="preserve">
|
||||||
<value>View</value>
|
<value>View</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Edit.Heading" xml:space="preserve">
|
||||||
|
<value>Edit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Versions.Heading" xml:space="preserve">
|
||||||
|
<value>Versions</value>
|
||||||
|
</data>
|
||||||
|
<data name="HtmlEditor.Heading" xml:space="preserve">
|
||||||
|
<value>Raw HTML Editor</value>
|
||||||
|
</data>
|
||||||
|
<data name="RichTextEditor.Heading" xml:space="preserve">
|
||||||
|
<value>Rich Text Editor</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -120,6 +120,9 @@
|
|||||||
<data name="Edit.Action" xml:space="preserve">
|
<data name="Edit.Action" xml:space="preserve">
|
||||||
<value>Edit</value>
|
<value>Edit</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Edit.Text" xml:space="preserve">
|
||||||
|
<value>Edit</value>
|
||||||
|
</data>
|
||||||
<data name="Error.Content.Load" xml:space="preserve">
|
<data name="Error.Content.Load" xml:space="preserve">
|
||||||
<value>An Error Occurred Loading Content</value>
|
<value>An Error Occurred Loading Content</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -405,4 +405,31 @@
|
|||||||
<data name="Search.RecentlyReleased" xml:space="preserve">
|
<data name="Search.RecentlyReleased" xml:space="preserve">
|
||||||
<value>Recently Released</value>
|
<value>Recently Released</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="From" xml:space="preserve">
|
||||||
|
<value>From</value>
|
||||||
|
</data>
|
||||||
|
<data name="To" xml:space="preserve">
|
||||||
|
<value>To</value>
|
||||||
|
</data>
|
||||||
|
<data name="Password.DigitRequirement" xml:space="preserve">
|
||||||
|
<value>At Least One Digit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Password.LowercaseRequirement" xml:space="preserve">
|
||||||
|
<value>At Least One Lowercase Letter</value>
|
||||||
|
</data>
|
||||||
|
<data name="Password.PunctuationRequirement" xml:space="preserve">
|
||||||
|
<value>At Least One Punctuation Mark</value>
|
||||||
|
</data>
|
||||||
|
<data name="Password.UppercaseRequirement" xml:space="preserve">
|
||||||
|
<value>At Least One Uppercase Letter</value>
|
||||||
|
</data>
|
||||||
|
<data name="Password.ValidationCriteria" xml:space="preserve">
|
||||||
|
<value>Passwords Must Have A Minimum Length Of {0} Characters, Including At Least {1} Unique Character(s), {2}{3}{4}{5} To Satisfy Password Compexity Requirements For This Site.</value>
|
||||||
|
</data>
|
||||||
|
<data name="ProfileInvalid" xml:space="preserve">
|
||||||
|
<value>{0} Is Not Valid</value>
|
||||||
|
</data>
|
||||||
|
<data name="ProfileRequired" xml:space="preserve">
|
||||||
|
<value>{0} Is Required</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
@ -186,4 +186,16 @@
|
|||||||
<data name="VisibilityView" xml:space="preserve">
|
<data name="VisibilityView" xml:space="preserve">
|
||||||
<value>Same As Page</value>
|
<value>Same As Page</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Confirm.Page.Delete" xml:space="preserve">
|
||||||
|
<value>Are You Sure You Want To Delete This Page?</value>
|
||||||
|
</data>
|
||||||
|
<data name="Location" xml:space="preserve">
|
||||||
|
<value>Location:</value>
|
||||||
|
</data>
|
||||||
|
<data name="LocationBottom" xml:space="preserve">
|
||||||
|
<value>Bottom</value>
|
||||||
|
</data>
|
||||||
|
<data name="LocationTop" xml:space="preserve">
|
||||||
|
<value>Top</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -29,7 +29,7 @@ namespace Oqtane.Services
|
|||||||
public async Task<Folder> GetFolderAsync(int siteId, [NotNull] string folderPath)
|
public async Task<Folder> GetFolderAsync(int siteId, [NotNull] string folderPath)
|
||||||
{
|
{
|
||||||
var path = WebUtility.UrlEncode(folderPath);
|
var path = WebUtility.UrlEncode(folderPath);
|
||||||
return await GetJsonAsync<Folder>($"{ApiUrl}/{siteId}/{path}");
|
return await GetJsonAsync<Folder>($"{ApiUrl}/path/{siteId}/?path={path}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Folder> AddFolderAsync(Folder folder)
|
public async Task<Folder> AddFolderAsync(Folder folder)
|
||||||
|
@ -38,13 +38,19 @@ namespace Oqtane.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<Package>> GetPackagesAsync(string type, string search, string price, string package, string sort);
|
Task<List<Package>> GetPackagesAsync(string type, string search, string price, string package, string sort);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of packages based on installationid
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<Package>> GetPackageUpdatesAsync(string type);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a specific package
|
/// Returns a specific package
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="packageId"></param>
|
/// <param name="packageId"></param>
|
||||||
/// <param name="version"></param>
|
/// <param name="version"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Package> GetPackageAsync(string packageId, string version);
|
Task<Package> GetPackageAsync(string packageId, string version, bool download);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Downloads a specific package as .nupkg file
|
/// Downloads a specific package as .nupkg file
|
||||||
@ -53,7 +59,7 @@ namespace Oqtane.Services
|
|||||||
/// <param name="version"></param>
|
/// <param name="version"></param>
|
||||||
/// <param name="folder"></param>
|
/// <param name="folder"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task DownloadPackageAsync(string packageId, string version, string folder);
|
Task DownloadPackageAsync(string packageId, string version);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Installs all packages located in //TODO: 2dm where?
|
/// Installs all packages located in //TODO: 2dm where?
|
||||||
|
@ -9,13 +9,13 @@ namespace Oqtane.Services
|
|||||||
public interface ISystemService
|
public interface ISystemService
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns a key-value directory with the current system configuration information
|
/// returns a key-value dictionary with the current system configuration information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Dictionary<string, object>> GetSystemInfoAsync();
|
Task<Dictionary<string, object>> GetSystemInfoAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// returns a key-value directory with the current system information - "environment" or "configuration"
|
/// returns a key-value dictionary with the current system information - "environment" or "configuration"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Dictionary<string, object>> GetSystemInfoAsync(string type);
|
Task<Dictionary<string, object>> GetSystemInfoAsync(string type);
|
||||||
@ -32,5 +32,11 @@ namespace Oqtane.Services
|
|||||||
/// <param name="settings"></param>
|
/// <param name="settings"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task UpdateSystemInfoAsync(Dictionary<string, object> settings);
|
Task UpdateSystemInfoAsync(Dictionary<string, object> settings);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// returns a key-value dictionary with default system icons
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Dictionary<string, string>> GetIconsAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Oqtane.Models;
|
using Oqtane.Models;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
@ -16,7 +17,6 @@ namespace Oqtane.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<User> GetUserAsync(int userId, int siteId);
|
Task<User> GetUserAsync(int userId, int siteId);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a <see cref="User"/> of a specific site
|
/// Get a <see cref="User"/> of a specific site
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -25,6 +25,15 @@ namespace Oqtane.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<User> GetUserAsync(string username, int siteId);
|
Task<User> GetUserAsync(string username, int siteId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get a <see cref="User"/> of a specific site
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="username">Username / login of a <see cref="User"/></param>
|
||||||
|
/// <param name="email">email address of a <see cref="User"/></param>
|
||||||
|
/// <param name="siteId">ID of a <see cref="Site"/></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<User> GetUserAsync(string username, string email, int siteId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save a user to the Database.
|
/// Save a user to the Database.
|
||||||
/// The <see cref="User"/> object contains all the information incl. what <see cref="Site"/> it belongs to.
|
/// The <see cref="User"/> object contains all the information incl. what <see cref="Site"/> it belongs to.
|
||||||
@ -127,6 +136,20 @@ namespace Oqtane.Services
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<User> LinkUserAsync(User user, string token, string type, string key, string name);
|
Task<User> LinkUserAsync(User user, string token, string type, string key, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get password requirements for site
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="siteId">ID of a <see cref="Site"/></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<string> GetPasswordRequirementsAsync(int siteId);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Bulk import of users
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="siteId">ID of a <see cref="Site"/></param>
|
||||||
|
/// <param name="fileId">ID of a <see cref="File"/></param>
|
||||||
|
/// <param name="notify">Indicates if new users should be notified by email</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Dictionary<string, string>> ImportUsersAsync(int siteId, int fileId, bool notify);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,19 @@ namespace Oqtane.Services
|
|||||||
return await GetJsonAsync<List<Package>>($"{Apiurl}?type={type}&search={WebUtility.UrlEncode(search)}&price={price}&package={package}&sort={sort}");
|
return await GetJsonAsync<List<Package>>($"{Apiurl}?type={type}&search={WebUtility.UrlEncode(search)}&price={price}&package={package}&sort={sort}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Package> GetPackageAsync(string packageId, string version)
|
public async Task<List<Package>> GetPackageUpdatesAsync(string type)
|
||||||
{
|
{
|
||||||
return await PostJsonAsync<Package>($"{Apiurl}?packageid={packageId}&version={version}", null);
|
return await GetJsonAsync<List<Package>>($"{Apiurl}/updates/?type={type}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task DownloadPackageAsync(string packageId, string version, string folder)
|
public async Task<Package> GetPackageAsync(string packageId, string version, bool download)
|
||||||
{
|
{
|
||||||
await PostAsync($"{Apiurl}?packageid={packageId}&version={version}&folder={folder}");
|
return await PostJsonAsync<Package>($"{Apiurl}?packageid={packageId}&version={version}&download={download}&install=false", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DownloadPackageAsync(string packageId, string version)
|
||||||
|
{
|
||||||
|
await PostAsync($"{Apiurl}?packageid={packageId}&version={version}&download=true&install=true");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task InstallPackagesAsync()
|
public async Task InstallPackagesAsync()
|
||||||
|
@ -4,6 +4,7 @@ using System.Net.Http;
|
|||||||
using System;
|
using System;
|
||||||
using Oqtane.Documentation;
|
using Oqtane.Documentation;
|
||||||
using Oqtane.Shared;
|
using Oqtane.Shared;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
@ -18,7 +19,7 @@ namespace Oqtane.Services
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<Sync> GetSyncEventsAsync(DateTime lastSyncDate)
|
public async Task<Sync> GetSyncEventsAsync(DateTime lastSyncDate)
|
||||||
{
|
{
|
||||||
return await GetJsonAsync<Sync>($"{ApiUrl}/{lastSyncDate.ToString("yyyyMMddHHmmssfff")}");
|
return await GetJsonAsync<Sync>($"{ApiUrl}/{lastSyncDate.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture)}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,10 @@ namespace Oqtane.Services
|
|||||||
{
|
{
|
||||||
await PostJsonAsync(Apiurl, settings);
|
await PostJsonAsync(Apiurl, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<Dictionary<string, string>> GetIconsAsync()
|
||||||
|
{
|
||||||
|
return await GetJsonAsync<Dictionary<string, string>>($"{Apiurl}/icons");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,23 @@ using System.Net.Http;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Oqtane.Documentation;
|
using Oqtane.Documentation;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
|
using Oqtane.Modules.Admin.Roles;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace Oqtane.Services
|
namespace Oqtane.Services
|
||||||
{
|
{
|
||||||
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
[PrivateApi("Don't show in the documentation, as everything should use the Interface")]
|
||||||
public class UserService : ServiceBase, IUserService
|
public class UserService : ServiceBase, IUserService
|
||||||
{
|
{
|
||||||
public UserService(HttpClient http, SiteState siteState) : base(http, siteState) { }
|
private readonly IStringLocalizer<SharedResources> _localizer;
|
||||||
|
|
||||||
|
public UserService(IStringLocalizer<SharedResources> localizer, HttpClient http, SiteState siteState) : base(http, siteState)
|
||||||
|
{
|
||||||
|
_localizer = localizer;
|
||||||
|
}
|
||||||
|
|
||||||
private string Apiurl => CreateApiUrl("User");
|
private string Apiurl => CreateApiUrl("User");
|
||||||
|
|
||||||
@ -21,7 +31,12 @@ namespace Oqtane.Services
|
|||||||
|
|
||||||
public async Task<User> GetUserAsync(string username, int siteId)
|
public async Task<User> GetUserAsync(string username, int siteId)
|
||||||
{
|
{
|
||||||
return await GetJsonAsync<User>($"{Apiurl}/name/{username}?siteid={siteId}");
|
return await GetUserAsync(username, "", siteId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<User> GetUserAsync(string username, string email, int siteId)
|
||||||
|
{
|
||||||
|
return await GetJsonAsync<User>($"{Apiurl}/name/{(!string.IsNullOrEmpty(username) ? username : "-")}/{(!string.IsNullOrEmpty(email) ? email : "-")}/?siteid={siteId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<User> AddUserAsync(User user)
|
public async Task<User> AddUserAsync(User user)
|
||||||
@ -90,5 +105,31 @@ namespace Oqtane.Services
|
|||||||
return await PostJsonAsync<User>($"{Apiurl}/link?token={token}&type={type}&key={key}&name={name}", user);
|
return await PostJsonAsync<User>($"{Apiurl}/link?token={token}&type={type}&key={key}&name={name}", user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<string> GetPasswordRequirementsAsync(int siteId)
|
||||||
|
{
|
||||||
|
var requirements = await GetJsonAsync<Dictionary<string, string>>($"{Apiurl}/passwordrequirements/{siteId}");
|
||||||
|
|
||||||
|
var minimumlength = (requirements.ContainsKey("IdentityOptions:Password:RequiredLength")) ? requirements["IdentityOptions:Password:RequiredLength"] : "6";
|
||||||
|
var uniquecharacters = (requirements.ContainsKey("IdentityOptions:Password:RequiredUniqueChars")) ? requirements["IdentityOptions:Password:RequiredUniqueChars"] : "1";
|
||||||
|
var requiredigit = bool.Parse((requirements.ContainsKey("IdentityOptions:Password:RequireDigit")) ? requirements["IdentityOptions:Password:RequireDigit"] : "true");
|
||||||
|
var requireupper = bool.Parse((requirements.ContainsKey("IdentityOptions:Password:RequireUppercase")) ? requirements["IdentityOptions:Password:RequireUppercase"] : "true");
|
||||||
|
var requirelower = bool.Parse((requirements.ContainsKey("IdentityOptions:Password:RequireLowercase")) ? requirements["IdentityOptions:Password:RequireLowercase"] : "true");
|
||||||
|
var requirepunctuation = bool.Parse((requirements.ContainsKey("IdentityOptions:Password:RequireNonAlphanumeric")) ? requirements["IdentityOptions:Password:RequireNonAlphanumeric"] : "true");
|
||||||
|
|
||||||
|
// replace the placeholders with the setting values
|
||||||
|
string digitRequirement = requiredigit ? _localizer["Password.DigitRequirement"] + ", " : "";
|
||||||
|
string uppercaseRequirement = requireupper ? _localizer["Password.UppercaseRequirement"] + ", " : "";
|
||||||
|
string lowercaseRequirement = requirelower ? _localizer["Password.LowercaseRequirement"] + ", " : "";
|
||||||
|
string punctuationRequirement = requirepunctuation ? _localizer["Password.PunctuationRequirement"] + ", " : "";
|
||||||
|
string passwordValidationCriteriaTemplate = _localizer["Password.ValidationCriteria"];
|
||||||
|
|
||||||
|
// format requirements
|
||||||
|
return string.Format(passwordValidationCriteriaTemplate, minimumlength, uniquecharacters, digitRequirement, uppercaseRequirement, lowercaseRequirement, punctuationRequirement);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Dictionary<string, string>> ImportUsersAsync(int siteId, int fileId, bool notify)
|
||||||
|
{
|
||||||
|
return await PostJsonAsync<Dictionary<string, string>>($"{Apiurl}/import?siteid={siteId}&fileid={fileId}¬ify={notify}", null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="main g-0">
|
<div class="main g-0">
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
<div class="ms-auto"><UserProfile /> <Login /> <ControlPanel /></div>
|
<div class="ms-auto"><UserProfile /> <Login /> <ControlPanel LanguageDropdownAlignment="right" /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row px-4">
|
<div class="row px-4">
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
@inherits ContainerBase
|
@inherits ContainerBase
|
||||||
@attribute [OqtaneIgnore]
|
@attribute [OqtaneIgnore]
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
@inject IStringLocalizerFactory LocalizerFactory
|
||||||
|
|
||||||
<span class="app-moduletitle">
|
<span class="app-moduletitle">
|
||||||
@((MarkupString)title)
|
@((MarkupString)title)
|
||||||
@ -20,7 +21,8 @@
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(ModuleState.ControlTitle))
|
if (!string.IsNullOrEmpty(ModuleState.ControlTitle))
|
||||||
{
|
{
|
||||||
title = ModuleState.ControlTitle;
|
var localizer = LocalizerFactory.Create(ModuleState.ModuleType);
|
||||||
|
title = localizer[ModuleState.ControlTitle];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -10,12 +10,14 @@
|
|||||||
@inject IPageModuleService PageModuleService
|
@inject IPageModuleService PageModuleService
|
||||||
@inject ILogService logger
|
@inject ILogService logger
|
||||||
@inject ISettingService SettingService
|
@inject ISettingService SettingService
|
||||||
|
@inject IJSRuntime jsRuntime
|
||||||
|
@inject IServiceProvider ServiceProvider
|
||||||
@inject IStringLocalizer<ControlPanel> Localizer
|
@inject IStringLocalizer<ControlPanel> Localizer
|
||||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||||
|
|
||||||
@if (ShowLanguageSwitcher)
|
@if (ShowLanguageSwitcher)
|
||||||
{
|
{
|
||||||
<LanguageSwitcher />
|
<LanguageSwitcher DropdownAlignment="@LanguageDropdownAlignment" />
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (_showEditMode || (PageState.Page.IsPersonalizable && PageState.User != null && UserSecurity.IsAuthorized(PageState.User, RoleNames.Registered)))
|
@if (_showEditMode || (PageState.Page.IsPersonalizable && PageState.User != null && UserSecurity.IsAuthorized(PageState.User, RoleNames.Registered)))
|
||||||
@ -36,14 +38,14 @@
|
|||||||
|
|
||||||
@if (_canViewAdminDashboard || UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList))
|
@if (_canViewAdminDashboard || UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList))
|
||||||
{
|
{
|
||||||
<button type="button" class="btn @ButtonClass ms-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasControlPanel" aria-controls="offcanvasControlPanel">
|
<button type="button" class="btn @ButtonClass ms-1" data-bs-toggle="offcanvas" data-bs-target="#offcanvasControlPanel" aria-controls="offcanvasControlPanel" @onclick="ClearMessage">
|
||||||
<span class="oi oi-cog"></span>
|
<span class="oi oi-cog"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="@ContainerClass" tabindex="-1" data-bs-scroll="true" data-bs-backdrop="true" id="offcanvasControlPanel" aria-labelledby="offcanvasScrollingLabel">
|
<div class="@ContainerClass" tabindex="-1" data-bs-scroll="true" data-bs-backdrop="true" id="offcanvasControlPanel" aria-labelledby="offcanvasScrollingLabel">
|
||||||
<div class="@HeaderClass">
|
<div class="@HeaderClass">
|
||||||
<h5 id="offcanvasScrollingLabel" class="offcanvas-title">@Localizer["ControlPanel"]</h5>
|
<h5 id="offcanvasScrollingLabel" class="offcanvas-title">@Localizer["ControlPanel"]</h5>
|
||||||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close" @onclick="ClearMessage"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="@BodyClass">
|
<div class="@BodyClass">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@ -98,7 +100,7 @@
|
|||||||
<button type="button" class="btn-close" aria-label="Close" @onclick="ConfirmDelete"></button>
|
<button type="button" class="btn-close" aria-label="Close" @onclick="ConfirmDelete"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Are You Sure You Want To Delete This Page?</p>
|
<p>@Localizer["Confirm.Page.Delete"]</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-danger" @onclick="DeletePage">@SharedLocalizer["Delete"]</button>
|
<button type="button" class="btn btn-danger" @onclick="DeletePage">@SharedLocalizer["Delete"]</button>
|
||||||
@ -109,13 +111,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList))
|
|
||||||
{
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<label for="Module" class="control-label">@Localizer["Module.Manage"] </label>
|
<label for="Module" class="control-label">@Localizer["Module.Manage"]</label>
|
||||||
<select class="form-select" @bind="@ModuleType">
|
<select class="form-select" @bind="@ModuleType">
|
||||||
<option value="new">@Localizer["Module.AddNew"]</option>
|
<option value="new">@Localizer["Module.AddNew"]</option>
|
||||||
<option value="existing">@Localizer["Module.AddExisting"]</option>
|
<option value="existing">@Localizer["Module.AddExisting"]</option>
|
||||||
@ -180,27 +179,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<label for="Title" class="control-label">@Localizer["Title"] </label>
|
<label for="Title" class="control-label">@Localizer["Title"]</label>
|
||||||
<input type="text" name="Title" class="form-control" @bind="@Title" />
|
<input type="text" name="Title" class="form-control" @bind="@Title" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (_pane.Length > 1)
|
|
||||||
{
|
|
||||||
<div class="row">
|
|
||||||
<div class="col text-center">
|
|
||||||
<label for="Pane" class="control-label">@Localizer["Pane"] </label>
|
|
||||||
<select class="form-select" @bind="@Pane">
|
|
||||||
@foreach (string pane in PageState.Page.Panes)
|
|
||||||
{
|
|
||||||
<option value="@pane">@pane Pane</option>
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col text-center">
|
<div class="col text-center">
|
||||||
<label for="Container" class="control-label">@Localizer["Container"] </label>
|
<label for="Pane" class="control-label">@Localizer["Pane"]</label>
|
||||||
|
<select class="form-select" @bind="@Pane">
|
||||||
|
@foreach (string pane in PageState.Page.Panes)
|
||||||
|
{
|
||||||
|
<option value="@pane">@pane Pane</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-center">
|
||||||
|
<label for="Insert" class="control-label">@Localizer["Location"]</label>
|
||||||
|
<select class="form-select" @bind="@Location">
|
||||||
|
<option value="@int.MinValue">@Localizer["LocationTop"]</option>
|
||||||
|
<option value="@int.MaxValue">@Localizer["LocationBottom"]</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-center">
|
||||||
|
<label for="Container" class="control-label">@Localizer["Container"]</label>
|
||||||
<select class="form-select" @bind="@ContainerType">
|
<select class="form-select" @bind="@ContainerType">
|
||||||
@foreach (var container in _containers)
|
@foreach (var container in _containers)
|
||||||
{
|
{
|
||||||
@ -220,13 +225,38 @@
|
|||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-primary col-12 mt-4" @onclick="@AddModule">@Localizer["Page.Module.Add"]</button>
|
<button type="button" class="btn btn-primary col-12 mt-4" @onclick="@AddModule">@Localizer["Page.Module.Add"]</button>
|
||||||
@((MarkupString)Message)
|
@((MarkupString)Message)
|
||||||
}
|
<hr class="app-rule" />
|
||||||
</div>
|
}
|
||||||
|
|
||||||
|
<div class="row d-flex">
|
||||||
|
<div class="col">
|
||||||
|
<button type="button" data-bs-dismiss="offcanvas" class="btn btn-secondary col-12" @onclick=@(async () => await LogoutUser())>@Localizer["Logout"]</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
[Parameter]
|
||||||
|
public string ButtonClass { get; set; } = "btn-outline-secondary";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string ContainerClass { get; set; } = "offcanvas offcanvas-end";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string HeaderClass { get; set; } = "offcanvas-header";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string BodyClass { get; set; } = "offcanvas-body overflow-auto";
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public bool ShowLanguageSwitcher { get; set; } = true;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public string LanguageDropdownAlignment { get; set; } = string.Empty; // Empty or Left or Right
|
||||||
|
|
||||||
private bool _canViewAdminDashboard = false;
|
private bool _canViewAdminDashboard = false;
|
||||||
private bool _showEditMode = false;
|
private bool _showEditMode = false;
|
||||||
private bool _deleteConfirmation = false;
|
private bool _deleteConfirmation = false;
|
||||||
@ -237,12 +267,22 @@
|
|||||||
private List<Module> _modules = new List<Module>();
|
private List<Module> _modules = new List<Module>();
|
||||||
private List<ThemeControl> _containers = new List<ThemeControl>();
|
private List<ThemeControl> _containers = new List<ThemeControl>();
|
||||||
private string _category = "Common";
|
private string _category = "Common";
|
||||||
|
private string _pane = "";
|
||||||
|
|
||||||
protected string PageId { get; private set; } = "-";
|
protected string PageId { get; private set; } = "-";
|
||||||
protected string ModuleId { get; private set; } = "-";
|
protected string ModuleId { get; private set; } = "-";
|
||||||
protected string ModuleType { get; private set; } = "new";
|
protected string ModuleType { get; private set; } = "new";
|
||||||
protected string ModuleDefinitionName { get; private set; } = "-";
|
protected string ModuleDefinitionName { get; private set; } = "-";
|
||||||
|
|
||||||
|
protected string Title { get; private set; } = "";
|
||||||
|
protected string ContainerType { get; private set; } = "";
|
||||||
|
protected int Location { get; private set; } = int.MaxValue;
|
||||||
|
protected string Visibility { get; private set; } = "view";
|
||||||
|
protected string Message { get; private set; } = "";
|
||||||
|
|
||||||
|
private string settingCategory = "CP-category";
|
||||||
|
private string settingPane = "CP-pane";
|
||||||
|
|
||||||
protected string Category
|
protected string Category
|
||||||
{
|
{
|
||||||
get => _category;
|
get => _category;
|
||||||
@ -273,27 +313,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string Title { get; private set; } = "";
|
|
||||||
protected string ContainerType { get; private set; } = "";
|
|
||||||
protected string Visibility { get; private set; } = "view";
|
|
||||||
protected string Message { get; private set; } = "";
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public string ButtonClass { get; set; } = "btn-outline-secondary";
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public string ContainerClass { get; set; } = "offcanvas offcanvas-end";
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public string HeaderClass { get; set; } = "offcanvas-header";
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public string BodyClass { get; set; } = "offcanvas-body overflow-auto";
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public bool ShowLanguageSwitcher { get; set; } = true;
|
|
||||||
|
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
protected override async Task OnParametersSetAsync()
|
||||||
{
|
{
|
||||||
_canViewAdminDashboard = CanViewAdminDashboard();
|
_canViewAdminDashboard = CanViewAdminDashboard();
|
||||||
@ -301,8 +320,9 @@
|
|||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.PermissionList))
|
||||||
{
|
{
|
||||||
_showEditMode = true;
|
_showEditMode = true;
|
||||||
_pages?.Clear();
|
LoadSettingsAsync();
|
||||||
|
|
||||||
|
_pages?.Clear();
|
||||||
foreach (Page p in PageState.Pages)
|
foreach (Page p in PageState.Pages)
|
||||||
{
|
{
|
||||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
@ -310,7 +330,6 @@
|
|||||||
_pages.Add(p);
|
_pages.Add(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await LoadSettingsAsync();
|
|
||||||
|
|
||||||
var themes = await ThemeService.GetThemesAsync();
|
var themes = await ThemeService.GetThemesAsync();
|
||||||
_containers = ThemeService.GetContainerControls(themes, PageState.Page.ThemeType);
|
_containers = ThemeService.GetContainerControls(themes, PageState.Page.ThemeType);
|
||||||
@ -434,7 +453,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
pageModule.Pane = Pane;
|
pageModule.Pane = Pane;
|
||||||
pageModule.Order = int.MaxValue;
|
pageModule.Order = Location;
|
||||||
pageModule.ContainerType = ContainerType;
|
pageModule.ContainerType = ContainerType;
|
||||||
|
|
||||||
if (pageModule.ContainerType == PageState.Site.DefaultContainerType)
|
if (pageModule.ContainerType == PageState.Site.DefaultContainerType)
|
||||||
@ -510,7 +529,7 @@
|
|||||||
switch (location)
|
switch (location)
|
||||||
{
|
{
|
||||||
case "Admin":
|
case "Admin":
|
||||||
// get admin dashboard moduleid
|
// get admin dashboard moduleid
|
||||||
module = PageState.Modules.FirstOrDefault(item => item.ModuleDefinitionName == Constants.AdminDashboardModule);
|
module = PageState.Modules.FirstOrDefault(item => item.ModuleDefinitionName == Constants.AdminDashboardModule);
|
||||||
if (module != null)
|
if (module != null)
|
||||||
{
|
{
|
||||||
@ -613,15 +632,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string settingCategory = "CP-category";
|
// the following code is duplicated from LoginBase
|
||||||
private string settingPane = "CP-pane";
|
private async Task LogoutUser()
|
||||||
private string _pane = "";
|
{
|
||||||
|
await LoggingService.Log(PageState.Alias, PageState.Page.PageId, null, PageState.User?.UserId, GetType().AssemblyQualifiedName, "Logout", LogFunction.Security, LogLevel.Information, null, "User Logout For Username {Username}", PageState.User?.Username);
|
||||||
|
|
||||||
private async Task LoadSettingsAsync()
|
Route route = new Route(PageState.Uri.AbsoluteUri, PageState.Alias.Path);
|
||||||
|
var url = route.PathAndQuery;
|
||||||
|
|
||||||
|
// verify if anonymous users can access page
|
||||||
|
if (!UserSecurity.IsAuthorized(null, PermissionNames.View, PageState.Page.PermissionList))
|
||||||
|
{
|
||||||
|
url = PageState.Alias.Path;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PageState.Runtime == Shared.Runtime.Hybrid)
|
||||||
|
{
|
||||||
|
// hybrid apps utilize an interactive logout
|
||||||
|
await UserService.LogoutUserAsync(PageState.User);
|
||||||
|
var authstateprovider = (IdentityAuthenticationStateProvider)ServiceProvider.GetService(typeof(IdentityAuthenticationStateProvider));
|
||||||
|
authstateprovider.NotifyAuthenticationChanged();
|
||||||
|
NavigationManager.NavigateTo(url, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// post to the Logout page to complete the logout process
|
||||||
|
var fields = new { __RequestVerificationToken = SiteState.AntiForgeryToken, returnurl = url };
|
||||||
|
var interop = new Interop(jsRuntime);
|
||||||
|
await interop.SubmitForm(Utilities.TenantUrl(PageState.Alias, "/pages/logout/"), fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSettingsAsync()
|
||||||
{
|
{
|
||||||
Dictionary<string, string> settings = await SettingService.GetUserSettingsAsync(PageState.User.UserId);
|
_category = SettingService.GetSetting(PageState.User.Settings, settingCategory, "Common");
|
||||||
_category = SettingService.GetSetting(settings, settingCategory, "Common");
|
var pane = SettingService.GetSetting(PageState.User.Settings, settingPane, "");
|
||||||
var pane = SettingService.GetSetting(settings, settingPane, "");
|
|
||||||
if (PageState.Page.Panes.Contains(pane))
|
if (PageState.Page.Panes.Contains(pane))
|
||||||
{
|
{
|
||||||
_pane = pane;
|
_pane = pane;
|
||||||
@ -647,4 +692,10 @@
|
|||||||
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
|
await SettingService.UpdateUserSettingsAsync(settings, PageState.User.UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ClearMessage()
|
||||||
|
{
|
||||||
|
|
||||||
|
Message = "";
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
@if (_supportedCultures?.Count() > 1)
|
@if (_supportedCultures?.Count() > 1)
|
||||||
{
|
{
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group pe-1" role="group">
|
||||||
<button id="btnCultures" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button id="btnCultures" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<span class="oi oi-globe"></span>
|
<span class="oi oi-globe"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="btnCultures">
|
<div class="dropdown-menu @MenuAlignment" aria-labelledby="btnCultures">
|
||||||
@foreach (var culture in _supportedCultures)
|
@foreach (var culture in _supportedCultures)
|
||||||
{
|
{
|
||||||
<a class="dropdown-item @(CultureInfo.CurrentUICulture.Name == culture.Name ? "active" : String.Empty)" href="#" @onclick="@(async e => await SetCultureAsync(culture.Name))">@culture.DisplayName</a>
|
<a class="dropdown-item @(CultureInfo.CurrentUICulture.Name == culture.Name ? "active" : String.Empty)" href="#" @onclick="@(async e => await SetCultureAsync(culture.Name))">@culture.DisplayName</a>
|
||||||
@ -23,10 +23,15 @@
|
|||||||
|
|
||||||
@code{
|
@code{
|
||||||
private IEnumerable<Culture> _supportedCultures;
|
private IEnumerable<Culture> _supportedCultures;
|
||||||
|
[Parameter]
|
||||||
|
public string DropdownAlignment { get; set; } = string.Empty; // Empty or Left or Right
|
||||||
|
private string MenuAlignment = string.Empty;
|
||||||
|
|
||||||
protected override void OnParametersSet()
|
protected override void OnParametersSet()
|
||||||
{
|
{
|
||||||
var languages = PageState.Languages;
|
MenuAlignment = DropdownAlignment.ToLower() == "right" ? "dropdown-menu-end" : string.Empty;
|
||||||
|
|
||||||
|
var languages = PageState.Languages;
|
||||||
_supportedCultures = languages.Select(l => new Culture { Name = l.Code, DisplayName = l.Name });
|
_supportedCultures = languages.Select(l => new Culture { Name = l.Code, DisplayName = l.Name });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ namespace Oqtane.Themes.Controls
|
|||||||
{
|
{
|
||||||
[Inject] public NavigationManager NavigationManager { get; set; }
|
[Inject] public NavigationManager NavigationManager { get; set; }
|
||||||
[Inject] public IUserService UserService { get; set; }
|
[Inject] public IUserService UserService { get; set; }
|
||||||
|
[Inject] public ISettingService SettingService { get; set; }
|
||||||
[Inject] public IJSRuntime jsRuntime { get; set; }
|
[Inject] public IJSRuntime jsRuntime { get; set; }
|
||||||
[Inject] public IServiceProvider ServiceProvider { get; set; }
|
[Inject] public IServiceProvider ServiceProvider { get; set; }
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<nav class="navbar navbar-dark bg-primary fixed-top">
|
<nav class="navbar navbar-dark bg-primary fixed-top">
|
||||||
<Logo /><Menu Orientation="Horizontal" />
|
<Logo /><Menu Orientation="Horizontal" />
|
||||||
<div class="controls ms-auto">
|
<div class="controls ms-auto">
|
||||||
<div class="controls-group"><UserProfile ShowRegister="@_register" /> <Login ShowLogin="@_login" /> <ControlPanel /></div>
|
<div class="controls-group"><UserProfile ShowRegister="@_register" /> <Login ShowLogin="@_login" /> <ControlPanel LanguageDropdownAlignment="right" /></div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
@ -28,11 +28,11 @@ namespace Oqtane.UI
|
|||||||
|
|
||||||
public List<Page> Pages
|
public List<Page> Pages
|
||||||
{
|
{
|
||||||
get { return Site.Pages.Where(item => !item.IsDeleted).ToList(); }
|
get { return Site.Pages; }
|
||||||
}
|
}
|
||||||
public List<Module> Modules
|
public List<Module> Modules
|
||||||
{
|
{
|
||||||
get { return Site.Modules.Where(item => !item.IsDeleted).ToList(); }
|
get { return Site.Modules; }
|
||||||
}
|
}
|
||||||
public List<Language> Languages
|
public List<Language> Languages
|
||||||
{
|
{
|
||||||
|
@ -146,6 +146,10 @@
|
|||||||
{
|
{
|
||||||
editmode = false; // reset edit mode when navigating to different page
|
editmode = false; // reset edit mode when navigating to different page
|
||||||
}
|
}
|
||||||
|
if (querystring.ContainsKey("edit") && querystring["edit"] == "true")
|
||||||
|
{
|
||||||
|
editmode = true; // querystring can set edit mode
|
||||||
|
}
|
||||||
|
|
||||||
// get user
|
// get user
|
||||||
if (PageState == null || refresh || PageState.Alias.SiteId != SiteState.Alias.SiteId)
|
if (PageState == null || refresh || PageState.Alias.SiteId != SiteState.Alias.SiteId)
|
||||||
@ -290,7 +294,7 @@
|
|||||||
var urlMapping = await UrlMappingService.GetUrlMappingAsync(site.SiteId, route.PagePath);
|
var urlMapping = await UrlMappingService.GetUrlMappingAsync(site.SiteId, route.PagePath);
|
||||||
if (urlMapping != null && !string.IsNullOrEmpty(urlMapping.MappedUrl))
|
if (urlMapping != null && !string.IsNullOrEmpty(urlMapping.MappedUrl))
|
||||||
{
|
{
|
||||||
var url = (urlMapping.MappedUrl.StartsWith("http")) ? urlMapping.MappedUrl : route.SiteUrl + "/" + urlMapping.MappedUrl;
|
var url = (urlMapping.MappedUrl.StartsWith("http")) ? urlMapping.MappedUrl : route.SiteUrl + "/" + urlMapping.MappedUrl + route.Query;
|
||||||
NavigationManager.NavigateTo(url, false);
|
NavigationManager.NavigateTo(url, false);
|
||||||
}
|
}
|
||||||
else // not mapped
|
else // not mapped
|
||||||
@ -387,6 +391,7 @@
|
|||||||
private (Page Page, List<Module> Modules) ProcessModules(Page page, List<Module> modules, int moduleid, string action, string defaultcontainertype, Alias alias)
|
private (Page Page, List<Module> Modules) ProcessModules(Page page, List<Module> modules, int moduleid, string action, string defaultcontainertype, Alias alias)
|
||||||
{
|
{
|
||||||
var paneindex = new Dictionary<string, int>();
|
var paneindex = new Dictionary<string, int>();
|
||||||
|
|
||||||
foreach (Module module in modules)
|
foreach (Module module in modules)
|
||||||
{
|
{
|
||||||
// initialize module control properties
|
// initialize module control properties
|
||||||
@ -397,7 +402,7 @@
|
|||||||
module.PaneModuleIndex = -1;
|
module.PaneModuleIndex = -1;
|
||||||
module.PaneModuleCount = 0;
|
module.PaneModuleCount = 0;
|
||||||
|
|
||||||
if ((module.PageId == page.PageId || module.ModuleId == moduleid))
|
if (module.PageId == page.PageId || module.ModuleId == moduleid)
|
||||||
{
|
{
|
||||||
var typename = Constants.ErrorModule;
|
var typename = Constants.ErrorModule;
|
||||||
|
|
||||||
@ -463,8 +468,8 @@
|
|||||||
// additional metadata needed for admin components
|
// additional metadata needed for admin components
|
||||||
if (module.ModuleId == moduleid && action != "")
|
if (module.ModuleId == moduleid && action != "")
|
||||||
{
|
{
|
||||||
module.SecurityAccessLevel = moduleobject.SecurityAccessLevel;
|
|
||||||
module.ControlTitle = moduleobject.Title;
|
module.ControlTitle = moduleobject.Title;
|
||||||
|
module.SecurityAccessLevel = moduleobject.SecurityAccessLevel;
|
||||||
module.Actions = moduleobject.Actions;
|
module.Actions = moduleobject.Actions;
|
||||||
module.UseAdminContainer = moduleobject.UseAdminContainer;
|
module.UseAdminContainer = moduleobject.UseAdminContainer;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user