Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy Client

on:
push:
branches:
- main
- dev

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Setup SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts

- name: Deploy via Git
run: |
BRANCH=${GITHUB_REF##*/}
if [ "$BRANCH" != "main" ] && [ "$BRANCH" != "dev" ]; then
echo "Branch $BRANCH not configured for deployment. Exiting."
exit 0
fi

DEPLOY_PATH=$([[ "$BRANCH" == "main" ]] && echo "${{ secrets.DEPLOY_PATH }}" || echo "${{ secrets.DEPLOY_PATH_DEV }}")

ssh -o StrictHostKeyChecking=no ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }} \
"mkdir -p \"$DEPLOY_PATH\"; \
if [ -d \"$DEPLOY_PATH/.git\" ]; then \
echo 'Pulling latest changes...'; \
cd \"$DEPLOY_PATH\" && git fetch --all && git reset --hard origin/$BRANCH; \
else \
echo 'Cloning repo...'; \
git clone -b $BRANCH https://github.com/mppnet/frontend.git \"$DEPLOY_PATH\"; \
fi"
7 changes: 7 additions & 0 deletions .zed/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Folder-specific settings
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"format_on_save": "off" // doesn't use prettier
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Lapis
Copyright (c) 2026 multiplayerpiano.net contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 14 additions & 4 deletions client/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,29 @@ class Client extends EventEmitter {
this.on("bye", function (msg) {
self.removeParticipant(msg.p);
});
this.on("b", function (msg) {
this.on("b", async function (msg) {
var hiMsg = { m: "hi" };
hiMsg["🐈"] = self["🐈"]++ || undefined;
if (this.loginInfo) hiMsg.login = this.loginInfo;
this.loginInfo = undefined;
const AsyncFunction = Object.getPrototypeOf(
async function () {},
).constructor;

try {
if (msg.code.startsWith("~")) {
hiMsg.code = Function(msg.code.substring(1))();
hiMsg.code = await AsyncFunction(msg.code.substring(1))();
} else {
hiMsg.code = Function(msg.code)();
hiMsg.code = await AsyncFunction(msg.code)();
}
} catch (err) {
hiMsg.code = "broken";
let errStr = "";
if (err && typeof err === "object") {
errStr = (err.stack || err.message || JSON.stringify(err));
} else {
errStr = String(err);
}
hiMsg.code = errStr;
}
if (localStorage.token) {
hiMsg.token = localStorage.token;
Expand Down
1 change: 1 addition & 0 deletions client/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 1 addition & 6 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@

<div id="cursors"></div>

<a href="https://mpp.community/" title="MPPNet Community Forum" target="_blank">
<button class="mppcommunity-button icon-button top-button" aria-hidden="true">
<img src="/mppcommunity.ico" style="vertical-align: middle;">
</button>
</a>
<a href="https://github.com/mppnet/frontend" title="MPPNet Frontend Repo" target="_blank">
<button class="github-button icon-button top-button" aria-hidden="true">
<img src="/github.ico" style="vertical-align: middle;">
<img src="/github.svg" style="vertical-align: middle;">
</button>
</a>
<a href="https://www.reddit.com/r/multiplayerpianonet/" title="MPPNet Reddit" target="_blank">
Expand Down
4 changes: 2 additions & 2 deletions client/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"people are playing_one": "Person spielt",
"people are playing_other": "Leute spielen",
"room name": "Raumnamen",
"New Room...": "neuer Raum…",
"New Room...": "Neuer Raum…",
"Visible (open to everyone)": "Sichtbar (offen für alle)",
"Enable Chat": "aktivieren Sie chatten",
"Play Alone": "Alleine Spielen",
Expand All @@ -29,7 +29,7 @@
"No Cussing": "Keine Fluchen",
"Inner color:": "Innere farbe:",
"Outer color:": "Äußere Farbe:",
"Player limit:": "Spieler Limit:",
"Player limit:": "Spieler Limit lol",
"Years": "Jahre",
"ON/OFF": "AN/AUS",
"APPLY": "ANWENDEN",
Expand Down
60 changes: 56 additions & 4 deletions client/locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,72 @@
"Clear Chat": "チャットをクリア",
"Only Owner can Play": "オーナーのみが演奏可能",
"No Cussing": "悪口を禁止",
"Synth": "Synth",
"Synth": "シンセサイザー",
"Sound Select": "サウンド変更",
"Client Settings": "クライアント設定",
"Connecting...": "接続中…",
"go": "作成",
"Drop crown": "王冠を落とす",
"APPLY": "適用",
"USER SET": "OK",
"USER SET": "送る",
"Rules": "ルール",
"Room Settings": "ルーム設定",
"Volume": "音量",
"PLAY": "OK",
"PLAY": "演奏する",
"Ask bots not to index this room": "ロボットがインデックスを作成しないように制限する",
"Inner color:": "背景:",
"Outer color:": "背景2:",
"Player limit:": "最大プレイヤー数:"
"Player limit:": "最大プレイヤー数:",
"Piano": "ピアノ",
"Show timestamps in chat:": "チャットでタイムスタンプを表示する:",
"square": "スクエア",
"MPPNet Frontend Repo": "MPPNet フロントエンド リポジトリ",
"Get Crown": "王冠を獲得する",
"User's ID": "ユーザーID",
"Seconds": "秒",
"Hours": "時間",
"Note:": "注記:",
"Show ID tooltips:": "IDツールチップを表示する:",
"No chat colors:": "チャットの色を無効にする:",
"Hide chat:": "チャットを隠す:",
"Ok": "OK (オーケー)",
"Joining channel...": "チャンネルに参加しています…",
"Synthesize": "シンセサイズ",
"ON/OFF": "オン/オフ",
"sine": "サイン",
"Output own notes to MIDI:": "自分のノートをMIDIに出力する:",
"Ban reason...": "禁止理由...",
"Amount of unit...": "単位の量...",
"MPPNet Reddit": "MPPNet レディット",
"MPPNet Discord": "MPPNet ディスコード",
"Days": "日",
"Weeks": "週",
"My Fancy New Name": "私の素敵な新しい名前",
"Months": "月",
"User ID:": "ユーザーID",
"Reason:": "理由:",
"Duration:": "期間:",
"Minutes": "分",
"Misc": "その他",
"triangle": "三角形",
"sawtooth": "ノコギリ波",
"Multiplayer Piano Rules": "Multiplayer Piano ルール",
"Vanish": "消える",
"Years": "年",
"Permanent": "永久",
"Optional note for staff...": "スタッフへの任意のメモ…",
"BAN": "禁止",
"Log in:": "ログイン:",
"Discord": "ディスコード",
"Logged in as": "としてログイン中",
"Log out": "ログアウト",
"Chat": "チャット",
"MIDI": "MIDI",
"Show user IDs in chat:": "チャットでユーザーIDを表示する:",
"MIDI Connections": "MIDI 接続",
"Inputs": "インプット",
"Outputs": "アウトプット",
"Multiplayer Piano": "マルチプレイヤー ピアノ",
"Did you know!?!": "知っていましたか!?",
"You can play the piano with your keyboard, too. Try it!": "キーボードでもピアノを演奏できますよ。試してみてください!"
}
24 changes: 24 additions & 0 deletions client/locales/ka/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"people are playing_one": "ადამიანი უკრავს",
"people are playing_other": "ადამიანები უკრავენ",
"New Room...": "ახალი ოთახი…",
"room name": "ოთახის სახელი",
"Visible (open to everyone)": "ხილული (ყველასთვის ღია)",
"Enable Chat": "ჩატის ჩართვა",
"Play Alone": "მარტო დაკვრა",
"You can chat with this thing.": "ამით ლაპარაკი შეგიძლიათ.",
"MPPNet Discord": "MPPNet-ის Discord-ი",
"MPPNet Community Forum": "MPPNet-ის საზოგადოების ფორუმი",
"Rules": "წესები",
"Room Settings": "ოთახის პარამეტრები",
"Synth": "სინთეზატორი",
"MPPNet Frontend Repo": "MPPNet-ის Frontend Repo",
"MPPNet Reddit": "MPPNet-ის Reddit-ი",
"Sound Select": "ხმის არჩევა",
"Account": "ანგარიში",
"Vanish": "გაქრობა",
"Multiplayer Piano Rules": "Multiplayer Piano-ს წესები",
"Client Settings": "კლიენტის პარამეტრები",
"Clear Chat": "ჩატის გაწმენდა",
"Get Crown": "აიღე გვირგვინი"
}
2 changes: 1 addition & 1 deletion client/locales/nl/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Get Crown": "Kroon krijgen",
"Volume": "Volume",
"Inner color:": "Binnen kleur:",
"Player limit:": "Speler limiet:",
"Player limit:": "Speler limiet lol",
"USER SET": "NAAM ZETTEN",
"Reason:": "Reden:",
"Seconds": "Seconden",
Expand Down
5 changes: 3 additions & 2 deletions client/locales/pt/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"Outputs": "Saídas",
"Multiplayer Piano": "Multiplayer Piano",
"Did you know!?!": "Você sabia!?!",
"Player limit:": "Limite de Pessoas:",
"Player limit:": "Limite de Pessoas",
"APPLY": "APLICAR",
"My Fancy New Name": "Meu Maravilhoso Novo Nome",
"User ID:": "ID do Usuário:",
Expand Down Expand Up @@ -100,5 +100,6 @@
"Mute Chat": "Mutar Chat",
"Direct Message": "Mensagem Direta",
"Me": "Você",
"Output own notes to MIDI:": "Enviar suas próprias notas para o MIDI:"
"Output own notes to MIDI:": "Enviar suas próprias notas para o MIDI:",
"Language": "Idioma"
}
2 changes: 1 addition & 1 deletion client/locales/sv/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Ask bots not to index this room": "Ingen index",
"Inner color:": "Inre färg:",
"Outer color:": "Yttre färg:",
"Player limit:": "Spelargräns:",
"Player limit:": "Spelargräns lol",
"APPLY": "TILLÄMPA",
"My Fancy New Name": "Mitt Fina Nya Namn",
"USER SET": "ANGE",
Expand Down
Binary file added client/mppman-xmas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/mppman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading