refactoring the Register
This commit is contained in:
parent
ee1e49fde5
commit
f1dd648970
43 changed files with 4610 additions and 86 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Description> A shared model for a little client/server app, dealing about establishing some contract, between some human client and provider.
|
<Description> A shared model for a little client/server app, dealing about establishing some contract, between some human client and provider.
|
||||||
</Description>
|
</Description>
|
||||||
|
<RootNamespace>Yavsc.Abstract</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" />
|
<PackageReference Include="Newtonsoft.Json" />
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace Yavsc.ViewModels.Account
|
||||||
[StringLength(Constants.MaxUserNameLength)]
|
[StringLength(Constants.MaxUserNameLength)]
|
||||||
[RegularExpression(Constants.UserNameRegExp)]
|
[RegularExpression(Constants.UserNameRegExp)]
|
||||||
[DataType(DataType.Text)]
|
[DataType(DataType.Text)]
|
||||||
[Display(Name = "UserName", Description = "User name")]
|
[Display(Name = "UserName", Description = "User name")]
|
||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
|
|
||||||
[Required()]
|
[Required()]
|
||||||
|
|
@ -3,7 +3,7 @@ namespace Yavsc.Interfaces
|
||||||
|
|
||||||
public interface IComment<TReceiverId>
|
public interface IComment<TReceiverId>
|
||||||
{
|
{
|
||||||
string Content { get; set; }
|
string Article { get; set; }
|
||||||
TReceiverId ReceiverId { get; set; }
|
TReceiverId ReceiverId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,5 @@ public class CommentPost : IComment<long>
|
||||||
{
|
{
|
||||||
public long ReceiverId { get; set; }
|
public long ReceiverId { get; set; }
|
||||||
public long? ParentId { get; set; }
|
public long? ParentId { get; set; }
|
||||||
public string Content { get; set; }
|
public string Article { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<!--
|
||||||
|
route name for the api controller used to tag the 'BlogPost' entity
|
||||||
|
-->
|
||||||
|
<data name="UserName"><value>Nom d'utilisateur</value></data>
|
||||||
|
</root>
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<UserSecretsId>1c73094f-959f-4211-b1a1-6a69b236c283</UserSecretsId>
|
<UserSecretsId>1c73094f-959f-4211-b1a1-6a69b236c283</UserSecretsId>
|
||||||
|
<RootNamespace>Yavsc.Api</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Yavsc.Controllers
|
||||||
string uid = User.GetUserId();
|
string uid = User.GetUserId();
|
||||||
Comment c = new Comment{
|
Comment c = new Comment{
|
||||||
ReceiverId = post.ReceiverId,
|
ReceiverId = post.ReceiverId,
|
||||||
Content = post.Content,
|
Article = post.Article,
|
||||||
ParentId = post.ParentId,
|
ParentId = post.ParentId,
|
||||||
AuthorId = uid,
|
AuthorId = uid,
|
||||||
UserModified = uid
|
UserModified = uid
|
||||||
|
|
|
||||||
3
src/Org/AssemblyInfo.cs
Normal file
3
src/Org/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
|
[assembly: RootNamespace("Yavsc")]
|
||||||
|
|
@ -23,7 +23,8 @@ using IdentityServer8.Events;
|
||||||
using IdentityServer8.Extensions;
|
using IdentityServer8.Extensions;
|
||||||
using IdentityModel;
|
using IdentityModel;
|
||||||
using Yavsc.Server.Helpers;
|
using Yavsc.Server.Helpers;
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
using Microsoft.AspNetCore.Mvc.Localization;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Yavsc.Controllers
|
namespace Yavsc.Controllers
|
||||||
{
|
{
|
||||||
|
|
@ -41,10 +42,11 @@ namespace Yavsc.Controllers
|
||||||
readonly TwilioSettings _twilioSettings;
|
readonly TwilioSettings _twilioSettings;
|
||||||
|
|
||||||
readonly IStringLocalizer _localizer;
|
readonly IStringLocalizer _localizer;
|
||||||
|
private readonly IStringLocalizer _sharedLocalizer;
|
||||||
|
|
||||||
// TwilioSettings _twilioSettings;
|
// TwilioSettings _twilioSettings;
|
||||||
|
|
||||||
readonly ApplicationDbContext _dbContext;
|
readonly ApplicationDbContext _dbContext;
|
||||||
private readonly IIdentityServerInteractionService _interaction;
|
private readonly IIdentityServerInteractionService _interaction;
|
||||||
private readonly IClientStore _clientStore;
|
private readonly IClientStore _clientStore;
|
||||||
private readonly IAuthenticationSchemeProvider _schemeProvider;
|
private readonly IAuthenticationSchemeProvider _schemeProvider;
|
||||||
|
|
@ -63,7 +65,9 @@ namespace Yavsc.Controllers
|
||||||
IOptions<SiteSettings> siteSettings,
|
IOptions<SiteSettings> siteSettings,
|
||||||
ILoggerFactory loggerFactory, IOptions<TwilioSettings> twilioSettings,
|
ILoggerFactory loggerFactory, IOptions<TwilioSettings> twilioSettings,
|
||||||
IStringLocalizerFactory localizerFactory,
|
IStringLocalizerFactory localizerFactory,
|
||||||
ApplicationDbContext dbContext)
|
IHtmlLocalizerFactory htmlLocalizerFactory,
|
||||||
|
ApplicationDbContext dbContext
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_interaction = interaction;
|
_interaction = interaction;
|
||||||
_clientStore = clientStore;
|
_clientStore = clientStore;
|
||||||
|
|
@ -80,6 +84,13 @@ namespace Yavsc.Controllers
|
||||||
|
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_localizer = localizerFactory.Create(typeof(AccountController));
|
_localizer = localizerFactory.Create(typeof(AccountController));
|
||||||
|
_sharedLocalizer = localizerFactory.Create(typeof(Startup));
|
||||||
|
foreach (String name in new String[]{
|
||||||
|
"ConfirmYourAccountBody",
|
||||||
|
"ConfirmYourAccountTitle"
|
||||||
|
})
|
||||||
|
Debug.Assert(!_localizer[name].ResourceNotFound);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -566,10 +577,20 @@ namespace Yavsc.Controllers
|
||||||
// TODO user.DiskQuota = Startup.SiteSetup.UserFiles.Quota;
|
// TODO user.DiskQuota = Startup.SiteSetup.UserFiles.Quota;
|
||||||
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
|
||||||
// Send an email with this link
|
// Send an email with this link
|
||||||
|
|
||||||
|
Uri authority = new Uri(Config.Authority);
|
||||||
|
|
||||||
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
|
||||||
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, protocol: "https", host: Config.Authority);
|
var callbackUrl = Url.Action("ConfirmEmail", "Account",
|
||||||
|
new { userId = user.Id, code },
|
||||||
|
protocol: authority.Scheme,
|
||||||
|
host: authority.Host+":"+authority.Port);
|
||||||
await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
|
||||||
string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
|
string.Format(_localizer["ConfirmYourAccountBody"],
|
||||||
|
_siteSettings.Title,
|
||||||
|
callbackUrl,
|
||||||
|
_siteSettings.Slogan,
|
||||||
|
_siteSettings.Audience));
|
||||||
// No, wait for more than a login pass submission:
|
// No, wait for more than a login pass submission:
|
||||||
// do not await _signInManager.SignInAsync(user, isPersistent: false);
|
// do not await _signInManager.SignInAsync(user, isPersistent: false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ namespace Yavsc.Controllers
|
||||||
|
|
||||||
private SiteSettings siteSettings;
|
private SiteSettings siteSettings;
|
||||||
public HomeController(ILogger<HomeController> logger,
|
public HomeController(ILogger<HomeController> logger,
|
||||||
IHtmlLocalizer<Startup> localizer,
|
IHtmlLocalizer<HomeController> localizer,
|
||||||
ApplicationDbContext context,
|
ApplicationDbContext context,
|
||||||
IOptions<SiteSettings> settingsOptions)
|
IOptions<SiteSettings> settingsOptions)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ public static class HostingExtensions
|
||||||
options.ClaimsIdentity.UserNameClaimType = JwtClaimTypes.Name;
|
options.ClaimsIdentity.UserNameClaimType = JwtClaimTypes.Name;
|
||||||
options.ClaimsIdentity.RoleClaimType = Constants.RoleClaimType;
|
options.ClaimsIdentity.RoleClaimType = Constants.RoleClaimType;
|
||||||
});
|
});
|
||||||
var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
|
var migrationsAssembly = typeof(Program).GetTypeInfo().Assembly.GetName().Name;
|
||||||
var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
|
var connectionString = builder.Configuration.GetConnectionString(Constants.YavscConnectionStringName);
|
||||||
|
|
||||||
var identityServerBuilder = builder.Services.AddIdentityServer(options =>
|
var identityServerBuilder = builder.Services.AddIdentityServer(options =>
|
||||||
|
|
|
||||||
4301
src/Org/Migrations/20260222202324_article.Designer.cs
generated
Normal file
4301
src/Org/Migrations/20260222202324_article.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
59
src/Org/Migrations/20260222202324_article.cs
Normal file
59
src/Org/Migrations/20260222202324_article.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Yavsc.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class article : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Content",
|
||||||
|
table: "Comment",
|
||||||
|
newName: "Article");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Content",
|
||||||
|
table: "BlogSpot",
|
||||||
|
newName: "Article");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_MusicalPreference_TendencyId",
|
||||||
|
table: "MusicalPreference",
|
||||||
|
column: "TendencyId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_MusicalPreference_MusicalTendency_TendencyId",
|
||||||
|
table: "MusicalPreference",
|
||||||
|
column: "TendencyId",
|
||||||
|
principalTable: "MusicalTendency",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_MusicalPreference_MusicalTendency_TendencyId",
|
||||||
|
table: "MusicalPreference");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_MusicalPreference_TendencyId",
|
||||||
|
table: "MusicalPreference");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Article",
|
||||||
|
table: "Comment",
|
||||||
|
newName: "Content");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "Article",
|
||||||
|
table: "BlogSpot",
|
||||||
|
newName: "Content");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1315,13 +1315,13 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AuthorId")
|
b.Property<string>("Article")
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.HasMaxLength(56224)
|
.HasMaxLength(56224)
|
||||||
.HasColumnType("character varying(56224)");
|
.HasColumnType("character varying(56224)");
|
||||||
|
|
||||||
|
b.Property<string>("AuthorId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("DateCreated")
|
b.Property<DateTime>("DateCreated")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
|
@ -1373,11 +1373,11 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||||
|
|
||||||
b.Property<string>("AuthorId")
|
b.Property<string>("Article")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Content")
|
b.Property<string>("AuthorId")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
|
@ -2279,6 +2279,8 @@ namespace Yavsc.Migrations
|
||||||
|
|
||||||
b.HasIndex("GeneralSettingsUserId");
|
b.HasIndex("GeneralSettingsUserId");
|
||||||
|
|
||||||
|
b.HasIndex("TendencyId");
|
||||||
|
|
||||||
b.ToTable("MusicalPreference");
|
b.ToTable("MusicalPreference");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -3839,6 +3841,14 @@ namespace Yavsc.Migrations
|
||||||
b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings", null)
|
b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings", null)
|
||||||
.WithMany("SoundColor")
|
.WithMany("SoundColor")
|
||||||
.HasForeignKey("GeneralSettingsUserId");
|
.HasForeignKey("GeneralSettingsUserId");
|
||||||
|
|
||||||
|
b.HasOne("Yavsc.Models.Musical.MusicalTendency", "MusicalTendency")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TendencyId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("MusicalTendency");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b =>
|
modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b =>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
||||||
<UserSecretsId>76e56fc2-1619-40d8-8393-365258b7a21d</UserSecretsId>
|
<UserSecretsId>76e56fc2-1619-40d8-8393-365258b7a21d</UserSecretsId>
|
||||||
|
<RootNamespace>Yavsc</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="popper.js">
|
<PackageReference Include="popper.js">
|
||||||
|
|
|
||||||
|
|
@ -77,16 +77,6 @@ Thanks.
|
||||||
<value>Please, confirm your e-mail</value>
|
<value>Please, confirm your e-mail</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data name="ConfirmYourAccountBody">
|
|
||||||
<value>Ypu've successfully created an account {0},
|
|
||||||
but you still need to confirm your email.
|
|
||||||
Without this confirmation, you won't be able to login.
|
|
||||||
|
|
||||||
Please, follow this link to confirm your account : <{1}>.
|
|
||||||
|
|
||||||
--
|
|
||||||
{0} - {2} <{3}></value>
|
|
||||||
</data>
|
|
||||||
<data name="Reset Password"><value>Ré-initialiser votre mot de passe</value></data>
|
<data name="Reset Password"><value>Ré-initialiser votre mot de passe</value></data>
|
||||||
<data name="Reset password confirmation"><value>Confirmation de ré-initialisation du mot de passe</value></data>
|
<data name="Reset password confirmation"><value>Confirmation de ré-initialisation du mot de passe</value></data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
||||||
65
src/Org/Resources/Views/Register.resx
Normal file
65
src/Org/Resources/Views/Register.resx
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<!--
|
||||||
|
route name for the api controller used to tag the 'BlogPost' entity
|
||||||
|
-->
|
||||||
|
<data name="UserName"><value>Nom d'utilisateur</value></data>
|
||||||
|
</root>
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Yavsc.Server.Helpers;
|
using Yavsc.Server.Helpers;
|
||||||
using Yavsc.Settings;
|
using Yavsc.Settings;
|
||||||
|
|
||||||
namespace Yavsc;
|
namespace Yavsc;
|
||||||
|
|
||||||
public class Startup
|
public class Startup
|
||||||
{
|
{
|
||||||
public static void Configure(
|
public static void Configure(
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
<table >
|
<table >
|
||||||
<thead>
|
<thead>
|
||||||
<th>
|
<th>
|
||||||
@SR["Public info"]
|
@Localizer["Public info"]
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
@SR["AdminOnly"]
|
@Localizer["AdminOnly"]
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<td>
|
<td>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@SR["UserName"]
|
@Localizer["UserName"]
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(m=>user.UserName)
|
@Html.DisplayFor(m=>user.UserName)
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@SR["FullName"]
|
@Localizer["FullName"]
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(m=>user.FullName)
|
@Html.DisplayFor(m=>user.FullName)
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@SR["PostalAddress"]
|
@Localizer["PostalAddress"]
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(m=>user.PostalAddress)
|
@Html.DisplayFor(m=>user.PostalAddress)
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
@SR["Email"]
|
@Localizer["Email"]
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
@Html.DisplayFor(m=>user.Email)
|
@Html.DisplayFor(m=>user.Email)
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@await Component.InvokeAsync("Directory","")
|
@await Component.InvokeAsync(name: "Directory",arguments: new {subdir="."})
|
||||||
<div >
|
<div >
|
||||||
@{ await Html.RenderPartialAsync("_PostFilesPartial"); }
|
@{ await Html.RenderPartialAsync("_PostFilesPartial"); }
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@
|
||||||
<img class="blogphoto" alt="" src="@Model.Photo" title="Photo associée au post">
|
<img class="blogphoto" alt="" src="@Model.Photo" title="Photo associée au post">
|
||||||
<h2 title="Titre du post" class="blogtitle" id="titleview" >@Model.Title</h2>
|
<h2 title="Titre du post" class="blogtitle" id="titleview" >@Model.Title</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
|
|
||||||
|
|
@ -115,10 +112,6 @@
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div id="prev">
|
|
||||||
<asciidoc>@Model.Article</asciidoc>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div >
|
<div >
|
||||||
@{ await Html.RenderPartialAsync("_PostFilesPartial"); }
|
@{ await Html.RenderPartialAsync("_PostFilesPartial"); }
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
@model Client
|
@model Client
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Create"];
|
ViewData["Title"] = @Localizer["Create"];
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@SR["Create"]</h2>
|
<h2>@Localizer["Create"]</h2>
|
||||||
|
|
||||||
<form asp-action="Create">
|
<form asp-action="Create">
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
|
|
@ -78,6 +78,6 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a asp-action="Index">@SR["Back to List"]</a>
|
<a asp-action="Index">@Localizer["Back to List"]</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
@model Client
|
@model Client
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Delete"];
|
ViewData["Title"] = @Localizer["Delete"];
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@SR["Delete"]</h2>
|
<h2>@Localizer["Delete"]</h2>
|
||||||
|
|
||||||
<h3>@SR["AreYourSureYouWantToDeleteThis"]</h3>
|
<h3>@Localizer["AreYourSureYouWantToDeleteThis"]</h3>
|
||||||
<div>
|
<div>
|
||||||
<h4>Client</h4>
|
<h4>Client</h4>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
<form asp-action="Delete">
|
<form asp-action="Delete">
|
||||||
<div class="form-actions no-color">
|
<div class="form-actions no-color">
|
||||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||||
<a asp-action="Index">@SR["Back to List"]</a>
|
<a asp-action="Index">@Localizer["Back to List"]</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
@model Client
|
@model Client
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Details"];
|
ViewData["Title"] = @Localizer["Details"];
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@SR["Details"]</h2>
|
<h2>@Localizer["Details"]</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h4>Client</h4>
|
<h4>Client</h4>
|
||||||
|
|
@ -63,6 +63,6 @@
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a> |
|
<a asp-action="Edit" asp-route-id="@Model.Id">@Localizer["Edit"]</a> |
|
||||||
<a asp-action="Index">@SR["Back to List"]</a>
|
<a asp-action="Index">@Localizer["Back to List"]</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
ViewData["Title"] = "Edit";
|
ViewData["Title"] = "Edit";
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@SR["Edit"]</h2>
|
<h2>@Localizer["Edit"]</h2>
|
||||||
|
|
||||||
<form asp-action="Edit">
|
<form asp-action="Edit">
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
|
|
@ -78,6 +78,6 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a asp-action="Index">@SR["Back to List"]</a>
|
<a asp-action="Index">@Localizer["Back to List"]</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
@model IEnumerable<IdentityServer8.EntityFramework.Entities.Client>
|
@model IEnumerable<IdentityServer8.EntityFramework.Entities.Client>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Index"];
|
ViewData["Title"] = @Localizer["Index"];
|
||||||
}
|
}
|
||||||
|
|
||||||
<h2>@SR["Index"]</h2>
|
<h2>@Localizer["Index"]</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a asp-action="Create">@SR["Create New"]</a>
|
<a asp-action="Create">@Localizer["Create New"]</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["À propos des restrictions d'accès"];
|
ViewData["Title"] = @Localizer["À propos des restrictions d'accès"];
|
||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["À propos de Markdown"];
|
ViewData["Title"] = @Localizer["À propos de Markdown"];
|
||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Page d'accueil"];
|
ViewData["Title"] = @Localizer["Page d'accueil"];
|
||||||
}
|
}
|
||||||
@section scripts {
|
@section scripts {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Dash"];
|
ViewData["Title"] = @Localizer["Dash"];
|
||||||
}
|
}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@model IEnumerable<Activity>
|
@model IEnumerable<Activity>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Page d'accueil"];
|
ViewData["Title"] = @Localizer["Page d'accueil"];
|
||||||
int i=0;
|
int i=0;
|
||||||
bool multipleact = Model.Count()>1;
|
bool multipleact = Model.Count()>1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["Todo (first)"];
|
ViewData["Title"] = @Localizer["Todo (first)"];
|
||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
<em>Linkmuse(trox)</em>
|
<em>Linkmuse(trox)</em>
|
||||||
|
|
@ -9,7 +9,7 @@ Les tags.
|
||||||
La librairie, les lives.
|
La librairie, les lives.
|
||||||
</asciidoc>
|
</asciidoc>
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = @SR["TODO"];
|
ViewData["Title"] = @Localizer["TODO"];
|
||||||
}
|
}
|
||||||
<h1>@ViewData["Title"]</h1>
|
<h1>@ViewData["Title"]</h1>
|
||||||
<em>Faster, stronger, shorter</em>
|
<em>Faster, stronger, shorter</em>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ background-attachment: fixed;
|
||||||
<img src="~/images/Notifications/@(n.icon).png" style="max-height:3em; float: left; margin:1em;" />
|
<img src="~/images/Notifications/@(n.icon).png" style="max-height:3em; float: left; margin:1em;" />
|
||||||
<h2 markdown="@n.title"></h2>
|
<h2 markdown="@n.title"></h2>
|
||||||
<a class="close" data-dismiss="alert" aria-label="close"
|
<a class="close" data-dismiss="alert" aria-label="close"
|
||||||
onclick="notifClick(@n.Id)">@((n.click_action == null) ? SR["Fermer"] : SR[n.click_action])</a>
|
onclick="notifClick(@n.Id)">@((n.click_action == null) ? Localizer["Fermer"] : Localizer[n.click_action])</a>
|
||||||
<asciidoc>@n.body</asciidoc>
|
<asciidoc>@n.body</asciidoc>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
<div class="collapse navbar-collapse" id="navbar" style="background-image: @Config.SiteSetup.Banner;">
|
<div class="collapse navbar-collapse" id="navbar" style="background-image: @Config.SiteSetup.Banner;">
|
||||||
<ul class="navbar-nav me-auto" >
|
<ul class="navbar-nav me-auto" >
|
||||||
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Home</a></li>
|
<li class="nav-item"><a class="nav-link active" aria-current="page" href="/">Home</a></li>
|
||||||
<li class="nav-item"><a asp-controller="Blogspot" asp-action="Index" class="nav-link">@SR["Blogs"]</a></li>
|
<li class="nav-item"><a asp-controller="Blogspot" asp-action="Index" class="nav-link">@Localizer["Blogs"]</a></li>
|
||||||
<li class="nav-item"><a asp-controller="Home" asp-action="Contact" class="nav-link">@SR["Contact"]</a></li>
|
<li class="nav-item"><a asp-controller="Home" asp-action="Contact" class="nav-link">@Localizer["Contact"]</a></li>
|
||||||
<li class="nav-item"><a asp-controller="Home" asp-action="About" class="nav-link">@SR["About"]</a></li>
|
<li class="nav-item"><a asp-controller="Home" asp-action="About" class="nav-link">@Localizer["About"]</a></li>
|
||||||
<partial name="_LoginPartial" />
|
<partial name="_LoginPartial" />
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
@using Yavsc
|
@using Microsoft.AspNetCore.Mvc.Localization
|
||||||
|
@using Yavsc
|
||||||
@using Yavsc.Models
|
@using Yavsc.Models
|
||||||
@using Yavsc.Models.Musical;
|
@using Yavsc.Models.Musical;
|
||||||
@using Yavsc.Models.Drawing;
|
@using Yavsc.Models.Drawing;
|
||||||
|
|
@ -36,8 +37,10 @@
|
||||||
@addTagHelper *, Yavsc
|
@addTagHelper *, Yavsc
|
||||||
|
|
||||||
@inject IAuthorizationService AuthorizationService
|
@inject IAuthorizationService AuthorizationService
|
||||||
@inject Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<Startup> SR
|
|
||||||
@inject Microsoft.Extensions.Options.IOptions<SiteSettings> SiteSettings
|
@inject Microsoft.Extensions.Options.IOptions<SiteSettings> SiteSettings
|
||||||
@inject SignInManager<ApplicationUser> SignInManager
|
@inject SignInManager<ApplicationUser> SignInManager
|
||||||
@inject UserManager<ApplicationUser> UserManager
|
@inject UserManager<ApplicationUser> UserManager
|
||||||
|
|
||||||
|
@inject IViewLocalizer Localizer
|
||||||
|
@inject IHtmlLocalizer<Startup> SharedLocalizer
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ namespace Yavsc;
|
||||||
|
|
||||||
public static class Config
|
public static class Config
|
||||||
{
|
{
|
||||||
public static string? Authority { get; set; }
|
public static string Authority { get; set; }
|
||||||
|
|
||||||
public static IConfigurationRoot? GoogleWebClientConfiguration { get; set; }
|
public static IConfigurationRoot? GoogleWebClientConfiguration { get; set; }
|
||||||
public static GoogleServiceAccount? GServiceAccount { get; set; }
|
public static GoogleServiceAccount? GServiceAccount { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,22 @@ namespace Yavsc.Models.Blog
|
||||||
{
|
{
|
||||||
public class BlogPostEditViewModel : BlogPost
|
public class BlogPostEditViewModel : BlogPost
|
||||||
{
|
{
|
||||||
|
public bool Publish { get; set; }
|
||||||
|
public BlogPostEditViewModel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public BlogPostEditViewModel(BlogPost post, bool publish)
|
public BlogPostEditViewModel(BlogPost post, bool publish)
|
||||||
{
|
{
|
||||||
Id = post.Id;
|
Id = post.Id;
|
||||||
AuthorId = post.AuthorId;
|
AuthorId = post.AuthorId;
|
||||||
ACL = post.ACL;
|
Photo = post.Photo;
|
||||||
Article = post.Article;
|
|
||||||
Title = post.Title;
|
Title = post.Title;
|
||||||
|
Article = post.Article;
|
||||||
Publish = publish;
|
Publish = publish;
|
||||||
|
ACL = post.ACL;
|
||||||
}
|
}
|
||||||
public bool Publish { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Yavsc.Models.Blog
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
[YaStringLength(1024)]
|
[YaStringLength(1024)]
|
||||||
public string Content { get; set; }
|
public string Article { get; set; }
|
||||||
|
|
||||||
[ForeignKeyAttribute(nameof(ReceiverId))][JsonIgnore]
|
[ForeignKeyAttribute(nameof(ReceiverId))][JsonIgnore]
|
||||||
public virtual BlogPost Post { get; set; }
|
public virtual BlogPost Post { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<UserSecretsId>53bd70e8-ff81-497a-847f-a15fd8ea7a09</UserSecretsId>
|
<UserSecretsId>53bd70e8-ff81-497a-847f-a15fd8ea7a09</UserSecretsId>
|
||||||
|
<RootNamespace>Yavsc.Server</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="HigginsSoft.IdentityServer8.EntityFramework" />
|
<PackageReference Include="HigginsSoft.IdentityServer8.EntityFramework" />
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,12 @@ namespace Yavsc.Services
|
||||||
msg.From.Add(new MailboxAddress(siteSettings.Owner.Name,
|
msg.From.Add(new MailboxAddress(siteSettings.Owner.Name,
|
||||||
siteSettings.Owner.EMail));
|
siteSettings.Owner.EMail));
|
||||||
msg.To.Add(new MailboxAddress(name, email));
|
msg.To.Add(new MailboxAddress(name, email));
|
||||||
msg.Body = new TextPart("html")
|
TextPart text;
|
||||||
|
msg.Body = text = new TextPart("html")
|
||||||
{
|
{
|
||||||
Text = htmlMessage
|
Text = $"<html><body>{htmlMessage}</body></html>"
|
||||||
};
|
};
|
||||||
|
|
||||||
msg.Subject = subject;
|
msg.Subject = subject;
|
||||||
msg.MessageId = MimeKit.Utils.MimeUtils.GenerateMessageId(
|
msg.MessageId = MimeKit.Utils.MimeUtils.GenerateMessageId(
|
||||||
siteSettings.Authority
|
siteSettings.Authority
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<RootNamespace>Yavsc.cli</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Razor" />
|
<PackageReference Include="Microsoft.AspNetCore.Razor" />
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,4 @@ public class Services : BaseTestContext, IClassFixture<WebServerFixture>
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
<RootNamespace>Yavsc.Tests</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" />
|
<PackageReference Include="coverlet.collector" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue