This commit is contained in:
2026-04-20 22:51:41 +02:00
parent 89fc0119f3
commit 81eec53978
27 changed files with 1067 additions and 399 deletions
+21 -18
View File
@@ -4,9 +4,10 @@
import { notify } from '../lib/store.js'
const providers = [
{ key: 'finnhub_api_key', label: 'Finnhub', provider: 'finnhub', placeholder: 'c_xxxxxxxxxxxxxxxx' },
{ key: 'alphavantage_key', label: 'Alpha Vantage', provider: 'alphavantage', placeholder: 'XXXXXXXXXXXX' },
{ key: 'etoro_api_key', label: 'eToro', provider: 'etoro', placeholder: 'eToro API key' },
{ key: 'finnhub_api_key', label: 'Finnhub', provider: 'finnhub', placeholder: 'c_xxxxxxxxxxxxxxxx' },
{ key: 'alphavantage_key', label: 'Alpha Vantage', provider: 'alphavantage', placeholder: 'XXXXXXXXXXXX' },
{ key: 'etoro_api_key', label: 'eToro — Public Key', provider: 'etoro', placeholder: 'x-api-key (clé publique)' },
{ key: 'etoro_user_key', label: 'eToro — User Key', provider: null, placeholder: 'eyJjaSI6… (clé utilisateur)' },
]
let values = {}
@@ -76,6 +77,7 @@
placeholder={p.placeholder}
autocomplete="off"
/>
{#if p.provider}
<button
type="button"
class="btn-test"
@@ -86,6 +88,7 @@
>
{testing[p.provider] ? '…' : testResults[p.provider] === 'ok' ? '✓' : testResults[p.provider] === 'error' ? '✗' : 'Tester'}
</button>
{/if}
</div>
</div>
{/each}
@@ -100,47 +103,47 @@
</div>
<style>
.page h1 { color: #e6edf3; font-size: 1.4rem; }
.page h1 { color: #1f2328; font-size: 1.4rem; }
form { max-width: 560px; }
section { margin-bottom: 2rem; }
h2 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8b949e; border-bottom: 1px solid #21262d; padding-bottom: 0.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.08em; color: #57606a; border-bottom: 1px solid #d0d7de; padding-bottom: 0.5rem; margin-bottom: 1.25rem; }
.hint { font-size: 0.8rem; color: #484f58; margin: -0.75rem 0 1.25rem; }
.hint { font-size: 0.8rem; color: #8c959f; margin: -0.75rem 0 1.25rem; }
.field { margin-bottom: 1.25rem; }
label { display: block; font-size: 0.875rem; color: #8b949e; margin-bottom: 0.4rem; }
label { display: block; font-size: 0.875rem; color: #57606a; margin-bottom: 0.4rem; }
.input-row { display: flex; gap: 0.5rem; }
input {
flex: 1;
background: #161b22;
border: 1px solid #30363d;
background: #ffffff;
border: 1px solid #c6cdd5;
border-radius: 6px;
color: #e6edf3;
color: #1f2328;
padding: 0.5rem 0.75rem;
font-size: 0.875rem;
outline: none;
transition: border-color 0.15s;
}
input:focus { border-color: #58a6ff; }
input::placeholder { color: #484f58; }
input:focus { border-color: #0969da; }
input::placeholder { color: #8c959f; }
.btn-test {
background: #21262d;
border: 1px solid #30363d;
background: #d0d7de;
border: 1px solid #c6cdd5;
border-radius: 6px;
color: #8b949e;
color: #57606a;
padding: 0.5rem 0.75rem;
font-size: 0.8rem;
min-width: 64px;
transition: background 0.15s, color 0.15s;
}
.btn-test:hover:not(:disabled) { background: #30363d; color: #e6edf3; }
.btn-test.ok { color: #3fb950; border-color: #3fb950; }
.btn-test.error { color: #f85149; border-color: #f85149; }
.btn-test:hover:not(:disabled) { background: #c6cdd5; color: #1f2328; }
.btn-test.ok { color: #1a7f37; border-color: #1a7f37; }
.btn-test.error { color: #cf222e; border-color: #cf222e; }
.btn-test:disabled { opacity: 0.5; }
.actions { padding-top: 1rem; }