diff --git a/android/app/src/main/assets/public/blah/en-cat.json b/android/app/src/main/assets/public/blah/en-cat.json index 515cf00f..95c07f09 100644 --- a/android/app/src/main/assets/public/blah/en-cat.json +++ b/android/app/src/main/assets/public/blah/en-cat.json @@ -14,7 +14,7 @@ "dm.key.too.large": "meowchat key too large :o", "dm.key.not.found": "meowchat key not found :c", "dm.key.updated": "meowchat key updated successfully :3", - "body.too.large": "request body too large ><", + "body.too.large": "request too large ><", "invite.revoked": "invite revoked successfully", "invite.declined": "invite declined successfully", "account.creation.request.expired": "cat creation request expired. try again", @@ -33,12 +33,8 @@ "username.conditions.allowed": "cat name can only include {all}", "password.not.hashed.properly": "meow word is not hashed properly", "invalid.username.or.password": "invalid cat name or meow word", - "error.account.not.exist": "Meowccount Does Not Exist", "error.storage.limit.exceeded": "Storage Limit Exceeded, purr", - "error.username.taken": "Meowname is Taken", "error.network.error": "Network error, check connection or file size, meow.", - "error.body.too.large": "File is too large, meow! (max 10MB)", - "error.unknown.error": "Unknown error, purr", "account.not.exist": "cat with this name doesn't exist", "invalid.nonce": "invalid nonce. try again", "username.changed": "cat name changed successfully", @@ -122,7 +118,6 @@ "title.back.to.register": "back to registration", "title.details": "details", "title.members": "cats", - "placeholder.username": "cat name", "placeholder.captcha.code": "captcha code", "desc.messages.loading": "loading meows...", @@ -191,5 +186,11 @@ "action.attachment.poll": "Meowll", "action.attachment.uploading": "Uploading meowttachments...", "attachment.legacy": "Legacy meowttachment", - "warning.unencrypted": "This meowsage is not encrypted" + "warning.unencrypted": "This meowsage is not encrypted", + "action.change.avatar": "Change Cat Picture", + "action.change.banner": "Change Cat Banner", + "placeholder.type.text.emoji": "Type purr / meow...", + "action.cancel": "Cancel", + "title.crop.image": "Crop Image", + "title.zoom": "Zoom" } \ No newline at end of file diff --git a/android/app/src/main/assets/public/blah/en-us.json b/android/app/src/main/assets/public/blah/en-us.json index fdeaf7f6..e550f1b1 100644 --- a/android/app/src/main/assets/public/blah/en-us.json +++ b/android/app/src/main/assets/public/blah/en-us.json @@ -14,7 +14,7 @@ "dm.key.too.large": "DM key too large", "dm.key.not.found": "DM key not found", "dm.key.updated": "DM key updated successfully", - "body.too.large": "Request body too large", + "body.too.large": "Request too large", "invite.revoked": "Invite revoked successfully", "invite.declined": "Invite declined successfully", "account.creation.request.expired": "Account creation request expired. Try again", @@ -33,12 +33,8 @@ "username.conditions.allowed": "Username can only include {all}", "password.not.hashed.properly": "Password is not hashed properly", "invalid.username.or.password": "Invalid username or password", - "error.account.not.exist": "Account Does Not Exist", "error.storage.limit.exceeded": "Storage Limit Exceeded", - "error.username.taken": "Username is Taken", "error.network.error": "Network error, check connection or file size.", - "error.body.too.large": "File is too large (max 10MB)", - "error.unknown.error": "Unknown error", "account.not.exist": "Account with this name doesn't exist", "invalid.nonce": "Invalid nonce. Try again", "username.changed": "Username changed successfully", @@ -156,7 +152,6 @@ "title.loading": "Loading...", "title.details": "Details", "title.members": "Members", - "action.edit.profile": "Edit profile", "action.open.dm": "Open DM", "action.invite.accept": "Accept invite", @@ -191,5 +186,11 @@ "action.attachment.poll": "Poll", "action.attachment.uploading": "Uploading attachments...", "attachment.legacy": "Legacy attachment", - "warning.unencrypted": "This message is not encrypted" + "warning.unencrypted": "This message is not encrypted", + "action.change.avatar": "Change Avatar", + "action.change.banner": "Change Banner", + "placeholder.type.text.emoji": "Type text / emoji...", + "action.cancel": "Cancel", + "title.crop.image": "Crop Image", + "title.zoom": "Zoom" } \ No newline at end of file diff --git a/android/app/src/main/assets/public/blah/index.json b/android/app/src/main/assets/public/blah/index.json index 4571bb39..ecf850c2 100644 --- a/android/app/src/main/assets/public/blah/index.json +++ b/android/app/src/main/assets/public/blah/index.json @@ -1,4 +1,5 @@ { "en-us": { "english": "English (US)", "native": "English (US)" }, - "en-cat": { "english": "English (Cat)", "native": "Meowlish" } + "en-cat": { "english": "English (Cat)", "native": "Meowlish" }, + "pl-pl": { "english": "Polish", "native": "Polski" } } diff --git a/android/app/src/main/assets/public/icons.js b/android/app/src/main/assets/public/icons.js index 2d05a6b2..706ff6bf 100644 --- a/android/app/src/main/assets/public/icons.js +++ b/android/app/src/main/assets/public/icons.js @@ -3,6 +3,7 @@ const ICONS = { _create: function(content, defaultProps, customProps = {}) { let p = { ...defaultProps, ...customProps }; + if (customProps.width && !customProps.height) p.height = customProps.width; let strokeAttrs = p.strokeWidth ? ` stroke-width="${p.strokeWidth}" stroke-linecap="${p.strokeLinecap}" stroke-linejoin="${p.strokeLinejoin}"` : ""; let classAttr = p.className ? ` class="${p.className}"` : ""; let styleAttr = p.style ? ` style="${p.style}"` : ""; diff --git a/android/app/src/main/assets/public/index.html b/android/app/src/main/assets/public/index.html index e30afd98..2dff68be 100644 --- a/android/app/src/main/assets/public/index.html +++ b/android/app/src/main/assets/public/index.html @@ -93,17 +93,17 @@
-

Crop Image

+

title.crop.image

- Zoom + title.zoom
- - + +
diff --git a/android/app/src/main/assets/public/login/index.html b/android/app/src/main/assets/public/login/index.html index d4360594..111fc1b6 100644 --- a/android/app/src/main/assets/public/login/index.html +++ b/android/app/src/main/assets/public/login/index.html @@ -163,79 +163,79 @@
- +

Larpix

title.sign.in.to

- +

loading.connecting

- +
- +
- +
- +
- +

join.larpix

title.create.new.account

- +

loading.connecting

- +
- +

notice.use.strong.pass

- +
- +
- +
- +

title.verify

@@ -291,19 +291,19 @@ const loginPassword = document.getElementById("login-password"); const captchaCode = document.getElementById("captcha-input"); const regKeyInput = document.getElementById("regkey-input"); - + const registerButton = document.getElementById("register-button"); const regKeyGroup = document.getElementById("regkey-group"); - - + + async function start() { updateLoadingStatus("loading.loading"); // updateLoadingStatus("loading.done"); await loadingFadeOut(); } - - + + toRegister.addEventListener('click', () => { authContainer.className = 'auth-container show-register'; @@ -323,7 +323,7 @@ try { await updateProtocolAndUrl(loginHost.value); let res = await Auth(loginUsername.value, loginPassword.value); - + if (res.startsWith("success:")) { let parts = res.split("|"); @@ -337,14 +337,14 @@ } await loadingFadeIn(); - + window.location.href = "../"; } else { showBlahNotification(res); } - + } catch (error) { console.log(error); showBlahNotification("error:something.wrong.mayb.pass"); @@ -436,7 +436,7 @@ if (res.startsWith("success")) { showBlahNotification(res); await delay(1000); - + let resolvedId = await fetchAsync(`${url}/nametoid?u=${registerUsername.value}`); if (resolvedId && !resolvedId.startsWith("error:")) { localStorage.setItem("id", resolvedId.split(":")[0]); @@ -458,7 +458,7 @@ authContainer.className = 'auth-container show-register'; } }); - + async function regHostChanged() { loginHost.value = registerHost.value; @@ -495,7 +495,7 @@ setServerStatus("Can't ping this server", "red"); } } - + function setServerStatus(status, color) { let elements = document.getElementsByClassName("serverstatus"); diff --git a/android/app/src/main/assets/public/main.js b/android/app/src/main/assets/public/main.js index 54233685..869ce2b6 100644 --- a/android/app/src/main/assets/public/main.js +++ b/android/app/src/main/assets/public/main.js @@ -2598,8 +2598,18 @@ async function renderMessages(messages, isPrepend = false) { let oldText = existingChild.querySelector('.chat-message-text'); let newText = newChild.querySelector('.chat-message-text'); - if (oldText && newText && oldText.innerHTML !== newText.innerHTML) { - oldText.innerHTML = newText.innerHTML; + if (oldText && newText) { + if (oldText.innerHTML !== newText.innerHTML) { + oldText.innerHTML = newText.innerHTML; + } + if (oldText.getAttribute('style') !== newText.getAttribute('style')) { + let newStyle = newText.getAttribute('style'); + if (newStyle) { + oldText.setAttribute('style', newStyle); + } else { + oldText.removeAttribute('style'); + } + } } let oldReactions = existingChild.querySelector('.chat-message-reactions'); @@ -3218,7 +3228,7 @@ async function loadEmotes() { reactionPickerMenuHtml = `
- +
${loadedEmotes.map(emoji => ``).join('')}
diff --git a/android/app/src/main/assets/public/screens.js b/android/app/src/main/assets/public/screens.js index 0940613b..8073e2d4 100644 --- a/android/app/src/main/assets/public/screens.js +++ b/android/app/src/main/assets/public/screens.js @@ -331,7 +331,7 @@ var profileSettings = `
title.avatar
- +
@@ -342,7 +342,7 @@ var profileSettings = `
title.banner
- +
diff --git a/webroot/blah/en-cat.json b/webroot/blah/en-cat.json index 515cf00f..95c07f09 100644 --- a/webroot/blah/en-cat.json +++ b/webroot/blah/en-cat.json @@ -14,7 +14,7 @@ "dm.key.too.large": "meowchat key too large :o", "dm.key.not.found": "meowchat key not found :c", "dm.key.updated": "meowchat key updated successfully :3", - "body.too.large": "request body too large ><", + "body.too.large": "request too large ><", "invite.revoked": "invite revoked successfully", "invite.declined": "invite declined successfully", "account.creation.request.expired": "cat creation request expired. try again", @@ -33,12 +33,8 @@ "username.conditions.allowed": "cat name can only include {all}", "password.not.hashed.properly": "meow word is not hashed properly", "invalid.username.or.password": "invalid cat name or meow word", - "error.account.not.exist": "Meowccount Does Not Exist", "error.storage.limit.exceeded": "Storage Limit Exceeded, purr", - "error.username.taken": "Meowname is Taken", "error.network.error": "Network error, check connection or file size, meow.", - "error.body.too.large": "File is too large, meow! (max 10MB)", - "error.unknown.error": "Unknown error, purr", "account.not.exist": "cat with this name doesn't exist", "invalid.nonce": "invalid nonce. try again", "username.changed": "cat name changed successfully", @@ -122,7 +118,6 @@ "title.back.to.register": "back to registration", "title.details": "details", "title.members": "cats", - "placeholder.username": "cat name", "placeholder.captcha.code": "captcha code", "desc.messages.loading": "loading meows...", @@ -191,5 +186,11 @@ "action.attachment.poll": "Meowll", "action.attachment.uploading": "Uploading meowttachments...", "attachment.legacy": "Legacy meowttachment", - "warning.unencrypted": "This meowsage is not encrypted" + "warning.unencrypted": "This meowsage is not encrypted", + "action.change.avatar": "Change Cat Picture", + "action.change.banner": "Change Cat Banner", + "placeholder.type.text.emoji": "Type purr / meow...", + "action.cancel": "Cancel", + "title.crop.image": "Crop Image", + "title.zoom": "Zoom" } \ No newline at end of file diff --git a/webroot/blah/en-us.json b/webroot/blah/en-us.json index fdeaf7f6..e550f1b1 100644 --- a/webroot/blah/en-us.json +++ b/webroot/blah/en-us.json @@ -14,7 +14,7 @@ "dm.key.too.large": "DM key too large", "dm.key.not.found": "DM key not found", "dm.key.updated": "DM key updated successfully", - "body.too.large": "Request body too large", + "body.too.large": "Request too large", "invite.revoked": "Invite revoked successfully", "invite.declined": "Invite declined successfully", "account.creation.request.expired": "Account creation request expired. Try again", @@ -33,12 +33,8 @@ "username.conditions.allowed": "Username can only include {all}", "password.not.hashed.properly": "Password is not hashed properly", "invalid.username.or.password": "Invalid username or password", - "error.account.not.exist": "Account Does Not Exist", "error.storage.limit.exceeded": "Storage Limit Exceeded", - "error.username.taken": "Username is Taken", "error.network.error": "Network error, check connection or file size.", - "error.body.too.large": "File is too large (max 10MB)", - "error.unknown.error": "Unknown error", "account.not.exist": "Account with this name doesn't exist", "invalid.nonce": "Invalid nonce. Try again", "username.changed": "Username changed successfully", @@ -156,7 +152,6 @@ "title.loading": "Loading...", "title.details": "Details", "title.members": "Members", - "action.edit.profile": "Edit profile", "action.open.dm": "Open DM", "action.invite.accept": "Accept invite", @@ -191,5 +186,11 @@ "action.attachment.poll": "Poll", "action.attachment.uploading": "Uploading attachments...", "attachment.legacy": "Legacy attachment", - "warning.unencrypted": "This message is not encrypted" + "warning.unencrypted": "This message is not encrypted", + "action.change.avatar": "Change Avatar", + "action.change.banner": "Change Banner", + "placeholder.type.text.emoji": "Type text / emoji...", + "action.cancel": "Cancel", + "title.crop.image": "Crop Image", + "title.zoom": "Zoom" } \ No newline at end of file diff --git a/webroot/blah/pl-pl.json b/webroot/blah/pl-pl.json index 0807217d..7274282e 100644 --- a/webroot/blah/pl-pl.json +++ b/webroot/blah/pl-pl.json @@ -33,12 +33,8 @@ "username.conditions.allowed": "Nazwa użytkownika może zawierać tylko: {all}", "password.not.hashed.properly": "Hasło nie zostało poprawnie zahaszowane", "invalid.username.or.password": "Nieprawidłowa nazwa użytkownika lub hasło", - "error.account.not.exist": "Konto nie istnieje", "error.storage.limit.exceeded": "Przekroczono limit pamięci", - "error.username.taken": "Nazwa użytkownika jest już zajęta", "error.network.error": "Błąd sieci. Sprawdź połączenie lub rozmiar pliku.", - "error.body.too.large": "Plik jest zbyt duży (maks. 10 MB)", - "error.unknown.error": "Nieznany błąd", "account.not.exist": "Konto o tej nazwie nie istnieje", "invalid.nonce": "Nieprawidłowy nonce. Spróbuj ponownie", "username.changed": "Nazwa użytkownika została pomyślnie zmieniona", @@ -156,7 +152,6 @@ "title.loading": "Ładowanie...", "title.details": "Szczegóły", "title.members": "Członkowie", - "action.edit.profile": "Edytuj profil", "action.open.dm": "Otwórz rozmowę", "action.invite.accept": "Akceptuj zaproszenie", @@ -191,5 +186,11 @@ "action.attachment.poll": "Ankieta", "action.attachment.uploading": "Przesyłanie załączników...", "attachment.legacy": "Starszy załącznik", - "warning.unencrypted": "Ta wiadomość nie jest szyfrowana" -} + "warning.unencrypted": "Ta wiadomość nie jest szyfrowana", + "action.change.avatar": "Zmień awatar", + "action.change.banner": "Zmień baner", + "placeholder.type.text.emoji": "Wpisz tekst / emoji...", + "action.cancel": "Anuluj", + "title.crop.image": "Przytnij obraz", + "title.zoom": "Przybliżenie" +} \ No newline at end of file diff --git a/webroot/icons.js b/webroot/icons.js index 2d05a6b2..706ff6bf 100644 --- a/webroot/icons.js +++ b/webroot/icons.js @@ -3,6 +3,7 @@ const ICONS = { _create: function(content, defaultProps, customProps = {}) { let p = { ...defaultProps, ...customProps }; + if (customProps.width && !customProps.height) p.height = customProps.width; let strokeAttrs = p.strokeWidth ? ` stroke-width="${p.strokeWidth}" stroke-linecap="${p.strokeLinecap}" stroke-linejoin="${p.strokeLinejoin}"` : ""; let classAttr = p.className ? ` class="${p.className}"` : ""; let styleAttr = p.style ? ` style="${p.style}"` : ""; diff --git a/webroot/index.html b/webroot/index.html index e30afd98..2dff68be 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -93,17 +93,17 @@
-

Crop Image

+

title.crop.image

- Zoom + title.zoom
- - + +
diff --git a/webroot/login/index.html b/webroot/login/index.html index d4360594..111fc1b6 100644 --- a/webroot/login/index.html +++ b/webroot/login/index.html @@ -163,79 +163,79 @@
- +

Larpix

title.sign.in.to

- +

loading.connecting

- +
- +
- +
- +
- +

join.larpix

title.create.new.account

- +

loading.connecting

- +
- +

notice.use.strong.pass

- +
- +
- +
- +

title.verify

@@ -291,19 +291,19 @@ const loginPassword = document.getElementById("login-password"); const captchaCode = document.getElementById("captcha-input"); const regKeyInput = document.getElementById("regkey-input"); - + const registerButton = document.getElementById("register-button"); const regKeyGroup = document.getElementById("regkey-group"); - - + + async function start() { updateLoadingStatus("loading.loading"); // updateLoadingStatus("loading.done"); await loadingFadeOut(); } - - + + toRegister.addEventListener('click', () => { authContainer.className = 'auth-container show-register'; @@ -323,7 +323,7 @@ try { await updateProtocolAndUrl(loginHost.value); let res = await Auth(loginUsername.value, loginPassword.value); - + if (res.startsWith("success:")) { let parts = res.split("|"); @@ -337,14 +337,14 @@ } await loadingFadeIn(); - + window.location.href = "../"; } else { showBlahNotification(res); } - + } catch (error) { console.log(error); showBlahNotification("error:something.wrong.mayb.pass"); @@ -436,7 +436,7 @@ if (res.startsWith("success")) { showBlahNotification(res); await delay(1000); - + let resolvedId = await fetchAsync(`${url}/nametoid?u=${registerUsername.value}`); if (resolvedId && !resolvedId.startsWith("error:")) { localStorage.setItem("id", resolvedId.split(":")[0]); @@ -458,7 +458,7 @@ authContainer.className = 'auth-container show-register'; } }); - + async function regHostChanged() { loginHost.value = registerHost.value; @@ -495,7 +495,7 @@ setServerStatus("Can't ping this server", "red"); } } - + function setServerStatus(status, color) { let elements = document.getElementsByClassName("serverstatus"); diff --git a/webroot/main.js b/webroot/main.js index 54233685..869ce2b6 100644 --- a/webroot/main.js +++ b/webroot/main.js @@ -2598,8 +2598,18 @@ async function renderMessages(messages, isPrepend = false) { let oldText = existingChild.querySelector('.chat-message-text'); let newText = newChild.querySelector('.chat-message-text'); - if (oldText && newText && oldText.innerHTML !== newText.innerHTML) { - oldText.innerHTML = newText.innerHTML; + if (oldText && newText) { + if (oldText.innerHTML !== newText.innerHTML) { + oldText.innerHTML = newText.innerHTML; + } + if (oldText.getAttribute('style') !== newText.getAttribute('style')) { + let newStyle = newText.getAttribute('style'); + if (newStyle) { + oldText.setAttribute('style', newStyle); + } else { + oldText.removeAttribute('style'); + } + } } let oldReactions = existingChild.querySelector('.chat-message-reactions'); @@ -3218,7 +3228,7 @@ async function loadEmotes() { reactionPickerMenuHtml = `
- +
${loadedEmotes.map(emoji => ``).join('')}
diff --git a/webroot/screens.js b/webroot/screens.js index 0940613b..8073e2d4 100644 --- a/webroot/screens.js +++ b/webroot/screens.js @@ -331,7 +331,7 @@ var profileSettings = `
title.avatar
- +
@@ -342,7 +342,7 @@ var profileSettings = `
title.banner
- +