From 2aabdd7527fe931618ff1be7b2c90fa199095b64 Mon Sep 17 00:00:00 2001 From: iAlexeyProkhorov Date: Fri, 27 Jan 2023 17:23:55 +0200 Subject: [PATCH] Update to version 1.4.3. Changes: - fixed installation bug for linux OS; - added 'await' in GarbageManager; --- BaseBaroquePlugin.cs | 4 ++-- Data/SchemaMigration.cs | 7 +++++-- Infrastructure/NopStartup.cs | 2 +- Nop.Plugin.Widgets.qBoSlider.csproj | 15 ++++++++++----- Service/GarbageManager.cs | 8 ++++---- plugin.json | 4 ++-- qBoSliderPlugin.cs | 5 +++-- 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/BaseBaroquePlugin.cs b/BaseBaroquePlugin.cs index 7ecd52f..a9af852 100644 --- a/BaseBaroquePlugin.cs +++ b/BaseBaroquePlugin.cs @@ -45,11 +45,11 @@ public BaseBaroquePlugin() { //get plugin descriptor var pluginsInfo = Singleton.Instance; - var descriptor = pluginsInfo.PluginDescriptors.FirstOrDefault(x => x.PluginType == this.GetType()); + var descriptor = pluginsInfo.PluginDescriptors.FirstOrDefault(x => x.pluginDescriptor.PluginType == this.GetType()); //intialize varialbes this._localizationService = EngineContext.Current.Resolve(); this._languageService = EngineContext.Current.Resolve(); - this._originalAssemblyFile = new FileInfo(descriptor.OriginalAssemblyFile); + this._originalAssemblyFile = new FileInfo(descriptor.pluginDescriptor.OriginalAssemblyFile); } #endregion diff --git a/Data/SchemaMigration.cs b/Data/SchemaMigration.cs index b1fc4e7..26f7b35 100644 --- a/Data/SchemaMigration.cs +++ b/Data/SchemaMigration.cs @@ -14,12 +14,13 @@ using FluentMigrator; +using Nop.Data.Extensions; using Nop.Data.Migrations; using Nop.Plugin.Widgets.qBoSlider.Domain; namespace Nop.Plugin.Widgets.qBoSlider.Data { - [NopMigration("2020/05/24 15:33:23:6455432", "Widgets.qBoSlider base schema")] + [NopMigration("2020/05/24 15:33:23:6455432", "Widgets.qBoSlider base schema", MigrationProcessType.Installation)] public class SchemaMigration : AutoReversingMigration { protected IMigrationManager _migrationManager; @@ -31,7 +32,9 @@ public SchemaMigration(IMigrationManager migrationManager) public override void Up() { - //_migrationManager.BuildTable(Create); + Create.TableFor(); + Create.TableFor(); + Create.TableFor(); } } } diff --git a/Infrastructure/NopStartup.cs b/Infrastructure/NopStartup.cs index 6da3123..42ea23e 100644 --- a/Infrastructure/NopStartup.cs +++ b/Infrastructure/NopStartup.cs @@ -60,7 +60,7 @@ public void Configure(IApplicationBuilder application) public int Order { - get { return 1; } + get { return 1000; } } } } diff --git a/Nop.Plugin.Widgets.qBoSlider.csproj b/Nop.Plugin.Widgets.qBoSlider.csproj index ada88be..c28c623 100644 --- a/Nop.Plugin.Widgets.qBoSlider.csproj +++ b/Nop.Plugin.Widgets.qBoSlider.csproj @@ -8,7 +8,7 @@ - net6.0 + net7.0 Copyright © Baroque Team Baroque Team @@ -16,7 +16,7 @@ https://github.com/iAlexeyProkhorov/qBoSlider Git - 1.4.2 + 1.4.3 ..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider $(OutputPath) @@ -31,10 +31,17 @@ ..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider + + + + + + + @@ -58,9 +65,7 @@ - - false - + diff --git a/Service/GarbageManager.cs b/Service/GarbageManager.cs index 5ad5a04..4a877c8 100644 --- a/Service/GarbageManager.cs +++ b/Service/GarbageManager.cs @@ -83,9 +83,9 @@ public virtual async Task DeleteSlideLocalizedValuesAsync(Slide slide, int langu var isPictureValid = int.TryParse(pictureIdLocalizaedValue, out int localizePictureId); //delete localized values - _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.PictureId, null, languageId); - _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.HyperlinkAddress, null, languageId); - _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.Description, null, languageId); + await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.PictureId, null, languageId); + await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.HyperlinkAddress, null, languageId); + await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.Description, null, languageId); //remove localized picture if (!string.IsNullOrEmpty(pictureIdLocalizaedValue) && isPictureValid) @@ -96,7 +96,7 @@ public virtual async Task DeleteSlideLocalizedValuesAsync(Slide slide, int langu if (localizedPicture == null) return; - _pictureService.DeletePictureAsync(localizedPicture); + await _pictureService.DeletePictureAsync(localizedPicture); } } diff --git a/plugin.json b/plugin.json index 47a7b4c..130cbb2 100644 --- a/plugin.json +++ b/plugin.json @@ -2,8 +2,8 @@ "Group": "Widgets", "FriendlyName": "qBoSlider", "SystemName": "Widgets.qBoSlider", - "Version": "1.4.2", - "SupportedVersions": [ "4.50" ], + "Version": "1.4.3", + "SupportedVersions": [ "4.60" ], "Author": "Baroque team", "DisplayOrder": 1, "FileName": "Nop.Plugin.Widgets.qBoSlider.dll", diff --git a/qBoSliderPlugin.cs b/qBoSliderPlugin.cs index 8ab303a..4ad17df 100644 --- a/qBoSliderPlugin.cs +++ b/qBoSliderPlugin.cs @@ -13,6 +13,7 @@ //limitations under the License. using Nop.Core; +using Nop.Plugin.Widgets.qBoSlider.Components; using Nop.Plugin.Widgets.qBoSlider.Domain; using Nop.Plugin.Widgets.qBoSlider.Service; using Nop.Services.Cms; @@ -124,9 +125,9 @@ public async Task> GetWidgetZonesAsync() /// /// Name of the widget zone /// View component name - public string GetWidgetViewComponentName(string widgetZone) + public Type GetWidgetViewComponent(string widgetZone) { - return "Baroque.qBoSlider.PublicInfo"; + return typeof(PublicInfoComponent); } ///