From d496b42ae63ca60333932db13586deaaafb273f3 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Thu, 30 Jan 2025 13:19:03 +0100 Subject: [PATCH 1/8] Localisation updates from https://translatewiki.net. --- translations/ru.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/translations/ru.json b/translations/ru.json index 9e89d24..473bd0b 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -4,6 +4,7 @@ "locale": "ru", "comment": "Русский перевод Jank Client", "authors": [ + "Amire80", "Aprenik", "Kaganer", "Kareyac", @@ -266,6 +267,8 @@ "themesAndSounds": "Темы и звуки", "theme:": "Тема", "notisound": "Звук уведомления:", + "customSound": "Пользовательский звук", + "soundTooLarge": "Звук, который вы пытались загрузить, был слишком большим, попробуйте ещё раз.", "accentColor": "Акцентный цвет:", "enableEVoice": "Включить экспериментальную поддержку голосовых каналов", "VoiceWarning": "Вы точно хотите включить это? Оно находится на стадии доработки. (Эта функция создана для разработчиков, пожалуйста, не включайте, если вы не знаете, что делаете)", From f70cd71774be13baa83d679bb7951f4677793034 Mon Sep 17 00:00:00 2001 From: MathMan05 <73901602+MathMan05@users.noreply.github.com> Date: Thu, 6 Feb 2025 21:18:41 -0600 Subject: [PATCH 2/8] Update CompressingImages.md --- CompressingImages.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CompressingImages.md b/CompressingImages.md index 98f2533..2c127af 100644 --- a/CompressingImages.md +++ b/CompressingImages.md @@ -6,6 +6,13 @@ good at reducing the pallet, a first step for images that have a limited number ## PNGs: good ratios, though not as good as other options, though better compatibility +### oxipng +Seems to be the best of all of the options, not sure if it's all you would need, but it did shrink pngs further than the other two tools afterwards. +```bash +oxipng -o max --strip all --alpha +``` +`all` may be replaced with `safe` if you want to be a bit safer + ### pngcrush Good, but should be ran before optipng, but isn't as good as it, use in tandom ### optipng From 00f65f30544e07d2dd30cacc9bf9b9a1b97fc1d7 Mon Sep 17 00:00:00 2001 From: MathMan05 <73901602+MathMan05@users.noreply.github.com> Date: Thu, 6 Feb 2025 21:20:27 -0600 Subject: [PATCH 3/8] Update CompressingImages.md --- CompressingImages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CompressingImages.md b/CompressingImages.md index 2c127af..754adcd 100644 --- a/CompressingImages.md +++ b/CompressingImages.md @@ -16,7 +16,7 @@ oxipng -o max --strip all --alpha ### pngcrush Good, but should be ran before optipng, but isn't as good as it, use in tandom ### optipng -The best tool to really shrink pngs to be as small as they can be. +The second best tool to really shrink pngs to be as small as they can be. ## WEBP it's better than png, though I have a feeling more could be done to compress these From dafc1eadff47e7838c4275363b6f7f027a160bd1 Mon Sep 17 00:00:00 2001 From: Jon Lawrence Date: Mon, 3 Mar 2025 14:52:37 -0800 Subject: [PATCH 4/8] Added docker Added a Dockerfile and compose.yaml for easy deployment via docker. Updated README to provide clear instruction on how to get the instance running. --- Dockerfile-jank | 18 ++++++++++++++++++ README.md | 4 ++-- compose.yaml | 8 ++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Dockerfile-jank create mode 100644 compose.yaml diff --git a/Dockerfile-jank b/Dockerfile-jank new file mode 100644 index 0000000..a004369 --- /dev/null +++ b/Dockerfile-jank @@ -0,0 +1,18 @@ +From node:18-bullseye as builder + +WORKDIR devel/ +RUN apt-get update ; apt-get upgrade -y ; apt-get install -y python-is-python3 build-essential git +RUN git clone https://github.com/MathMan05/JankClient +RUN cd JankClient ; npm i ; npm run build + +From node:18-alpine + +EXPOSE 8080 +WORKDIR exec +RUN apk add --update git nodejs npm +COPY --from=builder /devel/JankClient/ . +RUN adduser -D jankclient + +USER jankclient + +CMD ["npm", "start"] diff --git a/README.md b/README.md index af4289e..365441c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Jank Client Jank Client is a [Spacebar](https://spacebar.chat) Client written in TS, HTML, and CSS. -To run it, clone the repo and do `npm install`, then -`node index.js` +To build it, clone the repo and run `npm install`, then `npm run build` +To run it, use `npm start` or do the equivalent with bun Both [Bun](https://bun.sh) and [Node.js](https://nodejs.org) are supported, and should function as expected. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..f93d94a --- /dev/null +++ b/compose.yaml @@ -0,0 +1,8 @@ +services: + jank: + build: + context: . + dockerfile: Dockerfile-jank + restart: unless-stopped + ports: + - "8080:8080" From 58590a56ea8796428786bc6f59af1b290f1c513c Mon Sep 17 00:00:00 2001 From: Jon Lawrence Date: Fri, 7 Mar 2025 14:07:14 -0800 Subject: [PATCH 5/8] Dockerfile now named correctly Dockerfile is now named correctly, and pulls from the local repository/directory instead of pulling the image from github. --- Dockerfile | 18 ++++++++++++++++++ Dockerfile-jank | 18 ------------------ compose.yaml | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 Dockerfile delete mode 100644 Dockerfile-jank diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6676f2d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:18-bullseye AS builder + +WORKDIR /devel +RUN apt-get update ; apt-get upgrade -y ; apt-get install -y build-essential +COPY . . +RUN npm i ; npm run build + +FROM node:18-alpine + +EXPOSE 8080 +WORKDIR /exec +RUN apk add --update nodejs npm +COPY --from=builder /devel/ . +RUN adduser -D jankclient + +USER jankclient + +CMD ["npm", "start"] diff --git a/Dockerfile-jank b/Dockerfile-jank deleted file mode 100644 index a004369..0000000 --- a/Dockerfile-jank +++ /dev/null @@ -1,18 +0,0 @@ -From node:18-bullseye as builder - -WORKDIR devel/ -RUN apt-get update ; apt-get upgrade -y ; apt-get install -y python-is-python3 build-essential git -RUN git clone https://github.com/MathMan05/JankClient -RUN cd JankClient ; npm i ; npm run build - -From node:18-alpine - -EXPOSE 8080 -WORKDIR exec -RUN apk add --update git nodejs npm -COPY --from=builder /devel/JankClient/ . -RUN adduser -D jankclient - -USER jankclient - -CMD ["npm", "start"] diff --git a/compose.yaml b/compose.yaml index f93d94a..ba6944f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,7 +2,7 @@ services: jank: build: context: . - dockerfile: Dockerfile-jank + dockerfile: Dockerfile restart: unless-stopped ports: - "8080:8080" From a41d17c507b42672b5f0415ee1d153ae89864680 Mon Sep 17 00:00:00 2001 From: Jon Lawrence Date: Sat, 8 Mar 2025 00:00:51 +0000 Subject: [PATCH 6/8] Create docker-image.yml --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..3f53646 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 76caa43276ab216b5d56aaaa0d1bb695c580c338 Mon Sep 17 00:00:00 2001 From: Jon Lawrence Date: Fri, 7 Mar 2025 16:46:18 -0800 Subject: [PATCH 7/8] Color picker on member page The color picker on the member page now shows the currently selected user color on load. --- src/webpage/member.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/webpage/member.ts b/src/webpage/member.ts index 4acbdea..7997847 100644 --- a/src/webpage/member.ts +++ b/src/webpage/member.ts @@ -290,12 +290,8 @@ class Member extends SnowFlake { hypomember.bio = _; regen(); }); - return; //Returns early to stop errors - if (this.accent_color) { - color = "#" + this.accent_color.toString(16); - } else { - color = "transparent"; - } + color = (this.accent_color ? "#" + this.accent_color.toString(16) : "transparent") as string; + const colorPicker = settingsLeft.addColorInput( I18n.getTranslation("profileColor"), (_) => {}, @@ -304,7 +300,7 @@ class Member extends SnowFlake { colorPicker.watchForChange((_) => { console.log(); color = _; - hypomember.accent_color = Number.parseInt("0x" + _.substr(1), 16); + hypomember.accent_color = Number.parseInt("0x" + _.substr(1, 16)); changed = true; regen(); }); From 2bc58ed24f78a0025c50bdafb6a16947cc2b1ac1 Mon Sep 17 00:00:00 2001 From: "translatewiki.net" Date: Mon, 10 Mar 2025 13:18:26 +0100 Subject: [PATCH 8/8] Localisation updates from https://translatewiki.net. --- translations/de.json | 32 ++++++++++++++++++++++++++- translations/lb.json | 52 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/translations/de.json b/translations/de.json index df099a9..8aea718 100644 --- a/translations/de.json +++ b/translations/de.json @@ -3,6 +3,7 @@ "authors": [ "Booky", "Brettchenweber", + "Byte", "SergeCroise", "SomeRandomDeveloper" ] @@ -45,7 +46,36 @@ "MANAGE_GUILD_EXPRESSIONS": "Ermöglicht die Verwaltung von Emojis, Stickern und dem Soundboard", "USE_APPLICATION_COMMANDS": "Erlaubt dem Nutzer die Verwendung von Befehlen bestimmter Anwendungen", "REQUEST_TO_SPEAK": "Erlaubt dem Nutzer, in einem Bühnenkanal das Rederecht zu erbitten", - "MANAGE_EVENTS": "Erlaubt dem Nutzer das Verwalten und Editieren von Events" + "MANAGE_EVENTS": "Erlaubt dem Nutzer das Verwalten und Editieren von Events", + "MANAGE_THREADS": "Erlaubt es dem Benutzer, Threads zu löschen und zu archivieren sowie alle privaten Threads anzuzeigen", + "CREATE_PUBLIC_THREADS": "Erlaubt es dem Benutzer, öffentliche Threads zu erstellen", + "CREATE_PRIVATE_THREADS": "Erlaubt es dem Benutzer, private Threads zu erstellen", + "USE_EXTERNAL_STICKERS": "Ermöglicht dem Benutzer, externe Aufkleber zu verwenden", + "SEND_MESSAGES_IN_THREADS": "Ermöglicht dem Benutzer, Nachrichten in Threads zu senden", + "USE_EMBEDDED_ACTIVITIES": "Erlaubt es dem Benutzer, eingebettete Aktivitäten zu nutzen", + "MODERATE_MEMBERS": "Erlaubt es dem Benutzer, andere Benutzer zeitlich auszuschließen, um zu verhindern, dass sie Nachrichten im Chat und in Threads senden oder darauf reagieren, sowie um zu verhindern, dass sie in Sprach- und Bühnenkanälen sprechen", + "VIEW_CREATOR_MONETIZATION_ANALYTICS": "Ermöglicht das Anzeigen von Einblicken in Rollenabonnements", + "USE_SOUNDBOARD": "Erlaubt die Verwendung von Soundboard in einem Sprachkanal", + "CREATE_GUILD_EXPRESSIONS": "Erlaubt die Erstellung von Emojis, Aufklebern und Soundboard-Sounds sowie die Bearbeitung und Löschung der von dem aktuellen Benutzer erstellten.", + "CREATE_EVENTS": "Erlaubt die Erstellung von geplanten Ereignissen und die Bearbeitung und Löschung der von dem aktuellen Benutzer erstellten.", + "USE_EXTERNAL_SOUNDS": "Ermöglicht die Verwendung benutzerdefinierter Soundboard-Sounds von anderen Servern", + "SEND_VOICE_MESSAGES": "Ermöglicht Senden von Sprachnachrichten", + "SEND_POLLS": "Erlaubt die Absendung von Umfragen", + "USE_EXTERNAL_APPS": "Ermöglicht benutzerinstallierten Apps, öffentliche Antworten zu senden. Wenn diese Option deaktiviert ist, können Benutzer ihre Apps weiterhin verwenden, die Antworten sind jedoch flüchtig. Dies gilt nur für Apps, die nicht auch auf dem Server installiert sind." + }, + "readableNames": { + "CREATE_INSTANT_INVITE": "Einladung erstellen", + "KICK_MEMBERS": "Mitglieder rauswerfen", + "BAN_MEMBERS": "Mitglieder sperren", + "ADMINISTRATOR": "Administrator", + "MANAGE_CHANNELS": "Vorlagen verwalten", + "MANAGE_GUILD": "Gilde verwalten", + "ADD_REACTIONS": "Reaktionen hinzufügen", + "VIEW_AUDIT_LOG": "Audit-Protokoll anzeigen", + "PRIORITY_SPEAKER": "Prioritätsredner", + "STREAM": "Video", + "VIEW_CHANNEL": "Änderungen zeigen", + "SPEAK": "Bergspitze" } }, "hideBlockedMessages": "Dieser Benutzer ist blockiert, klicke, um die Nachrichten zu verbergen.", diff --git a/translations/lb.json b/translations/lb.json index 7f70927..a13f409 100644 --- a/translations/lb.json +++ b/translations/lb.json @@ -9,28 +9,53 @@ "permissions": { "readableNames": { "ADMINISTRATOR": "Administrateur", - "STREAM": "Video" + "STREAM": "Video", + "ATTACH_FILES": "Fichieren uspéngelen", + "USE_EXTERNAL_EMOJIS": "Extern Emojie benotzen", + "CONNECT": "Verbannen", + "SPEAK": "Schwätzen", + "MUTE_MEMBERS": "Membere stommschalten", + "CHANGE_NICKNAME": "Spëtznumm änneren", + "MANAGE_NICKNAMES": "Spëtznimm geréieren", + "MANAGE_ROLES": "Rolle geréieren", + "MANAGE_GUILD_EXPRESSIONS": "Ausdréck geréieren", + "CREATE_EVENTS": "Evenementer uleeën", + "SEND_POLLS": "Ëmfroen uleeën", + "USE_EXTERNAL_APPS": "Extern Appe benotzen" } }, + "deleteConfirm": "Sidd Dir sécher, datt Dir dat läsche wëllt?", "yes": "Jo", "no": "Neen", "todayAt": "Haut um $1", "yesterdayAt": "Gëschter um $1", - "botSettings": "Botastellungen", + "botSettings": "Bot-Astellungen", "pronouns": "Pronomen:", "profileColor": "Profilfaarf", + "confirmGuildLeave": "Sidd Dir sécher, datt Dir aus $1 erausgoe wëllt", "typing": "$2 {{PLURAL:$1|ass|sinn}} am schreiwen", + "blankMessage": "Eidele Message", "channel": { + "copyId": "Kanal-ID kopéieren", "markRead": "Als gelies markéieren", "settings": "Astellungen", + "delete": "Kanal läschen", + "makeInvite": "Invitatioun maachen", "settingsFor": "Astellunge fir $1", "text": "Text", + "announcement": "Ukënnegungen", "name:": "Numm:", "topic:": "Theema:", + "nsfw:": "NSFW:", + "selectType": "Kanaltyp auswielen", + "selectName": "Numm vum Kanal", "selectCatName": "Numm vun der Kategorie", + "createChannel": "Kanal uleeën", "createCatagory": "Kategorie uleeën" }, + "switchAccounts": "Konto wiesselen ⇌", "htmlPages": { + "instanceField": "Instanz:", "emailField": "E-Mail:", "pwField": "Passwuert:", "loginButton": "Aloggen", @@ -59,6 +84,7 @@ "serverName": "Servernumm:", "yesDelete": "Jo, ech si mer sécher", "loadingDiscovery": "Lueden…", + "default": "Standard ($1)", "description:": "Beschreiwung:" }, "role": { @@ -76,6 +102,9 @@ "SWOff": "Aus", "SWOffline": "Nëmmen offline", "SWOn": "Un", + "clearCache": "Cache eidelmaachen", + "CheckUpdate": "No Aktualiséierunge sichen", + "2faDisable": "2FA desaktivéieren", "badCode": "Ongültege Code", "2faEnable": "2FA aktivéieren", "2faCode:": "Code:", @@ -90,10 +119,15 @@ "newPassword:": "Neit Passwuert:", "PasswordsNoMatch": "D'Passwierder sinn net d'selwecht", "description": "Beschreiwung:", + "manageBot": "Bot geréieren", + "addBot": "Bot derbäisetzen", "botUsername": "Botbenotzernumm:", - "language": "Sprooch:" + "advancedBot": "Erweidert Bot-Astellungen", + "language": "Sprooch:", + "connections": "Verbindungen" }, "message": { + "reactionAdd": "Reaktioun derbäisetzen", "delete": "Message läschen", "edit": "Message änneren", "edited": "(geännert)", @@ -106,6 +140,7 @@ "members": "Memberen: $1" }, "inviteOptions": { + "title": "Leit invitéieren", "30m": "30 Minutten", "1h": "1 Stonn", "6h": "6 Stonnen", @@ -113,13 +148,20 @@ "1d": "1 Dag", "7d": "7 Deeg", "30d": "30 Deeg", - "never": "Ni" + "never": "Ni", + "noLimit": "Keng Limitt" }, "2faCode": "2FA-Code:", "invite": { - "accept": "Akzeptéieren" + "invitedBy": "Dir gouft vum $1 invitéiert", + "alreadyJoined": "Scho bäigetrueden", + "accept": "Akzeptéieren", + "channel:": "Kanal:", + "createInvite": "Invitatioun maachen" }, "friends": { + "blocked": "Gespaart", + "blockedusers": "Gespaarte Benotzer:", "notfound": "Benotzer net fonnt", "online": "Online", "friends": "Frënn"