Skip to content

Commit

Permalink
Update to version 1.4.3. Changes:
Browse files Browse the repository at this point in the history
 - fixed installation bug for linux OS;
 - added 'await' in GarbageManager;
  • Loading branch information
iAlexeyProkhorov committed Jan 27, 2023
1 parent 482622c commit 2aabdd7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
4 changes: 2 additions & 2 deletions BaseBaroquePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public BaseBaroquePlugin()
{
//get plugin descriptor
var pluginsInfo = Singleton<IPluginsInfo>.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<ILocalizationService>();
this._languageService = EngineContext.Current.Resolve<ILanguageService>();
this._originalAssemblyFile = new FileInfo(descriptor.OriginalAssemblyFile);
this._originalAssemblyFile = new FileInfo(descriptor.pluginDescriptor.OriginalAssemblyFile);
}

#endregion
Expand Down
7 changes: 5 additions & 2 deletions Data/SchemaMigration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +32,9 @@ public SchemaMigration(IMigrationManager migrationManager)

public override void Up()
{
//_migrationManager.BuildTable<Slide>(Create);
Create.TableFor<WidgetZone>();
Create.TableFor<Slide>();
Create.TableFor<WidgetZoneSlide>();
}
}
}
2 changes: 1 addition & 1 deletion Infrastructure/NopStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void Configure(IApplicationBuilder application)

public int Order
{
get { return 1; }
get { return 1000; }
}
}
}
15 changes: 10 additions & 5 deletions Nop.Plugin.Widgets.qBoSlider.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Copyright>Copyright © Baroque Team</Copyright>
<Company></Company>
<Authors>Baroque Team</Authors>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl></PackageProjectUrl>
<RepositoryUrl>https://github.com/iAlexeyProkhorov/qBoSlider</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<Version>1.4.2</Version>
<Version>1.4.3</Version>
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider</OutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
Expand All @@ -31,10 +31,17 @@
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider</OutputPath>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Data\**" />
<EmbeddedResource Remove="Data\**" />
<None Remove="Data\**" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Infrastructure\EfStartUpTask.cs" />
<Compile Remove="Infrastructure\qBoSliderContext.cs" />
<Compile Remove="Infrastructure\RouteProvider.cs" />
<Compile Remove="Mapping\qBoSliderNamesCompatibility.cs" />
</ItemGroup>

<ItemGroup>
Expand All @@ -58,9 +65,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj">
<Private>false</Private>
</ProjectReference>
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Content\images\a17.png">
Expand Down
8 changes: 4 additions & 4 deletions Service/GarbageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -96,7 +96,7 @@ public virtual async Task DeleteSlideLocalizedValuesAsync(Slide slide, int langu
if (localizedPicture == null)
return;

_pictureService.DeletePictureAsync(localizedPicture);
await _pictureService.DeletePictureAsync(localizedPicture);
}
}

Expand Down
4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions qBoSliderPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -124,9 +125,9 @@ public async Task<IList<string>> GetWidgetZonesAsync()
/// </summary>
/// <param name="widgetZone">Name of the widget zone</param>
/// <returns>View component name</returns>
public string GetWidgetViewComponentName(string widgetZone)
public Type GetWidgetViewComponent(string widgetZone)
{
return "Baroque.qBoSlider.PublicInfo";
return typeof(PublicInfoComponent);
}

/// <summary>
Expand Down

0 comments on commit 2aabdd7

Please sign in to comment.