Skip to content

Commit

Permalink
Email sender v1
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystianKempski committed Apr 29, 2024
1 parent 0c7f0cf commit 6c51cb3
Show file tree
Hide file tree
Showing 19 changed files with 230 additions and 77 deletions.
4 changes: 2 additions & 2 deletions DagoniteEmpire/Areas/Identity/Pages/Account/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</form>
</section>
</div>
<div class="col-md-6 col-md-offset-2">
@* <div class="col-md-6 col-md-offset-2">
<section>
<h3>Use another service to log in.</h3>
<hr />
Expand Down Expand Up @@ -75,7 +75,7 @@
}
}
</section>
</div>
</div> *@
</div>

@section Scripts {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public async Task<IActionResult> OnGetAsync(string email, string returnUrl = nul

Email = email;
// Once you add a real email sender, you should remove this code that lets you confirm the account
DisplayConfirmAccountLink = true;
DisplayConfirmAccountLink = false;
if (DisplayConfirmAccountLink)
{
var userId = await _userManager.GetUserIdAsync(user);
Expand Down
3 changes: 3 additions & 0 deletions DagoniteEmpire/DagoniteEmpire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Abp" Version="9.1.1" />
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="Dapper" Version="2.1.28" />
<PackageReference Include="Imazen.WebP" Version="10.0.1" />
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="13.6.0" />
<PackageReference Include="Magick.NET.Core" Version="13.6.0" />
<PackageReference Include="MailKit" Version="4.5.0" />
<PackageReference Include="Mandrill.net" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="7.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="7.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.15" />
Expand Down
13 changes: 13 additions & 0 deletions DagoniteEmpire/Helper/EmailConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace DagoniteEmpire.Helper
{
public class EmailConfiguration
{
public string Host { get; set; } = string.Empty;
public int Port { get; set; }
public string Username { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string From { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public bool EnableSSL { get; set; }
}
}
16 changes: 16 additions & 0 deletions DagoniteEmpire/Helper/EmailMessage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;

namespace DagoniteEmpire.Helper
{
public class EmailMessage
{
[EmailAddress]
public string Email { get; set; } = string.Empty;

[Required]
public string Subject { get; set; } = string.Empty;

[Required]
public string Message { get; set; } = string.Empty;
}
}
36 changes: 18 additions & 18 deletions DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
<section class="section-create-character">
<div class="container-fluid">
<div class="row">
<div class="portrait">
<div class="portrait border">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">PORTRAIT</h3>
<div class="portrait-imageframe">
Expand All @@ -87,10 +87,10 @@
</div>

</div>
<div class="attribute">

<div class="attribute border">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">ATTRIBUTES</h3>

Expand Down Expand Up @@ -155,9 +155,9 @@
</tbody>
</table>
</div>
<div class="baseskills">
<div class="baseskills border">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">BASE SKILLS</h3>
<table class="table align-middle">
Expand Down Expand Up @@ -213,26 +213,26 @@
</table>
</div>

<div class="races">
<div class="races border">

<RaceComponent @bind-Attributes="@Attributes" @bind-BaseSkills="@BaseSkills" @bind-SpecialSkills="@SpecialSkills" @bind-Races="@Races" @bind-CurrentRace="@CurrentRace"></RaceComponent>
</div>

<div class="profession">
<div class="profession border">
<ProfessionComponent Attributes="@Attributes" @bind-Profession="@Profession"></ProfessionComponent>
</div>

<div class="traits">
<div class="traits border">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">TRAITS</h3>
<div class="trait-container">
<TraitsComponent @bind-Attributes="@Attributes" @bind-BaseSkills="@BaseSkills" @bind-SpecialSkills="@SpecialSkills" @bind-Character="@Character" @bind-Traits="@Traits" TraitType="@SD.TraitType_Advantage"></TraitsComponent>
</div>
</div>

<div class="description">
<div class="description border">

<CharDescriptionDialog DescriptionConfirmation="GetDescription" SavedDescription="@Character.Description"></CharDescriptionDialog>
</div>
Expand All @@ -248,9 +248,9 @@

@foreach (var baseSkill in BaseSkills)
{
<div class="specialskills-table">
<div class="specialskills-table border">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<div class="specialskills-control">
<label class="specialskills-label">@baseSkill.Name</label>
Expand All @@ -275,7 +275,7 @@
<td class="name-td-small" colspan="6">
@if (obj.Editable)
{
<InputText style="width: 100%;font-size: 14px;font-weight: bold; padding: 2px 0px 2px 0px; text-transform:uppercase; border: 1px solid black; border-radius:4px; background-color: transparent;" @bind-Value="obj.Name" class=""></InputText>
<InputText style="width: 100%;font-size: 14px;font-weight: bold; padding: 2px 0px 2px 0px; text-transform:uppercase; border: 1px solid RGB(206 212 218); border-radius:4px; background-color: transparent;" @bind-Value="obj.Name" class=""></InputText>
}
else
{
Expand All @@ -287,7 +287,7 @@
<td class="name-td-big">
@if (obj.Editable)
{
<InputText style="width: 100%;font-size: 14px;font-weight: bold; padding: 2px 0px 2px 0px; text-transform:uppercase; border: 1px solid black; border-radius:4px; background-color: transparent;" @bind-Value="obj.Name" class=""></InputText>
<InputText style="width: 100%;font-size: 14px;font-weight: bold; padding: 2px 0px 2px 0px; text-transform:uppercase; border: 1px solid RGB(206 212 218); border-radius:4px; background-color: transparent;" @bind-Value="obj.Name" class=""></InputText>
}
else
{
Expand Down Expand Up @@ -394,13 +394,13 @@
background: transparent;
}
.e-richtexteditor.e-rte-tb-expand .e-rte-content, .e-richtexteditor.e-rte-tb-expand .e-source-content{
/* .e-richtexteditor.e-rte-tb-expand .e-rte-content, .e-richtexteditor.e-rte-tb-expand .e-source-content{
border: 1px solid black;
}
.e-richtexteditor.e-rte-tb-expand{
border: none;
}
} */
</style>

Expand Down
26 changes: 15 additions & 11 deletions DagoniteEmpire/Pages/CharacterPages/CharacterUpsert.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
padding: 0;
}

.border {
border: 1px solid rgb(72, 69, 69);
border-radius: 10px;
margin: 6px;
}

.loading-gif{
width:100px;
}
Expand All @@ -25,7 +31,7 @@ h3 {
}

.bonus-row {
width: 18px;F
width: 18px;
font-size: 13px;
text-align: left;
padding: 2px;
Expand All @@ -42,7 +48,7 @@ h3 {
font-size: 13px;
width: 40px;
text-align: left;
padding: 5px;
padding: 2px;
vertical-align: middle;
}

Expand Down Expand Up @@ -116,7 +122,7 @@ td {
justify-content: center;
align-items: center;
padding: 5px 5px 0px 5px;
border: 1px solid black;
border: 1px solid RGB(206 212 218);
border-radius: 4px;
/*width: 320px;*/
height: 390px;
Expand Down Expand Up @@ -158,9 +164,9 @@ td {
width: 100%;
padding: 30px;
text-align: center;
background-color: wheat;
background-color: transparent;
color: black;
border: 1px solid gray;
border: 1px solid RGB(206 212 218);
border-radius: 10px;
cursor: pointer;
}
Expand Down Expand Up @@ -201,9 +207,7 @@ i:active {
padding: 2px;
letter-spacing: 1px;
}
.attribute .bonus-row {
padding: 5px;
}


.attribute td {
padding: 2px;
Expand Down Expand Up @@ -370,7 +374,7 @@ i:active {
}

.add-skill {
background-color: darkgray;
background-color: transparent;
border: 1px solid black;
border-radius: 3px;
}
Expand Down Expand Up @@ -452,11 +456,11 @@ i:active {
}

.table tr th {
border-bottom: 1px solid black; /* Change the color you want to set */
/*border-bottom: 1px solid black; */
}

.table tr td {
border-bottom: 1px solid black; /* Change the color you want to set */
/* border-bottom: 1px solid black;*/
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="description-frame">

<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">DESCRIPTION</h3>
<div class="description-richtext">
Expand Down
14 changes: 7 additions & 7 deletions DagoniteEmpire/Pages/Components/CharDescriptionDialog.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ h3 {
}

.add-trait {
border: none;
border-radius: 3px;
width: 170px;
height: 35px;
margin: 5px 0 10px 0;
background-color: transparent;
background-image: url('../images/buttonFrame1.png');
border: 1px solid black;
border-radius: 6px;
width: 120px;
height: 32px;
margin: 5px 5px 10px 5px;
background-color: transparent; /*
background-image: url('../images/buttonFrame1.png');*/
position: relative;
background-size: cover;
background-position: center;
Expand Down
4 changes: 2 additions & 2 deletions DagoniteEmpire/Pages/Components/ProfessionComponent.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="profession">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">CLASS</h3>
<InputText style="width: 100%;font-size: 14px;padding: 2px 2px 2px 2px; margin: 0px; border: 1px solid black; border-radius: 4px;background-color:transparent;" @bind-Value="@Profession.Name" class=""></InputText>
<InputText style="width: 100%;font-size: 14px;padding: 2px 2px 2px 2px; margin: 0px; border: 1px solid RGB(206 212 218); border-radius: 4px; background-color:transparent;" @bind-Value="@Profession.Name" class=""></InputText>
<table class="table align-middle">
<thead>
<tr>
Expand Down
20 changes: 10 additions & 10 deletions DagoniteEmpire/Pages/Components/ProfessionComponent.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ h3 {
}

.add-trait {
border: none;
border-radius: 3px;
width: 170px;
height: 35px;
margin: 5px 0 10px 0;
background-color: transparent;
background-image: url('../images/buttonFrame1.png');
border: 1px solid black;
border-radius: 6px;
width: 120px;
height: 32px;
margin: 5px 5px 10px 5px;
background-color: transparent; /*
background-image: url('../images/buttonFrame1.png');*/
position: relative;
background-size: cover;
background-position: center;
font-weight:bold;
font-weight: bold;
transition: transform 0.1s;
}
.add-trait:hover {
Expand All @@ -90,9 +90,9 @@ h3 {
}

.table tr th {
border-bottom: 1px solid black; /* Change the color you want to set */
/*border-bottom: 1px solid black;*/
}

.table tr td {
border-bottom: 1px solid black; /* Change the color you want to set */
/* border-bottom: 1px solid black; */
}
8 changes: 4 additions & 4 deletions DagoniteEmpire/Pages/Components/RaceComponent.razor
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="race">
<div class="sheet-img">
<img src="../images/old_paper2.png" class="stretch" />
@* <img src="../images/old_paper2.png" class="stretch" /> *@
</div>
<h3 class="my-3 ml-3 text-center">RACE</h3>
<InputSelect style="width: 100%; padding: 2px 0px 2px 0px; background-color: transparent; border: 1px solid black; border-radius: 4px;"
<InputSelect style="width: 100%; padding: 2px 0px 2px 0px; background-color: transparent; border: 1px solid RGB(206 212 218); border-radius: 4px;"
ValueExpression="@(()=>SelectedRace)"
Value="@SelectedRace"
ValueChanged="@((string value) => ChangeRace(value))">
Expand All @@ -16,11 +16,11 @@
</InputSelect>
@if (ShowNameLabel)
{
<InputText style="width: 100%;font-size: 14px;padding: 2px 2px 2px 2px; margin: 6px 0px 4px 0px; border: 1px solid black; border-radius: 4px; background-color: transparent;" @bind-Value="@CurrentRace.Name" class=""></InputText>
<InputText style="width: 100%;font-size: 14px;padding: 2px 2px 2px 2px; margin: 6px 0px 4px 0px; border: 1px solid RGB(206 212 218); border-radius: 4px; background-color: transparent;" @bind-Value="@CurrentRace.Name" class=""></InputText>
}
<label class="race-descr-label">Race description</label>
<div class="richtext-conteiner">
<SfRichTextEditor Height="100%" @ref="RaceDescrShow" @bind-Value="@CurrentRace.Description" Readonly="true" ShowTooltip="false">
<SfRichTextEditor Height="100%" @ref="RaceDescrShow" @bind-Value="@CurrentRace.Description" Readonly="true" ShowTooltip="false">
<RichTextEditorToolbarSettings Items="@NoTools" />
</SfRichTextEditor>
</div>
Expand Down
Loading

0 comments on commit 6c51cb3

Please sign in to comment.