Initial commit - Stand 26.04.2026
This commit is contained in:
@@ -0,0 +1,412 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#667eea">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<title>Finanz Flow Mobile</title>
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="apple-touch-icon" href="/icon-192.png">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.header p {
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.9;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 15px;
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
padding: 20px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: #f0f0f0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.camera-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 4/3;
|
||||
background: #000;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
#canvas {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
width: 100%;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 500;
|
||||
color: #555;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.form-input, .form-select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 2px solid #e0e0e0;
|
||||
border-radius: 10px;
|
||||
font-size: 1rem;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.form-input:focus, .form-select:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ocr-result {
|
||||
background: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.ocr-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.ocr-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.ocr-label {
|
||||
color: #666;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.ocr-value {
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.bottom-nav {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 10px 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 5px 15px;
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.nav-item.active {
|
||||
color: #667eea;
|
||||
}
|
||||
|
||||
.nav-icon {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: none;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.loading.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 4px solid #e0e0e0;
|
||||
border-top-color: #667eea;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto 10px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.success-message {
|
||||
display: none;
|
||||
background: #d4edda;
|
||||
color: #155724;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.success-message.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.api-config {
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffeaa7;
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.api-config input {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 8px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>📱 Finanz Flow Mobile</h1>
|
||||
<p>Rechnungen scannen & verbuchen</p>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<!-- API Config -->
|
||||
<div class="card api-config" id="api-config">
|
||||
<div class="card-title">⚙️ API Einstellungen</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">Backend URL</label>
|
||||
<input type="text" id="api-url" placeholder="https://buchhaltung.deine-domain.de/api" value="http://192.168.0.141/api">
|
||||
</div>
|
||||
<button class="btn btn-secondary" onclick="saveApiConfig()">
|
||||
💾 Speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Scanner -->
|
||||
<div class="card" id="scanner-card">
|
||||
<div class="card-title">📷 Rechnung scannen</div>
|
||||
|
||||
<div class="camera-container" id="camera-container">
|
||||
<video id="video" autoplay playsinline></video>
|
||||
<canvas id="canvas"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="loading" id="loading">
|
||||
<div class="spinner"></div>
|
||||
<p>Analysiere Rechnung...</p>
|
||||
</div>
|
||||
|
||||
<img id="preview" class="preview-image hidden">
|
||||
|
||||
<button class="btn btn-primary" id="capture-btn" onclick="capturePhoto()">
|
||||
📸 Foto aufnehmen
|
||||
</button>
|
||||
|
||||
<button class="btn btn-secondary hidden" id="retake-btn" onclick="retakePhoto()">
|
||||
🔄 Neu aufnehmen
|
||||
</button>
|
||||
|
||||
<input type="file" id="file-input" accept="image/*,application/pdf" class="hidden" onchange="handleFileSelect(event)">
|
||||
|
||||
<button class="btn btn-secondary" onclick="document.getElementById('file-input').click()" style="margin-top: 10px;">
|
||||
📁 Aus Dateien wählen
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- OCR Results -->
|
||||
<div class="card hidden" id="ocr-card">
|
||||
<div class="card-title">📋 Erkannte Daten</div>
|
||||
|
||||
<div class="ocr-result" id="ocr-result">
|
||||
<div class="ocr-row">
|
||||
<span class="ocr-label">Händler:</span>
|
||||
<span class="ocr-value" id="ocr-händler">-</span>
|
||||
</div>
|
||||
<div class="ocr-row">
|
||||
<span class="ocr-label">Datum:</span>
|
||||
<span class="ocr-value" id="ocr-datum">-</span>
|
||||
</div>
|
||||
<div class="ocr-row">
|
||||
<span class="ocr-label">Betrag brutto:</span>
|
||||
<span class="ocr-value" id="ocr-brutto">-</span>
|
||||
</div>
|
||||
<div class="ocr-row">
|
||||
<span class="ocr-label">MwSt (19%):</span>
|
||||
<span class="ocr-value" id="ocr-mwst">-</span>
|
||||
</div>
|
||||
<div class="ocr-row">
|
||||
<span class="ocr-label">Betrag netto:</span>
|
||||
<span class="ocr-value" id="ocr-netto">-</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Kategorie</label>
|
||||
<select class="form-select" id="kategorie">
|
||||
<option value="">Bitte wählen...</option>
|
||||
<option value="hardware">💻 Hardware / IT</option>
|
||||
<option value="büro">🖨️ Büroausstattung</option>
|
||||
<option value="fahrzeug">🚗 Fahrzeugkosten</option>
|
||||
<option value="werkzeug">🔧 Werkzeug</option>
|
||||
<option value="software">💿 Software / Lizenzen</option>
|
||||
<option value="dienstleistung">🛠️ Dienstleistungen</option>
|
||||
<option value="material">📦 Material</option>
|
||||
<option value="sonstiges">📋 Sonstiges</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label">Notiz (optional)</label>
|
||||
<input type="text" class="form-input" id="notiz" placeholder="z.B. ASUS ROG Strix Halo X2 für KI-Entwicklung">
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" onclick="saveDocument()">
|
||||
💾 In Buchhaltung speichern
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Success -->
|
||||
<div class="success-message" id="success-message">
|
||||
✅ Rechnung erfolgreich verbucht!
|
||||
</div>
|
||||
|
||||
<!-- Recent Documents -->
|
||||
<div class="card" id="recent-card">
|
||||
<div class="card-title">📑 Letzte Dokumente</div>
|
||||
<div id="recent-list">
|
||||
<p style="text-align: center; color: #999; padding: 20px;">Noch keine Dokumente</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Navigation -->
|
||||
<nav class="bottom-nav">
|
||||
<a href="#" class="nav-item active" onclick="showTab('scan')">
|
||||
<span class="nav-icon">📷</span>
|
||||
<span>Scannen</span>
|
||||
</a>
|
||||
<a href="#" class="nav-item" onclick="showTab('list')">
|
||||
<span class="nav-icon">📋</span>
|
||||
<span>Dokumente</span>
|
||||
</a>
|
||||
<a href="#" class="nav-item" onclick="showTab('stats')">
|
||||
<span class="nav-icon">📊</span>
|
||||
<span>Übersicht</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<script src="/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user