start moving media into separate table

This commit is contained in:
2020-05-14 15:40:41 +02:00
parent 0cc08e5779
commit 4fd2f2fc23
13 changed files with 79 additions and 53 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ namespace zero.Web.Mapper
target.IsSuper = source.IsSuper;
target.Email = source.Email;
target.IsEmailConfirmed = source.IsEmailConfirmed;
target.Avatar = source.Avatar;
target.AvatarId = source.AvatarId;
target.LanguageId = source.LanguageId;
target.Roles = source.Roles;
target.Claims = source.Claims;
@@ -37,7 +37,7 @@ namespace zero.Web.Mapper
target.IsActive = source.IsActive;
target.IsSuper = source.IsSuper;
target.Email = source.Email;
target.Avatar = source.Avatar;
target.AvatarId = source.AvatarId;
target.LanguageId = source.LanguageId;
target.Roles = source.Roles;
target.Claims = source.Claims;
@@ -49,7 +49,7 @@ namespace zero.Web.Mapper
target.Name = source.Name;
target.IsActive = source.IsActive && (!source.LockoutEnabled || !source.LockoutEnd.HasValue);
target.Email = source.Email;
target.Avatar = source.Avatar?.Source;
target.AvatarId = source.AvatarId;
target.Roles = String.Join(", ", source.Roles); // TODO get name from alias
});
+1 -1
View File
@@ -14,7 +14,7 @@ namespace zero.Web.Models
public bool IsEmailConfirmed { get; set; }
public Media Avatar { get; set; }
public string AvatarId { get; set; }
public string LanguageId { get; set; }
+1 -1
View File
@@ -10,6 +10,6 @@
public string Roles { get; set; }
public string Avatar { get; set; }
public string AvatarId { get; set; }
}
}
+11 -1
View File
@@ -15,6 +15,7 @@ using zero.Core.Extensions;
using zero.Core.Identity;
using zero.Core.Mapper;
using zero.Core.Options;
using zero.Core.Plugins;
using zero.Web.Models;
using zero.Web.Sections;
@@ -32,14 +33,17 @@ namespace zero.Web
protected IMapper Mapper { get; private set; }
protected IEnumerable<IZeroPlugin> Plugins { get; private set; }
public ZeroVue(IZeroOptions options, IWebHostEnvironment env, IApplicationsApi applicationsApi, IAuthenticationApi authenticationApi, IMapper mapper)
public ZeroVue(IZeroOptions options, IWebHostEnvironment env, IApplicationsApi applicationsApi, IAuthenticationApi authenticationApi, IMapper mapper, IEnumerable<IZeroPlugin> plugins)
{
Environment = env;
Options = options;
ApplicationsApi = applicationsApi;
AuthenticationApi = authenticationApi;
Mapper = mapper;
Plugins = plugins;
//zero.path = "@Model.BackofficePath.EnsureEndsWith('/')";
//zero.translations = @Html.Raw(text);
}
@@ -53,6 +57,8 @@ namespace zero.Web
config.Path = Options.BackofficePath.EnsureEndsWith('/');
config.ApiPath = config.Path + "api/";
config.PluginPath = "@/Plugins";
config.Version = Options.ZeroVersion;
config.PluginCount = 2; // TODO Plugins.Count();
config.ErrorFieldNone = Constants.ErrorFieldNone;
config.Sections = CreateSections();
config.Translations = CreateTranslations();
@@ -253,6 +259,10 @@ namespace zero.Web
public string PluginPath { get; set; }
public string Version { get; set; }
public int PluginCount { get; set; }
public string ErrorFieldNone { get; set; }
public UserEditModel User { get; set; }