diff --git a/zero.Core/Plugins/IZeroBuiltInPlugin.cs b/zero.Core/Plugins/IZeroBuiltInPlugin.cs new file mode 100644 index 00000000..6a7f43ab --- /dev/null +++ b/zero.Core/Plugins/IZeroBuiltInPlugin.cs @@ -0,0 +1,10 @@ +using Microsoft.Extensions.DependencyInjection; +using zero.Core.Options; + +namespace zero.Core.Plugins +{ + internal interface IZeroBuiltInPlugin + { + + } +} \ No newline at end of file diff --git a/zero.Core/Plugins/ZeroPlugin.cs b/zero.Core/Plugins/IZeroPlugin.cs similarity index 58% rename from zero.Core/Plugins/ZeroPlugin.cs rename to zero.Core/Plugins/IZeroPlugin.cs index befe2780..f3798782 100644 --- a/zero.Core/Plugins/ZeroPlugin.cs +++ b/zero.Core/Plugins/IZeroPlugin.cs @@ -3,13 +3,6 @@ using zero.Core.Options; namespace zero.Core.Plugins { - //public abstract class ZeroPlugin : IZeroPlugin - //{ - // public virtual void Configure(IServiceCollection services, IZeroOptions zero) { } - - //} - - public interface IZeroPlugin { void Configure(IServiceCollection services, IZeroOptions zero); diff --git a/zero.Debug/Startup.cs b/zero.Debug/Startup.cs index 3df6013e..b7b4e305 100644 --- a/zero.Debug/Startup.cs +++ b/zero.Debug/Startup.cs @@ -38,6 +38,7 @@ namespace zero.Debug services.AddZero(Configuration, opts => { opts.Plugins.Add(); + opts.Plugins.Add(); }); services.AddMvc(); diff --git a/zero.Debug/zero.Debug.csproj b/zero.Debug/zero.Debug.csproj index f4565b1f..55e66dee 100644 --- a/zero.Debug/zero.Debug.csproj +++ b/zero.Debug/zero.Debug.csproj @@ -5,6 +5,7 @@ + diff --git a/zero.Web.UI/App/services/localization.js b/zero.Web.UI/App/services/localization.js index d7444a5b..ba2401bd 100644 --- a/zero.Web.UI/App/services/localization.js +++ b/zero.Web.UI/App/services/localization.js @@ -27,7 +27,7 @@ export default { // TODO only return key if in debug mode if (!value || typeof value !== 'string') { - return ''; // '[' + key + ']'; + return '[' + key + ']'; } return this.replaceTokens(value, params.tokens); diff --git a/zero.Web/Defaults/DefaultBackofficePlugin.cs b/zero.Web/Defaults/DefaultBackofficePlugin.cs index 14a3c1c4..20dec785 100644 --- a/zero.Web/Defaults/DefaultBackofficePlugin.cs +++ b/zero.Web/Defaults/DefaultBackofficePlugin.cs @@ -6,7 +6,7 @@ using zero.Web.Sections; namespace zero.Web.Defaults { - public class DefaultBackofficePlugin : IZeroPlugin + internal class DefaultBackofficePlugin : IZeroPlugin { public void Configure(IServiceCollection services, IZeroOptions zero) { diff --git a/zero.Web/ZeroBuilder.cs b/zero.Web/ZeroBuilder.cs index 245f3ef4..1cef494b 100644 --- a/zero.Web/ZeroBuilder.cs +++ b/zero.Web/ZeroBuilder.cs @@ -66,7 +66,9 @@ namespace zero.Web { opts.ZeroVersion = "0.0.1.0"; // TODO opts.Plugins = new PluginCollection(Services, opts); - opts.Plugins.Add(); + + // resolve default plugin + new DefaultBackofficePlugin().Configure(Services, opts); }); Services.AddTransient(factory => factory.GetService>().CurrentValue);