feat: 增加 GetThemes 接口定义
This commit is contained in:
parent
0cdcb0eec9
commit
1e95e722f9
|
@ -46,7 +46,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||||
services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
||||||
|
|
||||||
services.AddSingleton<INavigation, NavigationsService>();
|
services.AddSingleton<INavigation, NavigationsService>();
|
||||||
services.AddSingleton<IDict, DictsService>();
|
services.AddSingleton<IDict, DictService>();
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,18 @@ using BootstrapBlazor.Components;
|
||||||
|
|
||||||
namespace BootstrapAdmin.DataAccess.EFCore.Services
|
namespace BootstrapAdmin.DataAccess.EFCore.Services
|
||||||
{
|
{
|
||||||
class DictsService : IDict
|
class DictService : IDict
|
||||||
{
|
{
|
||||||
public Dictionary<string, string> GetApps()
|
public Dictionary<string, string> GetApps()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, string> GetThemes()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
public string GetWebFooter()
|
public string GetWebFooter()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
|
@ -26,7 +26,13 @@ class DictService : BaseDatabase, IDict
|
||||||
public Dictionary<string, string> GetApps()
|
public Dictionary<string, string> GetApps()
|
||||||
{
|
{
|
||||||
var dicts = GetAll();
|
var dicts = GetAll();
|
||||||
return dicts.Where(d => d.Category == "应用程序").Select(d => new SelectedItem(d.Code, d.Name)).ToDictionary(i => i.Value, i => i.Text);
|
return dicts.Where(d => d.Category == "应用程序").Select(d => new KeyValuePair<string, string>(d.Code, d.Name)).ToDictionary(i => i.Key, i => i.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, string> GetThemes()
|
||||||
|
{
|
||||||
|
var dicts = GetAll();
|
||||||
|
return dicts.Where(d => d.Category == "网站样式").Select(d => new KeyValuePair<string, string>(d.Code, d.Name)).ToDictionary(i => i.Key, i => i.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -11,6 +11,12 @@
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Dictionary<string, string> GetApps();
|
Dictionary<string, string> GetApps();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获得 配置所有的主题集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
Dictionary<string, string> GetThemes();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取当前系统配置是否为演示模式
|
/// 获取当前系统配置是否为演示模式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue