diff --git a/Oqtane.Client/IconResources.cs b/Oqtane.Client/IconResources.cs new file mode 100644 index 00000000..a7c086ee --- /dev/null +++ b/Oqtane.Client/IconResources.cs @@ -0,0 +1,14 @@ +namespace Oqtane +{ + /// + /// Dummy class used to collect shared resource strings for this application + /// + /// + /// This class is mostly used with IStringLocalizer and IHtmlLocalizer interfaces. + /// The class must reside at the project root. + /// + public class IconResources + { + + } +} diff --git a/Oqtane.Client/Installer/Controls/MySQLConfig.razor b/Oqtane.Client/Installer/Controls/MySQLConfig.razor index 735285d4..1d41a9d9 100644 --- a/Oqtane.Client/Installer/Controls/MySQLConfig.razor +++ b/Oqtane.Client/Installer/Controls/MySQLConfig.razor @@ -1,5 +1,6 @@ @namespace Oqtane.Installer.Controls @implements Oqtane.Interfaces.IDatabaseConfigControl +@inject IStringLocalizer SharedLocalizer
@@ -28,7 +29,10 @@
- +
+ + +
@@ -38,6 +42,13 @@ private string _database = "Oqtane-" + DateTime.UtcNow.ToString("yyyyMMddHHmm"); private string _uid = 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() { @@ -55,4 +66,18 @@ return connectionString; } + + private void TogglePassword() + { + if (_passwordType == "password") + { + _passwordType = "text"; + _togglePassword = SharedLocalizer["HidePassword"]; + } + else + { + _passwordType = "password"; + _togglePassword = SharedLocalizer["ShowPassword"]; + } + } } \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor b/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor index 652e55dc..f9413fbb 100644 --- a/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor +++ b/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor @@ -1,6 +1,7 @@ @namespace Oqtane.Installer.Controls @implements Oqtane.Interfaces.IDatabaseConfigControl @inject IStringLocalizer Localizer +@inject IStringLocalizer SharedLocalizer
@@ -40,7 +41,10 @@
- +
+ + +
} @@ -52,6 +56,13 @@ private string _security = "integrated"; private string _uid = 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() { @@ -80,4 +91,18 @@ return connectionString; } + + private void TogglePassword() + { + if (_passwordType == "password") + { + _passwordType = "text"; + _togglePassword = SharedLocalizer["HidePassword"]; + } + else + { + _passwordType = "password"; + _togglePassword = SharedLocalizer["ShowPassword"]; + } + } } \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/SqlServerConfig.razor b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor index f3ef53fb..0f96c9ff 100644 --- a/Oqtane.Client/Installer/Controls/SqlServerConfig.razor +++ b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor @@ -35,7 +35,10 @@
- +
+ + +
} @@ -67,9 +70,16 @@ private string _security = "integrated"; private string _uid = String.Empty; private string _pwd = String.Empty; + private string _passwordType = "password"; + private string _togglePassword = string.Empty; private string _encryption = "false"; private string _trustservercertificate = "false"; + protected override void OnInitialized() + { + _togglePassword = SharedLocalizer["ShowPassword"]; + } + public string GetConnectionString() { var connectionString = String.Empty; @@ -92,4 +102,18 @@ return connectionString; } + + private void TogglePassword() + { + if (_passwordType == "password") + { + _passwordType = "text"; + _togglePassword = SharedLocalizer["HidePassword"]; + } + else + { + _passwordType = "password"; + _togglePassword = SharedLocalizer["ShowPassword"]; + } + } } \ No newline at end of file diff --git a/Oqtane.Client/Modules/Admin/Files/Details.razor b/Oqtane.Client/Modules/Admin/Files/Details.razor index af70abc6..56eca8c7 100644 --- a/Oqtane.Client/Modules/Admin/Files/Details.razor +++ b/Oqtane.Client/Modules/Admin/Files/Details.razor @@ -66,12 +66,6 @@ public override string Title => "File Management"; - protected override void OnParametersSet() - { - base.OnParametersSet(); - base.SetModuleTitle(Localizer["ModuleTitle.Text"]); - } - protected override async Task OnInitializedAsync() { try diff --git a/Oqtane.Client/Modules/Admin/Files/Edit.razor b/Oqtane.Client/Modules/Admin/Files/Edit.razor index c5030a31..e69b44aa 100644 --- a/Oqtane.Client/Modules/Admin/Files/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Files/Edit.razor @@ -48,7 +48,7 @@
- +
@@ -112,11 +112,6 @@ public override string Title => "Folder Management"; - protected override void OnParametersSet() - { - base.OnParametersSet(); - base.SetModuleTitle(Localizer["ModuleTitle.Text"]); - } protected override async Task OnInitializedAsync() { try diff --git a/Oqtane.Client/Modules/Admin/Jobs/Edit.razor b/Oqtane.Client/Modules/Admin/Jobs/Edit.razor index 34780aa0..6a9246e2 100644 --- a/Oqtane.Client/Modules/Admin/Jobs/Edit.razor +++ b/Oqtane.Client/Modules/Admin/Jobs/Edit.razor @@ -56,7 +56,7 @@
- +
@@ -69,7 +69,7 @@
- +
@@ -82,7 +82,7 @@
- +
@@ -97,22 +97,22 @@ @code { - private ElementReference form; - private bool validated = false; - private int _jobId; - private string _name = string.Empty; - private string _jobType = string.Empty; - private string _isEnabled = "True"; - private string _interval = string.Empty; - private string _frequency = string.Empty; - private DateTime? _startDate = null; - private string _startTime = string.Empty; - private DateTime? _endDate = null; - private string _endTime = string.Empty; - private string _retentionHistory = string.Empty; - private DateTime? _nextDate = null; - private string _nextTime = string.Empty; - private string createdby; + private ElementReference form; + private bool validated = false; + private int _jobId; + private string _name = string.Empty; + private string _jobType = string.Empty; + private string _isEnabled = "True"; + private string _interval = string.Empty; + private string _frequency = string.Empty; + private DateTime? _startDate = null; + private DateTime? _startTime = null; + private DateTime? _endDate = null; + private DateTime? _endTime = null; + private string _retentionHistory = string.Empty; + private DateTime? _nextDate = null; + private DateTime? _nextTime = null; + private string createdby; private DateTime createdon; private string modifiedby; private DateTime modifiedon; @@ -132,11 +132,14 @@ _isEnabled = job.IsEnabled.ToString(); _interval = job.Interval.ToString(); _frequency = job.Frequency; - (_startDate, _startTime) = Utilities.UtcAsLocalDateAndTime(job.StartDate); - (_endDate, _endTime) = Utilities.UtcAsLocalDateAndTime(job.EndDate); - _retentionHistory = job.RetentionHistory.ToString(); - (_nextDate, _nextTime) = Utilities.UtcAsLocalDateAndTime(job.NextExecution); - createdby = job.CreatedBy; + _startDate = Utilities.UtcAsLocalDate(job.StartDate); + _startTime = Utilities.UtcAsLocalDateTime(job.StartDate); + _endDate = Utilities.UtcAsLocalDate(job.EndDate); + _endTime = Utilities.UtcAsLocalDateTime(job.EndDate); + _retentionHistory = job.RetentionHistory.ToString(); + _nextDate = Utilities.UtcAsLocalDate(job.NextExecution); + _nextTime = Utilities.UtcAsLocalDateTime(job.NextExecution); + createdby = job.CreatedBy; createdon = job.CreatedOn; modifiedby = job.ModifiedBy; modifiedon = job.ModifiedOn; diff --git a/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor b/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor deleted file mode 100644 index 6785292a..00000000 --- a/Oqtane.Client/Modules/Admin/ModuleCreator/Index.razor +++ /dev/null @@ -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 Localizer -@inject IStringLocalizer SharedLocalizer - -@if (string.IsNullOrEmpty(_moduledefinitionname) && _templates != null) -{ -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
- @if (!string.IsNullOrEmpty(_location)) - { -
- -
- -
-
- } -
-
- -} -else -{ - -} - -@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