From 8e67a28abd5afb6dd1f7e8ea72ff6bb1ac44d124 Mon Sep 17 00:00:00 2001 From: Michael Prior Date: Mon, 17 Nov 2025 17:37:28 +0100 Subject: [PATCH 01/31] Return Message Styles angefangen --- app/static/css/style.css | 10 +++++++++- app/static/js/functions.js | 10 +++++++--- app/static/js/index.js | 11 ++++++++--- app/templates/index.html | 24 ++++++++++++++++-------- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/app/static/css/style.css b/app/static/css/style.css index ff9a724..0ff2689 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -15,6 +15,10 @@ main { flex: 1; } +.container.hero { + margin-top: 10%; +} + /* Pico Tooltip Feature with newlines*/ .long-tooltip:before { white-space: wrap; @@ -118,7 +122,10 @@ button.info { } .tag-chip:hover, .tag-chip a, .tag-chip a:hover { text-decoration: none; - color: initial; + color: var(--pico-code-kbd-color); + } + .tag-chip a.remove:hover{ + color: var(--pico-color-red-500); } .tag-chip.category { background-color: cornflowerblue; @@ -126,6 +133,7 @@ button.info { .tag-chip.parsed { background-color: blueviolet; } + .tag-chip a { margin-left: 0.33em; color: var(--pico-secondary); diff --git a/app/static/js/functions.js b/app/static/js/functions.js index 0df5fdd..8929423 100644 --- a/app/static/js/functions.js +++ b/app/static/js/functions.js @@ -305,10 +305,12 @@ function manualTag(t_ids, tags, overwrite) { apiSubmit(api_function, tagging, function (responseText, error) { if (error) { - alert('Tagging failed: ' + '(' + error + ')' + responseText); + alert('Tagging fehlgeschlagen: ' + '(' + error + ')'); } else { - alert('Entries tagged successfully!' + responseText); + const success_msg = JSON.parse(responseText); + const counts = success_msg.updated != 1 ? success_msg.updated + ' Einträge' : success_msg.updated + ' Eintrag'; + alert(counts + ' getaggt'); window.location.reload(); } @@ -365,7 +367,9 @@ function manualCat(t_ids, cat) { alert('Tagging failed: ' + '(' + error + ')' + responseText); } else { - alert('Entries tagged successfully!' + responseText); + const success_msg = JSON.parse(responseText); + const counts = success_msg.updated != 1 ? success_msg.updated + ' Einträge' : success_msg.updated + ' Eintrag'; + alert(counts + ' kategorisiert'); window.location.reload(); } diff --git a/app/static/js/index.js b/app/static/js/index.js index 5059fb2..c8bfdf0 100644 --- a/app/static/js/index.js +++ b/app/static/js/index.js @@ -214,17 +214,22 @@ function uploadFile() { const fileInput = document.getElementById('file-input'); if (fileInput.files.length === 0) { - alert('Please select a file to upload.'); + alert('Es wurde keine Datei ausgewählt.'); return; } const params = { file: 'file-input', 'bank': bank_id}; // The value of 'file' corresponds to the input element's ID apiSubmit('upload/' + iban, params, function (responseText, error) { if (error) { - alert('File upload failed: ' + '(' + error + ')' + responseText); + //const error_msg = JSON.parse(responseText) || "unbekannter Fehler"; + //alert('Datei Upload fehlgeschlagen ' + '(' + error + '): ' + error_msg); + alert('Datei Upload fehlgeschlagen ' + '(' + error + ')'); } else { - if (confirm('File uploaded successfully!' + responseText + '\nKonto aufrufen?')) { + let success_msg = JSON.parse(responseText); + success_msg = 'Es wurden ' + success_msg.inserted + ' Transaktionen aus der ' + success_msg.size + + ' Byte großen Datei importiert.\n\nMöchtest du das Konto jetzt aufrufen?' + if (confirm(success_msg)) { window.location.href = '/' + iban; } else { prepareAddModal('add-iban', null, iban); diff --git a/app/templates/index.html b/app/templates/index.html index e3151db..d4be7ba 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -2,16 +2,20 @@ {% block content %} -
-

Pynance Parser

-

Manage your Bankaccounts like a Boss !

-
+
+
+

Pynance Parser

+

Manage Bankaccounts like a Boss !

+
+
-

- Importiere neue Kontoumsätze oder wähle die Übersicht aus, an der du weiterarbeiten möchtest. Das Konto wird bei einem Import automatisch erstellt. -

+
+

+ Importiere neue Kontoumsätze oder wähle die Übersicht aus, an der du weiterarbeiten möchtest. +

+
@@ -48,7 +52,11 @@

Pynance Parser

- + +
+

Das Konto wird bei einem Import automatisch erstellt.

+
+