Skip to content

Commit 2aabdd7

Browse files
Update to version 1.4.3. Changes:
- fixed installation bug for linux OS; - added 'await' in GarbageManager;
1 parent 482622c commit 2aabdd7

File tree

7 files changed

+27
-18
lines changed

7 files changed

+27
-18
lines changed

BaseBaroquePlugin.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ public BaseBaroquePlugin()
4545
{
4646
//get plugin descriptor
4747
var pluginsInfo = Singleton<IPluginsInfo>.Instance;
48-
var descriptor = pluginsInfo.PluginDescriptors.FirstOrDefault(x => x.PluginType == this.GetType());
48+
var descriptor = pluginsInfo.PluginDescriptors.FirstOrDefault(x => x.pluginDescriptor.PluginType == this.GetType());
4949
//intialize varialbes
5050
this._localizationService = EngineContext.Current.Resolve<ILocalizationService>();
5151
this._languageService = EngineContext.Current.Resolve<ILanguageService>();
52-
this._originalAssemblyFile = new FileInfo(descriptor.OriginalAssemblyFile);
52+
this._originalAssemblyFile = new FileInfo(descriptor.pluginDescriptor.OriginalAssemblyFile);
5353
}
5454

5555
#endregion

Data/SchemaMigration.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515

1616
using FluentMigrator;
17+
using Nop.Data.Extensions;
1718
using Nop.Data.Migrations;
1819
using Nop.Plugin.Widgets.qBoSlider.Domain;
1920

2021
namespace Nop.Plugin.Widgets.qBoSlider.Data
2122
{
22-
[NopMigration("2020/05/24 15:33:23:6455432", "Widgets.qBoSlider base schema")]
23+
[NopMigration("2020/05/24 15:33:23:6455432", "Widgets.qBoSlider base schema", MigrationProcessType.Installation)]
2324
public class SchemaMigration : AutoReversingMigration
2425
{
2526
protected IMigrationManager _migrationManager;
@@ -31,7 +32,9 @@ public SchemaMigration(IMigrationManager migrationManager)
3132

3233
public override void Up()
3334
{
34-
//_migrationManager.BuildTable<Slide>(Create);
35+
Create.TableFor<WidgetZone>();
36+
Create.TableFor<Slide>();
37+
Create.TableFor<WidgetZoneSlide>();
3538
}
3639
}
3740
}

Infrastructure/NopStartup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void Configure(IApplicationBuilder application)
6060

6161
public int Order
6262
{
63-
get { return 1; }
63+
get { return 1000; }
6464
}
6565
}
6666
}

Nop.Plugin.Widgets.qBoSlider.csproj

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
</PropertyGroup>
99

1010
<PropertyGroup>
11-
<TargetFramework>net6.0</TargetFramework>
11+
<TargetFramework>net7.0</TargetFramework>
1212
<Copyright>Copyright © Baroque Team</Copyright>
1313
<Company></Company>
1414
<Authors>Baroque Team</Authors>
1515
<PackageLicenseUrl></PackageLicenseUrl>
1616
<PackageProjectUrl></PackageProjectUrl>
1717
<RepositoryUrl>https://github.com/iAlexeyProkhorov/qBoSlider</RepositoryUrl>
1818
<RepositoryType>Git</RepositoryType>
19-
<Version>1.4.2</Version>
19+
<Version>1.4.3</Version>
2020
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider</OutputPath>
2121
<OutDir>$(OutputPath)</OutDir>
2222
</PropertyGroup>
@@ -31,10 +31,17 @@
3131
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Widgets.qBoSlider</OutputPath>
3232
</PropertyGroup>
3333

34+
<ItemGroup>
35+
<Compile Remove="Data\**" />
36+
<EmbeddedResource Remove="Data\**" />
37+
<None Remove="Data\**" />
38+
</ItemGroup>
39+
3440
<ItemGroup>
3541
<Compile Remove="Infrastructure\EfStartUpTask.cs" />
3642
<Compile Remove="Infrastructure\qBoSliderContext.cs" />
3743
<Compile Remove="Infrastructure\RouteProvider.cs" />
44+
<Compile Remove="Mapping\qBoSliderNamesCompatibility.cs" />
3845
</ItemGroup>
3946

4047
<ItemGroup>
@@ -58,9 +65,7 @@
5865
</Content>
5966
</ItemGroup>
6067
<ItemGroup>
61-
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj">
62-
<Private>false</Private>
63-
</ProjectReference>
68+
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
6469
</ItemGroup>
6570
<ItemGroup>
6671
<None Update="Content\images\a17.png">

Service/GarbageManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ public virtual async Task DeleteSlideLocalizedValuesAsync(Slide slide, int langu
8383
var isPictureValid = int.TryParse(pictureIdLocalizaedValue, out int localizePictureId);
8484

8585
//delete localized values
86-
_localizedEntityService.SaveLocalizedValueAsync(slide, x => x.PictureId, null, languageId);
87-
_localizedEntityService.SaveLocalizedValueAsync(slide, x => x.HyperlinkAddress, null, languageId);
88-
_localizedEntityService.SaveLocalizedValueAsync(slide, x => x.Description, null, languageId);
86+
await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.PictureId, null, languageId);
87+
await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.HyperlinkAddress, null, languageId);
88+
await _localizedEntityService.SaveLocalizedValueAsync(slide, x => x.Description, null, languageId);
8989

9090
//remove localized picture
9191
if (!string.IsNullOrEmpty(pictureIdLocalizaedValue) && isPictureValid)
@@ -96,7 +96,7 @@ public virtual async Task DeleteSlideLocalizedValuesAsync(Slide slide, int langu
9696
if (localizedPicture == null)
9797
return;
9898

99-
_pictureService.DeletePictureAsync(localizedPicture);
99+
await _pictureService.DeletePictureAsync(localizedPicture);
100100
}
101101
}
102102

plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"Group": "Widgets",
33
"FriendlyName": "qBoSlider",
44
"SystemName": "Widgets.qBoSlider",
5-
"Version": "1.4.2",
6-
"SupportedVersions": [ "4.50" ],
5+
"Version": "1.4.3",
6+
"SupportedVersions": [ "4.60" ],
77
"Author": "Baroque team",
88
"DisplayOrder": 1,
99
"FileName": "Nop.Plugin.Widgets.qBoSlider.dll",

qBoSliderPlugin.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//limitations under the License.
1414

1515
using Nop.Core;
16+
using Nop.Plugin.Widgets.qBoSlider.Components;
1617
using Nop.Plugin.Widgets.qBoSlider.Domain;
1718
using Nop.Plugin.Widgets.qBoSlider.Service;
1819
using Nop.Services.Cms;
@@ -124,9 +125,9 @@ public async Task<IList<string>> GetWidgetZonesAsync()
124125
/// </summary>
125126
/// <param name="widgetZone">Name of the widget zone</param>
126127
/// <returns>View component name</returns>
127-
public string GetWidgetViewComponentName(string widgetZone)
128+
public Type GetWidgetViewComponent(string widgetZone)
128129
{
129-
return "Baroque.qBoSlider.PublicInfo";
130+
return typeof(PublicInfoComponent);
130131
}
131132

132133
/// <summary>

0 commit comments

Comments
 (0)