修改BUG:修正用户未设置默认头像时不显示问题,依赖组件Bootstrap.Security.DataAccess升级到1.4
This commit is contained in:
parent
fc043c8ffc
commit
34e340d9ee
|
@ -16,7 +16,7 @@ namespace Bootstrap.Admin.Models
|
||||||
public HeaderBarModel(IIdentity identity)
|
public HeaderBarModel(IIdentity identity)
|
||||||
{
|
{
|
||||||
var user = UserHelper.RetrieveUserByUserName(identity.Name);
|
var user = UserHelper.RetrieveUserByUserName(identity.Name);
|
||||||
Icon = Path.Combine(DictHelper.RetrieveIconFolderPath(), string.IsNullOrEmpty(user.Icon) ? DictHelper.RetrieveDefaultIcon() : user.Icon);
|
Icon = string.Format("{0}{1}", DictHelper.RetrieveIconFolderPath(), user.Icon);
|
||||||
DisplayName = user.DisplayName;
|
DisplayName = user.DisplayName;
|
||||||
UserName = user.UserName;
|
UserName = user.UserName;
|
||||||
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
|
if (!string.IsNullOrEmpty(user.Css)) Theme = user.Css;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.3.0" />
|
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.4.0" />
|
||||||
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
||||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.3.0" />
|
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.4.0" />
|
||||||
<PackageReference Include="Longbow.Data" Version="2.2.3" />
|
<PackageReference Include="Longbow.Data" Version="2.2.4" />
|
||||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
||||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||||
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
||||||
<PackageReference Include="Longbow" Version="2.2.3" />
|
<PackageReference Include="Longbow" Version="2.2.4" />
|
||||||
<PackageReference Include="PetaPoco.Compiled" Version="1.0.1" />
|
<PackageReference Include="PetaPoco.Compiled" Version="1.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,6 @@ namespace Bootstrap.DataAccess
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public virtual string RetrieveHomeUrl() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "前台首页" && d.Category == "网站设置" && d.Define == 0) ?? new BootstrapDict() { Code = "~/Home/Index" }).Code;
|
public virtual string RetrieveHomeUrl() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "前台首页" && d.Category == "网站设置" && d.Define == 0) ?? new BootstrapDict() { Code = "~/Home/Index" }).Code;
|
||||||
|
|
||||||
public virtual string RetrieveDefaultIcon() => (DictHelper.RetrieveDicts().FirstOrDefault(d => d.Name == "头像文件" && d.Category == "头像地址" && d.Define == 0) ?? new BootstrapDict() { Code = "default.jpg" }).Code;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -109,12 +109,6 @@ namespace Bootstrap.DataAccess
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string RetrieveHomeUrl() => DbContextManager.Create<Dict>().RetrieveHomeUrl();
|
public static string RetrieveHomeUrl() => DbContextManager.Create<Dict>().RetrieveHomeUrl();
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获得默认的前台首页地址,默认为~/Home/Index
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string RetrieveDefaultIcon() => DbContextManager.Create<Dict>().RetrieveDefaultIcon();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue