From b0f6ee2c89b2020a9c4a9b179c50011d487a059a Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 17 Mar 2025 13:20:54 +0100 Subject: [PATCH 1/4] Localisation updates from https://translatewiki.net. --- translations/ko.json | 18 +++++++++++++++++- translations/lb.json | 8 +++++++- translations/qqq.json | 6 +++++- translations/ru.json | 7 ++++++- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/translations/ko.json b/translations/ko.json index 518e2d1..41d4fb1 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -181,7 +181,23 @@ "tokenDisplay": "토큰: $1", "advancedBot": "고급 봇 설정", "language": "언어:", - "connections": "연결" + "connections": "연결", + "deleteAccount": "계정 삭제", + "deleteAccountButton": "계정 삭제", + "manageInstance": "인스턴스 관리" + }, + "manageInstance": { + "stop": "인스턴스 중지", + "AreYouSureStop": "이 인스턴스를 중지하시겠습니까?", + "length": "길이:", + "format": "포맷:", + "TokenFormats": { + "URLs": "초대 URL" + }, + "create": "만들기", + "clientURL": "클라이언트 URL:", + "regType": "토큰 URL 유형 등록", + "copy": "복사" }, "message": { "reactionAdd": "반응 추가", diff --git a/translations/lb.json b/translations/lb.json index a13f409..676a440 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -124,7 +124,13 @@ "botUsername": "Botbenotzernumm:", "advancedBot": "Erweidert Bot-Astellungen", "language": "Sprooch:", - "connections": "Verbindungen" + "connections": "Verbindungen", + "deleteAccountButton": "Kont läschen" + }, + "manageInstance": { + "length": "Längt:", + "genericType": "Geneeresch", + "copy": "Kopéieren" }, "message": { "reactionAdd": "Reaktioun derbäisetzen", diff --git a/translations/qqq.json b/translations/qqq.json index c64b29d..e6d374a 100644 --- a/translations/qqq.json +++ b/translations/qqq.json @@ -3,7 +3,11 @@ "last-updated": "2024/11/4", "locale": "en", "comment": "Don't know how often I'll update this top part lol", - "authors": ["MathMan05", "McDutchie", "Vl1"] + "authors": [ + "MathMan05", + "McDutchie", + "Vl1" + ] }, "readableName": "{{doc-important|This should be the name of the language you are translating into, in that language. Please DO NOT translate this into your language’s word for “English”!}}", "typing": "$1 is the number of people typing and $2 is the names of the people typing separated by commas", diff --git a/translations/ru.json b/translations/ru.json index 473bd0b..cc4110d 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -324,7 +324,12 @@ "advancedBot": "Расширенные настройки бота", "botInviteCreate": "Создатель приглашения бота", "language": "Язык:", - "connections": "Подключения" + "connections": "Подключения", + "deleteAccount": "Удаление учётной записи", + "areYouSureDelete": "Вы уверены, что хотите удалить свою учётную запись? Если да, введите фразу $1", + "sillyDeleteConfirmPhrase": "Шрек - это любовь, Шрек - это жизнь", + "deleteAccountButton": "Удалить учётную запись", + "mustTypePhrase": "Чтобы удалить свою учётную запись, вам необходимо ввести фразу" }, "message": { "reactionAdd": "Добавить реакцию", From d4af74f60e7d6b8740083f95cdd55125ca085856 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Mar 2025 09:28:22 -0700 Subject: [PATCH 2/4] Added escape key funtionality --- src/index.ts | 13 +++++++++++-- src/webpage/instances.json | 18 ++++++++++++++++++ src/webpage/manifest.json | 5 ++++- src/webpage/settings.ts | 6 ++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index fc97ea8..0165c86 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,6 +99,10 @@ const instances = JSON.parse( readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/instances.json").toString(), ) as instace[]; +const manifest = JSON.parse( + readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/manifest.json").toString(), +) as object; + const instanceNames = new Map(); for (const instance of instances) { @@ -118,7 +122,7 @@ async function updateInstances(): Promise { const existingInstance = instanceNames.get(instance.name); if (existingInstance) { for (const key of Object.keys(instance)) { - if (!existingInstance[key]) { + if (!(key in existingInstance)) { existingInstance[key] = instance[key]; } } @@ -183,6 +187,11 @@ app.use("/", async (req: Request, res: Response) => { return; } + if (req.path.startsWith("/manifest.json")) { + res.json(manifest); + return; + } + if (req.path.startsWith("/invite/")) { res.sendFile(path.join(__dirname, "webpage", "invite.html")); return; @@ -193,7 +202,7 @@ app.use("/", async (req: Request, res: Response) => { app.set("trust proxy", (ip: string) => ip.startsWith("127.")); -const PORT = process.env.PORT || Number(process.argv[2]) || 8080; +const PORT = process.env.PORT || Number(process.argv[2]) || 8333; app.listen(PORT, () => { console.log(`Server running on port ${PORT}`); }); diff --git a/src/webpage/instances.json b/src/webpage/instances.json index 4949fbc..5fdecf3 100644 --- a/src/webpage/instances.json +++ b/src/webpage/instances.json @@ -1,4 +1,18 @@ [ + { + "name": "NomBar", + "description": "The Tastiest Chat around, get your fill today", + "image": "https://munchy.impassivedev.com/images/icon.png", + "url": "https://spacebar.nomchy-verse.com", + "language": "en", + "country": "US", + "display": true, + "contactInfo": { + "dicord": "munchy420", + "github": "https://tea.nomchy-verse.com/munchy", + "email": "thedudedies22@gmail.com" + } + }, { "name": "Spacebar", "description": "The official Spacebar instance.", @@ -30,5 +44,9 @@ "github": "https://github.com/greysilly7", "email": "greysilly7@gmail.com" } + }, + { + "name": "Vanilla Minigames", + "display": false } ] diff --git a/src/webpage/manifest.json b/src/webpage/manifest.json index f78e7cd..cf54989 100644 --- a/src/webpage/manifest.json +++ b/src/webpage/manifest.json @@ -6,8 +6,11 @@ "sizes": "512x512" } ], - "start_url": "/channels/@me", + "start_url": "https://chat.nomchy-verse.com/", "display": "standalone", + "scope": "/", "theme_color": "#05050a", + "description": "Welcome to the Jank Client, a spacebar FOSS client implementation", + "background_color": "#05050a", "offline_enabled": true } diff --git a/src/webpage/settings.ts b/src/webpage/settings.ts index 1c2e61a..3c68663 100644 --- a/src/webpage/settings.ts +++ b/src/webpage/settings.ts @@ -1431,6 +1431,12 @@ class Settings extends Buttons { exit.onclick = (_) => { this.hide(); }; + onkeyup = (event) => { + if (event.key === "Escape") { + // Cancel the default action, if needed + this.hide() + } + } document.body.append(background); this.html = background; } From 430fedf594aad6cfdf08019c1c8b4f05dee0176f Mon Sep 17 00:00:00 2001 From: Munchy <80545175+thedudedies21@users.noreply.github.com> Date: Mon, 17 Mar 2025 12:49:24 -0400 Subject: [PATCH 3/4] Update index.ts --- src/index.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/index.ts b/src/index.ts index 0165c86..6e08ff4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,10 +99,6 @@ const instances = JSON.parse( readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/instances.json").toString(), ) as instace[]; -const manifest = JSON.parse( - readFileSync(process.env.JANK_INSTANCES_PATH || __dirname + "/webpage/manifest.json").toString(), -) as object; - const instanceNames = new Map(); for (const instance of instances) { @@ -187,11 +183,6 @@ app.use("/", async (req: Request, res: Response) => { return; } - if (req.path.startsWith("/manifest.json")) { - res.json(manifest); - return; - } - if (req.path.startsWith("/invite/")) { res.sendFile(path.join(__dirname, "webpage", "invite.html")); return; @@ -202,7 +193,7 @@ app.use("/", async (req: Request, res: Response) => { app.set("trust proxy", (ip: string) => ip.startsWith("127.")); -const PORT = process.env.PORT || Number(process.argv[2]) || 8333; +const PORT = process.env.PORT || Number(process.argv[2]) || 8080; app.listen(PORT, () => { console.log(`Server running on port ${PORT}`); }); From 157c01ad1a94372e4c88db5a0febbe06c4319f39 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 Mar 2025 09:54:41 -0700 Subject: [PATCH 4/4] Mods to manifest --- src/webpage/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpage/manifest.json b/src/webpage/manifest.json index cf54989..190e548 100644 --- a/src/webpage/manifest.json +++ b/src/webpage/manifest.json @@ -6,7 +6,7 @@ "sizes": "512x512" } ], - "start_url": "https://chat.nomchy-verse.com/", + "start_url": "/channels/@me", "display": "standalone", "scope": "/", "theme_color": "#05050a",