diff --git a/.env.build b/.env.build index bb995aad..4d3f2a45 100644 --- a/.env.build +++ b/.env.build @@ -1,2 +1,2 @@ -API_SERVER=__API_URL__ -THEMES_URL=https://static.revolt.chat/themes \ No newline at end of file +VITE_API_URL=__API_URL__ +VITE_THEMES_URL=https://static.revolt.chat/themes \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5b405a7f..dcf3dd90 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -ko_fi: insertish \ No newline at end of file +ko_fi: insertish +custom: https://insrt.uk/donate diff --git a/.gitmodules b/.gitmodules index 481dd10f..14a79276 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "external/lang"] path = external/lang - url = https://gitlab.insrt.uk/revolt/translations + url = https://github.com/revoltchat/translations diff --git a/.prettierrc.js b/.prettierrc.js index cc690915..49e1e325 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -7,7 +7,7 @@ module.exports = { "/(lib)", "/(redux|mobx)", "/(context)", - "/(ui|common)|.svg$", + "/(ui|common)|.svg|.webp$", "^[./]", ], importOrderSeparation: true, diff --git a/Dockerfile b/Dockerfile index dcc3fec4..976d3043 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ RUN npm prune --production FROM node:15-buster WORKDIR /usr/src/app COPY --from=builder /usr/src/app . -RUN rm ./.env EXPOSE 5000 CMD [ "yarn", "start:inject" ] \ No newline at end of file diff --git a/external/lang b/external/lang index 8676906e..2d5b96a5 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 8676906ec594a42ee72dcc5ad227357bb300570d +Subproject commit 2d5b96a5c72bb706b73e9b67d5be395810a18c15 diff --git a/package.json b/package.json index 9ed67f51..5ce9d93a 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,9 @@ } }, "dependencies": { + "fs-extra": "^10.0.0", + "klaw": "^3.0.0", + "sirv-cli": "^1.0.14", "vite": "npm:@insertish/vite@2.4.0-beta.3-dynamic-import-css-3c1466b" }, "devDependencies": { @@ -92,7 +95,6 @@ "eslint-config-preact": "^1.1.4", "eventemitter3": "^4.0.7", "highlight.js": "^11.0.1", - "klaw": "^3.0.0", "localforage": "^1.9.0", "lodash.defaultsdeep": "^4.6.1", "lodash.isequal": "^4.5.0", @@ -123,7 +125,6 @@ "rimraf": "^3.0.2", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", - "sirv-cli": "^1.0.14", "styled-components": "^5.3.0", "typescript": "^4.3.2", "ulid": "^2.3.0", diff --git a/src/context/Locale.tsx b/src/context/Locale.tsx index da039a64..3ddb5ba4 100644 --- a/src/context/Locale.tsx +++ b/src/context/Locale.tsx @@ -67,6 +67,7 @@ export enum Language { BOTTOM = "bottom", LEET = "leet", PIGLATIN = "piglatin", + ENCHANTMENT_TABLE = "enchantment", } export interface LanguageEntry { @@ -146,7 +147,7 @@ export const Languages: { [key in Language]: LanguageEntry } = { owo: { display: "OwO", - emoji: "🐱", + emoji: "😸", i18n: "owo", dayjs: "en-gb", cat: "alt", @@ -172,6 +173,13 @@ export const Languages: { [key in Language]: LanguageEntry } = { dayjs: "en-gb", cat: "alt", }, + enchantment: { + display: "Enchantment Table", + emoji: "🪄", + i18n: "enchantment", + dayjs: "en-gb", + cat: "alt", + }, piglatin: { display: "Pig Latin", emoji: "🐖", diff --git a/src/pages/settings/assets/enchanting_table.webp b/src/pages/settings/assets/enchanting_table.webp new file mode 100644 index 00000000..02ab3b21 Binary files /dev/null and b/src/pages/settings/assets/enchanting_table.webp differ diff --git a/src/pages/settings/panes/Languages.tsx b/src/pages/settings/panes/Languages.tsx index f9b1583e..cc521efc 100644 --- a/src/pages/settings/panes/Languages.tsx +++ b/src/pages/settings/panes/Languages.tsx @@ -13,6 +13,7 @@ import { import Emoji from "../../../components/common/Emoji"; import Checkbox from "../../../components/ui/Checkbox"; import Tip from "../../../components/ui/Tip"; +import enchantingTableWEBP from "../assets/enchanting_table.webp"; import tokiponaSVG from "../assets/toki_pona.svg"; type Props = { @@ -38,6 +39,12 @@ function Entry({ entry: [x, lang], locale }: { entry: Key } & Props) {
{lang.emoji === "🙂" ? ( + ) : lang.emoji === "🪄" ? ( + ) : ( )} diff --git a/yarn.lock b/yarn.lock index c5c81381..4e6eec06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2459,6 +2459,15 @@ from@~0: resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +fs-extra@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" + integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"