Scraper and plugin manager (#4242)

* Add package manager
* Add SettingModal validate
* Reverse modal button order
* Add plugin package management
* Refactor ClearableInput
This commit is contained in:
WithoutPants
2023-11-22 10:01:11 +11:00
committed by GitHub
parent d95ef4059a
commit 987fa80786
42 changed files with 3484 additions and 35 deletions

View File

@@ -347,6 +347,18 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input ConfigGen
c.Set(config.DrawFunscriptHeatmapRange, input.DrawFunscriptHeatmapRange)
}
refreshScraperSource := false
if input.ScraperPackageSources != nil {
c.Set(config.ScraperPackageSources, input.ScraperPackageSources)
refreshScraperSource = true
}
refreshPluginSource := false
if input.PluginPackageSources != nil {
c.Set(config.PluginPackageSources, input.PluginPackageSources)
refreshPluginSource = true
}
if err := c.Write(); err != nil {
return makeConfigGeneralResult(), err
}
@@ -361,6 +373,12 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input ConfigGen
if refreshBlobStorage {
manager.GetInstance().SetBlobStoreOptions()
}
if refreshScraperSource {
manager.GetInstance().RefreshScraperSourceManager()
}
if refreshPluginSource {
manager.GetInstance().RefreshPluginSourceManager()
}
return makeConfigGeneralResult(), nil
}