change dumb date field and tos and some minor styling and things
Some checks failed
Docker Image CI / build (push) Has been cancelled

This commit is contained in:
mtgmonkey 2025-06-10 21:54:52 -04:00
parent ea9268d856
commit 0e59a339c8
13 changed files with 95 additions and 106 deletions

View file

@ -6,9 +6,9 @@
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>Jank Client</title>
<meta content="Jank Client" property="og:title" />
<meta content="A spacebar client that has DMs, replying and more" property="og:description" />
<title>Jankfork</title>
<meta content="Jankfork" property="og:title" />
<meta content="The bestest spacebar client" property="og:description" />
<meta content="/logo.webp" property="og:image" />
<meta content="#4b458c" data-react-helmet="true" name="theme-color" />
<link href="/style.css" rel="stylesheet" />
@ -32,7 +32,7 @@
<div id="loading" class="loading">
<div class="centeritem">
<img src="/logo.svg" style="width: 3in; height: 3in" />
<h1 id="loadingText">Jank Client is loading</h1>
<h1 id="loadingText">Andromeda's Jank Client Fork is loading</h1>
<h2 id="load-desc">This shouldn't take long</h2>
<h1 id="switchaccounts">Switch Accounts</h1>
</div>

View file

@ -3,10 +3,10 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<meta content="Jank Client" property="og:title" />
<meta content="A spacebar client that has DMs, replying and more" property="og:description" />
<meta content="A spacebar client that has DMs, replying and more" name="description" />
<title>Jankfork</title>
<meta content="Jankfork" property="og:title" />
<meta content="The bestest spacebar client" property="og:description" />
<meta content="The bestest spacebar client" name="description" />
<meta content="/logo.webp" property="og:image" />
<meta content="#4b458c" data-react-helmet="true" name="theme-color" />
<link href="/style.css" rel="stylesheet" />
@ -25,16 +25,21 @@
<body class="no-theme" style="overflow-y: scroll">
<div id="titleDiv">
<!--
<img src="/logo.svg" width="40" alt="" />
<h1 id="pageTitle">Jank Client</h1>
<h1 id="pageTitle">Andromeda's Jank Client</h1>
<a href="/invite/USgYJo?instance=https%3A%2F%2Fspacebar.chat" class="TitleButtons">
Spacebar Guild
</a>
<a href="https://github.com/MathMan05/JankClient" class="TitleButtons"> Github </a>
-->
<a href="/channels/@me" class="TitleButtons" id="openClient"> Open Client </a>
<a href="https://git.mtgmonkey.net/jank-client-fork.git?h=main" class="TitleButtons"> Fork@Git </a>
<a href="https://github.com/MathMan05/JankClient" class="TitleButtons"> Original@Github </a>
</div>
<div id="homePage">
<h1 class="pagehead" id="welcomeJank">Welcome to Jank Client</h1>
<h1 class="pagehead" id="welcomeJank">Welcome to Andromeda's Jank Client!</h1>
<!--
<div class="pagebox">
<p id="box1title">
Jank Client is a Spacebar-compatible client seeking to be as good as it can be with many
@ -51,11 +56,12 @@
<li>Translation support</li>
</ul>
</div>
-->
<div class="pagebox">
<h2 id="compatableInstances">Spacebar-Compatible Instances:</h2>
<h2 id="compatableInstances">Instances:</h2>
<div id="instancebox"></div>
</div>
<!--
<div class="pagebox">
<h2 id="box4title">Translate Jank Client</h2>
<p id="box4description">You can help translate Jank Client into your own language!</p>
@ -78,6 +84,7 @@
<br />
<a href="https://github.com/MathMan05/JankClient" class="TitleButtons"> Github </a>
</div>
-->
</div>
</body>
<script src="/home.js" type="module"></script>

View file

@ -8,48 +8,48 @@ const serverbox = document.getElementById("instancebox") as HTMLDivElement;
await I18n.done;
const openClient = document.getElementById("openClient");
const welcomeJank = document.getElementById("welcomeJank");
const box1title = document.getElementById("box1title");
const box1Items = document.getElementById("box1Items");
// const box1title = document.getElementById("box1title");
// const box1Items = document.getElementById("box1Items");
const compatableInstances = document.getElementById("compatableInstances");
const box3title = document.getElementById("box3title");
const box3description = document.getElementById("box3description");
// const box3title = document.getElementById("box3title");
// const box3description = document.getElementById("box3description");
const box4title = document.getElementById("box4title");
const box4description = document.getElementById("box4description");
const translate = document.getElementById("translate");
// const box4title = document.getElementById("box4title");
// const box4description = document.getElementById("box4description");
// const translate = document.getElementById("translate");
if (
openClient &&
welcomeJank &&
compatableInstances &&
box3title &&
box3description &&
box1title &&
box1Items &&
box4title &&
box4description &&
translate
compatableInstances
// box3title &&
// box3description &&
// box1title &&
// box1Items &&
// box4title &&
// box4description &&
// translate
) {
openClient.textContent = I18n.getTranslation("htmlPages.openClient");
welcomeJank.textContent = I18n.getTranslation("htmlPages.welcomeJank");
box1title.textContent = I18n.getTranslation("htmlPages.box1title");
// box1title.textContent = I18n.getTranslation("htmlPages.box1title");
compatableInstances.textContent = I18n.getTranslation("htmlPages.compatableInstances");
box3title.textContent = I18n.getTranslation("htmlPages.box3title");
box3description.textContent = I18n.getTranslation("htmlPages.box3description");
// box3title.textContent = I18n.getTranslation("htmlPages.box3title");
// box3description.textContent = I18n.getTranslation("htmlPages.box3description");
box4title.textContent = I18n.htmlPages.transTitle();
box4title.textContent = I18n.htmlPages.transDesc();
box4title.textContent = I18n.htmlPages.trans();
// box4title.textContent = I18n.htmlPages.transTitle();
// box4title.textContent = I18n.htmlPages.transDesc();
// box4title.textContent = I18n.htmlPages.trans();
const items = I18n.getTranslation("htmlPages.box1Items").split("|");
/* const items = I18n.getTranslation("htmlPages.box1Items").split("|");
let i = 0;
//@ts-ignore ts is being dumb here
for (const item of box1Items.children) {
(item as HTMLElement).textContent = items[i];
i++;
}
} */
} else {
console.error(
/* console.error(
openClient,
welcomeJank,
compatableInstances,
@ -57,7 +57,7 @@ const serverbox = document.getElementById("instancebox") as HTMLDivElement;
box3description,
box1title,
box1Items,
);
); */
}
})();

View file

@ -1,34 +1,14 @@
[
{
"name": "Spacebar",
"description": "The official Spacebar instance.",
{
"name": "Andromeda's Instance",
"description": "The bestest Spacebar instance.",
"image": "https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/png/Spacebar__Icon-Discord.png",
"urls": {
"wellknown": "https://spacebar.chat/",
"api": "https://old.server.spacebar.chat/api",
"cdn": "https://cdn.old.server.spacebar.chat",
"gateway": "wss://gateway.old.server.spacebar.chat"
},
"url": "https://spacebar.chat"
},
{
"name": "Fastbar",
"description": "The best Spacebar instance with 95% uptime, running under on a NVME drive running with bleeding edge stuff <3",
"image": "https://spacebar.greysilly7.xyz/logo.png",
"url": "https://greysilly7.xyz",
"language": "en",
"country": "US",
"display": true,
"urls": {
"wellknown": "https://greysilly7.xyz",
"api": "https://api-spacebar.greysilly7.xyz/api",
"cdn": "https://cdn-spacebar.greysilly7.xyz",
"gateway": "wss://gateway-spacebar.greysilly7.xyz"
},
"contactInfo": {
"dicord": "greysilly7",
"github": "https://github.com/greysilly7",
"email": "greysilly7@gmail.com"
}
}
]
"urls": {
"wellknown": "https://spacebar-api.mtgmonkey.net",
"api": "https://spacebar-api.mtgmonkey.net/api/v9",
"cdn": "https://spacebar-api.mtgmonkey.net",
"gateway": "wss://spacebar-api.mtgmonkey.net"
},
"url": "https://spacebar-api.mtgmonkey.net"
}
]

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<title>Jankfork</title>
<meta content="Invite" property="og:title" />
<meta content="Accept this invite for a spacebar guild" property="og:description" />
<meta name="description" content="You shouldn't see this, but this is an invite URL" />
@ -27,8 +27,8 @@
<div id="invitebody">
<div id="inviteimg"></div>
<h1 id="invitename">Server Name</h1>
<p id="invitedescription">Someone invited you to Server Name</p>
<button id="AcceptInvite">Accept Invite</button>
<p id="invitedescription">Invite loading... Refresh in a few seconds if it doesn't load</p>
<button id="AcceptInvite">loading...</button>
</div>
</div>
<script src="/invite.js" type="module"></script>

View file

@ -60,6 +60,7 @@ import {getBulkUsers, Specialuser} from "./utils/utils.js";
json.inviter.username,
guildjson.name,
);
document.getElementById("AcceptInvite")!.textContent = "Accept Invite"
if (guildjson.icon) {
const img = document.createElement("img");
img.src = `${urls!.cdn}/icons/${guildjson.id}/${guildjson.icon}.png`;

View file

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<meta content="Jank Client" property="og:title" />
<meta content="A spacebar client that has DMs, replying and more" property="og:description" />
<title>Jankfork</title>
<meta content="Jankfork" property="og:title" />
<meta content="The bestest spacebar client" property="og:description" />
<meta content="/logo.webp" property="og:image" />
<meta content="#4b458c" data-react-helmet="true" name="theme-color" />
<link href="/style.css" rel="stylesheet" />

View file

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<meta content="Jank Client" property="og:title" />
<meta content="A spacebar client that has DMs, replying and more" property="og:description" />
<title>Jankfork</title>
<meta content="Jankfork" property="og:title" />
<meta content="The bestest spacebar client" property="og:description" />
<meta content="/logo.webp" property="og:image" />
<meta content="#4b458c" data-react-helmet="true" name="theme-color" />
<link href="/style.css" rel="stylesheet" />

View file

@ -11,7 +11,7 @@ export async function makeRegister(trasparentBg = false, instance = "") {
(info) => {
const api = info.login + (info.login.startsWith("/") ? "/" : "");
form.fetchURL = api + "/auth/register";
tosLogic(md);
// tosLogic(md);
},
{instance},
);
@ -52,24 +52,25 @@ export async function makeRegister(trasparentBg = false, instance = "") {
const user = form.addTextInput(I18n.htmlPages.userField(), "username");
const p1 = form.addTextInput(I18n.htmlPages.pwField(), "password", {password: true});
const p2 = form.addTextInput(I18n.htmlPages.pw2Field(), "password2", {password: true});
form.addDateInput(I18n.htmlPages.dobField(), "date_of_birth");
form.addDateInput(I18n.htmlPages.dobField(), "date_of_birth");
form.addPreprocessor((e) => {
if (p1.value !== p2.value) {
throw new FormError(p2, I18n.localuser.PasswordsNoMatch());
}
//@ts-expect-error it's there
delete e.password2;
if (!check.checked) throw new FormError(checkbox, I18n.register.tos());
// if (!check.checked) throw new FormError(checkbox, I18n.register.tos());
//@ts-expect-error it's there
e.consent = check.checked;
// e.consent = check.checked;
e.consent = true;
});
const toshtml = document.createElement("div");
/* const toshtml = document.createElement("div");
const md = document.createElement("span");
const check = document.createElement("input");
check.type = "checkbox";
toshtml.append(md, check);
const checkbox = form.addHTMLArea(toshtml);
const checkbox = form.addHTMLArea(toshtml); */
form.addCaptcha();
const a = document.createElement("a");
a.onclick = () => {
@ -87,7 +88,7 @@ async function tosLogic(box: HTMLElement) {
const data = await response.json();
const tosPage = data.instance.tosPage;
if (!box) return;
if (tosPage) {
if (tosPage) {
box.innerHTML = "";
box.append(new MarkDown(I18n.getTranslation("register.agreeTOS", tosPage)).makeHTML());
} else {

View file

@ -3,9 +3,9 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<meta content="Jank Client" property="og:title" />
<meta content="A spacebar client that has DMs, replying and more" property="og:description" />
<title>Jankfork</title>
<meta content="Jankfork" property="og:title" />
<meta content="The bestest spacebar client" property="og:description" />
<meta content="/logo.webp" property="og:image" />
<meta content="#4b458c" data-react-helmet="true" name="theme-color" />
<link href="/style.css" rel="stylesheet" />

View file

@ -1562,7 +1562,7 @@ class Form implements OptionsElement<object> {
this.names.set(formName, emoji);
return emoji;
}
addDateInput(label: string, formName: string, {initText = "", required = false} = {}) {
addDateInput(label: string, formName: string, {initText = "1900-01-01", required = false} = {}) {
const dateInput = this.options.addDateInput(label, (_) => {}, {
initText,
});
@ -1620,7 +1620,7 @@ class Form implements OptionsElement<object> {
addOptions(name: string, {ltr = false, noSubmit = false} = {}) {
return this.options.addOptions(name, {ltr, noSubmit});
}
addCheckboxInput(label: string, formName: string, {initState = false, required = false} = {}) {
addCheckboxInput(label: string, formName: string, {initState = true, required = false} = {}) {
const box = this.options.addCheckboxInput(label, (_) => {}, {initState});
this.names.set(formName, box);
if (required) {

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jank Client</title>
<title>Jankfork</title>
<meta content="Invite" property="og:title" />
<meta content="Accept this invite for a spacebar guild" property="og:description" />
<meta name="description" content="A server template" />

View file

@ -1,7 +1,7 @@
{
"@metadata": {
"authors": ["MathMan05"],
"last-updated": "2024/15/24",
"authors": ["MathMan05", "Andromeda"],
"last-updated": "2025/10/06",
"locale": "en",
"comment": "Don't know how often I'll update this top part lol"
},
@ -218,7 +218,7 @@
"htmlPages": {
"idpermissions": "This will allow the bot to:",
"addBot": "Add to server",
"loadingText": "Jank Client is loading",
"loadingText": "Jankfork is loading",
"loaddesc": "This shouldn't take long",
"switchaccounts": "Switch Accounts",
"instanceField": "Instance:",
@ -232,10 +232,10 @@
"createAccount": "Create account",
"alreadyHave": "Already have an account?",
"openClient": "Open Client",
"welcomeJank": "Welcome to Jank Client",
"welcomeJank": "Welcome to Andromeda's Jank Client Fork",
"box1title": "Jank Client is a Spacebar-compatible client seeking to be as good as it can be with many features including:",
"box1Items": "Direct Messaging|Reactions support|Invites|Account switching|User settings|Developer portal|Bot invites|Translation support",
"compatableInstances": "Spacebar-Compatible Instances:",
"compatableInstances": "Instances:",
"box3title": "Contribute to Jank Client",
"box3description": "We always appreciate some help, whether that be in the form of bug reports, or code, or even just pointing out some typos.",
"trans": "Translate",
@ -329,7 +329,7 @@
"INVITES_DISABLED": "Invite only",
"DISCOVERABLE": "Discovery"
},
"welcomeMessages": "Welcome $1! Nice to see ya!\nHello, nice to meat you $1!\nWelcome, hope you brought pizza $1!",
"welcomeMessages": "Welcome $1! Nice to see ya!\nHello, nice to meet you $1!\nWelcome, hope you brought pizza $1!",
"role": {
"displaySettings": "Display settings",
"name": "Role name:",
@ -341,7 +341,7 @@
"confirmDelete": "Are you sure you want to delete $1?"
},
"settings": {
"unsaved": "Careful, you have unsaved changes",
"unsaved": "Unsaved changes will be deleted.",
"save": "Save changes"
},
"localuser": {
@ -417,7 +417,7 @@
"connections": "Connections",
"deleteAccount": "Account Deletion",
"areYouSureDelete": "Are you sure you want to delete your account? If so enter the phrase $1",
"sillyDeleteConfirmPhrase": "Shrek is love, Shrek is life",
"sillyDeleteConfirmPhrase": "Andromeda ist eine schoene schmetterling",
"deleteAccountButton": "Delete account",
"mustTypePhrase": "To delete your account you must type the phrase",
"manageInstance": "Manage Instance"
@ -429,7 +429,7 @@
"new": "New",
"old": "Old",
"search": "Search",
"nofind": "There seems to be no messages that match your search, maybe trying broadening your search to try and find what you want"
"nofind": "No matching messages, try broadening your search."
},
"manageInstance": {
"stop": "Stop instance",
@ -510,8 +510,8 @@
"removeFriend": "Remove Friend",
"addfriendpromt": "Add friends by username:",
"notfound": "User not found",
"discnotfound": "Discriminator not found",
"pending": "Pending",
"discnotfound": "Add discriminator (numbers after #)",
"pending": "Requests",
"pending:": "Pending friend requests:",
"all": "All",
"all:": "All friends:",
@ -537,7 +537,7 @@
"message": "Message user",
"block": "Block user",
"unblock": "Unblock user",
"friendReq": "Friend request",
"friendReq": "Request friendship",
"kick": "Kick member",
"ban": "Ban member",
"addRole": "Add roles",
@ -550,7 +550,7 @@
"login": {
"checking": "Checking Instance",
"allGood": "All good",
"invalid": "Invalid Instance, try again",
"invalid": "Invalid Instance, try again (try with https://?)",
"waiting": "Waiting to check Instance",
"recover": "Forgot password?",
"pasteInfo": "Paste the recovery URL here:",
@ -615,7 +615,7 @@
},
"widget": "Guild Widget",
"widgetEnabled": "Widget enabled",
"incorrectURLS": "## This instance has likely sent the incorrect URLs.\n### If you're the instance owner please see [here](https://docs.spacebar.chat/setup/server/) under *Connecting from remote machines* to correct the issue.\n Would you like Jank Client to automatically try to fix this error to let you connect to the instance?",
"incorrectURLS": "## This instance has likely sent the incorrect URLs.\n### If you're the instance owner please see [here](https://docs.spacebar.chat/setup/server/) under *Connecting from remote machines* to correct the issue.\nPlease contact the server owner about this issue.\n Would you like Jank Client to automatically try to fix this error to let you connect to the instance?",
"jankInfo": "Client Information",
"instInfo": "Instance Information",
"clientDesc": "Client version: $1\n\n[Join the official Jank Client guild]($2/invite/USgYJo?instance=https%3A%2F%2Fspacebar.chat)\n\n[Help translate Jank Client](https://translatewiki.net/wiki/Translating:JankClient#sortable:3=desc) \n\n[Help create Jank client](https://github.com/MathMan05/JankClient)\n\n[Help maintain the server jank client relies on](https://github.com/spacebarchat/server)\n\nCalculated rights: $3",