feat(HomeController): Endpunkt für Stammverzeichnis als Startseite hinzugefügt.
This commit is contained in:
parent
c4114a3800
commit
fcc3223eb1
@ -1,5 +1,4 @@
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
|
||||
@ -9,6 +9,7 @@ using EnvelopeGenerator.Extensions;
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Route("api/[controller]")]
|
||||
public class DocumentController : BaseController
|
||||
{
|
||||
private readonly EnvelopeOldService envelopeService;
|
||||
@ -48,7 +49,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost("api/document/{envelopeKey}")]
|
||||
[HttpPost("{envelopeKey}")]
|
||||
public async Task<IActionResult> Open(string envelopeKey)
|
||||
{
|
||||
try
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
@ -23,7 +22,6 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
private readonly IReceiverService _receiverService;
|
||||
private readonly IEnvelopeReceiverService _envRcvService;
|
||||
|
||||
|
||||
public EnvelopeController(DatabaseService database,
|
||||
EnvelopeOldService envelope,
|
||||
ILogger<EnvelopeController> logger, UrlEncoder urlEncoder,
|
||||
|
||||
@ -47,6 +47,12 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
_logger = logger;
|
||||
_readOnlyService = readOnlyService;
|
||||
}
|
||||
|
||||
[HttpGet("/")]
|
||||
public IActionResult Main()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}")]
|
||||
public async Task<IActionResult> MainAsync([FromRoute] string envelopeReceiverId, [FromQuery] string? culture = null)
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using EnvelopeGenerator.Application.Resources;
|
||||
using Ganss.Xss;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Extensions;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||
{
|
||||
[Route("api/test/[controller]")]
|
||||
public class TestViewController : BaseController
|
||||
{
|
||||
private readonly EnvelopeOldService envelopeOldService;
|
||||
@ -16,13 +16,13 @@ namespace EnvelopeGenerator.Web.Controllers.Test
|
||||
_config = configuration;
|
||||
}
|
||||
|
||||
[HttpGet("/")]
|
||||
[HttpGet]
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View("Index");
|
||||
}
|
||||
|
||||
[HttpPost("/")]
|
||||
[HttpPost]
|
||||
public IActionResult DebugEnvelopes([FromForm] string? password)
|
||||
{
|
||||
try
|
||||
|
||||
28
EnvelopeGenerator.Web/Views/Home/Main.cshtml
Normal file
28
EnvelopeGenerator.Web/Views/Home/Main.cshtml
Normal file
@ -0,0 +1,28 @@
|
||||
@{
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
var logo = _logoOpt.Value;
|
||||
ViewData["Title"] = _localizer["Home"];
|
||||
var userCulture = ViewData["UserCulture"] as Culture;
|
||||
}
|
||||
<div class="page container py-4 px-4">
|
||||
<header class="text-center">
|
||||
<div class="header-1 alert alert-secondary" role="alert">
|
||||
<h3 class="text">@_localizer[WebKey.WelcomeToTheESignPortal]</h3>
|
||||
<img class="@logo.LockedPageClass" src="@logo.Src" />
|
||||
</div>
|
||||
<div class="icon locked mt-4 mb-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
|
||||
</svg>
|
||||
</div>
|
||||
<h1>@_localizer["Title"]</h1>
|
||||
</header>
|
||||
<section class="text-center">
|
||||
<p>@_localizer["Explanation"]</p>
|
||||
</section>
|
||||
@if (ViewData["ErrorMessage"] is string errMsg)
|
||||
{
|
||||
<div id="access-code-error-message" class="alert alert-danger row" role="alert">
|
||||
@_sanitizer.Sanitize(errMsg)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
Loading…
x
Reference in New Issue
Block a user