Compare commits
3 Commits
3448c17d8b
...
89290c03f9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89290c03f9 | ||
|
|
3b27260b14 | ||
|
|
9fa5827b09 |
@@ -117,12 +117,24 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Complete" xml:space="preserve">
|
||||
<value>Abschließen</value>
|
||||
</data>
|
||||
<data name="de-DE" xml:space="preserve">
|
||||
<value>Deutch</value>
|
||||
</data>
|
||||
<data name="DocProtected" xml:space="preserve">
|
||||
<value>Dokument geschützt</value>
|
||||
</data>
|
||||
<data name="en-US" xml:space="preserve">
|
||||
<value>Englisch</value>
|
||||
</data>
|
||||
<data name="EnvelopeInfo1" xml:space="preserve">
|
||||
<value>Sie müssen {0} Vorgang unterzeichen. Bitte prüfen Sie die Seite {1}.</value>
|
||||
</data>
|
||||
<data name="EnvelopeInfo2" xml:space="preserve">
|
||||
<value>Erstellt am {0} von {1}. Sie können den Absender über <a href="mailto:{2}?subject={3}&body=Sehr%20geehrter%20{4}%20{5},%0A%0A%0A">{6}</a> kontaktieren.</value>
|
||||
</data>
|
||||
<data name="LocakedOpen" xml:space="preserve">
|
||||
<value>Öffnen</value>
|
||||
</data>
|
||||
@@ -141,6 +153,9 @@
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<value>Dokument erfordert einen Zugriffscode</value>
|
||||
</data>
|
||||
<data name="SignDoc" xml:space="preserve">
|
||||
<value>Dokument unterschreiben</value>
|
||||
</data>
|
||||
<data name="UnexpectedError" xml:space="preserve">
|
||||
<value>Ein unerwarteter Fehler ist aufgetreten.</value>
|
||||
</data>
|
||||
|
||||
@@ -117,12 +117,24 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Complete" xml:space="preserve">
|
||||
<value>Complete</value>
|
||||
</data>
|
||||
<data name="de-DE" xml:space="preserve">
|
||||
<value>German</value>
|
||||
</data>
|
||||
<data name="DocProtected" xml:space="preserve">
|
||||
<value>Document protected</value>
|
||||
</data>
|
||||
<data name="en-US" xml:space="preserve">
|
||||
<value>English</value>
|
||||
</data>
|
||||
<data name="EnvelopeInfo1" xml:space="preserve">
|
||||
<value>You have to sign {0} process. Please check page {1}.</value>
|
||||
</data>
|
||||
<data name="EnvelopeInfo2" xml:space="preserve">
|
||||
<value>Created on {0} by {1}. You can contact the sender via <a href="mailto:{2}?subject={3}&body=Dear%20{4}%20{5},%0A%0A%0A">{6}</a>.</value>
|
||||
</data>
|
||||
<data name="LocakedOpen" xml:space="preserve">
|
||||
<value>Open</value>
|
||||
</data>
|
||||
@@ -141,6 +153,9 @@
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<value>Document requires an access code</value>
|
||||
</data>
|
||||
<data name="SignDoc" xml:space="preserve">
|
||||
<value>Sign document</value>
|
||||
</data>
|
||||
<data name="UnexpectedError" xml:space="preserve">
|
||||
<value>An unexpected error has occurred.</value>
|
||||
</data>
|
||||
|
||||
@@ -16,6 +16,7 @@ using Microsoft.AspNetCore.Localization;
|
||||
using System.Text.Encodings.Web;
|
||||
using EnvelopeGenerator.Web.Models;
|
||||
using EnvelopeGenerator.Application.Resources;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
@@ -92,7 +93,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
else if (UserLanguage is not null && culture is not null)
|
||||
return Redirect($"Locked");
|
||||
|
||||
ViewData["UserLanguage"] = UserLanguage ?? culture;
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage ?? culture];
|
||||
|
||||
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||
Success: isExisting => isExisting ? View().WithData("EnvelopeKey", envelopeReceiverId) : this.ViewEnvelopeNotFound(),
|
||||
@@ -175,6 +176,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
|
||||
//add PSPDFKit licence key
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
|
||||
return View("ShowEnvelope", er);
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AngleSharp.Common;
|
||||
using DigitalData.Core.API;
|
||||
using EnvelopeGenerator.Application.Resources;
|
||||
using EnvelopeGenerator.Web.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -23,9 +24,15 @@ namespace EnvelopeGenerator.Web.Controllers.Test
|
||||
public IActionResult Localize([FromQuery] string key = "de_DE") => Ok(_localizer[key]);
|
||||
|
||||
[HttpGet("fi-class")]
|
||||
public IActionResult GetFIClass(string? lang = null) => lang is null ? Ok(_cultures.FIClasses) : Ok(_cultures.FIClassOf(lang));
|
||||
public IActionResult GetFIClass(string? lang = null) => lang is null ? Ok(_cultures.FIClasses) : Ok(_cultures[lang]?.FIClass);
|
||||
|
||||
[HttpGet("culture")]
|
||||
public IActionResult GetCultures(string? lang = null) => lang is null ? Ok(_cultures) : Ok(_cultures.CultureOf(lang));
|
||||
public IActionResult GetCultures(string? lang = null) => lang is null ? Ok(_cultures) : Ok(_cultures[lang]);
|
||||
|
||||
[HttpGet("to-culture-info")]
|
||||
public IActionResult ToCultureInfo(string locale) => Ok(locale.ToCultureInfo());
|
||||
|
||||
[HttpGet("two-letter-iso-language-name")]
|
||||
public IActionResult TwoLetterISOLanguageName(string locale) => Ok(locale.TwoLetterISOLanguageName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
namespace EnvelopeGenerator.Web.Models
|
||||
using System.Globalization;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Models
|
||||
{
|
||||
public class Culture
|
||||
{
|
||||
public string Language { get; init; } = string.Empty;
|
||||
private string _language = string.Empty;
|
||||
public string Language { get => _language;
|
||||
init {
|
||||
_language = value;
|
||||
Info = new(value);
|
||||
}
|
||||
}
|
||||
public string FIClass { get; init; } = string.Empty;
|
||||
|
||||
public CultureInfo? Info { get; init; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
|
||||
public IEnumerable<string> FIClasses => this.Select(c => c.FIClass);
|
||||
|
||||
public Culture? CultureOf(string? language) => language is null ? null : this.Where(c => c.Language == language).FirstOrDefault();
|
||||
|
||||
public Culture Default => this.First();
|
||||
|
||||
public string FIClassOf(string? language) => language is null ? string.Empty : CultureOf(language)?.FIClass ?? string.Empty;
|
||||
|
||||
public Culture? this[string? language] => language is null ? null : this.Where(c => c.Language == language).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
}
|
||||
@{
|
||||
ViewData["Title"] = "Dokument geschützt";
|
||||
var userLanguage = ViewData["UserLanguage"] as string;
|
||||
ViewData["Title"] = _localizer[WebKey.DocProtected];
|
||||
var userCulture = ViewData["UserCulture"] as Culture;
|
||||
}
|
||||
<div class="page container py-5 px-2">
|
||||
<header class="text-center">
|
||||
@@ -39,14 +39,16 @@
|
||||
<div class="col-4 mb-3 d-flex justify-content-center align-items-center">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-secondary dropdown-toggle" type="button" id="langDropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span class="fi @_cultures.FIClassOf(userLanguage).TrySanitize(_sanitizer) me-2" id="selectedFlag"></span><span id="selectedLanguage"></span>
|
||||
<span class="fi @userCulture?.FIClass.TrySanitize(_sanitizer) me-2" id="selectedFlag"></span><span id="selectedLanguage"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="langDropdownMenuButton">
|
||||
@foreach(var lang in _cultures.Languages)
|
||||
@foreach(var culture in _cultures)
|
||||
{
|
||||
var lang = culture.Language;
|
||||
var info = culture.Info;
|
||||
<li>
|
||||
<a class="dropdown-item" data-language="@lang.TrySanitize(_sanitizer)" data-flag="@_cultures.FIClassOf(lang).TrySanitize(_sanitizer)">
|
||||
<span class="fi @_cultures.FIClassOf(lang).TrySanitize(_sanitizer) me-2"></span>@_localizer[lang].Value.TrySanitize(_sanitizer)
|
||||
<a class="dropdown-item" data-language="@lang.TrySanitize(_sanitizer)" data-flag="@_cultures[lang]?.FIClass.TrySanitize(_sanitizer)">
|
||||
<span class="fi @_cultures[lang]?.FIClass.TrySanitize(_sanitizer) me-2"></span>@info?.Parent.NativeName
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
@using EnvelopeGenerator.Application.DTOs;
|
||||
@model EnvelopeReceiverDto;
|
||||
@{
|
||||
ViewData["Title"] = "Dokument unterschreiben";
|
||||
ViewData["Title"] = _localizer[WebKey.SignDoc];
|
||||
}
|
||||
<partial name="_CookieConsentPartial" />
|
||||
@{
|
||||
var userCulture = ViewData["UserCulture"] as Culture;
|
||||
var envelope = Model.Envelope;
|
||||
var document = Model.Envelope?.Documents?.FirstOrDefault();
|
||||
var sender = Model.Envelope?.User;
|
||||
@@ -32,14 +33,18 @@
|
||||
<div class="bg-light p-1">
|
||||
<div class="card sender-card mb-3">
|
||||
<div class="row g-0">
|
||||
<div class="col-1 p-0 m-0 ps-4 mx-auto">
|
||||
<img src="~/img/default-user.svg" class="img-fluid p-0 m-0" alt="...">
|
||||
</div>
|
||||
<div class="col p-0 m-0">
|
||||
<div class="card-body p-0 m-0">
|
||||
<div class="card-body p-0 m-0 ms-4">
|
||||
<h5 class="card-title p-0 m-0">@($"{envelope?.Title.TrySanitize(_sanitizer)}")</h5>
|
||||
<p class="card-text p-0 m-0">@($"Sie müssen {(pages.Count())} Vorgang unterzeichen. Bitte prüfen Sie die Seite {stPageIndexes.TrySanitize(_sanitizer)}.")</p>
|
||||
<p class="card-text p-0 m-0"><small class="text-body-secondary">Erstellt am @envelope?.AddedWhen von @sender?.Prename.TrySanitize(_sanitizer) @sender?.Name.TrySanitize(_sanitizer). Sie können den Absender über <a href="mailto:@(sender?.Email.TryEncode(_encoder))?subject=@(envelope?.Title.TryEncode(_encoder))&body=Sehr%20geehrter%20@(sender?.Prename.TryEncode(_encoder))%20@(sender?.Name.TryEncode(_encoder)),%0A%0A%0A">@sender?.Email.TryEncode(_encoder)</a> kontaktieren.</small></p>
|
||||
<p class="card-text p-0 m-0">@(string.Format(_localizer[WebKey.EnvelopeInfo1], pages.Count(), stPageIndexes.TrySanitize(_sanitizer)))</p>
|
||||
<p class="card-text p-0 m-0"><small class="text-body-secondary">@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo2],
|
||||
envelope?.AddedWhen.ToString(userCulture?.Info?.DateTimeFormat),
|
||||
$"{sender?.Prename} {sender?.Name}".TrySanitize(_sanitizer),
|
||||
sender?.Email.TryEncode(_encoder),
|
||||
envelope?.Title.TryEncode(_encoder),
|
||||
sender?.Prename.TryEncode(_encoder),
|
||||
sender?.Name.TryEncode(_encoder),
|
||||
sender?.Email.TryEncode(_encoder)))</small></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,7 +57,7 @@
|
||||
<path d="m10.036 8.278 9.258-7.79A1.979 1.979 0 0 0 18 0H2A1.987 1.987 0 0 0 .641.541l9.395 7.737Z" />
|
||||
<path d="M11.241 9.817c-.36.275-.801.425-1.255.427-.428 0-.845-.138-1.187-.395L0 2.6V14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2.5l-8.759 7.317Z" />
|
||||
</svg>
|
||||
<span>Abschließen</span>
|
||||
<span>@_localizer[WebKey.Complete]</span>
|
||||
</button>
|
||||
<button class="btn_refresh btn btn-outline-secondary" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
|
||||
@@ -83,9 +88,8 @@
|
||||
};
|
||||
var envelopeReceiverJson = Newtonsoft.Json.JsonConvert.SerializeObject(Model, settings);
|
||||
var documentBase64String = Convert.ToBase64String(documentBytes);
|
||||
|
||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||
|
||||
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey.TrySanitize(_sanitizer)", @Html.Raw(envelopeReceiverJson.TrySanitize(_sanitizer)), B64ToBuff("@Html.Raw(documentBase64String.TrySanitize(_sanitizer))"), "@ViewData["PSPDFKitLicenseKey"]").init())
|
||||
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey.TrySanitize(_sanitizer)", @Html.Raw(envelopeReceiverJson.TrySanitize(_sanitizer)), B64ToBuff("@Html.Raw(documentBase64String.TrySanitize(_sanitizer))"), "@ViewData["PSPDFKitLicenseKey"]", "@userCulture?.Info?.TwoLetterISOLanguageName").init())
|
||||
}
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - EnvelopeGenerator.Web</title>
|
||||
<title>@ViewData["Title"]</title>
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="~/lib/sweetalert2/sweetalert2.min.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace EnvelopeGenerator.Web
|
||||
using System.Numerics;
|
||||
|
||||
namespace EnvelopeGenerator.Web
|
||||
{
|
||||
public static class WebKey
|
||||
{
|
||||
@@ -17,5 +19,10 @@
|
||||
public static readonly string LockedFooterTitle = nameof(LockedFooterTitle);
|
||||
public static readonly string LockedFooterBody = nameof(LockedFooterBody);
|
||||
public static readonly string WrongAccessCode = nameof(WrongAccessCode);
|
||||
public static readonly string SignDoc = nameof(SignDoc);
|
||||
public static readonly string DocProtected = nameof(DocProtected);
|
||||
public static readonly string Complete = nameof(Complete);
|
||||
public static readonly string EnvelopeInfo1 = nameof(EnvelopeInfo1);
|
||||
public static readonly string EnvelopeInfo2 = nameof(EnvelopeInfo2);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"AdminPassword": "dd",
|
||||
"PSPDFKitLicenseKey_SignFlow": "y8VgCpBgUfNlpKJZC-GwjpPs-S-KFBHv4RywfHbqpBAbO0XxRuWDaMGZtIaMrXBDlndlJLk---Ve93xjI_ZR4sbFymf4Ot97yTYUMeDdL2LYXhspkEnSAtkXf9zqepNL1v_0DMibjpqXFQMkVB1y3D5xdnOg-iJuCCZEMhZ780qg04_H_nmx63uSgxjN0GJxC8YvsbnRcUZ2l_idImMvWL0HMqB5B7oEpNenasA0RK0uapFRTa7NIQok0phpTHZYKB4qvj7od2yxlytGB7qBl4-lwT70DSQ9mrLkCWbuzZ9cV9D8fDzdFXr6WoZdOYpkrUadRbsy2bhPq_ukxszDWN4JGhebo0XKUK_YfgvSlS7lFOxHNblHeC9B7gZ8T-VuQ_z1QA2JYRf1dmhSuclnW00diShIg-N0I79PWGsQE4j40XtVpyWcN9uT9hMuiRpL0LzHV4YgsgBrgKgs_moqL7f0L4-MwaS25Dx4Wcz4ttKaerLavwMM4CJHI3DNqTC5UUEG6EViFxBQtrmuAS7kiw2nWjvXO7kUA24NARtsRCphjWE4l6wSMdh7kpqhfbV7_hdb5xXYGALNPkv8En6zPpFIew8DDcOH9dgxfKMI34LLhkEWqovZW_7fXNJTEIHVpR0DSPbZrmyEwkECnbDcNzjyFk2M1fzstJj_dSotyZvS57XJK2DgojbRgXL9pncs",
|
||||
"UseCSPInDev": true,
|
||||
"UseCSPInDev": false,
|
||||
"Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value.
|
||||
"default-src 'self'",
|
||||
"script-src 'self' 'nonce-{0}' 'unsafe-inline' 'unsafe-eval' blob: data:",
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
margin-right: 10vw;
|
||||
margin-bottom: 10vh;
|
||||
}
|
||||
|
||||
.btn_refresh, .btn_complete {
|
||||
height:4vh
|
||||
}
|
||||
|
||||
.btn_complete .icon {
|
||||
width: 2vh;
|
||||
}
|
||||
.btn_complete .icon {
|
||||
width: 1.1rem;
|
||||
}
|
||||
|
||||
.btn_complete span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.btn_complete span {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.button-finish {
|
||||
transition: background-color linear 300ms;
|
||||
@@ -33,10 +33,10 @@
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.button-finish:hover, .button-finish:focus, .button-finish:active {
|
||||
background-color: #10b981; /* emerald-500 */
|
||||
color: white;
|
||||
}
|
||||
.button-finish:hover, .button-finish:focus, .button-finish:active {
|
||||
background-color: #10b981; /* emerald-500 */
|
||||
color: white;
|
||||
}
|
||||
|
||||
.button-reject {
|
||||
transition: background-color linear 300ms;
|
||||
@@ -45,10 +45,10 @@
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.button-reject:hover, .button-reject:focus, .button-reject:active {
|
||||
background-color: #f59e0b; /* amber-500 */
|
||||
color: white;
|
||||
}
|
||||
.button-reject:hover, .button-reject:focus, .button-reject:active {
|
||||
background-color: #f59e0b; /* amber-500 */
|
||||
color: white;
|
||||
}
|
||||
|
||||
.button-reset {
|
||||
transition: background-color linear 300ms;
|
||||
@@ -57,10 +57,10 @@
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.button-reset:hover, .button-reset:focus, .button-reset:active {
|
||||
background-color: #3b82f6; /* blue-500 */
|
||||
color: white;
|
||||
}
|
||||
.button-reset:hover, .button-reset:focus, .button-reset:active {
|
||||
background-color: #3b82f6; /* blue-500 */
|
||||
color: white;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #bbb;
|
||||
@@ -74,42 +74,41 @@ body {
|
||||
max-width: 40rem;
|
||||
}
|
||||
|
||||
.page section {
|
||||
max-width: 30rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.page section {
|
||||
max-width: 30rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page header .icon {
|
||||
display: inline-block;
|
||||
border-radius: 100px;
|
||||
padding: 15px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.page header .icon {
|
||||
display: inline-block;
|
||||
border-radius: 100px;
|
||||
padding: 15px;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.page header .icon.admin {
|
||||
background-color: #331904;
|
||||
color: #fecba1;
|
||||
}
|
||||
.page header .icon.admin {
|
||||
background-color: #331904;
|
||||
color: #fecba1;
|
||||
}
|
||||
|
||||
.page header .icon.locked {
|
||||
background-color: #ffc107;
|
||||
color: #000;
|
||||
}
|
||||
.page header .icon.locked {
|
||||
background-color: #ffc107;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.page header .icon.signed {
|
||||
background-color: #146c43;
|
||||
color: #fff;
|
||||
}
|
||||
.page header .icon.signed {
|
||||
background-color: #146c43;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.page .form {
|
||||
max-width: 30rem;
|
||||
margin: 2rem auto;
|
||||
.page .form {
|
||||
max-width: 30rem;
|
||||
margin: 2rem auto;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
#form-access-code > .input,
|
||||
#form-access-code > .input,
|
||||
#form-admin-password > .input {
|
||||
flex-grow: 1;
|
||||
}
|
||||
@@ -134,26 +133,29 @@ footer#page-footer {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
footer#page-footer a,
|
||||
footer#page-footer a:link,
|
||||
footer#page-footer a:hover,
|
||||
footer#page-footer a:visited,
|
||||
footer#page-footer a:focus {
|
||||
color: #444;
|
||||
}
|
||||
footer#page-footer a,
|
||||
footer#page-footer a:link,
|
||||
footer#page-footer a:hover,
|
||||
footer#page-footer a:visited,
|
||||
footer#page-footer a:focus {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.sender-card {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
.sender-card .row {
|
||||
height: 7vh;
|
||||
}
|
||||
.sender-card img{
|
||||
height: 7vh;
|
||||
background-color: rgb(209, 207, 207);
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.sender-card .row {
|
||||
height: 7vh;
|
||||
}
|
||||
|
||||
.sender-card img {
|
||||
height: 7vh;
|
||||
background-color: rgb(209, 207, 207);
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.envelope-message {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
}
|
||||
@@ -166,6 +168,7 @@ footer#page-footer a:focus {
|
||||
width: 30%;
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
.dropdown-flag {
|
||||
height: 75%;
|
||||
width: 75%;
|
||||
@@ -187,7 +190,7 @@ footer#page-footer a:focus {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
#langDropdownMenuButton{
|
||||
#langDropdownMenuButton {
|
||||
min-width: 4vw;
|
||||
}
|
||||
|
||||
@@ -199,7 +202,6 @@ footer#page-footer a:focus {
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
@@ -210,13 +212,10 @@ footer#page-footer a:focus {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.collapse .card-text , .collapsing .card-text {
|
||||
font-size: 0.7rem; /* Font size reduced */
|
||||
padding-left:2rem;
|
||||
}
|
||||
|
||||
.collapse.show {
|
||||
height: 100%;
|
||||
.collapse .card-text, .collapsing .card-text {
|
||||
font-size: 0.6rem; /* Font size reduced */
|
||||
margin: 0rem;
|
||||
padding: 0rem;
|
||||
}
|
||||
|
||||
.sender-card .card-body {
|
||||
@@ -228,8 +227,6 @@ footer#page-footer a:focus {
|
||||
flex-direction: row;
|
||||
bottom: 0.5rem;
|
||||
right: 0.5rem;
|
||||
margin: 0;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.btn_complete, .btn_refresh {
|
||||
@@ -240,9 +237,14 @@ footer#page-footer a:focus {
|
||||
margin-bottom: 0.5rem; /* Space between buttons */
|
||||
}
|
||||
|
||||
.img {
|
||||
.img-fluid {
|
||||
width: 1.2rem;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 4rem;
|
||||
}
|
||||
|
||||
.page {
|
||||
@@ -251,7 +253,7 @@ footer#page-footer a:focus {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.page section {
|
||||
max-width: 90%;
|
||||
}
|
||||
.page section {
|
||||
max-width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ const ActionType = {
|
||||
}
|
||||
|
||||
class App {
|
||||
constructor(envelopeKey, envelopeReceiver, documentBytes, licenseKey, container) {
|
||||
constructor(envelopeKey, envelopeReceiver, documentBytes, licenseKey, locale, container) {
|
||||
this.container = container ?? `#${this.constructor.name.toLowerCase()}`;
|
||||
this.envelopeKey = envelopeKey
|
||||
|
||||
@@ -25,6 +25,7 @@ class App {
|
||||
this.envelopeReceiver = envelopeReceiver;
|
||||
this.documentBytes = documentBytes;
|
||||
this.licenseKey = licenseKey;
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
// This function will be called from the ShowEnvelope.razor page
|
||||
@@ -48,7 +49,7 @@ class App {
|
||||
const arrayBuffer = this.documentBytes
|
||||
|
||||
// Load PSPDFKit
|
||||
this.Instance = await this.UI.loadPSPDFKit(arrayBuffer, this.container, this.licenseKey)
|
||||
this.Instance = await this.UI.loadPSPDFKit(arrayBuffer, this.container, this.licenseKey, this.locale)
|
||||
this.UI.configurePSPDFKit(this.Instance, this.handleClick.bind(this))
|
||||
|
||||
this.Instance.addEventListener(
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
|
||||
// Load the PSPDFKit UI by setting a target element as the container to render in
|
||||
// and a arraybuffer which represents the document that should be displayed.
|
||||
loadPSPDFKit(arrayBuffer, container, licenseKey) {
|
||||
loadPSPDFKit(arrayBuffer, container, licenseKey, locale) {
|
||||
return PSPDFKit.load({
|
||||
locale: locale,
|
||||
licenseKey: licenseKey,
|
||||
styleSheets: ['/css/site.css'],
|
||||
container: container,
|
||||
|
||||
Reference in New Issue
Block a user