mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Plugin info - Implemented property changed
Plugins - Improved enable failure detection Plugins UI - Show an indicator on plugins that failed to enable Plugins UI - Show a progress indicator on plugins that are enabling UI - Added reusable Snackbar (not the Dutch kind with kroketten)
This commit is contained in:
1 parent
28bcfcc95a
commit
a47eedf1c2
18 files changed
+399
-179
No files matched your search
@@ -8,7 +8,6 @@ namespace Artemis.Storage.Entities.Plugins
|
||||
public class PluginEntity
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid PluginGuid { get; set; }
|
||||
|
||||
public bool IsEnabled { get; set; }
|
||||
public bool LastEnableSuccessful { get; set; }
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ using LiteDB;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
public class AttributeBasedPropertiesMigration : IStorageMigration
|
||||
public class M1AttributeBasedPropertiesMigration : IStorageMigration
|
||||
{
|
||||
public int UserVersion => 1;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ using LiteDB;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
public class ProfileEntitiesEnabledMigration : IStorageMigration
|
||||
public class M2ProfileEntitiesEnabledMigration : IStorageMigration
|
||||
{
|
||||
public int UserVersion => 2;
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Artemis.Storage.Migrations.Interfaces;
|
||||
using LiteDB;
|
||||
|
||||
namespace Artemis.Storage.Migrations
|
||||
{
|
||||
public class M3PluginEntitiesIndexChangesMigration : IStorageMigration
|
||||
{
|
||||
public int UserVersion => 3;
|
||||
|
||||
public void Apply(LiteRepository repository)
|
||||
{
|
||||
if (repository.Database.CollectionExists("PluginEntity"))
|
||||
repository.Database.DropCollection("PluginEntity");
|
||||
if (repository.Database.CollectionExists("PluginSettingEntity"))
|
||||
repository.Database.DropCollection("PluginSettingEntity");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,9 +13,7 @@ namespace Artemis.Storage.Repositories
|
||||
{
|
||||
_repository = repository;
|
||||
|
||||
_repository.Database.GetCollection<PluginEntity>().EnsureIndex(s => s.PluginGuid);
|
||||
_repository.Database.GetCollection<PluginSettingEntity>().EnsureIndex(s => s.Name);
|
||||
_repository.Database.GetCollection<PluginSettingEntity>().EnsureIndex(s => s.PluginGuid);
|
||||
_repository.Database.GetCollection<PluginSettingEntity>().EnsureIndex(s => new {s.Name, s.PluginGuid}, true);
|
||||
}
|
||||
|
||||
public void AddPlugin(PluginEntity pluginEntity)
|
||||
@@ -25,12 +23,13 @@ namespace Artemis.Storage.Repositories
|
||||
|
||||
public PluginEntity GetPluginByGuid(Guid pluginGuid)
|
||||
{
|
||||
return _repository.FirstOrDefault<PluginEntity>(p => p.PluginGuid == pluginGuid);
|
||||
return _repository.FirstOrDefault<PluginEntity>(p => p.Id == pluginGuid);
|
||||
}
|
||||
|
||||
public void SavePlugin(PluginEntity pluginEntity)
|
||||
{
|
||||
_repository.Upsert(pluginEntity);
|
||||
_repository.Database.Checkpoint();
|
||||
}
|
||||
|
||||
public void AddSetting(PluginSettingEntity pluginSettingEntity)
|
||||
|
||||
Reference in new issue
Block a user