From 72ee5f80c2dfd73d3d57e042bed54a38dcffd311 Mon Sep 17 00:00:00 2001 From: otibulai15 Date: Mon, 23 Feb 2026 10:24:30 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Local=20storage=20=C3=A4nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 14 ++++++++++++++ docs/Formular.md | 39 ++++++++++++++++++++++++++++++++++++++- gitcommands.txt/gitignore | 12 ++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 gitcommands.txt/gitignore diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..503fe88 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "msedge", + "request": "launch", + "name": "Open Formular.html", + "file": "c:\\Users\\OBulai\\Development\\BMI-Web-App-1\\src\\formular\\html\\formular.html" + } + ] +} \ No newline at end of file diff --git a/docs/Formular.md b/docs/Formular.md index 00983b1..bd80621 100644 --- a/docs/Formular.md +++ b/docs/Formular.md @@ -31,4 +31,41 @@ This part of the BMI calculator is responsible for **user input**. Users can ent 3. Click "BMI berechnen" 4. Result is displayed and saved 5. On reload: Data is still there -6. "Clear/Reset" deletes all data \ No newline at end of file +6. "Clear/Reset" deletes all data + + +## 💾 LocalStorage + +**Speicherort:** `localStorage['bmiData']` + +Daten werden nach der Berechnung als JSON-String gespeichert: + +```json +{ + "age": "25", + "date": "2025-02-23", + "weight": "75", + "height": "180", + "bmi": 23.1, + "category": "Normalgewicht", + "timestamp": "2025-02-23T14:30:45.123Z" +} +``` + +### Daten extrahieren +```javascript +// Einfaches Auslesen +const data = JSON.parse(localStorage.getItem('bmiData')); +console.log(data.bmi, data.category); + +// Mit Null-Check +if (localStorage.getItem('bmiData')) { + const data = JSON.parse(localStorage.getItem('bmiData')); + console.log('Gespeicherte Daten:', data); +} +``` + +### Daten löschen +```javascript +localStorage.removeItem('bmiData'); +``` \ No newline at end of file diff --git a/gitcommands.txt/gitignore b/gitcommands.txt/gitignore new file mode 100644 index 0000000..812cc91 --- /dev/null +++ b/gitcommands.txt/gitignore @@ -0,0 +1,12 @@ +git init +git checkout -b new_branch # create a new branch +git branch # what branches do I have? +git status + +git pull origin develop +git pull origin feature/Formular_Eingabe + +git push -u origin feature/Formular_Eingabe +git push -u origin develop + + From 8ec26c278456e0937794dc736bc61230c37fdd56 Mon Sep 17 00:00:00 2001 From: Kay Grewe <59564389+grewek@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:27:18 +0100 Subject: [PATCH 2/3] Delete gitcommands.txt/gitignore --- gitcommands.txt/gitignore | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 gitcommands.txt/gitignore diff --git a/gitcommands.txt/gitignore b/gitcommands.txt/gitignore deleted file mode 100644 index 812cc91..0000000 --- a/gitcommands.txt/gitignore +++ /dev/null @@ -1,12 +0,0 @@ -git init -git checkout -b new_branch # create a new branch -git branch # what branches do I have? -git status - -git pull origin develop -git pull origin feature/Formular_Eingabe - -git push -u origin feature/Formular_Eingabe -git push -u origin develop - - From b3a4893611ca86fcc1924ddd6842960815ad5342 Mon Sep 17 00:00:00 2001 From: Kamron Khakimov <107259358+kameronmazuda@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:28:03 +0100 Subject: [PATCH 3/3] Delete .vscode/launch.json --- .vscode/launch.json | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 503fe88..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "msedge", - "request": "launch", - "name": "Open Formular.html", - "file": "c:\\Users\\OBulai\\Development\\BMI-Web-App-1\\src\\formular\\html\\formular.html" - } - ] -} \ No newline at end of file