From e897c7d5637c5531380c9d9ac129d66f5a88a989 Mon Sep 17 00:00:00 2001
From: Tracker-Friendly
Date: Tue, 27 Feb 2024 20:04:26 +0000
Subject: [PATCH] Big
---
Makefile | 6 +-
createwebsite.sh | 14 ++
logout.html | 15 ++
org.hectabit.PageBurger.metainfo.xml | 16 +-
org.hectabit.PageBurger.svg | 291 ++++++++++++++++++++++-----
pageburger.c | 28 ++-
website/index.html | 44 ----
website/login/index.html | 1 +
website/logout/index.html | 2 +-
website/privacy/index.html | 8 +-
website/signup/index.html | 3 +-
website/static/css/style.css | 2 +-
website/static/js/login.js | 4 +-
website/static/js/main.js | 36 ++--
website/static/js/signup.js | 2 +-
15 files changed, 334 insertions(+), 138 deletions(-)
create mode 100755 createwebsite.sh
create mode 100644 logout.html
delete mode 100644 website/index.html
diff --git a/Makefile b/Makefile
index 21a1bc3..6085a74 100644
--- a/Makefile
+++ b/Makefile
@@ -28,11 +28,13 @@ clean:
install: pageburger
mkdir -p $(DESTDIR)
- cp pageburger $(DESTDIR)
+ mkdir -p $(SHAREDIR)/pageburger
+ cp pageburger $(SHAREDIR)/pageburger/
+ ln -sf $(SHAREDIR)/pageburger/pageburger $(DESTDIR)/pageburger
mkdir -p $(SHAREDIR)/icons/hicolor/scalable/apps/
mkdir -p $(SHAREDIR)/applications/
mkdir -p $(SHAREDIR)/metainfo/
cp org.hectabit.PageBurger.svg $(SHAREDIR)/icons/hicolor/scalable/apps/
cp org.hectabit.PageBurger.desktop $(SHAREDIR)/applications/
cp org.hectabit.PageBurger.metainfo.xml $(SHAREDIR)/metainfo/
- cp -r website $(SHAREDIR)/pageburger
+ cp -r website $(SHAREDIR)/pageburger/website
diff --git a/createwebsite.sh b/createwebsite.sh
new file mode 100755
index 0000000..646930d
--- /dev/null
+++ b/createwebsite.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+cd $(dirname "$(readlink -f "$0")")
+git clone https://centrifuge.hectabit.org/hectabit/burgernotes --depth=1
+cd burgernotes
+mkdir -p ../website/static ../website/app ../website/error ../website/login ../website/logout ../website/privacy ../website/signup
+cp -r static/* ../website/static
+cp templates/app.html ../website/app/index.html
+cp templates/error.html ../website/error/index.html
+cp templates/login.html ../website/login/index.html
+cp ../logout.html ../website/logout/index.html
+cp templates/privacy.html ../website/privacy/index.html
+cp templates/signup.html ../website/signup/index.html
+cd ..
+rm -rf burgernotes
diff --git a/logout.html b/logout.html
new file mode 100644
index 0000000..4d84463
--- /dev/null
+++ b/logout.html
@@ -0,0 +1,15 @@
+
+
+
+
+ Burgernotes
+
+
+
+Logging out..
+
diff --git a/org.hectabit.PageBurger.metainfo.xml b/org.hectabit.PageBurger.metainfo.xml
index 3a38218..e9acf0f 100644
--- a/org.hectabit.PageBurger.metainfo.xml
+++ b/org.hectabit.PageBurger.metainfo.xml
@@ -2,9 +2,9 @@
org.hectabit.PageBurger
- PageBurger
+ Burgernotes
Simple, private notes app
- Arzumify
+ Hectabit
MIT
GPL-3.0-or-later
@@ -50,6 +50,18 @@
+
+ https://centrifuge.hectabit.org/HectaBit/PageBurger-App/releases/tag/1.1
+
+ Release 1.1
+
+ - Make website local to prevent MITMs
+ - Make icon smaller
+ - Changed name
+ - Fixed developer name
+
+
+
https://centrifuge.hectabit.org/HectaBit/PageBurger-App/releases/tag/1.0-3
diff --git a/org.hectabit.PageBurger.svg b/org.hectabit.PageBurger.svg
index 2fa1b22..f985d62 100644
--- a/org.hectabit.PageBurger.svg
+++ b/org.hectabit.PageBurger.svg
@@ -1,55 +1,238 @@
-
+
+
diff --git a/website/signup/index.html b/website/signup/index.html
index 375f2cf..f2528eb 100644
--- a/website/signup/index.html
+++ b/website/signup/index.html
@@ -21,7 +21,8 @@
Please note that it's impossible to reset your password, do not forget it!
Already have an account? If so, Login instead!
+ Privacy & Terms
-
+
diff --git a/website/static/css/style.css b/website/static/css/style.css
index 5d40e2a..1eb19c1 100644
--- a/website/static/css/style.css
+++ b/website/static/css/style.css
@@ -170,7 +170,7 @@ body {
filter: invert(var(--invertdm));
padding-left: 17.5px;
padding-right: 17.5px;
- background-image: url("/static/svg/delete.svg");
+ background-image: url("../static/svg/delete.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 55%;
diff --git a/website/static/js/login.js b/website/static/js/login.js
index 7800374..e20da4c 100644
--- a/website/static/js/login.js
+++ b/website/static/js/login.js
@@ -118,7 +118,7 @@ signupButton.addEventListener("click", (event) => {
newpass: "null"
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -142,7 +142,7 @@ signupButton.addEventListener("click", (event) => {
newpass: await hashpass(password)
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
diff --git a/website/static/js/main.js b/website/static/js/main.js
index 3156b9e..2da1223 100644
--- a/website/static/js/main.js
+++ b/website/static/js/main.js
@@ -203,7 +203,7 @@ function updateUserInfo() {
secretKey: secretkey
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -214,7 +214,7 @@ function updateUserInfo() {
closeErrorButton.classList.add("hidden")
usernameBox.innerText = ""
setTimeout(function () {
- window.location.replace("https://notes.hectabit.org/api/logout")
+ window.location.replace("../logout/index.html")
}, 2500);
} else {
let responseData = await response.json()
@@ -236,7 +236,7 @@ usernameBox.addEventListener("click", (event) => {
updateUserInfo()
});
logOutButton.addEventListener("click", (event) => {
- window.location.replace("https://notes.hectabit.org/api/logout")
+ window.location.replace("../logout/index.html")
});
exitThing.addEventListener("click", (event) => {
optionsDiv.classList.add("hidden")
@@ -250,13 +250,13 @@ deleteMyAccountButton.addEventListener("click", (event) => {
secretKey: secretkey
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then((response) => {
if (response.status == 200) {
- window.location.href = "https://notes.hectabit.org/api/logout"
+ window.location.href = "../logout/index.html"
} else {
displayError("Failed to delete account (HTTP error code " + response.status + ")")
}
@@ -273,7 +273,7 @@ sessionManagerButton.addEventListener("click", (event) => {
secretKey: secretkey
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -295,15 +295,15 @@ sessionManagerButton.addEventListener("click", (event) => {
sessionText.title = responseData[i]["device"]
sessionRemoveButton.innerText = "x"
- sessionImage.src = "../static/svg/device_other.svg"
+ sessionImage.src = "/static/svg/device_other.svg"
ua = responseData[i]["device"]
if (ua.includes("NT") || ua.includes("Linux")) {
- sessionImage.src = "../static/svg/device_computer.svg"
+ sessionImage.src = "/static/svg/device_computer.svg"
}
if (ua.includes("iPhone" || ua.includes("Android") || ua.include ("iPod"))) {
- sessionImage.src = "../static/svg/device_smartphone.svg"
+ sessionImage.src = "/static/svg/device_smartphone.svg"
}
sessionRemoveButton.addEventListener("click", (event) => {
@@ -314,13 +314,13 @@ sessionManagerButton.addEventListener("click", (event) => {
sessionId: responseData[i]["id"]
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then((response) => {
if (responseData[i]["thisSession"] == true) {
- window.location.replace("https://notes.hectabit.org/api/logout")
+ window.location.replace("../logout/index.html")
}
});
sessionElement.remove()
@@ -365,7 +365,7 @@ function selectNote(nameithink) {
noteId: nameithink,
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.catch((error) => {
@@ -404,7 +404,7 @@ function selectNote(nameithink) {
content: encryptedText,
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -431,7 +431,7 @@ function updateNotes() {
secretKey: secretkey
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -466,7 +466,7 @@ function updateNotes() {
noteId: responseData[i]["id"]
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -506,7 +506,7 @@ newNote.addEventListener("click", (event) => {
noteName: encryptedName,
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.catch((error) => {
@@ -541,7 +541,7 @@ function exportNotes() {
secretKey: secretkey
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
@@ -601,7 +601,7 @@ removeBox.addEventListener("click", (event) => {
noteId: selectedNote
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
diff --git a/website/static/js/signup.js b/website/static/js/signup.js
index 4566a67..9452651 100644
--- a/website/static/js/signup.js
+++ b/website/static/js/signup.js
@@ -68,7 +68,7 @@ signupButton.addEventListener("click", (event) => {
password: await hashpass(password)
}),
headers: {
- "Content-type": "application/json; charset=UTF-8"
+ "Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)