Compare commits

..

No commits in common. "main" and "1.3" have entirely different histories.
main ... 1.3

48 changed files with 4749 additions and 3250 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
.idea

View File

@ -1,3 +1,5 @@
# Burgernotes-web
# Burgernotes-client-web
Burgernotes web client
/static/img/background.jpg by perga (@pergagreen on discord)

View File

@ -1,38 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css"/>
<script type="text/javascript" src="/static/js/hash-wasm.js"></script>
<link rel="icon" href="/static/svg/favicon.svg">
<link rel="stylesheet" type="text/css" href="../static/css/style.css" />
<script type="text/javascript" src="../static/js/crypto-js.js"></script>
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<noscript>
<meta http-equiv="refresh" content="0; url=/login"/>
</noscript>
<body>
<div class="topBar" id="topBar">
<div class="modernToolbar">
<button class="usernameBox hidden" onclick="handleGesture()" id="backButton"><div class="vcenter"><img alt="Back arrow" src="/static/svg/arrow-back.svg"></div></button>
<button class="count" id="wordCountBox">0 words</button>
<button id="usernameBox" class="usernameBox"><div class="vcenter"><img alt="Account settings" src="/static/svg/acct-settings.svg"></div></button>
<div class="topBar">
<p tabindex="0" class="logo" id="burgerButton">Burgernotes</p>
<p tabindex="0" id="usernameBox" class="usernameBox"></p>
</div>
<div class="bottomBar">
<button id="removeBox" class="removeButton"></button>
<button id="wordCountBox">0 words</button>
<div class="textManipulator">
<button id="textMinusBox">-</button>
<button id="textSizeBox">16px</button>
<button id="textPlusBox">+</button>
</div>
</div>
<div id="notesBar" class="notesBar">
<button id="newNote" class="newNote" style="margin-left: 5px;">
<div class="vcenter"><img id="newNoteImage" draggable="false" alt="" src="/static/svg/add.svg"></div>
</button>
<button id="removeBox" class="newNote remove">
<div class="vcenter"><img id="deleteNoteImage" draggable="false" alt="" src="/static/svg/delete.svg"></div>
</button>
<button id="newNote" class="newNote"><img id="newNoteImage" draggable="false" alt=""
src="../static/svg/add.svg">New note</button>
<div id="notesDiv" class="notesDiv">
<button class="loadingStuff" id="loadingStuff">Meow :3</button>
<button class="loadingStuff" id="loadingStuff"></button>
</div>
</div>
@ -40,27 +48,18 @@
<div id="optionsDiv" class="optionsDiv hidden">
<button class="exit" id="exitThing">X</button>
<h3 class="w300">Your account</h3>
<p id="usernameThing">Cannot connect to the server</p>
<div class="section"></div>
<p>Device settings</p>
<div class="fontManipulator">
<div class="vcenter"><text>Font size</text></div>
<div class="vcenter textMinusBox"><button id="textMinusBox">-</button></div>
<div class="vcenter textSizeBox"><text style="background-color: rgba(0, 0, 0, 0) !important;" id="textSizeBox">16px</text></div>
<div class="vcenter"><button id="textPlusBox">+</button></div>
</div>
<p id="usernameThing"></p>
<p id="passwordThing"></p>
<div class="section"></div>
<p>Storage</p>
<progress id="storageProgressThing" value="0" max="100"></progress><br>
<p id="storageThing">Cannot connect to the server</p>
<p id="storageThing"></p>
<div class="section"></div>
<p>Account management</p>
<button id="deleteMyAccountButton"><img src="/static/svg/delete_forever.svg" alt="">Delete account</button>
<button id="changePasswordButton"><img src="/static/svg/password.svg" alt="">Change password</button>
<button id="exportNotesButton"><img src="/static/svg/download.svg" alt="">Export notes</button>
<button id="importNotesButton"><img src="/static/svg/upload.svg" alt="">Import notes</button>
<button id="sessionManagerButton"><img src="/static/svg/list.svg" alt="">View sessions</button>
<button class="lastButton" id="logOutButton"><img src="/static/svg/logout.svg" alt="">Log out</button>
<p>Account managment</p>
<button id="deleteMyAccountButton"><img src="../static/svg/delete_forever.svg">Delete my account</button>
<button id="exportNotesButton"><img src="../static/svg/download.svg">Export notes</button>
<button id="sessionManagerButton"><img src="../static/svg/list.svg">Session manager</button>
<button class="lastButton" id="logOutButton"><img src="../static/svg/logout.svg">Log out</button>
</div>
<div id="sessionManagerDiv" class="optionsDiv hidden">
<button class="exit" id="exitSessionsThing">X</button>
@ -70,38 +69,24 @@
<div class="sessionDiv" id="sessionDiv">
</div>
</div>
<div id="importDiv" class="optionsDiv hidden">
<button class="exit" id="exitImportThing">X</button>
<h3 class="w300">Import manager</h3>
<p>Import your notes from your device</p>
<div class="section"></div>
<button onclick="uploadThing.click()" id="importFile">Browse</button>
<button id="importFileConfirm">Upload</button>
</div>
<div id="errorDiv" class="optionsDiv hidden">
<p id="errorMessageThing"></p>
<input class="hidden" id="errorInput" type="text" placeholder=""><br>
<button style="margin-bottom: 5px;" class="normalButton hidden" id="browseButton" onclick="uploadThing.click()">Browse</button>
<input class="hidden" id="errorInput" type="text" placeholder=""><br></input>
<button class="normalButton" id="closeErrorButton">Ok</button>
<button class="normalButton hidden" id="cancelErrorButton">Cancel</button>
</div>
</div>
<div class="noteBox" id="noteBoxDiv">
<div id="noteBox" class="noteBoxText"></div>
</div>
<input type="file" id="uploadThing" class="hidden"> <!-- This is only ever .click()'d so it doesn't need to be styled -->
<textarea id="noteBox" class="noteBox"></textarea>
<script type="text/javascript" src="../static/js/main.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
for (let i = 0; i < 40; i++) {
notesDiv.appendChild(loadingStuff.cloneNode())
}
loadingStuff.remove()
})
for (let i = 0; i < 40; i++) {
notesDiv.appendChild(loadingStuff.cloneNode())
}
loadingStuff.remove()
</script>
<script src="/static/js/pell.js"></script>
<script type="text/javascript" src="/static/js/main.js"></script>
</body>
</html>

View File

@ -1,50 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Download Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
<meta content="Burgernotes" property="og:title" />
<meta content="A simple note-taking app!" property="og:description" />
<link rel="icon" href="/static/svg/favicon.svg">
</head>
<body>
<br><br><br>
<div class="mainDiv">
<div class="startDiv">
<h1>Download for your device</h1>
<p class="burgerText">We support <b>Windows</b>, <b>macOS</b>, <b>Linux</b> + <b>iOS</b> and <b>Android</b>. Below you may find instructions for all the platforms listed.</p>
<br>
</div>
<h3>Desktop</h3>
<div class="feature black"><h1>Windows</h1>
<p>We do not support your Windows natively yet, however you may use the web app.</p></div>
<div class="feature black"><h1>macOS</h1>
<p>We do not support your macOS natively yet, however you may use the web app.</p></div>
<div class="feature black"><h1>Linux</h1>
<p>Burgernotes is available as a Flatpak on Flathub!</p><br>
<a style="padding: 0; margin-top: 5px; background-color: rgba(0, 0, 0, 0);" href="https://flathub.org/apps/org.hectabit.Burgernotes">
<img height="65px" src="/static/svg/flathublight.svg"></div>
</a>
<h3>Mobile</h3>
<div class="feature black"><h1>Android</h1>
<p>We do not support your Android natively yet, however you may use the web app.</p></div>
<div class="feature black"><h1>iOS</h1>
<p>There's two different Burgernotes apps available: the webclip and the native app. We recommend using the webclip as the native app is outdated and may not work.</p>
<br>
<div class="hAlign downloadDiv">
<a href="/static/burgernotes.mobileconfig">Download Webclip (recommended)</a>
&nbsp
<a href="https://centrifuge.hectabit.org/HectaBit/Burgernotes-iOS/releases/download/b1.0.0/Burgernotes.ipa">Download Native (IPA)</a>
</div>
</div>
</div>
<br>
</body>
</html>

33
error/index.html Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="../static/css/style.css" />
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<body>
<h2 class="w300">{{ errorMessage }}</h2>
{{ errorCode }} | {{ errorMessage }}
</body>
<style>
body {
margin-left: 15px;
}
</style>
</html>

View File

@ -1,74 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Homeserver - Burgernotes</title>
<title>Signup - Burgernotes</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="../static/css/style.css">
<link rel="icon" href="/static/svg/favicon.svg">
<script src="/static/js/hash-wasm.js"></script>
<link rel="icon" href="./static/svg/favicon.svg">
<script src="../static/js/hash-wasm.js"></script>
</head>
<body>
<img src="/static/img/background.jpg" class="background" alt="">
<p class="credit">Image by perga (@pergagreen on discord)</p>
<img src="/static/img/background.jpg" class="background">
<div class="inoutdiv">
<noscript>
<style>
.checkMark {
width: inherit !important;
height: inherit !important;
display: block !important;
position: fixed !important;
left: 50%;
top: 50%;
transform: translate(calc(-50% - 125px), calc(-50% - 16px));
}
<h2 class="w300">Homeserver</h2>
<p>Change your Burgernotes homeserver</p>
<p id="statusBox"></p>
.noContent {
display: inherit;
}
.content {
display: none;
}
.checkMark:checked ~ .content {
display: inherit !important;
}
.checkMark:checked ~ .noContent {
display: none !important;
}
.checkMark:checked {
display: none !important;
}
</style>
</noscript>
<input type="checkbox" class="checkMark">
<div class="noContent">
<h2 style="display: block !important;">Your web browser is unsupported</h2>
<p>Please enable JavaScript in your web browser to continue</p>
<p style="margin-bottom: 135px;">False alarm? Click the checkmark to ignore this warning.</p>
</div>
<div class="content">
<h2>Alternative servers</h2>
<p>Enter your custom homeserver URL</p>
<div class="inputContainer" id="inputContainer">
<div class="vAlign"><span id="inputNameBox">URL:</span></div>
<input type="text" placeholder="https://example.org" id="homeserverBox"><br>
</div>
<p>Please put in the URL in standard format; https://, http://, etc.</p>
<button id="changeButton" class="clickButton">Change</button>
<button class="clickButton nonimportant" id="backButton">Cancel</button><br><br>
<p>A homeserver is the server that your notes and account are stored on.</p>
<p id="statusBox">Loading...</p>
</div>
<input type="text" value="https://" id="homeserverBox"><br>
<button id="changeButton">Change</button><br><br>
<p>Please put in the URL in standard format; https://, http://, etc.</p>
</div>
<script type="text/javascript" src="/static/js/homeserver.js"></script>
<script type="text/javascript" src="../static/js/homeserver.js"></script>
</body>
</html>

View File

@ -1,80 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
<link rel="stylesheet" type="text/css" href="./static/css/style.css" />
<meta content="Burgernotes" property="og:title" />
<meta content="A simple note-taking app!" property="og:description" />
<link rel="icon" href="/static/svg/favicon.svg">
<link rel="icon" href="./static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<p class="alertDiv">Burgernotes is shutting down on October 20th, read <a href="/shutdown">this FAQ</a> for more info</p>
<body>
<br><br><br>
<a href="https://notes.old.hectabit.org" class="hiddenButton">Click here</a>
<div class="mainDiv">
<div class="startDiv">
<h1>The safe home for your notes</h1>
<p class="burgerText">Burgernotes is the number one service for storing your <b>shopping list</b>, <b>tasks'n todos</b>, <b>code snippets</b> plus more. And it's totally free.</p>
<br>
<div class="hAlign downloadDiv">
<a href="/download"><div class="vAlign"><text>Download</text></div></a>
<div class="vAlign"><p> or </p></div>
<a href="/app"><div class="vAlign"><text>Open in your web browser</text></div></a>
</div>
<br><br>
<br>
</div>
<div class="startDiv">
<h1 class="w300">Burgernotes</h1>
<p>A simple note-taking service!</p>
<br>
<a href="./app/index.html">Open in your browser</a>
<div class="feature black">
<h1>Secure, always.</h1>
<p>Burgernotes features industry-leading end-to-end encryption, so you can write knowing your notes are secure and private.</p>
</div>
<a href="./static/burgernotes.mobileconfig" style="margin-top: 5px;">Download for iOS</a>
<div class="feature black">
<h1>For your device.</h1>
<p>Burgernotes features a simple, yet powerful user interface.</p>
<p>We support many devices, including Windows, macOS, Linux, ChromeOS + iOS and Android.</p>
</div>
<div class="feature" style="background-color: rgba(0, 0, 0, 0); margin-bottom: 0;">
<details>
<summary>Is Burgernotes open-source?</summary>
<br>
Burgernotes is licensed under the free and open-source license GNU AGPL v3.0, which guarantees your right to be able to use, modify, and share Burgernotes freely without restrictions.<br>
<br>Unlike many other services, both our client and server software is open source, allowing you to self-host Burgernotes if you'd like.
</details>
<br>
<details>
<summary>Is Burgernotes really free?</summary>
<br>
Yes! We offer 25MB of storage by default, however you may request more by emailing support@cta.social. <br>There's no catch to this, we promise not to sell your data, and we don't display ads.
</details>
<br>
<details>
<summary>How can I trust Burgernotes to keep my notes private and secure?</summary>
<br>
We use bleeding-edge industry-leading encryption (AES-256 CBC) to keep your notes secure.<br>End-to-end encryption ensures your notes are only visible to you, not us, or anyone else. Our source code is fully open, meaning anyone can audit our encryption.<br>Our encryption is constantly recieving updates to remain on the very tip of what is most secure.
</details>
<br>
<details>
<summary>Does Burgernotes accept donations?</summary>
<br>
Yes! Donations of any amount is appreciated to keep Burgernotes running. <br>You may donate at https://www.ailur.dev/donate, the non-profit software project behind Burgernotes.
</details>
</div>
<div class="links">
<a href="https://concord.hectabit.org/hectabit/burgernotes"><img src="/static/svg/code.svg" alt=""><div class="vAlign">Source Code</div></a>
<a href="/privacy"><img src="/static/svg/info.svg" alt=""><div class="vAlign">Privacy &amp; Terms</div></a>
<a href="https://discord.gg/8EbKTjmH2d"><img src="/static/svg/forum.svg" alt=""><div class="vAlign">Discord</div></a>
</div>
<br>
<a style="padding: 0; padding-bottom: 0; margin-top: 5px; background-color: rgba(0, 0, 0, 0);" href="https://flathub.org/apps/org.hectabit.Burgernotes">
<img class="flathubLogo" style="height: 55px;"src="./static/svg/flathublight.svg">
</a>
</div>
<br>
<div class="feature green">
<h7 class="w300">Secure</h7>
<p2>All your notes are fully end-to-end encrypted. Only you can read your notes, not anyone else.</p2>
</div>
<div class="feature yellow">
<h7 class="w300">Always up-to-date</h7>
<p2>Your notes seamlessly sync across your devices.</p2>
</div>
</div>
<div class="links">
<a href="https://centrifuge.hectabit.org/hectabit/burgernotes"><img src="./static/svg/code.svg">Source Code</a>
<a href="../privacy/index.html"><img src="./static/svg/info.svg">Privacy &amp; Terms</a>
<a href="https://discord.gg/8EbKTjmH2d"><img src="./static/svg/forum.svg">Discord</a>
</div>
<br>
</body>
</html>

View File

@ -1,75 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Sign in - Burgernotes</title>
<title>Login - Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
<script src="/static/js/hash-wasm.js"></script>
<link rel="icon" href="/static/svg/favicon.svg">
<link rel="stylesheet" type="text/css" href="../static/css/style.css" />
<script src="../static/js/hash-wasm.js"></script>
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<p class="alertDiv">Burgernotes is shutting down on November 12th, read <a href="/shutdown">this FAQ</a> for more info</p>
<body>
<img src="/static/img/background.jpg" class="background" alt="">
<p class="credit">Image by perga (@pergagreen on discord)</p>
<img src="/static/img/background.jpg" class="background">
<div class="inoutdiv">
<noscript>
<style>
.checkMark {
width: inherit !important;
height: inherit !important;
display: block !important;
position: fixed !important;
left: 50%;
top: 50%;
transform: translate(calc(-50% - 125px), calc(-50% - 16px));
}
.noContent {
display: inherit;
}
.content {
display: none;
}
.checkMark:checked ~ .content {
display: inherit !important;
}
.checkMark:checked ~ .noContent {
display: none !important;
}
.checkMark:checked {
display: none !important;
}
</style>
</noscript>
<input type="checkbox" class="checkMark">
<div class="noContent">
<h2 style="display: block !important;">Your web browser is unsupported</h2>
<p>Please enable JavaScript in your web browser to continue</p>
<p style="margin-bottom: 135px;">False alarm? Click the checkmark to ignore this warning.</p>
</div>
<div class="content">
<h2>Sign in</h2>
<p id="statusBox"></p>
<div class="inputContainer" id="inputContainer">
<div class="vAlign"><span id="inputNameBox"></span></div>
<input id="usernameBox" class="hidden" type="text" placeholder="Enter your username">
<input id="passwordBox" class="hidden" type="password" placeholder="Enter your password">
</div>
<button class="clickButton" id="signupButton">Next</button>
<button id="backButton" class="clickButton hidden nonimportant">Back</button>
<br><br>
<div style="display: flex;"><p class="hidden" id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a class="hidden" href="/homeserver">Change</a></div></div>
<a class="iconbutton" title="Change homeserver" href="/homeserver/"><div class="vcenter"><img src="/static/svg/server.svg" alt="Homeservers"></div></a>
<a href="/privacy/">Privacy &amp; Terms</a>
</div>
<h2 class="w300">Login</h2>
<p id="statusBox"></p>
<span id="inputNameBox" style="margin-right: 10px;color: var(--text-color);"></span>
<input id="usernameBox" class="hidden" type="text" placeholder="Enter your username">
<input id="passwordBox" class="hidden" type="password" placeholder="Enter your password">
<button id="signupButton">Next</button>
<button id="backButton" class="hidden">Back</button>
<br>
<br>
<p>Don't have an account? If so, <a href="../signup/index.html">Create one here!</a></p>
<div style="display: flex;"><p id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a href="/homeserver">Change</a></div></div>
<a href="../privacy/index.html">Privacy &amp; Terms</a>
</div>
<script type="text/javascript" src="../static/js/login.js"></script>

View File

@ -1,11 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" href="/static/svg/favicon.svg">
</head>
<p>Logging out...</p>
<script src="/static/js/logout.js"></script>
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
<head>
Logging out..
<script>
localStorage.removeItem("DONOTSHARE-secretkey")
localStorage.removeItem("DONOTSHARE-password")
localStorage.removeItem("CACHE-username")
window.location.replace("../login/index.html")
</script>

View File

@ -1,64 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css"/>
<script type="text/javascript" src="/static/js/hash-wasm.js"></script>
<script type="text/javascript" src="/static/js/crypto-js.js"></script>
<script type="text/javascript" src="/static/js/migrate.js"></script>
<link rel="icon" href="/static/svg/favicon.svg">
</head>
<body>
<img src="/static/img/background.jpg" class="background" alt="">
<div class="inoutdiv">
<noscript>
<style>
.checkMark {
width: inherit !important;
height: inherit !important;
display: block !important;
position: fixed !important;
left: 50%;
top: 50%;
transform: translate(calc(-50% - 125px), calc(-50% - 16px));
}
.noContent {
display: inherit;
}
.content {
display: none;
}
.checkMark:checked ~ .content {
display: inherit !important;
}
.checkMark:checked ~ .noContent {
display: none !important;
}
.checkMark:checked {
display: none !important;
}
</style>
</noscript>
<input type="checkbox" class="checkMark">
<div class="noContent">
<h2 style="display: block !important;">Your web browser is unsupported</h2>
<p>Please enable JavaScript in your web browser to continue</p>
<p style="margin-bottom: 135px;">False alarm? Click the checkmark to ignore this warning.</p>
</div>
<div class="content">
<h2 id="title">Burgernotes Migrator</h2>
<p id="information">Welcome to the Burgernotes Migration wizard! Before we begin migration, there are a few things you should know.</p>
<button onclick="buttonClick()" class="clickButton">Continue</button>
<button id="backButton" onclick="back()" class="clickButton nonimportant hidden">Back</button>
</div>
</div>
</body>
</html>

View File

@ -1,105 +1,85 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Burgernotes Privacy &amp; Terms</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
<link rel="icon" href="/static/svg/favicon.svg">
<script src="/static/js/back.js"></script>
<link rel="stylesheet" type="text/css" href="../static/css/style.css" />
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<body>
<h1 class="w300">Burgernotes Privacy Policy &amp; Terms & Conditions</h1>
<h2 class="w300">Preamble</h2>
<p><i>Please note that I am not a lawyer. If you find any issues in this privacy policy, please create an issue <a href="https://concord.hectabit.org/HectaBit/Burgernotes/issues/new">on our git repository</a>.</i></p>
<p><i>Please note that I am not a lawyer, please don't expect too much of this policy :3</i></p>
<p>Welcome to the Burgernotes privacy policy! Burgernotes is <a
href="https://concord.hectabit.org/hectabit/burgernotes">free & open source</a> software licensed under the <a
href="https://centrifuge.hectabit.org/hectabit/burgernotes">free & open source</a> software licensed under <a
href="https://www.gnu.org/licenses/agpl-3.0.en.html">GNU AGPL-3.0</a>.</p>
<p>In this document, the terms "we" and "us" refer to the Hectabit Project, an open source initiative and the creator of Burgernotes. The terms "you" and "the user" refer to the reader of this privacy policy and all users of Burgernotes. "This website" and "this service" refer to Burgernotes, an online website you are currently using.</p>
<p>We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. You are advised to review this Privacy Policy periodically for any changes.</p>
<h2 class="w300">Your rights</h2>
<p>You have the right to access, rectify, and erase your personal data. To exercise these rights, please contact us by email at admin@hectabit.org with the subject line "Burgernotes Privacy Rights." We will respond to your request as soon as possible.</p>
<h2 class="w300">Your Data</h2>
<p>Your data is stored 100% on-premise, meaning it remains within our infrastructure and is not accessible to third parties. Additionally, all note data is encrypted on your device using AES-GCM 256-bit encryption, as specified later. This ensures that even we cannot access the content of your notes.</p>
<h2 class="w300">Information collected when signing up</h2>
<p>When signing up for an account, we collect and store the following information:</p>
<ul>
<li class="w600">Username, and your password hashed</li>
<li>This is used to authenticate you into our service when you log in</li>
<li class="w600">Date of account creation</li>
<li>This is used so that we can see inactive accounts and suspend them</li>
<li class="w600">Web browser "User Agent"</li>
<li>This is used, so you are able to recognise your devices signing in to your account</li>
<li>Username, and your password hashed</li>
<li>Date of creating account</li>
<li>Web browser "User Agent"</li>
</ul>
<h2 class="w300">Information collected when logging in</h2>
<p>When logging back in to your account, we collect and store the following information:</p>
<ul>
<li class="w600">Web browser "User agent"</li>
<li>This is used, so you are able to recognise your devices signing in to your account</li>
<li>Web browser "User agent"</li>
</ul>
<h2 class="w300">Information we collect while using our services</h2>
<p>When you create a note, we collect and use this information:</p>
<p>When you create an note, we collect and use this information:</p>
<ul>
<li class="w600">Encrypted note content and title</li>
<li>This is used so that you may retrieve the note later</li>
<li class="w600">Note creator</li>
<li>This is used so that we can make sure your note is not given to anyone else</li>
<li class="w600">Note creation date</li>
<li>This is used so that your notes are listed by age if no edited date exists</li>
<li class="w600">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
<li>Encrypted note content and title</li>
<li>Note creator</li>
<li>Note creation date</li>
<li>Note last edited date</li>
</ul>
<p>When you edit a note, we collect and use this information:</p>
<p>When you edit an note, we collect and use this information:</p>
<ul>
<li class="w600">Encrypted note content and title</li>
<li>This is used so that you may retrieve the note later</li>
<li class="w600">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
<li>Encrypted note content and title</li>
<li>Note last edited date</li>
</ul>
<h2 class="w300">How we use your data</h2>
<p>We use your data to make our services work. We don't share your information with third-parties.</p>
<h2 class="w300">We can't see the content and title of the notes you create</h2>
<p>Your notes are <a href="https://en.wikipedia.org/wiki/End-to-end_encryption">encrypted end-to-end</a> using <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>-<a href="https://en.wikipedia.org/wiki/Galois/Counter_Mode">GCM</a> (Advanced Encryption Standard - Galois / Counter Mode) 256-bit encryption.</p>
<h2 class="w300">We can't see notes you create's content and title</h2>
<p>Your notes are <a href="https://en.wikipedia.org/wiki/End-to-end_encryption">encrypted end-to-end</a> using AES
(Advanced Encryption Standard) 256-bit encryption.</p>
<p>We can only see:</p>
<ul>
<li class="w600">Note creation date</li>
<li>This is used so that your notes are listed by age if no edited date exists</li>
<li class="w600">Note last edited date</li>
<li>This is used so that your notes are listed by age</li>
<li class="w600">Note creator</li>
<li>This is used so that we can make sure your note is not given to anyone else</li>
</ul>
<p><b>Not</b> note content or title.</p>
<h2 class="w300">Use of cookies</h2>
<p>Burgernotes does not use cookies in the conventional sense. Burgernotes places information into localStorage, a type of blob storage similar to cookies, but not accessible to third-party websites or the server.</p>
<p>This ensures that a malicious server or third-party websites cannot tell your information.</p>
<ul>
<li class="w600">PRIVATE-secretKey</li>
<li>This is used by the client to send to the server in order to identify you as... you.</li>
<li>This contains no useful information and is simply a string of random bytes. If this is shared, you may simply remove the offending secretKey from your session list, by clicking "X" on the device you have logged in on to create this key.</li>
<li class="w600">PRIVATE-cryptoKey</li>
<li>This is used by the aforementioned AES to encrypt and decrypt your notes. It never leaves your device.</li>
<li>This is derived from your password and is therefore sensitive and should NEVER, EVER be shared. If you have done so, change your password as soon as possible.</li>
<li class="w600">SETTING-fontsize</li>
<li>This is used to determine the size of your font. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
<li class="w600">SETTING-newVersion</li>
<li>This determines if you have seen the "What's New?" dialog displayed in each new version. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
<li class="w600">SETTING-homeServer</li>
<li>This determines which server Burgernotes should connect to. It is not sensitive information and can be freely shared, though it never leaves your device.</li>
<li>Note creation date</li>
<li>Note last edited date</li>
<li>Note creator</li>
</ul>
<p>Not note content or title.</p>
<h2 class="w300">We don't sell your data</h2>
<p>We don't sell or share your data to advertisers or third-parties, and no such thing exists on this website - it is entirely self-contained. Not even an external font service is used.</p>
<p>We don't sell or share your data to advertisers or third-parties.</p>
<h2 class="w300">Liability</h2>
<p>We take no responsibility for the use of Burgernotes, or any external instances provided by third-parties. We refuse liability for any inappropriate or illegal use of Burgernotes, as it is not within our power to prevent it.</p>
<p>This is a summarization of the below paragraph, found in AGPL-3.0, as linked above.</p>
<p class="w500">IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
<p>Burgernotes comes with <b>ABSOLUTELY NO WARRANTY</b>, to the extent permitted by applicable law.</p>
<p>Burgernotes is compatible with the UK GDPR and the Californian Data Protection Regulation. We do not knowingly serve citizens in the European Union, and those who do so at their own risk. The only violating law of the EU GDPR is that it is no longer hosted in an EU country after the events of Brexit.</p>
<p>We take no responsibility for the use of burgernotes, or any external instances provided by third-parties. We
refuse liability for any inappropriate or illegal use of burgernotes.</p>
<p>You may view the AGPL-3.0 license which this software is provided to you with. A copy of the section is below.</p>
<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<br>
<button class="clickButton" onclick="back()">Take me back where I was!</button>
<button onclick="if(document.referrer!==' '){if(document.referrer!==''){window.location.href=document.referrer;}else{window.location.href='../index.html';}window.location.href=document.referrer; }else{window.location.href='../index.html';}" style="cursor: pointer; padding: 15px 20px;margin-right: auto;color: white;text-decoration: none;background-color: var(--theme-color);border-radius: 8px;border: medium;font-size: 15px;">Take me back where I was!</button>
<br><br>
</body>

View File

@ -1,85 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="/static/css/style.css" />
<link rel="icon" href="/static/svg/favicon.svg">
</head>
<body>
<h1 class="w300">Burgernotes Discontinuation FAQ</h1>
After a year in operation, on October 20th 2024, Burgernotes will shut down.
<br><br>
You might be asking, how will this affect me?
<ul>
<li>You'll no longer be able to access Burgernotes, and all of your notes.</li>
<li>You may download your notes before October 20th.</li>
<li>Your data will be permanently deleted after October 20th, 2024.</li>
<li>Third-party instances will be unaffected, but will likely no longer be maintained.</li>
<li>As of October 15th, 2024, you may no longer create a new Burgernotes account.</li>
</ul>
<h2 class="w300">Downloading your notes</h2>
You may download your notes until October 20th. To do this:
<ul>
<li>Open Burgernotes</li>
<li>Open the settings menu</li>
<li>Press "Export notes"</li>
</ul>
Your notes will be saved to a JSON file.
<h2 class="w300">The future</h2>
Burgernotes is not gone forever - we are rebasing and starting from scratch to give you an even better product.
In the meantime, you can use:
<ul>
<li>Standard Notes - a noting app very similar to Burgernotes</li>
<li>Joplin - A pretty powerful note-taking app</li>
</ul>
<h2 class="w300">Special thanks</h2>
Special thanks to all of these amazing people that made Burgernotes possible:
<ul>
<li>hippoz</li>
<li>ctapak</li>
<li>Mollomm1</li>
<li>Arzumify</li>
<li>Maaa</li>
<li>Karimrir</li>
<li>Pandarose</li>
<li>Neptune</li>
<li class="hidden" id="youThing"></li>
</ul>
</body>
<style>
body {
margin-left: 15px;
@media (prefers-color-scheme: dark) {
color: white !important;
}
}
</style>
<script>
fetch(localStorage.getItem("SETTING-homeServer") + "/api/userinfo", {
method: "POST",
body: JSON.stringify({
secretKey: localStorage.getItem("PRIVATE-secretKey")
}),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
})
.then((response) => {
async function doStuff() {
let responseData = await response.json()
if (response.status === 200) {
let youThing = document.getElementById("youThing")
youThing.classList.remove("hidden")
youThing.innerText = "You, " + responseData["username"] + ", for using Burgernotes!"
}
}
doStuff()
})
</script>
</html>

39
signup/index.html Normal file
View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>Signup - Burgernotes</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="../static/css/style.css" />
<script src="../static/js/hash-wasm.js"></script>
<link rel="icon" href="../static/svg/favicon.svg">
<script>
if (window.location.href.endsWith('/index.html')) {
if (window.location.origin !== null) {
var currentUrl = window.location.href;
var newUrl = currentUrl.replace('/index.html', '');
window.location.href = newUrl;
}
}
</script>
</head>
<body>
<p class="credit">Image by perga (@pergagreen on discord)</p>
<img src="/static/img/background.jpg" class="background">
<div class="inoutdiv">
<h2 class="w300">Signup</h2>
<p>Signup for a Burgernotes account</p>
<p id="statusBox"></p>
<input id="usernameBox" type="text" placeholder="Username">
<input id="passwordBox" type="password" placeholder="Password"><br>
<button id="signupButton">Signup</button><br><br>
<p>Already have an account? If so, <a href="../login/index.html">Login</a> instead!</p>
<p>Please note that it's impossible to reset your password, do not forget it!</p>
<div style="display: flex;"><p id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a href="/homeserver">Change</a></div></div>
<a href="../privacy/index.html">Privacy &amp; Terms</a>
</div>
<script type="text/javascript" src="../static/js/signup.js"></script>
</body>

File diff suppressed because one or more lines are too long

View File

@ -1,59 +1,46 @@
@import url("/static/fonts/inter.css");
@import url("/static/fonts/space-grotesk.css");
@import url("../fonts/inter.css");
:root {
--contrast: #eee;
--contrast2: #fff;
--bar: #FAFAFA;
--invertdm: 0%;
--bar: #f4f4f4;
--editor: #ffffff;
--text-color: #000000;
--border-color: #dcdcdc;
--theme-color: #1c71d8;
--note-theme-color: #CDE1EC;
--hover-theme-color: #4990e7;
--nonimporant-theme-color: #EBEBEB;
--hover-nonimportant-theme-color: #dbdbdb;
--nonimportant-text-color: #000;
--portal-background-color: #FAFAFA;
--border-color: #dadada;
--theme-color: #157efb;
--theme-text-color: #ffffff;
--exit-color: #e9e9e9;
--session-color: #f4f4f4;
--note-button: #ffffff;
--note-button-hover: #eeeeee;
--note-button-text-color: #000;
--note-button-text-color: #ffffff;
--unselected-note-button-text-color: #000000;
--option-background: #ffffff;
--icon-button-hover: #ececec;
--invertdm: 0%;
--invert: 100%;
--bottomBarHover: #e4e4e4;
}
/* dark mode */
@media (prefers-color-scheme: dark) {
:root {
--contrast: #323436;
--contrast2: #202124;
--bar: #242424;
--editor: #1E1E1E;
--invertdm: 100%;
--contrast: #2d2f21;
--contrast2: #2d2f21;
--bar: #2d2f31;
--editor: #202124;
--text-color: #ffffff;
--border-color: #393b3d;
--theme-color: #3584e4;
--note-theme-color: #293B53;
--hover-theme-color: #4990e7;
--nonimporant-theme-color: #4A4A4A;
--hover-nonimportant-theme-color: #595959;
--nonimportant-text-color: #fff;
--portal-background-color: #242424;
--theme-color: #157efb;
--theme-text-color: #ffffff;
--exit-color: #454649;
--session-color: #2d2f31;
--note-button: #202124;
--note-button-hover: #2a2c2f;
--note-button-text-color: #ffffff;
--unselected-note-button-text-color: #ffffff;
--option-background: #242424;
--icon-button-hover: #333333;
--invertdm: 100%;
--option-background: #202124;
--invert: 100%;
--bottomBarHover: #e4e4e4;
}
.startDiv p {
@ -68,6 +55,10 @@
color: white !important;
}
.newNote img {
filter: invert(100%);
}
#errorDiv p {
color: white !important;
}
@ -105,17 +96,6 @@
background-color: rgba(0, 0, 0, 0) !important;
color: var(--text-color);
}
.mainDiv {
color: white !important;
}
.mainDiv .black {
background-color: var(--bar) !important;
}
.mainDiv .black p {
background-color: var(--bar) !important;
}
.mainDiv .yellow {
border-color: #e9e98d !important;
}
@ -139,18 +119,20 @@ h6 {
h7 {
display: block;
font-size: 20px;
margin: 0.67em 0;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
}
body {
margin: 0;
background-color: var(--editor);
font-family: "Inter", sans-serif;
color: var(--text-color);
}
.hiddenButton {
right: 0;
right: 0px;
position: fixed;
background-color: var(--editor);
color: var(--editor);
@ -160,18 +142,62 @@ body {
/* Web app */
.topBar {
position: fixed;
right: 0;
width: calc(100% - 181px);
width: 100%;
height: 50px;
background-color: var(--bar);
border: none;
border: solid;
border-color: var(--border-color);
border-width: 0;
border-width: 0px;
border-bottom-width: 1px;
}
.bottomBar {
position: fixed;
width: 100%;
height: 29px;
bottom: 0;
background-color: var(--bar);
border: solid;
border-color: var(--border-color);
border-width: 0px;
border-top-width: 1px;
display: flex;
background-color: var(--editor);
z-index: -1;
}
.bottomBar button {
background-color: rgba(0, 0, 0, 0);
color: var(--text-color);
height: 100%;
border: none;
font-size: 14px;
padding-left: 7.5px;
padding-right: 7.5px;
}
.bottomBar .removeButton {
filter: invert(var(--invertdm));
padding-left: 17.5px;
padding-right: 17.5px;
background-image: url("../../static/svg/delete.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 55%;
}
.bottomBar .textManipulator {
margin-left: auto;
}
.bottomBar button:hover {
background-color: var(--bottomBarHover);
}
.bottomBar .right {
float: right;
}
.burgerDropdown {
@ -183,6 +209,7 @@ body {
height: 90px;
background-color: var(--bar);
border: solid;
border-color: var(--border-color);
border-width: 1px;
@ -210,100 +237,48 @@ body {
display: inline-block;
}
.topBar .modernToolbar {
margin-left: auto;
margin-right: 5px;
display: flex;
width: 100%;
overflow-x: auto;
}
.topBar .modernToolbar .count {
color: var(--text-color);
background-color: rgba(0, 0, 0, 0);
border: none;
font-size: 15px;
margin-left: auto;
}
.topBar .modernToolbar .textmod {
cursor: pointer;
filter: invert(var(--invertdm));
height: 41px;
width: 41px;
line-height: 41px;
text-align: left;
font-size: 16px;
margin-top: 5px;
background-color: rgba(0, 0, 0, 0);
border-radius: 99px;
border: none;
transition: 0.125s;
}
.topBar .textmod img {
height: 22px;
filter: invert(var(--invertdm));
}
.topBar .textmod:hover {
background-color: var(--icon-button-hover);
.topBar .logo {
padding-left: 12px;
}
.topBar .usernameBox {
padding: 5px;
text-align: right;
position: absolute;
cursor: pointer;
height: 41px;
width: 41px;
line-height: 41px;
text-align: left;
font-size: 16px;
margin-top: 5px;
background-color: rgba(0, 0, 0, 0);
border-radius: 8px;
border: none;
transition: 0.125s;
right: 12px;
}
.topBar .usernameBox:hover {
background-color: var(--icon-button-hover);
}
.topBar .usernameBox img {
filter: invert(var(--invertdm));
height: 22px;
}
.notesBar {
position: fixed;
width: 180px;
height: calc(100%);
top: 50px;
height: calc(100% - 50px - 30px - 1px);
background-color: var(--bar);
border: solid;
border-color: var(--border-color);
border-width: 0;
border-width: 0px;
border-right-width: 1px;
border-top-width: 1px;
}
.notesDiv {
display: flex;
flex-direction: column;
height: calc(100% - 50px);
overflow-y: auto;
overflow-y: scroll;
}
.notesBar .noteButton, .notesBar .loadingStuff {
width: calc(100% - 7px - 3px);
width: calc(100% - 7px - 7px - 3.5px);
height: 35px;
min-height: 35px;
line-height: 0;
line-height: 0px;
padding: 10px;
margin: 5px 5px 0;
background-color: var(--bar);
margin: 5px;
margin-bottom: 0;
background-color: var(--note-button);
color: var(--unselected-note-button-text-color);
border-radius: 8px;
border: none;
border: solid;
border-color: var(--border-color);
border-width: 1px;
font-size: 15px;
@ -312,141 +287,64 @@ body {
cursor: pointer;
white-space: nowrap;
overflow-x: hidden;
transition: 0.125s;
}
.notesBar .noteButton:hover {
background-color: var(--note-button-hover);
}
.notesBar .loadingStuff {
border: none;
background:
linear-gradient(0.25turn, transparent, var(--contrast2), transparent),
linear-gradient(var(--contrast), var(--contrast)),
radial-gradient(38px circle at 19px 19px, #eee 50%, transparent 51%),
linear-gradient(var(--contrast), var(--contrast));
linear-gradient(0.25turn, transparent, var(--contrast2), transparent),
linear-gradient(var(--contrast), var(--contrast)),
radial-gradient(38px circle at 19px 19px, #eee 50%, transparent 51%),
linear-gradient(var(--contrast), var(--contrast));
background-repeat: no-repeat;
background-size: 200% 200%, 100% 200%, 50% 50%, 140% 12%;
background-position: -200% 0, 0 0, 0 76%, 16% 78%;
background-size: 315px 250px, 315px 180px, 100px 100px, 225px 30px;
background-position: -315px 0, 0 0, 0px 190px, 50px 195px;
animation: loading 1.5s infinite;
}
@keyframes loading {
to {
background-position: 200% 0, 0 0, 0 76%, 16% 78%;
background-position: 315px 0, 0 0, 0 190px, 50px 195px;
}
}
.notesBar .selected {
background-color: var(--note-theme-color) !important;
background-color: var(--theme-color) !important;
border: none;
color: var(--note-button-text-color);
}
.notesBar .selected:hover {
background-color: var(--note-theme-color) !important;
}
.notesBar .newNote {
height: 41px;
width: 41px;
line-height: 41px;
width: 100%;
text-align: left;
font-size: 16px;
cursor: pointer;
margin-top: 5px;
background-color: var(--bar);
border-radius: 8px;
background-color: rgba(0, 0, 0, 0);
border: none;
transition: 0.125s;
padding: 0;
}
.notesBar .remove {
position: absolute;
right: 5px;
}
.notesBar .newNote:hover {
background-color: var(--icon-button-hover);
font-size: 16px;
margin-bottom: 5px;
cursor: pointer;
}
.notesBar .newNote img {
scale: 0.5;
filter: invert(var(--invertdm));
height: 32px;
padding-right: 5px;
transform: translateY(30%);
}
.noteBox {
resize: none;
position: fixed;
right: 0;
top: 35px;
top: 55px;
padding: 4px;
border: none;
font-size: 16px;
color: var(--text-color);
background-color: rgba(0, 0, 0, 0);
width: calc(100% - 200px);
height: calc(100% - 40px);
font-family: "Inter", sans-serif;
margin: 10px;
outline: none;
z-index: -1;
}
.noteBox.mobile {
margin: 15px 0 0;
height: calc(100% - 75px);
}
.noteBoxText {
background-color: var(--editor);
color: var(--text-color);
border: none;
width: 100%;
height: 100%;
width: calc(100% - 180px - 7px - 6px);
height: calc(100% - 50px - 6px - 8px - 30px);
font-family: "Inter", sans-serif;
outline: none;
margin-top: 5px;
}
.pell-content {
width: 100%;
height: calc(100% - 20px);
overflow-y: scroll;
}
.pell-button {
color: var(--text-color);
background-color: var(--note-button);
border: 1px var(--border-color) solid;
min-width: 35px;
max-width: 35px;
height: 35px;
margin-left: 1px;
margin-right: 1px;
border-radius: 10px;
}
button:hover {
background-color: var(--note-button-hover);
}
.pell-actionbar {
display: flex;
margin-bottom: 5px;
overflow-x: auto;
position: fixed;
top: 8px;
}
@media only screen and (max-width: 860px) {
.pell-actionbar {
position: inherit;
}
.noteBox {
height: calc(100% - 50px - 30px);
}
}
.noteBox:focus {
@ -471,40 +369,35 @@ button:hover {
padding: 10px;
color: var(--text-color);
border-radius: 8px;
width: 300px;
min-width: 300px;
z-index: 3;
display: flex;
flex-direction: column;
max-width: 90%;
max-height: 90%;
overflow-y: auto;
}
.optionsDiv button {
width: 100%;
padding: 10px;
padding-bottom: 13px;
margin-right: 5px;
margin-bottom: 7px;
background-color: var(--nonimporant-theme-color);
padding-left: 15px;
padding-right: 15px;
color: var(--theme-text-color);
border: none;
text-decoration: none;
color: var(--nonimportant-text-color);
border-radius: 10px;
background-color: var(--theme-color);
border-radius: 8px;
cursor: pointer;
font-size: 15px;
transition: 0.125s;
}
.optionsDiv button:hover {
background-color: var(--hover-nonimportant-theme-color);
}
.optionsDiv .normalButton {
width: auto;
margin-bottom: 0;
margin-bottom: 0px;
}
.optionsDiv .lastButton {
margin-bottom: 0;
margin-bottom: 0px;
}
.optionsDiv input {
@ -517,12 +410,14 @@ button:hover {
border: solid;
border-color: var(--border-color);
border-width: 1px;
border-radius: 10px;
border-radius: 8px;
}
.optionsDiv .mfacheckbox {
display: inline;
margin: 0 0 12px 5px;
margin: 0;
margin-left: 5px;
margin-bottom: 12px;
padding: 0;
height: 17px;
width: 17px;
@ -552,7 +447,7 @@ button:hover {
background: var(--theme-color);
}
.optionsDiv progress::-webkit-progress-value {
.optionsDiv progresss::-webkit-progress-value {
background: var(--theme-color);
}
@ -568,177 +463,93 @@ button:hover {
}
.optionsDiv img {
height: 20px;
height: 18px;
padding-right: 5px;
position: absolute;
left: 20px;
scale: 1.2;
filter: invert(var(--invertdm))
filter: invert(var(--invert));
transform: translateY(3.25px);
}
.optionsDiv .section {
width: 100%;
border-top: var(--border-color) solid 1px;
height: 1px;
background-color: var(--border-color);
margin-top: 2px;
margin-bottom: 10px;
}
.optionsDiv .fontManipulator {
display: flex;
}
.optionsDiv .fontManipulator .vcenter {
height: auto;
}
.optionsDiv .fontManipulator button {
width: 44px;
background-color: var(--nonimporant-theme-color);
color: var(--nonimportant-text-color);
transition: 0.125s;
margin-bottom: 0;
}
.optionsDiv .fontManipulator button:hover {
background-color: var(--hover-nonimportant-theme-color);
}
.optionsDiv .fontManipulator .textMinusBox {
margin-left: auto;
}
.optionsDiv .fontManipulator .textSizeBox {
margin-left: 5px;
margin-right: 5px;
}
.sessionDiv {
max-height: 255px;
overflow-y: auto;
min-height: 20px;
}
.sessionDiv div {
position: relative;
background-color: var(--session-color);
border-radius: 8px;
margin-bottom: 5px;
padding: 10px 10px 0;
display: flex;
padding: 10px;
height: 35px;
}
.sessionDiv div p {
display: inline;
overflow-wrap: anywhere;
margin: 0 10px 10px;
position: absolute;
transform: translateY(-7.5px);
}
.sessionDiv div button {
position: static;
position: absolute;
border-radius: 99px;
max-width: 40px;
min-width: 40px;
margin-left: auto;
right: 15px;
width: 40px;
height: 40px;
font-size: 16px;
transform: translateY(-2px);
}
.sessionDiv img {
display: inline;
filter: invert(var(--invertdm));
height: 35px;
position: static;
margin-right: 5px;
filter: none;
height: 100%;
}
/* Sign up/log in div */
.inoutdiv {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
position: fixed;
min-width: 585px;
min-height: 270px;
border-radius: 16px;
padding: 35px;
background-color: var(--portal-background-color);
}
.noContent {
display: none;
}
.inoutdiv .checkMark {
display: none;
}
.inoutdiv h2 {
font-family: "Space Grotesk", sans-serif;
font-optical-sizing: auto;
}
.inoutdiv .inputBox {
width: 100%
}
.inoutdiv .inputContainer {
display: flex;
width: 100%;
margin-right: 30px;
margin-bottom: 10px;
}
.inoutdiv table {
margin-right: 30px;
border-radius: 8px;
margin: 10%;
padding: 30px;
border: solid 1px var(--border-color);
background-color: var(--bar);
}
.inoutdiv input {
width: 100%;
margin-left: 10px;
width: calc(100% - 120px);
height: 30px;
margin-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
border: solid;
border-color: var(--border-color);
border-width: 1px;
border-radius: 6px;
border-radius: 8px;
}
.inoutdiv input:focus {
outline: none;
border-color: var(--hover-theme-color)
}
.clickButton {
.inoutdiv button {
background-color: var(--theme-color);
color: white;
padding: 10px;
margin-right: 5px;
padding: 10px 20px;
padding-left: 20px;
padding-right: 20px;
border: none;
border-radius: 25px;
border-radius: 8px;
font-size: 14px;
transition: 0.125s;
}
.clickButton:hover {
background-color: var(--hover-theme-color);
}
@media (prefers-reduced-motion) {
.inoutdiv button {
transition: none !important;
}
}
.inoutdiv .nonimportant {
background-color: var(--nonimporant-theme-color);
color: var(--nonimportant-text-color)
}
.inoutdiv .nonimportant:hover {
background-color: var(--hover-nonimportant-theme-color);
}
.inoutdiv a {
@ -746,61 +557,12 @@ button:hover {
text-align: center;
}
.inoutdiv .iconbutton {
position: absolute;
right: 15px;
bottom: 15px;
width: 41px;
height: 41px;
border: none;
border-radius: 99px;
transition: 0.125s;
}
.inoutdiv .iconbutton img {
height: 20px;
filter: invert(var(--invertdm));
}
.inoutdiv .iconbutton:hover {
background-color: var(--hover-nonimportant-theme-color);
}
@media only screen and (max-width: 600px) {
.inoutdiv {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border-radius: 0;
min-width: calc(100% - 10px);
min-height: 100%;
transform: none;
padding: 5px;
overflow-y: scroll;
}
.inoutdiv p {
font-size: 14px;
}
.inoutdiv h2 {
font-size: 21px;
}
}
.background {
position: fixed;
z-index: -2;
top: 0;
width: 100%;
height: 100%;
object-fit: cover;
-webkit-user-drag: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
pointer-events: none;
min-height: 100%;
}
.credit {
@ -816,13 +578,6 @@ button:hover {
display: none !important;
}
.vcenter {
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
}
.w100 {
font-weight: 300;
}
@ -876,79 +631,45 @@ button:hover {
}
.startDiv {
}
.startDiv h1 {
font-family: "Space Grotesk", sans-serif;
font-optical-sizing: auto;
font-size: 48px;
}
.startDiv p {
font-size: 18px;
}
.hAlign {
justify-content: center;
display: flex;
}
.vAlign {
justify-content: center;
text-align: left;
margin-top: 8vh;
margin-left: 7vh;
display: flex;
flex-direction: column;
}
.downloadDiv {
flex-wrap: wrap;
}
.downloadDiv p {
.startDiv h1 {
margin: 0;
}
.downloadDiv a {
margin: 0 !important;
}
.mainDiv a {
padding: 15px 20px;
padding: 15px;
padding-left: 20px;
padding-right: 20px;
margin-right: auto;
color: white;
text-decoration: none;
background-color: var(--theme-color);
border-radius: 25px;
cursor: pointer;
transition: 0.125s;
}
.mainDiv a:hover {
background-color: var(--hover-theme-color);
}
@media (prefers-reduced-motion) {
.mainDiv a {
transition: none !important;
}
}
.mainDiv .burgerText {
width: 75%;
margin-left: 12.5%;
border-radius: 8px;
}
.mainDiv .feature {
max-width: 85%;
width: calc(100% - 7vh - 7vh - 3.5vh);
margin-bottom: 10px;
margin-left: 7.5%;
margin-right: 7.5%;
border: none;
border-radius: 12px;
margin-left: 7vh;
margin-right: 7vh;
padding-left: 10px;
padding-right: 10px;
border: solid;
border-radius: 8px;
border-width: 1px;
border-color: var(--border-color);
padding-top: 15px;
padding-bottom: 15px;
font-size: 17px;
padding: 15px 10px 30px;
overflow-x: auto;
padding-bottom: 30px;
}
.mainDiv .green {
@ -959,21 +680,6 @@ button:hover {
background-color: #ffffeb;
}
.mainDiv .black, .mainDiv .black p {
background-color: #f8f8f8;
}
.mainDiv .feature h1 {
margin: 10px 0 0;
font-family: "Space Grotesk", sans-serif;
font-optical-sizing: auto;
font-size: 22px;
}
.mainDiv .feature p {
width: 70%;
padding-left: 15%;
margin-bottom: 0;
}
.links {
text-align: center;
padding: 10px;
@ -985,10 +691,11 @@ button:hover {
background-color: var(--bar);
color: var(--text-color);
padding: 10px;
padding-top: 2.5px;
margin-bottom: 10px;
border-radius: 10px;
transition: background-color .2s;
display: inline-flex;
display: inline-block;
}
.links a:hover {
@ -996,7 +703,8 @@ button:hover {
}
.links a img {
margin-right: 10px;
transform: translateY(5px);
padding-right: 10px;
filter: invert(var(--invertdm));
}

View File

@ -1,27 +0,0 @@
/* vietnamese */
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 300 700;
font-display: swap;
src: url(Space-Grotesk-Vietnamese.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 300 700;
font-display: swap;
src: url(Space-Grotesk-Latin-Ext.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Space Grotesk';
font-style: normal;
font-weight: 300 700;
font-display: swap;
src: url(Space-Grotesk-Latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -1,11 +0,0 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
function back() {
if (document.referrer !== ' ' || document.referrer !== '') {
window.location.href=document.referrer;
} else {
window.location.href='/';
}
}
// @license-end

View File

@ -1,11 +1,7 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
/*
* Beautified version of:
* crypto-js (https://www.npmjs.com/package/crypto-js)
* (c) Crypto-JS
* @license MIT
*/
Beautified version of crypto-js, to maintain compatibility with uMatrix
Beautified from https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js
*/
! function(t, e) {
"object" == typeof exports ? module.exports = exports = e() : "function" == typeof define && define.amd ? define([], e) : t.CryptoJS = e()
@ -1828,5 +1824,3 @@
ivSize: 2
}), M.RabbitLegacy = F._createHelper(P), U
});
// @license-end

View File

@ -1,5 +1,3 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
/*
* Beautified version of:
* hash-wasm (https://www.npmjs.com/package/hash-wasm)
@ -1353,5 +1351,3 @@
}
}
}));
// @license-end

View File

@ -1,38 +1,23 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
let homeserverBox = document.getElementById("homeserverBox")
let statusBox = document.getElementById("statusBox")
let changeButton = document.getElementById("changeButton")
let backButton = document.getElementById("backButton")
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("SETTING-homeServer", "https://notes.ailur.dev")
remote = "https://notes.ailur.dev"
}
document.addEventListener("DOMContentLoaded", function() {
statusBox.innerText = "You are currently connected to: " + remote + ". "
});
function showElements(yesorno) {
if (!yesorno) {
homeserverBox.classList.add("hidden")
changeButton.classList.add("hidden")
inputContainer.classList.add("hidden")
}
else {
homeserverBox.classList.remove("hidden")
changeButton.classList.remove("hidden")
inputContainer.classList.remove("hidden")
}
}
changeButton.addEventListener("click", () => {
changeButton.addEventListener("click", (event) => {
async function doStuff() {
let remote = homeserverBox.value
if (remote === "") {
if (remote == "") {
statusBox.innerText = "A homeserver is required!"
return
}
@ -40,62 +25,25 @@ changeButton.addEventListener("click", () => {
showElements(false)
statusBox.innerText = "Connecting to homeserver..."
fetch(remote + "/api/versionjson")
fetch(remote + "/api/version")
.then((response) => response)
.then((response) => {
async function doStuff() {
if (response.status === 200) {
let version = await response.json()
let fetchClientVersion = await (await fetch("/static/version.txt")).text()
if (parseInt(version["versionnum"]) < parseInt(fetchClientVersion)) {
localStorage.setItem("legacy", "true")
}
localStorage.setItem("SETTING-homeServer", remote)
if (response.status == 200) {
localStorage.setItem("homeserverURL", remote)
if (document.referrer !== "") {
window.location.href = document.referrer;
}
else {
window.location.href = "/login";
}
} else if (response.status === 404) {
let legacyHomeserverCheck = await fetch(remote + "/api/version")
if (legacyHomeserverCheck.status === 200) {
let homeserverText = await legacyHomeserverCheck.text()
let homeserverFloat = homeserverText.split(" ")[2]
let homeserverNameCheck = homeserverText.split(" ")[0]
if (homeserverNameCheck !== "Burgernotes") {
statusBox.innerText = "This homeserver is not compatible with Burgernotes!"
showElements(true)
return
}
let homeserverInt = parseFloat(homeserverFloat) * 100
if (homeserverInt < 200) {
localStorage.setItem("legacy", "true")
localStorage.setItem("SETTING-homeServer", remote)
if (document.referrer !== "") {
window.location.href = document.referrer;
}
else {
window.location.href = "/login";
}
} else if (homeserverInt > 200) {
localStorage.setItem("legacy", "false")
localStorage.setItem("SETTING-homeServer", remote)
if (document.referrer !== "") {
window.location.href = document.referrer;
}
else {
window.location.href = "/login";
}
} else {
statusBox.innerText = "This homeserver is not compatible with Burgernotes!"
showElements(true)
}
window.location.href = "https://notes.hectabit.org/login";
}
}
else if (response.status == 404) {
statusBox.innerText = "Not a valid homeserver!"
}
else {
statusBox.innerText = "This homeserver is not compatible with Burgernotes!"
statusBox.innerText = "Something went wrong!"
showElements(true)
}
}
@ -104,9 +52,3 @@ changeButton.addEventListener("click", () => {
}
doStuff()
});
backButton.addEventListener("click", () => {
history.back()
});
// @license-end

View File

@ -1,18 +1,20 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("PRIVATE-secretKey") !== null || localStorage.getItem("PRIVATE-cryptoKey") !== null) {
window.location.replace("/app/")
if (localStorage.getItem("DONOTSHARE-secretkey") !== null) {
window.location.replace("../app/index.html")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
if (localStorage.getItem("DONOTSHARE-password") !== null) {
window.location.replace("../app/index.html")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("SETTING-homeServer")
let remote = localStorage.getItem("homeserverURL")
if (remote == null) {
localStorage.setItem("SETTING-homeServer", "https://notes.ailur.dev")
remote = "https://notes.ailur.dev"
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}
let inputContainer = document.getElementById("inputContainer")
let usernameBox = document.getElementById("usernameBox")
let passwordBox = document.getElementById("passwordBox")
let statusBox = document.getElementById("statusBox")
@ -20,90 +22,38 @@ let signupButton = document.getElementById("signupButton")
let inputNameBox = document.getElementById("inputNameBox")
let backButton = document.getElementById("backButton")
async function loginFetch(username, password, modern) {
return await fetch(remote + "/api/login", {
method: "POST",
body: JSON.stringify({
username: username,
password: password,
modern: modern
}),
headers: {
"Content-Type": "application/json; charset=UTF-8",
}
})
}
async function migrateLegacyPassword(secretKey, password) {
return await fetch(remote + "/api/changepassword", {
method: "POST",
body: JSON.stringify({
secretKey: secretKey,
newPassword: password,
migration: true
}),
headers: {
"Content-Type": "application/json; charset=UTF-8",
}
})
}
async function hashPass(pass) {
return await hashwasm.argon2id({
password: pass,
salt: new TextEncoder().encode("I munch Burgers!!"),
parallelism: 1,
iterations: 32,
memorySize: 19264,
hashLength: 32,
outputType: "hex"
})
}
async function hashPassLegacy(pass) {
let key = pass
for (let i = 0; i < 128; i++) {
key = await hashwasm.sha3(key)
}
return key
}
usernameBox.classList.remove("hidden")
inputNameBox.innerText = "Username:"
let currentInputType = 0
function showInput(inputType) {
switch (inputType) {
case 0:
usernameBox.classList.remove("hidden")
passwordBox.classList.add("hidden")
backButton.classList.add("hidden")
inputContainer.classList.remove("hidden")
inputNameBox.innerText = "Username:"
statusBox.innerText = "Sign in with your Burgernotes account"
currentInputType = 0
break
case 1:
usernameBox.classList.add("hidden")
passwordBox.classList.remove("hidden")
backButton.classList.remove("hidden")
inputContainer.classList.remove("hidden")
inputNameBox.innerText = "Password:"
currentInputType = 1
break
case 2:
inputContainer.classList.add("hidden")
signupButton.classList.add("hidden")
backButton.classList.add("hidden")
inputNameBox.classList.add("hidden")
inputNameBox.innerText = "Password:"
currentInputType = 2
if (inputType == 0) {
usernameBox.classList.remove("hidden")
passwordBox.classList.add("hidden")
backButton.classList.add("hidden")
inputNameBox.innerText = "Username:"
statusBox.innerText = "Login to your Burgernotes account!"
currentInputType = 0
} else if (inputType == 1) {
usernameBox.classList.add("hidden")
passwordBox.classList.remove("hidden")
backButton.classList.remove("hidden")
inputNameBox.innerText = "Password:"
currentInputType = 1
} else if (inputType == 2) {
usernameBox.classList.add("hidden")
passwordBox.classList.add("hidden")
signupButton.classList.add("hidden")
backButton.classList.add("hidden")
inputNameBox.classList.add("hidden")
inputNameBox.innerText = "Password:"
currentInputType = 2
}
}
function showElements(show) {
if (!show) {
function showElements(yesorno) {
if (!yesorno) {
usernameBox.classList.add("hidden")
passwordBox.classList.add("hidden")
signupButton.classList.add("hidden")
@ -121,14 +71,14 @@ function showElements(show) {
}
}
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener('DOMContentLoaded', function() {
document.getElementById("homeserver").innerText = "Your homeserver is: " + remote + ". "
});
signupButton.addEventListener("click", () => {
signupButton.addEventListener("click", (event) => {
if (passwordBox.classList.contains("hidden")) {
if (usernameBox.value === "") {
statusBox.innerText = "Username required!"
if (usernameBox.value == "") {
statusBox.innerText = "A username is required!"
return
} else {
statusBox.innerText = "Welcome back, " + usernameBox.value + "!"
@ -139,89 +89,111 @@ signupButton.addEventListener("click", () => {
let username = usernameBox.value
let password = passwordBox.value
if (password === "") {
if (password == "") {
statusBox.innerText = "A password is required!"
return
}
showInput(2)
showElements(true)
statusBox.innerText = "Hashing password..."
statusBox.innerText = "Signing in..."
const hashedPass = await hashPass(password)
const login = await loginFetch(username, hashedPass, true)
const loginData = await login.json()
if (login.status === 401) {
if (loginData["migrated"] !== true) {
statusBox.innerText = "Migrating to Burgernotes 2.0..."
const loginOld = await loginFetch(username, await hashPassLegacy(password), false)
const loginDataOld = await loginOld.json()
if (loginOld.status === 401) {
statusBox.innerText = "Username or password incorrect!"
showInput(1)
showElements(true)
} else if (loginOld.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("PRIVATE-secretKey", loginDataOld["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,
iterations: 32,
memorySize: 19264,
hashLength: 32,
outputType: "hex"
}))
statusBox.innerText = "Migrating password..."
let status = await migrateLegacyPassword(loginDataOld["key"], hashedPass)
if (status.status === 200) {
statusBox.innerText = "Welcome back!"
await new Promise(r => setTimeout(r, 200))
window.location.href = "/app/"
} else {
statusBox.innerText = (await status.json())["error"]
async function hashpassold(pass) {
const key = await hashwasm.argon2id({
password: pass,
salt: await hashwasm.sha512(pass),
parallelism: 1,
iterations: 256,
memorySize: 512,
hashLength: 32,
outputType: "encoded"
});
return key
};
async function hashpass(pass) {
let key = pass
for (let i = 0; i < 128; i++) {
key = await hashwasm.sha3(key)
}
return key
};
fetch(remote + "/api/login", {
method: "POST",
body: JSON.stringify({
username: username,
password: await hashpass(password),
passwordchange: "no",
newpass: "null"
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then((response) => {
async function doStuff() {
let responseData = await response.json()
if (response.status == 200) {
localStorage.setItem("DONOTSHARE-secretkey", responseData["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.sha512(password))
window.location.href = "../app/index.html"
}
else if (response.status == 401) {
console.log("Trying oldhash")
fetch(remote + "/api/login", {
method: "POST",
body: JSON.stringify({
username: username,
password: await hashpassold(password),
passwordchange: "yes",
newpass: await hashpass(password)
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then((response) => {
async function doStuff2() {
let responseData = await response.json()
if (response.status == 200) {
localStorage.setItem("DONOTSHARE-secretkey", responseData["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.sha512(password))
window.location.href = "../app/index.html"
}
else if (response.status == 401) {
statusBox.innerText = "Wrong username or password..."
showInput(1)
showElements(true)
}
else {
statusBox.innerText = "Something went wrong! (error code: " + response.status + ")"
showInput(1)
showElements(true)
}
}
doStuff2()
});
}
else {
statusBox.innerText = "Something went wrong! (error code: " + response.status + ")"
showInput(1)
showElements(true)
}
} else {
statusBox.innerText = loginDataOld["error"]
showInput(1)
showElements(true)
}
} else {
statusBox.innerText = "Username or password incorrect!"
showInput(1)
showElements(true)
}
} else if (login.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("PRIVATE-secretKey", loginData["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,
iterations: 32,
memorySize: 19264,
hashLength: 32,
outputType: "hex"
}))
statusBox.innerText = "Welcome back!"
await new Promise(r => setTimeout(r, 200))
window.location.href = "/app/"
} else {
statusBox.innerText = loginData["error"]
showInput(1)
showElements(true)
}
doStuff()
});
}
doStuff()
}
});
backButton.addEventListener("click", () => {
backButton.addEventListener("click", (event) => {
showInput(0)
});
showInput(0)
// @license-end

View File

@ -1,8 +0,0 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
window.localStorage.removeItem("PRIVATE-secretKey")
window.localStorage.removeItem("PRIVATE-cryptoKey")
window.localStorage.removeItem("CACHE-username")
window.location.replace("/login")
// @license-end

File diff suppressed because it is too large Load Diff

View File

@ -1,189 +0,0 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
let secretKey = localStorage.getItem("PRIVATE-secretKey")
let cryptoKey = localStorage.getItem("PRIVATE-cryptoKey")
if (secretKey === null || cryptoKey === null) {
window.location.replace("/login")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("SETTING-homeServer")
if (remote == null) {
localStorage.setItem("SETTING-homeServer", "https://notes.ailur.dev")
remote = "https://notes.ailur.dev"
}
let notesPlainText = ""
let information
let backButton
let titleBox
let inputTypeGlobal = 0
document.addEventListener("DOMContentLoaded", function() {
information = document.getElementById("information")
backButton = document.getElementById("backButton")
titleBox = document.getElementById("title")
})
function showInput(inputType) {
inputTypeGlobal = inputType
switch (inputType) {
case 0:
information.innerText = "Welcome to the Burgernotes Migration wizard! Before we begin migration, there are a few things you should know."
titleBox.innerText = "Burgernotes Migrator"
backButton.classList.add("hidden")
break
case 1:
information.innerText = "This migration process may corrupt your data if interrupted. Please ensure you have a stable internet connection. Press continue to download a backup of your notes, just in case."
titleBox.innerText = "Disclaimer"
backButton.classList.remove("hidden")
break
case 2:
information.innerText = "Now that you have a backup of your notes, you can proceed to the next step. Press continue to begin migration."
titleBox.innerText = "Backup Complete"
break
case 3:
information.innerText = "You have successfully migrated to new Burgernotes! Enjoy the more secure and feature-rich experience. Click continue to return to the app."
titleBox.innerText = "Migration Complete"
break
}
}
function buttonClick() {
switch (inputTypeGlobal) {
case 0:
showInput(1)
break
case 1:
exportNotes().then((data) => {
if (data !== undefined) {
notesPlainText = data
let blob = new Blob([JSON.stringify(data)], {type: "application/json"})
let url = URL.createObjectURL(blob)
let a = document.createElement("a")
a.href = url
a.download = "backup.json"
a.click()
showInput(2)
}
})
break
case 2:
importNotes(notesPlainText).then((status) => {
if (status === 200) {
showInput(3)
} else if (status === -1 || status === -2) {
titleBox.innerText = "Error!"
information.innerText = "An error occurred while migrating your notes. Please try again by pressing continue."
console.log(status)
} else {
titleBox.innerText = "Critical Error!"
information.innerText = "All your notes have been lost. Good thing you have a backup! Press continue to return to the app, so you can import your backup."
inputTypeGlobal = 3
}
})
break
case 3:
window.location.href = "/app"
break
}
}
function back() {
showInput(inputTypeGlobal - 1)
}
async function getKey() {
let salt = new TextEncoder().encode("I love Burgernotes!")
let cryptoKeyFormatted = await window.crypto.subtle.importKey("raw", new TextEncoder().encode(cryptoKey), "PBKDF2", false, ["deriveBits", "deriveKey"])
return await window.crypto.subtle.deriveKey({
name: "PBKDF2",
salt,
iterations: 1,
hash: "SHA-512"
}, cryptoKeyFormatted, {name: "AES-GCM", length: 256}, true, ["encrypt", "decrypt"])
}
function arrayBufferToBase64(buffer) {
const uint8Array = new Uint8Array(buffer);
return btoa(String.fromCharCode.apply(null, uint8Array))
}
async function encrypt(text) {
let cryptoKey = await getKey()
let iv = window.crypto.getRandomValues(new Uint8Array(12))
let encrypted = await window.crypto.subtle.encrypt({
name: "AES-GCM",
iv: iv
}, cryptoKey, new TextEncoder().encode(text))
return btoa(JSON.stringify({
encrypted: arrayBufferToBase64(encrypted),
iv: arrayBufferToBase64(iv)
}))
}
async function importNotes(plaintextNotes) {
try {
for (let i in plaintextNotes) {
plaintextNotes[i]["title"] = await encrypt(plaintextNotes[i]["title"])
plaintextNotes[i]["content"] = await encrypt(plaintextNotes[i]["content"])
}
let purgeNotesFetch = await fetch(remote + "/api/purgenotes", {
method: "POST",
body: JSON.stringify({
"secretKey": secretKey,
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
if (purgeNotesFetch.status !== 200) {
return -2
}
let importNotesFetch = await fetch(remote + "/api/importnotes", {
method: "POST",
body: JSON.stringify({
"secretKey": secretKey,
"notes": JSON.stringify(plaintextNotes)
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
return importNotesFetch.status
} catch (e) {
return -1
}
}
async function exportNotes() {
try {
titleBox.innerText = "Decrypting Notes..."
let oldPasswordFormat = await hashwasm.sha512(prompt("Please enter your password to decrypt your notes."))
let exportNotesFetch = await fetch(remote + "/api/exportnotes", {
method: "POST",
body: JSON.stringify({
secretKey: secretKey
}),
headers: {
"Content-Type": "application/json; charset=UTF-8"
}
})
let responseData = await exportNotesFetch.json()
for (let i in responseData) {
information.innerText = "Decrypting " + i + "/" + responseData.length
responseData[i]["title"] = CryptoJS.AES.decrypt(responseData[i]["title"], oldPasswordFormat).toString(CryptoJS.enc.Utf8)
responseData[i]["content"] = CryptoJS.AES.decrypt(responseData[i]["content"], oldPasswordFormat).toString(CryptoJS.enc.Utf8)
}
titleBox.innerText = "Notes decrypted!"
information.innerText = "Now if anything goes wrong, you can import this backup to restore your notes in the settings panel."
return responseData
} catch (e) {
titleBox.innerText = "Error!"
information.innerText = "An error occurred while decrypting your notes. Good thing we found out before we started migration! Please try again by pressing continue."
}
}
// @license-end

View File

@ -1,200 +0,0 @@
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
/*
* Beautified version of:
* pell (https://github.com/jaredreich/pell)
* (c) Jared Reich
* @license MIT
*/
! function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.pell = {})
}(this, function(t) {
"use strict";
var e = Object.assign || function(t) {
for (var e = 1; e < arguments.length; e++) {
var n = arguments[e];
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r])
}
return t
},
c = "defaultParagraphSeparator",
l = "formatBlock",
a = function(t, e, n) {
return t.addEventListener(e, n)
},
s = function(t, e) {
return t.appendChild(e)
},
d = function(t) {
return document.createElement(t)
},
n = function(t) {
return document.queryCommandState(t)
},
f = function(t) {
var e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null;
return document.execCommand(t, !1, e)
},
p = {
bold: {
icon: "<b>B</b>",
title: "Bold",
state: function() {
return n("bold")
},
result: function() {
return f("bold")
}
},
italic: {
icon: "<i>I</i>",
title: "Italic",
state: function() {
return n("italic")
},
result: function() {
return f("italic")
}
},
underline: {
icon: "<u>U</u>",
title: "Underline",
state: function() {
return n("underline")
},
result: function() {
return f("underline")
}
},
strikethrough: {
icon: "<strike>S</strike>",
title: "Strike-through",
state: function() {
return n("strikeThrough")
},
result: function() {
return f("strikeThrough")
}
},
heading1: {
icon: "<b>H<sub>1</sub></b>",
title: "Heading 1",
result: function() {
return f(l, "<h1>")
}
},
heading2: {
icon: "<b>H<sub>2</sub></b>",
title: "Heading 2",
result: function() {
return f(l, "<h2>")
}
},
paragraph: {
icon: "&#182;",
title: "Paragraph",
result: function() {
return f(l, "<p>")
}
},
quote: {
icon: "&#8220; &#8221;",
title: "Quote",
result: function() {
return f(l, "<blockquote>")
}
},
olist: {
icon: "&#35;",
title: "Ordered List",
result: function() {
return f("insertOrderedList")
}
},
ulist: {
icon: "&#8226;",
title: "Unordered List",
result: function() {
return f("insertUnorderedList")
}
},
code: {
icon: "&lt;/&gt;",
title: "Code",
result: function() {
return f(l, "<pre>")
}
},
line: {
icon: "&#8213;",
title: "Horizontal Line",
result: function() {
return f("insertHorizontalRule")
}
},
link: {
icon: "&#128279;",
title: "Link",
result: function() {
var t = window.prompt("Enter the link URL");
t && f("createLink", t)
}
},
image: {
icon: "&#128247;",
title: "Image",
result: function() {
var t = window.prompt("Enter the image URL");
t && f("insertImage", t)
}
}
},
m = {
actionbar: "pell-actionbar",
button: "pell-button",
content: "pell-content",
selected: "pell-button-selected"
},
r = function(n) {
var t = n.actions ? n.actions.map(function(t) {
return "string" == typeof t ? p[t] : p[t.name] ? e({}, p[t.name], t) : t
}) : Object.keys(p).map(function(t) {
return p[t]
}),
r = e({}, m, n.classes),
i = n[c] || "div",
o = d("div");
o.className = r.actionbar, s(n.element, o);
var u = n.element.content = d("div");
return u.contentEditable = !0, u.className = r.content, u.oninput = function(t) {
var e = t.target.firstChild;
e && 3 === e.nodeType ? f(l, "<" + i + ">") : "<br>" === u.innerHTML && (u.innerHTML = ""), n.onChange(u.innerHTML)
}, u.onkeydown = function(t) {
var e;
"Enter" === t.key && "blockquote" === (e = l, document.queryCommandValue(e)) && setTimeout(function() {
return f(l, "<" + i + ">")
}, 0)
}, s(n.element, u), t.forEach(function(t) {
var e = d("button");
if (e.className = r.button, e.innerHTML = t.icon, e.title = t.title, e.setAttribute("type", "button"), e.onclick = function() {
return t.result() && u.focus()
}, t.state) {
var n = function() {
return e.classList[t.state() ? "add" : "remove"](r.selected)
};
a(u, "keyup", n), a(u, "mouseup", n), a(e, "click", n)
}
s(o, e)
}), n.styleWithCSS && f("styleWithCSS"), f(c, i), n.element
},
i = {
exec: f,
init: r
};
t.exec = f, t.init = r, t.default = i, Object.defineProperty(t, "__esModule", {
value: !0
})
});
// @license-end

View File

@ -1,174 +1,109 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0
if (localStorage.getItem("PRIVATE-secretKey") !== null || localStorage.getItem("PRIVATE-cryptoKey") !== null) {
window.location.replace("/app/")
if (localStorage.getItem("DONOTSHARE-secretkey") !== null) {
window.location.replace("../app/index.html")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
if (localStorage.getItem("DONOTSHARE-password") !== null) {
window.location.replace("../app/index.html")
document.body.innerHTML = "Redirecting..."
throw new Error();
}
let remote = localStorage.getItem("SETTING-homeServer")
let remote = localStorage.getItem("homeserverURL")
if (remote == null) {
localStorage.setItem("SETTING-homeServer", "https://notes.ailur.dev")
remote = "https://notes.ailur.dev"
localStorage.setItem("homeserverURL", "https://notes.hectabit.org")
remote = "https://notes.hectabit.org"
}
let usernameBox = document.getElementById("usernameBox")
let passwordBox = document.getElementById("passwordBox")
let statusBox = document.getElementById("statusBox")
let signupButton = document.getElementById("signupButton")
let opButton = document.getElementById("opButton")
// Leave these variables alone, they are used in the WASM code.
async function hashpass(pass) {
return await hashwasm.argon2id({
password: pass,
salt: new TextEncoder().encode("I munch Burgers!!"),
parallelism: 1,
iterations: 32,
memorySize: 19264,
hashLength: 32,
outputType: "hex"
})
}
function showElements(yesorno) {
if (!yesorno) {
usernameBox.classList.add("hidden")
passwordBox.classList.add("hidden")
signupButton.classList.add("hidden")
opButton.classList.add("hidden")
inputContainer.classList.add("hidden")
}
else {
usernameBox.classList.remove("hidden")
passwordBox.classList.remove("hidden")
signupButton.classList.remove("hidden")
opButton.classList.remove("hidden")
inputContainer.classList.remove("hidden")
}
}
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener('DOMContentLoaded', function() {
document.getElementById("homeserver").innerText = "Your homeserver is: " + remote + ". "
});
opButton.addEventListener("click", () => {
window.location.href = "/login"
});
signupButton.addEventListener("click", (event) => {
async function doStuff() {
let username = usernameBox.value
let password = passwordBox.value
complete = new Event("completed");
window.returnCode = undefined;
window.returnVar = undefined;
// This is for the WASM code to call when it's done. Do not remove it, even if it looks like it's never called.
function WASMComplete() {
window.dispatchEvent(complete);
}
signupButton.addEventListener("click", () => {
let username = usernameBox.value
let password = passwordBox.value
if (username === "") {
statusBox.innerText = "Username required!"
return
}
if ((username).length > 20) {
statusBox.innerText = "Username cannot be more than 20 characters!"
return
}
if (password === "") {
statusBox.innerText = "Password required!"
return
}
if ((password).length < 8) {
statusBox.innerText = "Password must be at least 8 characters!"
return
}
showElements(false)
statusBox.innerText = "Computing PoW Challenge... (this may take up to 5 minutes at worst, 3 seconds at best)"
/*
* Compiled version of:
* hashcat-wasm (https://concord.ailur.dev/hectabit/hashcat-wasm)
* (c) Arzumify
* @license AGPL-3.0
* Since this is my software, if you use it with proprietary servers, I will make sure you will walk across hot coals (just kidding, probably).
* I'm not kidding about the license though.
* I should stop including comments into JS and possibly minify this code. Oh, well.
*/
window.resourceExtra = "I love Burgernotes!"
const go = new Go();
WebAssembly.instantiateStreaming(fetch("/static/wasm/hashcat.wasm"), go.importObject).then((result) => {
go.run(result.instance);
})
window.addEventListener("completed", async () => {
if (window.returnCode === 1) {
statusBox.innerText = "Please do not expose your computer to cosmic rays (an impossible logical event has occurred)."
showElements(true)
if (username == "") {
statusBox.innerText = "A username is required!"
return
} else if (window.returnCode === 2) {
statusBox.innerText = "The PoW Challenge has failed. Please try again."
showElements(true)
}
if ((username).length > 20) {
statusBox.innerText = "Username cannot be more than 20 characters!"
return
}
if (password == "") {
statusBox.innerText = "A password is required!"
return
}
if ((password).length < 8) {
statusBox.innerText = "8 or more characters are required!"
return
}
statusBox.innerText = "Hashing password..."
let hashedPassword = await hashpass(password)
statusBox.innerText = "Contacting server..."
showElements(false)
statusBox.innerText = "Creating account, please hold on..."
async function hashpass(pass) {
let key = pass
for (let i = 0; i < 128; i++) {
key = await hashwasm.sha3(key)
}
return key
};
fetch(remote + "/api/signup", {
method: "POST",
body: JSON.stringify({
username: username,
password: hashedPassword,
stamp: window.returnVar,
password: await hashpass(password)
}),
headers: {
"Content-Type": "application/json; charset=UTF-8",
"Content-Type": "application/json; charset=UTF-8"
}
})
.then((response) => response)
.then(async (response) => {
let responseData = await response.json()
if (response.status === 200) {
statusBox.innerText = "Setting up encryption keys..."
localStorage.setItem("PRIVATE-secretKey", responseData["key"])
localStorage.setItem("PRIVATE-cryptoKey", await hashwasm.argon2id({
password: password,
salt: new TextEncoder().encode("I love Burgernotes!"),
parallelism: 1,
iterations: 32,
memorySize: 19264,
hashLength: 32,
outputType: "hex"
}))
statusBox.innerText = "Welcome!"
await new Promise(r => setTimeout(r, 200))
window.location.href = "/app/"
} else if (response.status === 409) {
if (responseData["error"] === "Stamp already spent") {
statusBox.innerText = "Pure bad luck... your PoW challenge was accepted, but someone else used the same PoW challenge as you. Please try again. (error: Stamp already spent)"
} else {
statusBox.innerText = "Username already taken!"
}
showElements(true)
} else if (response.status === 429) {
statusBox.innerText = "Please don't sign up to new accounts that quickly. If you are using a VPN, please turn it off!"
showElements(true)
} else if (response.status === 500) {
statusBox.innerText = responseData["error"]
showElements(true)
} else {
statusBox.innerText = "Something went wrong! (error: " + responseData["error"] + ")"
showElements(true)
}
})
})
});
.then((response) => {
async function doStuff() {
let responseData = await response.json()
// @license-end
if (response.status == 200) {
statusBox.innerText == "redirecting.."
localStorage.setItem("DONOTSHARE-secretkey", responseData["key"])
localStorage.setItem("DONOTSHARE-password", await hashwasm.sha512(password))
window.location.href = "../app/index.html"
}
else if (response.status == 409) {
statusBox.innerText = "Username already taken!"
showElements(true)
}
else {
statusBox.innerText = "Something went wrong!"
showElements(true)
}
}
doStuff()
});
}
doStuff()
});

View File

@ -1,567 +0,0 @@
// @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
/*
* wasm_exec (https://github.com/golang/go)
* (c) The Go Authors
* @license BSD-3-Clause
*/
"use strict";
(() => {
const enosys = () => {
const err = new Error("not implemented");
err.code = "ENOSYS";
return err;
};
if (!globalThis.fs) {
let outputBuf = "";
globalThis.fs = {
constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
writeSync(fd, buf) {
outputBuf += decoder.decode(buf);
const nl = outputBuf.lastIndexOf("\n");
if (nl != -1) {
console.log(outputBuf.substring(0, nl));
outputBuf = outputBuf.substring(nl + 1);
}
return buf.length;
},
write(fd, buf, offset, length, position, callback) {
if (offset !== 0 || length !== buf.length || position !== null) {
callback(enosys());
return;
}
const n = this.writeSync(fd, buf);
callback(null, n);
},
chmod(path, mode, callback) { callback(enosys()); },
chown(path, uid, gid, callback) { callback(enosys()); },
close(fd, callback) { callback(enosys()); },
fchmod(fd, mode, callback) { callback(enosys()); },
fchown(fd, uid, gid, callback) { callback(enosys()); },
fstat(fd, callback) { callback(enosys()); },
fsync(fd, callback) { callback(null); },
ftruncate(fd, length, callback) { callback(enosys()); },
lchown(path, uid, gid, callback) { callback(enosys()); },
link(path, link, callback) { callback(enosys()); },
lstat(path, callback) { callback(enosys()); },
mkdir(path, perm, callback) { callback(enosys()); },
open(path, flags, mode, callback) { callback(enosys()); },
read(fd, buffer, offset, length, position, callback) { callback(enosys()); },
readdir(path, callback) { callback(enosys()); },
readlink(path, callback) { callback(enosys()); },
rename(from, to, callback) { callback(enosys()); },
rmdir(path, callback) { callback(enosys()); },
stat(path, callback) { callback(enosys()); },
symlink(path, link, callback) { callback(enosys()); },
truncate(path, length, callback) { callback(enosys()); },
unlink(path, callback) { callback(enosys()); },
utimes(path, atime, mtime, callback) { callback(enosys()); },
};
}
if (!globalThis.process) {
globalThis.process = {
getuid() { return -1; },
getgid() { return -1; },
geteuid() { return -1; },
getegid() { return -1; },
getgroups() { throw enosys(); },
pid: -1,
ppid: -1,
umask() { throw enosys(); },
cwd() { throw enosys(); },
chdir() { throw enosys(); },
}
}
if (!globalThis.crypto) {
throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
}
if (!globalThis.performance) {
throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");
}
if (!globalThis.TextEncoder) {
throw new Error("globalThis.TextEncoder is not available, polyfill required");
}
if (!globalThis.TextDecoder) {
throw new Error("globalThis.TextDecoder is not available, polyfill required");
}
const encoder = new TextEncoder("utf-8");
const decoder = new TextDecoder("utf-8");
globalThis.Go = class {
constructor() {
this.argv = ["js"];
this.env = {};
this.exit = (code) => {
if (code !== 0) {
console.warn("exit code:", code);
}
};
this._exitPromise = new Promise((resolve) => {
this._resolveExitPromise = resolve;
});
this._pendingEvent = null;
this._scheduledTimeouts = new Map();
this._nextCallbackTimeoutID = 1;
const setInt64 = (addr, v) => {
this.mem.setUint32(addr + 0, v, true);
this.mem.setUint32(addr + 4, Math.floor(v / 4294967296), true);
}
const setInt32 = (addr, v) => {
this.mem.setUint32(addr + 0, v, true);
}
const getInt64 = (addr) => {
const low = this.mem.getUint32(addr + 0, true);
const high = this.mem.getInt32(addr + 4, true);
return low + high * 4294967296;
}
const loadValue = (addr) => {
const f = this.mem.getFloat64(addr, true);
if (f === 0) {
return undefined;
}
if (!isNaN(f)) {
return f;
}
const id = this.mem.getUint32(addr, true);
return this._values[id];
}
const storeValue = (addr, v) => {
const nanHead = 0x7FF80000;
if (typeof v === "number" && v !== 0) {
if (isNaN(v)) {
this.mem.setUint32(addr + 4, nanHead, true);
this.mem.setUint32(addr, 0, true);
return;
}
this.mem.setFloat64(addr, v, true);
return;
}
if (v === undefined) {
this.mem.setFloat64(addr, 0, true);
return;
}
let id = this._ids.get(v);
if (id === undefined) {
id = this._idPool.pop();
if (id === undefined) {
id = this._values.length;
}
this._values[id] = v;
this._goRefCounts[id] = 0;
this._ids.set(v, id);
}
this._goRefCounts[id]++;
let typeFlag = 0;
switch (typeof v) {
case "object":
if (v !== null) {
typeFlag = 1;
}
break;
case "string":
typeFlag = 2;
break;
case "symbol":
typeFlag = 3;
break;
case "function":
typeFlag = 4;
break;
}
this.mem.setUint32(addr + 4, nanHead | typeFlag, true);
this.mem.setUint32(addr, id, true);
}
const loadSlice = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
return new Uint8Array(this._inst.exports.mem.buffer, array, len);
}
const loadSliceOfValues = (addr) => {
const array = getInt64(addr + 0);
const len = getInt64(addr + 8);
const a = new Array(len);
for (let i = 0; i < len; i++) {
a[i] = loadValue(array + i * 8);
}
return a;
}
const loadString = (addr) => {
const saddr = getInt64(addr + 0);
const len = getInt64(addr + 8);
return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
}
const timeOrigin = Date.now() - performance.now();
this.importObject = {
_gotest: {
add: (a, b) => a + b,
},
gojs: {
// Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
// may synchronously trigger a Go event handler. This makes Go code get executed in the middle of the imported
// function. A goroutine can switch to a new stack if the current stack is too small (see morestack function).
// This changes the SP, thus we have to update the SP used by the imported function.
// func wasmExit(code int32)
"runtime.wasmExit": (sp) => {
sp >>>= 0;
const code = this.mem.getInt32(sp + 8, true);
this.exited = true;
delete this._inst;
delete this._values;
delete this._goRefCounts;
delete this._ids;
delete this._idPool;
this.exit(code);
},
// func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)
"runtime.wasmWrite": (sp) => {
sp >>>= 0;
const fd = getInt64(sp + 8);
const p = getInt64(sp + 16);
const n = this.mem.getInt32(sp + 24, true);
fs.writeSync(fd, new Uint8Array(this._inst.exports.mem.buffer, p, n));
},
// func resetMemoryDataView()
"runtime.resetMemoryDataView": (sp) => {
sp >>>= 0;
this.mem = new DataView(this._inst.exports.mem.buffer);
},
// func nanotime1() int64
"runtime.nanotime1": (sp) => {
sp >>>= 0;
setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);
},
// func walltime() (sec int64, nsec int32)
"runtime.walltime": (sp) => {
sp >>>= 0;
const msec = (new Date).getTime();
setInt64(sp + 8, msec / 1000);
this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);
},
// func scheduleTimeoutEvent(delay int64) int32
"runtime.scheduleTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this._nextCallbackTimeoutID;
this._nextCallbackTimeoutID++;
this._scheduledTimeouts.set(id, setTimeout(
() => {
this._resume();
while (this._scheduledTimeouts.has(id)) {
// for some reason Go failed to register the timeout event, log and try again
// (temporary workaround for https://github.com/golang/go/issues/28975)
console.warn("scheduleTimeoutEvent: missed timeout event");
this._resume();
}
},
getInt64(sp + 8),
));
this.mem.setInt32(sp + 16, id, true);
},
// func clearTimeoutEvent(id int32)
"runtime.clearTimeoutEvent": (sp) => {
sp >>>= 0;
const id = this.mem.getInt32(sp + 8, true);
clearTimeout(this._scheduledTimeouts.get(id));
this._scheduledTimeouts.delete(id);
},
// func getRandomData(r []byte)
"runtime.getRandomData": (sp) => {
sp >>>= 0;
crypto.getRandomValues(loadSlice(sp + 8));
},
// func finalizeRef(v ref)
"syscall/js.finalizeRef": (sp) => {
sp >>>= 0;
const id = this.mem.getUint32(sp + 8, true);
this._goRefCounts[id]--;
if (this._goRefCounts[id] === 0) {
const v = this._values[id];
this._values[id] = null;
this._ids.delete(v);
this._idPool.push(id);
}
},
// func stringVal(value string) ref
"syscall/js.stringVal": (sp) => {
sp >>>= 0;
storeValue(sp + 24, loadString(sp + 8));
},
// func valueGet(v ref, p string) ref
"syscall/js.valueGet": (sp) => {
sp >>>= 0;
const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 32, result);
},
// func valueSet(v ref, p string, x ref)
"syscall/js.valueSet": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));
},
// func valueDelete(v ref, p string)
"syscall/js.valueDelete": (sp) => {
sp >>>= 0;
Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));
},
// func valueIndex(v ref, i int) ref
"syscall/js.valueIndex": (sp) => {
sp >>>= 0;
storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));
},
// valueSetIndex(v ref, i int, x ref)
"syscall/js.valueSetIndex": (sp) => {
sp >>>= 0;
Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));
},
// func valueCall(v ref, m string, args []ref) (ref, bool)
"syscall/js.valueCall": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const m = Reflect.get(v, loadString(sp + 16));
const args = loadSliceOfValues(sp + 32);
const result = Reflect.apply(m, v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 56, result);
this.mem.setUint8(sp + 64, 1);
} catch (err) {
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 56, err);
this.mem.setUint8(sp + 64, 0);
}
},
// func valueInvoke(v ref, args []ref) (ref, bool)
"syscall/js.valueInvoke": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.apply(v, undefined, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueNew(v ref, args []ref) (ref, bool)
"syscall/js.valueNew": (sp) => {
sp >>>= 0;
try {
const v = loadValue(sp + 8);
const args = loadSliceOfValues(sp + 16);
const result = Reflect.construct(v, args);
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, result);
this.mem.setUint8(sp + 48, 1);
} catch (err) {
sp = this._inst.exports.getsp() >>> 0; // see comment above
storeValue(sp + 40, err);
this.mem.setUint8(sp + 48, 0);
}
},
// func valueLength(v ref) int
"syscall/js.valueLength": (sp) => {
sp >>>= 0;
setInt64(sp + 16, parseInt(loadValue(sp + 8).length));
},
// valuePrepareString(v ref) (ref, int)
"syscall/js.valuePrepareString": (sp) => {
sp >>>= 0;
const str = encoder.encode(String(loadValue(sp + 8)));
storeValue(sp + 16, str);
setInt64(sp + 24, str.length);
},
// valueLoadString(v ref, b []byte)
"syscall/js.valueLoadString": (sp) => {
sp >>>= 0;
const str = loadValue(sp + 8);
loadSlice(sp + 16).set(str);
},
// func valueInstanceOf(v ref, t ref) bool
"syscall/js.valueInstanceOf": (sp) => {
sp >>>= 0;
this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);
},
// func copyBytesToGo(dst []byte, src ref) (int, bool)
"syscall/js.copyBytesToGo": (sp) => {
sp >>>= 0;
const dst = loadSlice(sp + 8);
const src = loadValue(sp + 32);
if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
// func copyBytesToJS(dst ref, src []byte) (int, bool)
"syscall/js.copyBytesToJS": (sp) => {
sp >>>= 0;
const dst = loadValue(sp + 8);
const src = loadSlice(sp + 16);
if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {
this.mem.setUint8(sp + 48, 0);
return;
}
const toCopy = src.subarray(0, dst.length);
dst.set(toCopy);
setInt64(sp + 40, toCopy.length);
this.mem.setUint8(sp + 48, 1);
},
"debug": (value) => {
console.log(value);
},
}
};
}
async run(instance) {
if (!(instance instanceof WebAssembly.Instance)) {
throw new Error("Go.run: WebAssembly.Instance expected");
}
this._inst = instance;
this.mem = new DataView(this._inst.exports.mem.buffer);
this._values = [ // JS values that Go currently has references to, indexed by reference id
NaN,
0,
null,
true,
false,
globalThis,
this,
];
this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id
this._ids = new Map([ // mapping from JS values to reference ids
[0, 1],
[null, 2],
[true, 3],
[false, 4],
[globalThis, 5],
[this, 6],
]);
this._idPool = []; // unused ids that have been garbage collected
this.exited = false; // whether the Go program has exited
// Pass command line arguments and environment variables to WebAssembly by writing them to the linear memory.
let offset = 4096;
const strPtr = (str) => {
const ptr = offset;
const bytes = encoder.encode(str + "\0");
new Uint8Array(this.mem.buffer, offset, bytes.length).set(bytes);
offset += bytes.length;
if (offset % 8 !== 0) {
offset += 8 - (offset % 8);
}
return ptr;
};
const argc = this.argv.length;
const argvPtrs = [];
this.argv.forEach((arg) => {
argvPtrs.push(strPtr(arg));
});
argvPtrs.push(0);
const keys = Object.keys(this.env).sort();
keys.forEach((key) => {
argvPtrs.push(strPtr(`${key}=${this.env[key]}`));
});
argvPtrs.push(0);
const argv = offset;
argvPtrs.forEach((ptr) => {
this.mem.setUint32(offset, ptr, true);
this.mem.setUint32(offset + 4, 0, true);
offset += 8;
});
// The linker guarantees global data starts from at least wasmMinDataAddr.
// Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr.
const wasmMinDataAddr = 4096 + 8192;
if (offset >= wasmMinDataAddr) {
throw new Error("total length of command line and environment variables exceeds limit");
}
this._inst.exports.run(argc, argv);
if (this.exited) {
this._resolveExitPromise();
}
await this._exitPromise;
}
_resume() {
if (this.exited) {
throw new Error("Go program has already exited");
}
this._inst.exports.resume();
if (this.exited) {
this._resolveExitPromise();
}
}
_makeFuncWrapper(id) {
const go = this;
return function () {
const event = { id: id, this: this, args: arguments };
go._pendingEvent = event;
go._resume();
return event.result;
};
}
}
})();
// @license-end

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7.5 1.019531 c -0.550781 0 -0.996094 0.445313 -0.996094 0.996094 v 0.453125 c -0.472656 0.128906 -0.929687 0.320312 -1.355468 0.566406 l -0.324219 -0.324218 c -0.390625 -0.390626 -1.019531 -0.390626 -1.410157 0 l -0.703124 0.707031 c -0.390626 0.390625 -0.390626 1.019531 0 1.410156 l 0.320312 0.320313 c -0.246094 0.425781 -0.433594 0.882812 -0.5625 1.355468 h -0.453125 c -0.550781 0 -0.996094 0.445313 -0.996094 0.996094 v 1 c 0 0.550781 0.445313 0.996094 0.996094 0.996094 h 0.449219 c 0.132812 0.472656 0.320312 0.929687 0.566406 1.355468 l -0.320312 0.320313 c -0.390626 0.390625 -0.390626 1.019531 0 1.410156 l 0.703124 0.707031 c 0.390626 0.390626 1.019532 0.390626 1.410157 0 l 0.320312 -0.320312 c 0.429688 0.242188 0.882813 0.433594 1.359375 0.558594 v 0.457031 c 0 0.550781 0.445313 0.996094 0.996094 0.996094 h 0.996094 c 0.554687 0 1 -0.445313 1 -0.996094 v -0.453125 c 0.472656 -0.128906 0.929687 -0.320312 1.355468 -0.566406 l 0.320313 0.324218 c 0.390625 0.390626 1.019531 0.390626 1.410156 0 l 0.707031 -0.707031 c 0.390626 -0.390625 0.390626 -1.019531 0 -1.410156 l -0.320312 -0.320313 c 0.242188 -0.425781 0.433594 -0.882812 0.558594 -1.355468 h 0.453125 c 0.554687 0 1 -0.445313 1 -0.996094 v -1 c 0 -0.550781 -0.445313 -0.996094 -1 -0.996094 h -0.449219 c -0.128906 -0.472656 -0.320312 -0.929687 -0.566406 -1.355468 l 0.324218 -0.320313 c 0.390626 -0.390625 0.390626 -1.019531 0 -1.410156 l -0.707031 -0.707031 c -0.390625 -0.390626 -1.019531 -0.390626 -1.410156 0 l -0.320313 0.320312 c -0.425781 -0.242188 -0.882812 -0.429688 -1.355468 -0.558594 v -0.457031 c 0 -0.550781 -0.445313 -0.996094 -1 -0.996094 z m 0.515625 3.976563 c 1.660156 0 3 1.34375 3 3 s -1.339844 3 -3 3 c -1.65625 0 -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,2 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7 1 v 6 h -6 v 2 h 6 v 6 h 2 v -6 h 6 v -2 h -6 v -6 z m 0 0" fill="#222222"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M450-450H200v-60h250v-250h60v250h250v60H510v250h-60v-250Z"/></svg>

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 163 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#000000"><path d="M400-80 0-480l400-400 56 57-343 343 343 343-56 57Z"/></svg>

Before

Width:  |  Height:  |  Size: 175 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#000000"><path d="m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z"/></svg>

Before

Width:  |  Height:  |  Size: 222 B

View File

@ -1,10 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 1 3 h 14 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 h -14 c -0.550781 0 -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
<path d="m 4 4 v -1.5 c 0 -1.386719 1.113281 -2.5 2.5 -2.5 h 2.980469 c 1.382812 0 2.5 1.113281 2.5 2.5 v 1.5 h -2 v -1.5 c 0 -0.269531 -0.230469 -0.5 -0.5 -0.5 h -2.980469 c -0.269531 0 -0.5 0.230469 -0.5 0.5 v 1.5 z m 0 0"/>
<path d="m 4 4 v 9 c 0 0.546875 0.453125 1 1 1 h 6 c 0.546875 0 1 -0.453125 1 -1 v -9 h 2 v 9 c 0 1.660156 -1.339844 3 -3 3 h -6 c -1.660156 0 -3 -1.339844 -3 -3 v -9 z m 0 0"/>
<path d="m 7 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
<path d="m 10 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 300 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#000000"><path d="M251-160q-88 0-149.5-61.5T40-371q0-79 50.5-137.5T217-579q15-84 82-148.5T451-792q24 0 42 13.5t18 36.5v294l83-83 43 43-156 156-156-156 43-43 83 83v-289q-86 11-135 75.5T267-522h-19q-61 0-104.5 43T100-371q0 65 45 108t106 43h500q45 0 77-32t32-77q0-45-32-77t-77-32h-63v-84q0-68-33-117.5T570-718v-65q81 29 129.5 101T748-522v24q72-2 122 46t50 123q0 69-50 119t-119 50H251Zm229-347Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M480-313 287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193ZM220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Z"/></svg>

Before

Width:  |  Height:  |  Size: 497 B

After

Width:  |  Height:  |  Size: 249 B

View File

@ -1,44 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg fill="none" viewBox="0 0 390 390" xmlns="http://www.w3.org/2000/svg">
<path d="m40 69c0-17.673 14.327-32 32-32h235c17.673 0 32 14.327 32 32v38h-299v-38z" fill="#71CCB9"/>
<rect x="40" y="107" width="299" height="70" fill="#5EB5C7"/>
<rect x="40" y="177" width="299" height="70" fill="#54A9CE"/>
<path d="m40 247h299v75c0 17.673-14.327 32-32 32h-235c-17.673 0-32-14.327-32-32v-75z" fill="#3786E3"/>
<rect x="40" y="247" width="299" height="70" fill="#499CD5"/>
<path d="m40 69c0-17.673 14.327-32 32-32h57v317h-57c-17.673 0-32-14.327-32-32v-253z" fill="url(#d)"/>
<g filter="url(#e)">
<rect x="145" y="83" width="225" height="225" rx="32" fill="#F8FCFC"/>
<svg width="527" height="533" viewBox="0 0 527 533" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_6_27)">
<path d="M451 352.333C451 375.896 431.896 395 408.333 395H152.333C128.771 395 109.667 375.896 109.667 352.333V142.339C109.667 118.776 171.437 75 195 75H393.667C426.669 75 451 99.6613 451 132.333V352.333Z" fill="#226699"/>
<path d="M429.667 395C429.667 418.563 410.563 437.667 387 437.667H173.667C150.104 437.667 131 418.563 131 395V139C131 95.064 130.776 96.3333 184.333 96.3333H387C410.563 96.3333 429.667 115.437 429.667 139V395Z" fill="url(#paint0_linear_6_27)"/>
<path d="M408.333 405.667C408.333 423.341 394.008 437.667 376.333 437.667H141.667C123.992 437.667 109.667 423.341 109.667 405.667V149.667C109.667 131.992 123.992 117.667 141.667 117.667H376.333C394.008 117.667 408.333 131.992 408.333 149.667V405.667Z" fill="#E1E8ED"/>
<path d="M158.115 426.776C158.115 434.264 151 440.333 142.221 440.333C133.453 440.333 126.339 434.264 126.339 426.776C126.339 419.299 133.453 413.219 142.221 413.219C151 413.219 158.115 419.288 158.115 426.776Z" fill="#662113"/>
<path d="M140.536 419.224C135.416 419.811 132.088 423.224 129.688 427C126.413 432.173 118.947 437.667 109.667 437.667C97.8906 437.667 88.3333 430.509 88.3333 421.667C88.3333 412.824 97.8906 405.667 109.667 405.667V384.376C86.552 384.6 67.8853 401.176 67.8853 421.667C67.8853 442.296 86.7866 459 110.104 459C129.88 459 145.805 447.853 151.715 431.597C154.669 423.501 146.712 418.541 140.536 419.224Z" fill="url(#paint1_linear_6_27)"/>
<path d="M158.115 341.443C158.115 348.931 151 355 142.221 355C133.453 355 126.339 348.931 126.339 341.443C126.339 333.965 133.453 327.885 142.221 327.885C151 327.885 158.115 333.955 158.115 341.443Z" fill="#662113"/>
<path d="M140.536 333.891C135.416 334.477 132.088 337.891 129.688 341.667C126.413 346.84 118.947 352.333 109.667 352.333C97.8906 352.333 88.3333 345.176 88.3333 336.333C88.3333 327.491 97.8906 320.333 109.667 320.333V299.043C86.552 299.267 67.8853 315.843 67.8853 336.333C67.8853 356.963 86.7866 373.667 110.104 373.667C129.88 373.667 145.805 362.52 151.715 346.264C154.669 338.168 146.712 333.208 140.536 333.891Z" fill="url(#paint2_linear_6_27)"/>
<path d="M158.115 256.109C158.115 263.597 151 269.667 142.221 269.667C133.453 269.667 126.339 263.597 126.339 256.109C126.339 248.632 133.453 242.552 142.221 242.552C151 242.552 158.115 248.621 158.115 256.109Z" fill="#662113"/>
<path d="M140.536 248.557C135.416 249.144 132.088 252.557 129.688 256.333C126.413 261.507 118.947 267 109.667 267C97.8906 267 88.3333 259.843 88.3333 251C88.3333 242.157 97.8906 235 109.667 235V213.709C86.552 213.933 67.8853 230.509 67.8853 251C67.8853 271.629 86.7866 288.333 110.104 288.333C129.88 288.333 145.805 277.187 151.715 260.931C154.669 252.835 146.712 247.875 140.536 248.557Z" fill="url(#paint3_linear_6_27)"/>
<path d="M158.115 170.776C158.115 178.264 151 184.333 142.221 184.333C133.453 184.333 126.339 178.264 126.339 170.776C126.339 163.299 133.453 157.219 142.221 157.219C151 157.219 158.115 163.288 158.115 170.776Z" fill="#662113"/>
<path d="M140.536 163.224C135.416 163.811 132.088 167.224 129.688 171C126.413 176.173 118.947 181.667 109.667 181.667C97.8906 181.667 88.3333 174.509 88.3333 165.667C88.3333 156.824 97.8906 149.667 109.667 149.667V128.376C86.5626 128.589 67.8853 145.176 67.8853 165.667C67.8853 186.296 86.7866 203 110.104 203C129.88 203 145.805 191.853 151.715 175.597C154.669 167.501 146.712 162.541 140.536 163.224Z" fill="url(#paint4_linear_6_27)"/>
<path d="M281 300.771C192.496 300.771 120.756 298.646 120.756 361.47C120.756 424.266 192.496 438.556 281 438.556C369.504 438.556 441.244 424.266 441.244 361.47C441.244 298.655 369.504 300.771 281 300.771Z" fill="#D99E82"/>
<path d="M436.55 305.54C436.55 305.54 358.926 296.247 281 295.85C203.074 296.247 125.45 305.54 125.45 305.54C117.772 366.683 181.522 391.872 281 391.872C380.478 391.872 444.228 366.683 436.55 305.54Z" fill="#662113"/>
<path d="M431.035 281.098L130.182 287.199C119.793 287.199 111.095 308.251 122.116 313.757C204.358 339.332 270.47 365.21 270.47 365.21C279.555 370.234 282.625 370.253 291.72 365.238C291.72 365.238 383.009 328.707 441.65 313.36C449.971 311.188 441.414 281.098 431.035 281.098Z" fill="#FFCC4D"/>
<path d="M438.958 281.891C421.014 265.354 422.053 274.156 408.302 270.274C403.079 268.801 365.707 220.493 280.528 220.493H280.339C195.159 220.493 157.788 268.801 152.565 270.274C138.814 274.156 139.853 265.354 121.908 281.891C113.673 289.484 111.444 293.432 120.133 295.397C133.223 298.353 132.033 306.277 141.411 309.034C152.763 312.368 157.429 306.277 175.732 308.77C191.344 310.895 192.364 331.144 208.117 331.144C223.871 331.144 223.871 323.588 239.614 323.588C255.358 323.588 264.671 343.856 280.424 343.856C296.177 343.856 305.48 323.588 321.233 323.588C336.987 323.588 336.987 331.144 352.731 331.144C368.484 331.144 369.504 310.895 385.116 308.77C403.419 306.286 408.094 312.368 419.437 309.034C428.815 306.277 427.625 298.362 440.715 295.397C449.423 293.442 447.203 289.484 438.958 281.891Z" fill="#77B255"/>
<path d="M432.838 264.022C432.838 292.204 364.857 305.512 281 305.512C197.143 305.512 129.162 292.204 129.162 264.022C129.162 212.994 138.285 212.994 281 212.994C423.715 212.994 432.838 213.003 432.838 264.022Z" fill="#DD2E44"/>
<path d="M281 112.949C192.496 112.949 120.756 154.419 120.756 217.234C120.756 275.082 192.496 277.443 281 277.443C369.504 277.443 441.244 275.082 441.244 217.234C441.244 154.41 369.504 112.949 281 112.949Z" fill="#D99E82"/>
<path d="M212.849 142.897C208.146 139.884 201.903 141.263 198.899 145.967C195.896 150.67 197.266 156.922 201.969 159.916C206.672 162.929 218.591 165.177 221.604 160.473C224.607 155.77 217.552 145.901 212.849 142.897ZM304.781 133.122C299.473 134.841 290.152 142.623 291.88 147.931C293.608 153.239 305.707 154.051 311.014 152.332C316.322 150.613 319.222 144.909 317.493 139.601C315.774 134.303 310.07 131.394 304.781 133.122ZM407.811 199.564C403.542 195.975 392.841 201.689 389.243 205.958C385.654 210.236 386.211 216.602 390.48 220.191C394.749 223.779 401.124 223.222 404.713 218.953C408.311 214.675 412.089 203.153 407.811 199.564ZM373.404 152.342C368.701 149.338 362.458 150.717 359.446 155.421C356.442 160.124 357.821 166.367 362.524 169.37C367.228 172.383 379.147 174.631 382.15 169.927C385.163 165.214 378.108 155.345 373.404 152.342ZM231.738 218.453C227.034 215.449 220.792 216.828 217.779 221.532C214.776 226.226 216.154 232.478 220.858 235.472C225.561 238.484 237.48 240.742 240.483 236.029C243.496 231.326 236.441 221.456 231.738 218.453ZM260.506 173.044C257.332 177.634 254.65 189.468 259.249 192.641C263.839 195.814 273.954 189.109 277.128 184.519C280.301 179.929 279.139 173.639 274.549 170.466C269.969 167.292 263.669 168.454 260.506 173.044ZM335.627 218.453C330.923 215.449 324.681 216.828 321.668 221.532C318.664 226.226 320.043 232.487 324.747 235.472C329.45 238.484 341.369 240.742 344.372 236.029C347.385 231.326 340.33 221.456 335.627 218.453ZM157.731 181.742C154.01 185.907 149.864 197.307 154.029 201.028C158.175 204.749 169.055 199.384 172.776 195.219C176.507 191.064 176.148 184.679 171.992 180.949C167.846 177.228 161.452 177.587 157.731 181.742Z" fill="#FFE8B6"/>
</g>
<path d="m200.03 275v-161h37.49l56.12 148.81h2.99v-148.81h19.09v161h-37.49l-55.89-149.04h-3.22v149.04h-19.09z" fill="#54A9CE"/>
<path d="m65.488 117.22c-4.122 0.542-6.8012 3.698-8.7334 7.19-2.6363 4.783-8.6474 9.862-16.118 9.862-9.4805 0-17.175-6.617-17.175-14.794 0-8.176 7.6942-14.794 17.175-14.794v-19.686c-18.6 0.1973-33.637 15.534-33.637 34.48 0 19.075 15.217 34.52 33.989 34.52 15.921 0 28.742-10.307 33.499-25.337 2.3787-7.486-4.0275-12.073-8.9995-11.441z" fill="url(#c)"/>
<path d="m65.488 197.76c-4.122 0.534-6.8012 3.645-8.7334 7.085-2.6363 4.715-8.6474 9.72-16.118 9.72-9.4805 0-17.175-6.522-17.175-14.579 0-8.058 7.6942-14.58 17.175-14.58v-19.401c-18.6 0.194-33.637 15.309-33.637 33.981 0 18.798 15.217 34.019 33.989 34.019 15.921 0 28.742-10.157 33.499-24.97 2.3787-7.378-4.0275-11.897-8.9995-11.275z" fill="url(#b)"/>
<path d="m65.488 280.22c-4.122 0.542-6.8012 3.698-8.7334 7.19-2.6363 4.783-8.6474 9.862-16.118 9.862-9.4805 0-17.175-6.617-17.175-14.794 0-8.176 7.6942-14.794 17.175-14.794v-19.686c-18.6 0.197-33.637 15.534-33.637 34.48 0 19.075 15.217 34.52 33.989 34.52 15.921 0 28.742-10.307 33.499-25.337 2.3787-7.486-4.0275-12.073-8.9995-11.441z" fill="url(#a)"/>
<path d="M408.333 416.333C408.333 439.896 389.229 459 365.667 459H163C139.437 459 120.333 439.896 120.333 416.333V181.667C120.333 158.104 139.437 139 163 139H365.667C389.229 139 408.333 158.104 408.333 181.667V416.333Z" fill="#3B88C3"/>
<path d="M387 416.333C387 439.896 367.896 459 344.333 459H163C139.437 459 120.333 439.896 120.333 416.333V203C120.333 179.437 139.437 160.333 163 160.333H347.907C371.469 160.333 387 175.864 387 199.427V416.333Z" fill="url(#paint5_linear_6_27)"/>
<path d="M163 139C144.995 139 144.536 118.499 152.333 109.667C161.208 99.6293 175 96.3333 199.672 96.3333H216.333V75H187.331C144.995 75 109.667 101.667 109.667 132.333V416.333C109.667 439.896 128.771 459 152.333 459H173.667V139H163Z" fill="#226699"/>
<defs>
<filter id="e" x="133" y="83" width="249" height="249" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="12"/>
<feGaussianBlur stdDeviation="6"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
<feBlend in2="BackgroundImageFix" result="effect1_dropShadow_3_81"/>
<feBlend in="SourceGraphic" in2="effect1_dropShadow_3_81" result="shape"/>
</filter>
<linearGradient id="d" x1="84.5" x2="84.5" y1="37" y2="354" gradientUnits="userSpaceOnUse">
<stop stop-color="#A2D6DB" offset="0"/>
<stop stop-color="#6BB0B7" offset="1"/>
<linearGradient id="paint0_linear_6_27" x1="280.333" y1="96.3295" x2="280.333" y2="437.667" gradientUnits="userSpaceOnUse">
<stop stop-color="#CCD6DD"/>
<stop offset="1" stop-color="#CCD6DD" stop-opacity="0"/>
</linearGradient>
<linearGradient id="c" x1="41" x2="41" y1="85" y2="154" gradientUnits="userSpaceOnUse">
<stop stop-color="#A2D6DB" offset="0"/>
<stop stop-color="#6BB0B7" offset="1"/>
<linearGradient id="paint1_linear_6_27" x1="110.118" y1="384.376" x2="110.118" y2="459" gradientUnits="userSpaceOnUse">
<stop stop-color="#66757F"/>
<stop offset="1" stop-color="#50585C"/>
<stop offset="1" stop-color="#50585C"/>
</linearGradient>
<linearGradient id="b" x1="41" x2="41" y1="166" y2="234" gradientUnits="userSpaceOnUse">
<stop stop-color="#A2D6DB" offset="0"/>
<stop stop-color="#6BB0B7" offset="1"/>
<linearGradient id="paint2_linear_6_27" x1="110.118" y1="299.043" x2="110.118" y2="373.667" gradientUnits="userSpaceOnUse">
<stop stop-color="#66757F"/>
<stop offset="1" stop-color="#50585C"/>
</linearGradient>
<linearGradient id="a" x1="41" x2="41" y1="248" y2="317" gradientUnits="userSpaceOnUse">
<stop stop-color="#A2D6DB" offset="0"/>
<stop stop-color="#6BB0B7" offset="1"/>
<linearGradient id="paint3_linear_6_27" x1="110.118" y1="213.709" x2="110.118" y2="288.333" gradientUnits="userSpaceOnUse">
<stop stop-color="#66757F"/>
<stop offset="1" stop-color="#50585C"/>
</linearGradient>
<linearGradient id="paint4_linear_6_27" x1="110.118" y1="128.376" x2="110.118" y2="203" gradientUnits="userSpaceOnUse">
<stop stop-color="#66757F"/>
<stop offset="1" stop-color="#50585C"/>
</linearGradient>
<linearGradient id="paint5_linear_6_27" x1="253.667" y1="160.333" x2="253.667" y2="459" gradientUnits="userSpaceOnUse">
<stop stop-color="#55ACEE"/>
<stop offset="1" stop-color="#55ACEE" stop-opacity="0"/>
</linearGradient>
<clipPath id="clip0_6_27">
<rect width="384" height="384" fill="white" transform="translate(67 75)"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

3535
static/svg/grid.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 244 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#000000"><path d="M350-220h470v-137H350v137ZM140-603h150v-137H140v137Zm0 187h150v-127H140v127Zm0 196h150v-137H140v137Zm210-196h470v-127H350v127Zm0-187h470v-137H350v137ZM140-160q-24 0-42-18t-18-42v-520q0-24 18-42t42-18h680q24 0 42 18t18 42v520q0 24-18 42t-42 18H140Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M290-620v-60h550v60H290Zm0 170v-60h550v60H290Zm0 170v-60h550v60H290ZM150-620q-12 0-21-9t-9-21.5q0-12.5 9-21t21.5-8.5q12.5 0 21 8.625T180-650q0 12-8.625 21T150-620Zm0 170q-12 0-21-9t-9-21.5q0-12.5 9-21t21.5-8.5q12.5 0 21 8.625T180-480q0 12-8.625 21T150-450Zm0 170q-12 0-21-9t-9-21.5q0-12.5 9-21t21.5-8.5q12.5 0 21 8.625T180-310q0 12-8.625 21T150-280Z"/></svg>

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 455 B

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 0 2 v 2 h 16 v -2 z m 0 3 v 7 h 2 v -4.542969 l 2.09375 4.542969 h 1.8125 l 2.09375 -4.542969 v 4.542969 h 2 v -7 h -3 l -2 4 l -2 -4 z m 10 4 l 3 3 l 3 -3 h -2 v -4 h -2 v 4 z m -10 4 v 2 h 16 v -2 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 367 B

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 3 7 h 10 v 2 h -10 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 188 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 -960 960 960" width="40px" fill="#000000"><path d="M80-200v-67.33h800V-200H80Zm40.67-250-44-24.67 38-65.33H40v-50h74.67l-38-64.67 44-24.66 36.66 64 36.67-64 44 24.66L200-590h74.67v50H200l38 65.33L194-450l-36.67-64.67L120.67-450Zm322.66 0-44-26 38-65.33h-74.66v-50h74.66l-38-64.67 44-24.67 36.67 64 36.67-64 44 24.67-38 64.67h74.66v50h-74.66l38 65.33-44 26L480-514.67 443.33-450ZM766-450l-44-26 38-65.33h-74.67v-50H760L722-656l44-24.67 36.67 64 36.66-64 44 24.67-38 64.67H920v50h-74.67l38 65.33-44 26-36.66-64.67L766-450Z"/></svg>

Before

Width:  |  Height:  |  Size: 594 B

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7 3 v 4 h -4 v 2 h 4 v 4 h 2 v -4 h 4 v -2 h -4 v -4 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 222 B

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 7.996094 12 c -0.703125 0 -1.355469 0.371094 -1.714844 0.972656 h -3.285156 c -0.554688 0 -1 0.449219 -1 1 c 0 0.550782 0.445312 1 1 1 h 3.246094 c 0.351562 0.640625 1.023437 1.035156 1.753906 1.039063 c 0.726562 -0.003907 1.398437 -0.398438 1.75 -1.039063 h 3.261718 c 0.550782 0 1 -0.449218 1 -1 c 0 -0.550781 -0.449218 -1 -1 -1 h -3.292968 c -0.363282 -0.601562 -1.015625 -0.972656 -1.71875 -0.972656 z m 0 1 c 0.554687 0 1.003906 0.449219 1.003906 1.007812 c 0 0.554688 -0.449219 1.003907 -1.003906 1.003907 c -0.558594 0 -1.007813 -0.449219 -1.007813 -1.003907 c 0 -0.558593 0.449219 -1.007812 1.007813 -1.007812 z m 0 0"/>
<path d="m 6.992188 10 h 2.007812 v 3 h -2.007812 z m 0 0"/>
<path d="m 11.992188 2 c 1.113281 0 2.007812 0.894531 2.007812 2.007812 v 2.972657 c 0 1.109375 -0.894531 2.003906 -2.007812 2.003906 h -7.984376 c -1.113281 0 -2.007812 -0.894531 -2.007812 -2.003906 v -2.972657 c 0 -1.113281 0.894531 -2.007812 2.007812 -2.007812 z m -11.992188 2.007812 v 2.972657 c 0 2.21875 1.789062 4.003906 4.007812 4.003906 h 7.984376 c 2.21875 0 4.007812 -1.785156 4.007812 -4.003906 v -2.972657 c 0 -2.21875 -1.789062 -4.007812 -4.007812 -4.007812 h -7.984376 c -2.21875 0 -4.007812 1.789062 -4.007812 4.007812 z m 0 0"/>
<path d="m 5 4 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
<path d="m 8 4 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 -960 960 960" width="48px" fill="#000000"><path d="M250-160q-86 0-148-62T40-370q0-78 49.5-137.5T217-579q20-97 94-158.5T482-799q113 0 189.5 81.5T748-522v24q72-2 122 46.5T920-329q0 69-50 119t-119 50H510q-24 0-42-18t-18-42v-258l-83 83-43-43 156-156 156 156-43 43-83-83v258h241q45 0 77-32t32-77q0-45-32-77t-77-32h-63v-84q0-89-60.5-153T478-739q-89 0-150 64t-61 153h-19q-62 0-105 43.5T100-371q0 62 43.93 106.5T250-220h140v60H250Zm230-290Z"/></svg>

Before

Width:  |  Height:  |  Size: 506 B

View File

@ -1 +0,0 @@
200

Binary file not shown.