**Motivations:** - website-skeleton needs a real service contract with valid UUIDs and validators - Service wallet required for production use with configurable public key - Iframe styling needs improvement to remove scrollbars and match UserWallet theme **Root causes:** - DEFAULT_VALIDATEURS used placeholder public key that cannot verify signatures - No service wallet generation script for production deployment - Iframe had fixed height causing scrollbars and visual mismatch with dark theme **Correctifs:** - Created real service contract in src/serviceContract.ts with dedicated UUIDs (skeleton-service-uuid-4nkweb-2026) - Added service wallet generation script (generate-service-wallet.mjs) with .env and .env.private files - Improved iframe container styling: increased height (800px), dark background (#1a1a1a), better shadows, hidden scrollbars - Added .env.private to .gitignore for security **Evolutions:** - Service contract automatically loaded on startup and sent to UserWallet iframe - Public key configurable via VITE_SKELETON_SERVICE_PUBLIC_KEY environment variable - Added npm script 'generate-wallet' for easy wallet generation - Enhanced iframe visual integration with UserWallet dark theme **Pages affectées:** - website-skeleton/src/serviceContract.ts (new) - website-skeleton/src/config.ts - website-skeleton/src/main.ts - website-skeleton/generate-service-wallet.mjs (new) - website-skeleton/index.html - website-skeleton/package.json - website-skeleton/.gitignore - website-skeleton/.env (new) - website-skeleton/.env.private (new)
184 lines
4.6 KiB
HTML
184 lines
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>4NK un nouveau web - site d'exemple</title>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
max-width: 900px;
|
|
margin: 0 auto;
|
|
padding: 1rem;
|
|
line-height: 1.5;
|
|
}
|
|
h1 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.button-group {
|
|
margin: 1rem 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
}
|
|
button {
|
|
padding: 0.625rem 1.25rem;
|
|
font-size: 1rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 6px;
|
|
background: #fff;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
min-height: 44px;
|
|
}
|
|
button:hover {
|
|
background: #f5f5f5;
|
|
border-color: #999;
|
|
}
|
|
button:active {
|
|
background: #e0e0e0;
|
|
}
|
|
button.primary {
|
|
background: #007bff;
|
|
color: white;
|
|
border-color: #007bff;
|
|
}
|
|
button.primary:hover {
|
|
background: #0056b3;
|
|
border-color: #0056b3;
|
|
}
|
|
button.danger {
|
|
background: #dc3545;
|
|
color: white;
|
|
border-color: #dc3545;
|
|
}
|
|
button.danger:hover {
|
|
background: #c82333;
|
|
border-color: #c82333;
|
|
}
|
|
#iframe-container {
|
|
margin: 1.5rem 0;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
background: #fff;
|
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
|
|
border: 1px solid #e0e0e0;
|
|
}
|
|
.iframe-header {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
padding: 0.75rem 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
}
|
|
.iframe-header-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: rgba(255,255,255,0.2);
|
|
border-radius: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 14px;
|
|
}
|
|
.iframe-header-title {
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
}
|
|
.iframe-header-subtitle {
|
|
font-size: 0.8rem;
|
|
opacity: 0.85;
|
|
margin-left: auto;
|
|
}
|
|
#iframe-container iframe {
|
|
width: 100%;
|
|
height: 550px;
|
|
border: 0;
|
|
display: block;
|
|
background: #fafafa;
|
|
}
|
|
#connected-section {
|
|
padding: 1.5rem;
|
|
background: #f9f9f9;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
margin: 1rem 0;
|
|
}
|
|
#user-info {
|
|
margin: 1rem 0;
|
|
padding: 1rem;
|
|
background: white;
|
|
border-radius: 4px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
@media (max-width: 768px) {
|
|
body {
|
|
padding: 0.75rem;
|
|
}
|
|
h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
#iframe-container {
|
|
margin: 1rem 0;
|
|
border-radius: 8px;
|
|
}
|
|
#iframe-container iframe {
|
|
height: 500px;
|
|
}
|
|
.iframe-header {
|
|
padding: 0.6rem 0.8rem;
|
|
}
|
|
.iframe-header-subtitle {
|
|
display: none;
|
|
}
|
|
button {
|
|
width: 100%;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.button-group {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
@media (max-width: 480px) {
|
|
#iframe-container iframe {
|
|
height: 450px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>4NK un nouveau web - site d'exemple</h1>
|
|
|
|
<div id="login-section">
|
|
<p><a href="contrat.html">Le contrat</a> · <a href="membre.html">Qui êtes-vous ?</a></p>
|
|
<div class="button-group">
|
|
<button type="button" id="btn-login" class="primary">Se connecter</button>
|
|
</div>
|
|
<div id="iframe-container" style="display: none;">
|
|
<div class="iframe-header">
|
|
<div class="iframe-header-icon">🔐</div>
|
|
<span class="iframe-header-title">UserWallet</span>
|
|
<span class="iframe-header-subtitle">Connexion sécurisée</span>
|
|
</div>
|
|
<iframe id="userwallet" title="UserWallet"></iframe>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="connected-section" style="display: none;">
|
|
<h2>Vous êtes connecté</h2>
|
|
<div id="user-info"></div>
|
|
<p><a href="contrat.html">Le contrat</a> · <a href="membre.html">Qui êtes-vous ?</a></p>
|
|
<div class="button-group">
|
|
<button type="button" id="btn-logout" class="danger">Se déconnecter</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|