From 56f457de9f2e0d648ad30ebd480a32bbd8a4e207 Mon Sep 17 00:00:00 2001 From: XenGi Date: Sat, 16 Aug 2025 13:20:56 +0200 Subject: [PATCH 1/5] Edit README.md --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 01902ea..930dd0b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Simple visit the webpage under [BezahlBrudi.jetzt](https://bezahlbrudi.jetzt), a # Installation -BezahlBrudi is a PWA that can be installed on your phone. It is a little different depending on the Browser and your OS. +BezahlBrudi is a Progressive Web Application (PWA) that can be installed on your phone. It is a little different depending on the Browser and your OS. | OS | Browser | Home Screen Shortcut | App Launcher | How to install | | ------- | -------- | -------------------- | ------------ | -------------- | @@ -18,7 +18,7 @@ BezahlBrudi is a PWA that can be installed on your phone. It is a little differe | Android | Vanadium | ✅ | ❌ | Under the `⋮` menu, `Install app` | | Android | Firefox | ✅ | ❌ | Under the `⋮` menu, `Add app to Home screen` | | iOS | Safari | ✅ | ✅ | Under the `Share` menu, `Add to Home Screen` | -| iOS | Firefox | ❓️ | ❓️ | I don't have an iPhone, please tell me how that works | +| iOS | Firefox | ✅ | ✅ | Under the `≡` menu, `Share`, `Add app to Home screen` | # Data privacy @@ -56,6 +56,3 @@ a-zA-Z0-9/?:\(\).,'\+-[:space:] --- Build with ❤️ and 🍝. - -*[PWA]: Progressive Web Application -*[OS]: Operating System From d5dabe40ed9fce95459e92dc47a94bb10aecefa5 Mon Sep 17 00:00:00 2001 From: XenGi Date: Sat, 16 Aug 2025 13:24:39 +0200 Subject: [PATCH 2/5] Edit README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 930dd0b..fe44a13 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ BezahlBrudi is a Progressive Web Application (PWA) that can be installed on your | OS | Browser | Home Screen Shortcut | App Launcher | How to install | | ------- | -------- | -------------------- | ------------ | -------------- | -| Android | Chrome | ✅ | ✅ | Tap the `Install as App` button or under the `⋮` menu, `Install app` | -| Android | Vanadium | ✅ | ❌ | Under the `⋮` menu, `Install app` | -| Android | Firefox | ✅ | ❌ | Under the `⋮` menu, `Add app to Home screen` | -| iOS | Safari | ✅ | ✅ | Under the `Share` menu, `Add to Home Screen` | -| iOS | Firefox | ✅ | ✅ | Under the `≡` menu, `Share`, `Add app to Home screen` | +| Android | Chrome | ✅ | ✅ | Tap the Install as App button or under the ⋮ menu, Install app | +| Android | Vanadium | ✅ | ❌ | Under the ⋮ menu, Install app | +| Android | Firefox | ✅ | ❌ | Under the ⋮ menu, Add app to Home screen | +| iOS | Safari | ✅ | ✅ | Under the Share menu, Add to Home Screen | +| iOS | Firefox | ✅ | ✅ | Under the ≡ menu, Share, Add to Home screen | # Data privacy From bf54c753d9da88e0fa4bf274e0318bf009ee3d66 Mon Sep 17 00:00:00 2001 From: XenGi Date: Sat, 16 Aug 2025 13:36:28 +0200 Subject: [PATCH 3/5] Edit README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe44a13..cd3f24e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ In an effort to reduce the usage of Paypal, I created this simple web app. It ca # How to use -Simple visit the webpage under [BezahlBrudi.jetzt](https://bezahlbrudi.jetzt), and put in your details. The QR code will be generated automatically. You can choose to save your details in your browsers local storage, so you don't have to input your bank details every time. +Simple visit the webpage under [BezahlBrudi.jetzt](https://bezahlbrudi.jetzt), and put in your details. The QR code will be generated automatically as you type. You can choose to save your details in your browsers local storage, so you don't have to input your bank details every time. # Installation From 57c9868a6fc7338e64f05500bf93f65a78f5d25d Mon Sep 17 00:00:00 2001 From: XenGi Date: Sat, 16 Aug 2025 13:39:44 +0200 Subject: [PATCH 4/5] Edit README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cd3f24e..206392f 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ BezahlBrudi is a Progressive Web Application (PWA) that can be installed on your | OS | Browser | Home Screen Shortcut | App Launcher | How to install | | ------- | -------- | -------------------- | ------------ | -------------- | -| Android | Chrome | ✅ | ✅ | Tap the Install as App button or under the ⋮ menu, Install app | -| Android | Vanadium | ✅ | ❌ | Under the ⋮ menu, Install app | -| Android | Firefox | ✅ | ❌ | Under the ⋮ menu, Add app to Home screen | -| iOS | Safari | ✅ | ✅ | Under the Share menu, Add to Home Screen | -| iOS | Firefox | ✅ | ✅ | Under the ≡ menu, Share, Add to Home screen | +| Android | Chrome | ✅ | ✅ | Tap the Install as App button or under the ⋮ menu, press Install app | +| Android | Vanadium | ✅ | ❌ | Under the ⋮ menu, press Install app | +| Android | Firefox | ✅ | ❌ | Under the ⋮ menu, press Add app to Home screen | +| iOS | Safari | ✅ | ✅ | Under the Share menu, press Add to Home Screen | +| iOS | Firefox | ✅ | ✅ | Under the ≡ menu, press Share, then Add to Home screen | # Data privacy From 83cef1824b0f2573e46581dbecee42f4e133f160 Mon Sep 17 00:00:00 2001 From: Ricardo Band Date: Sun, 17 Aug 2025 15:11:40 +0200 Subject: [PATCH 5/5] now multi lingual --- index.html | 97 ++++++++++++++++++++++++++++++++++++++++++++++------- js/index.js | 64 ++++++++++++++++++++++++++++++++++- 2 files changed, 147 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index b402406..84f090b 100644 --- a/index.html +++ b/index.html @@ -60,11 +60,33 @@ + +

BezahlBrudi

-

Transfer money without any 3rd parties

-

The QR code can be scanned by most banking apps. Give it a try!

+

+

@@ -73,7 +95,7 @@
- +
@@ -81,7 +103,7 @@
- +
@@ -89,16 +111,16 @@
- +
-

Only needed if the Sender and/or Receiver IBAN is outside the EU

+

- +
€ @@ -107,7 +129,7 @@
- +
@@ -117,7 +139,7 @@
@@ -134,14 +156,63 @@

- BezahlBrudi v1.1.0 by XenGi. - The source code is licensed MIT. Find the source code on GitLab. -
- This site doesn't store any data outside your browser, not even cookies. The "Remember me" function stores your data in your browsers local storage. This site doesn't provide any financial services. It is a simple QR code generator. + BezahlBrudi v1.2.0 by XenGi. + + The source code is licensed under MIT, you can find it here. +
+ This site doesn't store any data outside your browser, not even cookies. The "Remember data" function stores your data in your browsers local storage. This site doesn't provide any financial services. It is a simple QR code generator.

+ diff --git a/js/index.js b/js/index.js index 0b8076c..32a520c 100644 --- a/js/index.js +++ b/js/index.js @@ -1,10 +1,60 @@ +// bulma hamburger menu +document.addEventListener('DOMContentLoaded', () => { + // Get all "navbar-burger" elements + const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); + // Add a click event on each of them + $navbarBurgers.forEach(el => { + el.addEventListener('click', () => { + // Get the target from the "data-target" attribute + const target = el.dataset.target; + const $target = document.getElementById(target); + // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu" + el.classList.toggle('is-active'); + $target.classList.toggle('is-active'); + }); + }); +}); + +// language selector +document.getElementById("current-language").addEventListener("click", (e) => { + e.preventDefault(); + document.getElementById("language-dropdown").classList.toggle("is-active"); +}); + +const i18n = JSON.parse(document.getElementById("i18n-data").textContent); +const i18nSupported = Object.keys(i18n._flags) + +// build language selector +const langSelector = document.getElementById("language-selector") +for (const l of i18nSupported) { + const a = document.createElement("a"); + a.classList.add("navbar-item"); + a.innerHTML = `${i18n._flags[l]} ${l.toUpperCase()}`; + a.href = "#"; + a.addEventListener("click", (e) => { + changeLanguage(e.target.textContent.slice(-2).toLowerCase()); + document.getElementById("language-dropdown").classList.remove("is-active"); + }); + langSelector.appendChild(a); +} + +changeLanguage = (l) => { + const lang = i18nSupported.includes(l) ? l : "en"; + document.querySelectorAll("[data-i18n]").forEach(el => { + el.innerHTML = i18n[el.dataset.i18n][lang]; + }); + document.getElementById("current-language").innerHTML = `${i18n._flags[lang]} ${lang.toUpperCase()}`; + console.log(`Switching language to ${lang}`); +}; + saveFormData = () => { localStorage.setItem("bezahlbrudiFormData", JSON.stringify({ name: document.querySelector("#name input").value, iban: document.querySelector("#iban input").value.toUpperCase(), bic: document.querySelector("#bic input").value.toUpperCase(), amount: parseFloat(document.querySelector("#amount input").value).toFixed(2), - purpose: document.querySelector("#purpose input").value + purpose: document.querySelector("#purpose input").value, + lang: document.getElementById("current-language").textContent.slice(-2).toLowerCase() })); } @@ -224,6 +274,18 @@ if (savedData) { document.querySelector("#amount input").value = formData["amount"]; document.querySelector("#purpose input").value = formData["purpose"]; document.querySelector("#rememberme").checked = true; + changeLanguage(formData["lang"]); +} else { + // get browser language + let lang = "en"; // default fallback + for (const l of navigator.languages) { + const base = l.split("-")[0]; + if (i18nSupported.includes(base)) { + lang = base; + break; + } + } + changeLanguage(lang); } // Validate all fields to set css properties