From 7b51c56169f6454b02540afe9116f72e150a6f3b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 21 Jan 2023 11:25:31 -0800 Subject: [PATCH 01/17] docs: :memo: clone depth 1 closes #9501 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0c21fdab2..d15d2fa94e 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ If you have access to a server that supports one of the sources below, I recomme ## 👀 Get folder ready ```sh -git clone https://codeberg.org/calckey/calckey.git +git clone --depth 1 https://codeberg.org/calckey/calckey.git cd calckey/ # git checkout main # if you want only stable versions ``` From eb14539989e578d1d40518c631570816290159be Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 21 Jan 2023 11:53:45 -0800 Subject: [PATCH 02/17] refactor: online indicator --- packages/client/src/components/MkUserOnlineIndicator.vue | 8 ++++---- packages/client/src/components/global/MkAvatar.vue | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client/src/components/MkUserOnlineIndicator.vue b/packages/client/src/components/MkUserOnlineIndicator.vue index a4d4c84bcf..35eef94a1c 100644 --- a/packages/client/src/components/MkUserOnlineIndicator.vue +++ b/packages/client/src/components/MkUserOnlineIndicator.vue @@ -27,19 +27,19 @@ const text = $computed(() => { border-radius: 120%; // Blinkのバグか知らんけど、100%ぴったりにすると何故か若干楕円でレンダリングされる &.online { - background: #58d4c9; + background: #9ccfd8; } &.active { - background: #e4bc48; + background: #f6c177; } &.offline { - background: #ea5353; + background: #eb6f92; } &.unknown { - background: #888; + background: #6e6a86; } } diff --git a/packages/client/src/components/global/MkAvatar.vue b/packages/client/src/components/global/MkAvatar.vue index c9c4735f0b..e391c433de 100644 --- a/packages/client/src/components/global/MkAvatar.vue +++ b/packages/client/src/components/global/MkAvatar.vue @@ -1,11 +1,11 @@ @@ -96,8 +96,8 @@ watch(() => props.user.avatarBlurhash, () => { z-index: 1; bottom: 0; left: 0; - width: 20%; - height: 20%; + width: 18%; + height: 18%; } &.square { From 1c434a23312ef1323ec2d90351ba7d55e56f6e83 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 21 Jan 2023 12:29:46 -0800 Subject: [PATCH 03/17] feat: PWA icons --- packages/backend/assets/icons/maskable.png | Bin 0 -> 10653 bytes packages/backend/assets/icons/monochrome.png | Bin 0 -> 6538 bytes packages/backend/src/server/web/manifest.json | 23 +++++++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 packages/backend/assets/icons/maskable.png create mode 100644 packages/backend/assets/icons/monochrome.png diff --git a/packages/backend/assets/icons/maskable.png b/packages/backend/assets/icons/maskable.png new file mode 100644 index 0000000000000000000000000000000000000000..44b214ca7c84e5f581d27e5d1a772613b2cdea5b GIT binary patch literal 10653 zcmeHti96I^^gsEaWT}X;SC&Hdv4la!HrBFcDWuGdC0Sz_QBNk&Dc=K5jK)>-<+9kyl zZ;|WQyW``ZTu_XBOZE|8(|kWtG*uM3b~vTK89NYd7wSD$6k4SE$S>~@b!?B7h5X<1 zzeEFrOPk~Rw_)J%Z2qcLnlPfUmplq=db~i65;GAXNXz~mnM zntN_!=^-81l7$|s;!KZmvJE(}?m>pDOB(AB^%4vsDjRXZIuNWz(t4mp>JWkvp!Y(h zDp`y)0F^V?O)?1hX9%)&9eOvMFcSPpYQ@2J)?6XAQV&E3hDF0oO-B?lSnVN)^Lr*!|<+kj>M z>vgp#0WgoUWUIY-M@ca2mXwR)xd&0{b`|1S_%NT0xtDQA#Q<*21A@)>elt#~VL-V; zZ}IeMBGax^Ut=)0WXzABj9lpOxq%guq7I|A%Q`3z{jY@3?k+Qb#ppltJBKX2H;Seai|KZF~LlWF?0}V{+htjcM-SWr&aoX zgL241zIp$RtoSA>MZ)ZiG-;9b38(h#x#b}1-m!X=XLHdh2*o(Z=wKsVR`v7|HVWmADPkqQ1%BtI@-tZMdc&=x4C>*7 z0;z5g&@L%=`c~0+qT#kIgkAll#~_IJep{Ct;`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7_;6rlqxm#yROzU$$h194EVO@QJcijZxhfc4Nw*VpVR)WnCU0eOhcwzO zaqQ=&pAY}+^mbZ>3?SpLZs~ii_*Cpg1P$q36txd6{lL#&7?T=jB2VKPvm0&cQ)|7lXU}La%-`!N~L3_%^m&6 z*UEg2McK~^Bz$JEj$cMiBPNM^T#LiHNtibBi{eL ew_#i#nMXq7-r^o?`Tl>VP*>G@je7Ml;Qs(tLthdA literal 0 HcmV?d00001 diff --git a/packages/backend/src/server/web/manifest.json b/packages/backend/src/server/web/manifest.json index 2f053fdc42..1e662fb202 100644 --- a/packages/backend/src/server/web/manifest.json +++ b/packages/backend/src/server/web/manifest.json @@ -11,12 +11,26 @@ { "src": "/static-assets/icons/192.png", "sizes": "192x192", - "type": "image/png" + "type": "image/png", + "purpose": "any" }, { "src": "/static-assets/icons/512.png", "sizes": "512x512", - "type": "image/png" + "type": "image/png", + "purpose": "any" + }, + { + "src": "/static-assets/icons/maskable.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/static-assets/icons/monochrome.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "monochrome" } ], "share_target": { @@ -53,5 +67,8 @@ "name": "Chats", "url": "/my/messaging" } - ] + ], + "categories": [ + "social" + ] } From b759ec45391eebccfede75e3e9a0c285963d507f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Sat, 21 Jan 2023 12:55:38 -0800 Subject: [PATCH 04/17] TWA/assetlinks support --- .config/example.yml | 6 ++++++ package.json | 2 +- packages/backend/src/config/types.ts | 6 ++++++ packages/backend/src/server/well-known.ts | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.config/example.yml b/.config/example.yml index 29f4a62290..900ac09051 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -145,6 +145,12 @@ id: 'aid' # '127.0.0.1/32' #] +# TWA +#twa: +# nameSpace: android_app +# packageName: tld.domain.twa +# sha256CertFingerprints: ['AB:CD:EF'] + # Upload or download file size limits (bytes) #maxFileSize: 262144000 diff --git a/package.json b/package.json index b5e3feea07..981c287120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.8-rc4", + "version": "13.0.9-rc", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/backend/src/config/types.ts b/packages/backend/src/config/types.ts index 0b9c4e8ba6..e9c42c08f6 100644 --- a/packages/backend/src/config/types.ts +++ b/packages/backend/src/config/types.ts @@ -64,6 +64,12 @@ export type Source = { mediaProxy?: string; proxyRemoteFiles?: boolean; + twa: { + nameSpace?: string; + packageName?: string; + sha256CertFingerprints?: string[]; + }; + // Managed hosting stuff maxUserSignups?: number; isManagedHosting?: boolean; diff --git a/packages/backend/src/server/well-known.ts b/packages/backend/src/server/well-known.ts index 4b839c879d..b617e38091 100644 --- a/packages/backend/src/server/well-known.ts +++ b/packages/backend/src/server/well-known.ts @@ -74,6 +74,22 @@ router.get("/.well-known/host-meta.json", async (ctx) => { }; }); +if (config.twa.nameSpace != null) { + router.get("/.well-known/assetlinks.json", async (ctx) => { + ctx.set("Content-Type", "application/json"); + ctx.body = [ + { + relation: ["delegate_permission/common.handle_all_urls"], + target: { + namespace: config.twa.nameSpace, + package_name: config.twa.packageName, + sha256_cert_fingerprints: config.twa.sha256CertFingerprints, + }, + }, + ]; + }); +} + router.get("/.well-known/nodeinfo", async (ctx) => { ctx.body = { links }; }); From c0ffb1db7f607b41017dbc941eba9d9e9fb598d5 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 23 Jan 2023 10:35:51 -0800 Subject: [PATCH 05/17] Fix config --- packages/backend/src/server/well-known.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/well-known.ts b/packages/backend/src/server/well-known.ts index b617e38091..5af3b2c84b 100644 --- a/packages/backend/src/server/well-known.ts +++ b/packages/backend/src/server/well-known.ts @@ -74,7 +74,7 @@ router.get("/.well-known/host-meta.json", async (ctx) => { }; }); -if (config.twa.nameSpace != null) { +if (config.twa != null) { router.get("/.well-known/assetlinks.json", async (ctx) => { ctx.set("Content-Type", "application/json"); ctx.body = [ From 7df330ec296b7c57a4b2a38317e2c00887406c8f Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 23 Jan 2023 12:12:49 -0800 Subject: [PATCH 06/17] fix: :bug: double name on splash Closes #9500 --- packages/client/src/pages/welcome.entrance.a.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/pages/welcome.entrance.a.vue b/packages/client/src/pages/welcome.entrance.a.vue index 26f28cd6da..4608ecb38e 100644 --- a/packages/client/src/pages/welcome.entrance.a.vue +++ b/packages/client/src/pages/welcome.entrance.a.vue @@ -24,8 +24,8 @@

- {{ instanceName }} - {{ instanceName }} + + {{ instanceName }}

From 1540db7af9181b12f1465547756d715eafc42573 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 24 Jan 2023 15:09:09 -0800 Subject: [PATCH 07/17] build: :construction_worker: Build service worker with swc --- packages/sw/.swcrc | 24 ++++++++++++++++++++++++ packages/sw/build.js | 37 ------------------------------------- packages/sw/package.json | 6 +++--- 3 files changed, 27 insertions(+), 40 deletions(-) create mode 100644 packages/sw/.swcrc delete mode 100644 packages/sw/build.js diff --git a/packages/sw/.swcrc b/packages/sw/.swcrc new file mode 100644 index 0000000000..1d6d3b4964 --- /dev/null +++ b/packages/sw/.swcrc @@ -0,0 +1,24 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "dynamicImport": true, + "decorators": true + }, + "transform": { + "decoratorMetadata": true + }, + "experimental": { + "keepImportAssertions": true + }, + "baseUrl": ".", + "paths": { + "@/*": [ + "./src/*" + ] + }, + "target": "es2022" + }, + "minify": false +} diff --git a/packages/sw/build.js b/packages/sw/build.js deleted file mode 100644 index c2a72fa4e9..0000000000 --- a/packages/sw/build.js +++ /dev/null @@ -1,37 +0,0 @@ -const esbuild = require('esbuild'); -const locales = require('../../locales'); -const meta = require('../../package.json'); -const watch = process.argv[2]?.includes('watch'); - -console.log('Starting SW building...'); - -esbuild.build({ - entryPoints: [ `${__dirname}/src/sw.ts` ], - bundle: true, - format: 'esm', - treeShaking: true, - minify: process.env.NODE_ENV === 'production', - absWorkingDir: __dirname, - outbase: `${__dirname}/src`, - outdir: `${__dirname}/../../built/_sw_dist_`, - loader: { - '.ts': 'ts' - }, - tsconfig: `${__dirname}/tsconfig.json`, - define: { - _VERSION_: JSON.stringify(meta.version), - _LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]) => [k, v._lang_])), - _ENV_: JSON.stringify(process.env.NODE_ENV), - _DEV_: process.env.NODE_ENV !== 'production', - _PERF_PREFIX_: JSON.stringify('Calckey:'), - }, - watch: watch ? { - onRebuild(error, result) { - if (error) console.error('SW: watch build failed:', error); - else console.log('SW: watch build succeeded:', result); - }, - } : false, -}).then(result => { - if (watch) console.log('watching...'); - else console.log('done,', JSON.stringify(result)); -}); diff --git a/packages/sw/package.json b/packages/sw/package.json index 41bdb0da84..ab22ca73fb 100644 --- a/packages/sw/package.json +++ b/packages/sw/package.json @@ -2,9 +2,9 @@ "name": "sw", "private": true, "scripts": { - "watch": "node build.js watch", - "build": "node build.js", - "lint": "pnpm rome check src/**/*.{ts}" + "build": "pnpm swc src -d built -D", + "watch": "pnpm swc src -d built -D -w", + "lint": "pnpm rome check \"src/**/*.ts\"" }, "dependencies": { "calckey-js": "^0.0.20", From 970b4907f3f7133bce78abce93d99b9ef66a4bd2 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 24 Jan 2023 15:11:15 -0800 Subject: [PATCH 08/17] chore: :wrench: remove eslint from service worker, up pnpm --- package.json | 2 +- packages/sw/package.json | 1 - pnpm-lock.yaml | 230 --------------------------------------- 3 files changed, 1 insertion(+), 232 deletions(-) diff --git a/package.json b/package.json index 981c287120..96588b5e82 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://codeberg.org/calckey/calckey.git" }, - "packageManager": "pnpm@7.25.0", + "packageManager": "pnpm@7.26.0", "private": true, "scripts": { "rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp", diff --git a/packages/sw/package.json b/packages/sw/package.json index ab22ca73fb..70990abf67 100644 --- a/packages/sw/package.json +++ b/packages/sw/package.json @@ -8,7 +8,6 @@ }, "dependencies": { "calckey-js": "^0.0.20", - "esbuild": "^0.15.18", "idb-keyval": "^6.2.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed3579ea12..7a2c2f8696 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -535,11 +535,9 @@ importers: packages/sw: specifiers: calckey-js: ^0.0.20 - esbuild: ^0.15.18 idb-keyval: ^6.2.0 dependencies: calckey-js: 0.0.20 - esbuild: 0.15.18 idb-keyval: 6.2.0 packages: @@ -900,15 +898,6 @@ packages: - supports-color dev: false - /@esbuild/android-arm/0.15.18: - resolution: {integrity: sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-arm/0.16.17: resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} engines: {node: '>=12'} @@ -999,15 +988,6 @@ packages: dev: false optional: true - /@esbuild/linux-loong64/0.15.18: - resolution: {integrity: sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-loong64/0.16.17: resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} @@ -5514,216 +5494,6 @@ packages: es6-symbol: 3.1.3 dev: false - /esbuild-android-64/0.15.18: - resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: false - optional: true - - /esbuild-android-arm64/0.15.18: - resolution: {integrity: sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: false - optional: true - - /esbuild-darwin-64/0.15.18: - resolution: {integrity: sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /esbuild-darwin-arm64/0.15.18: - resolution: {integrity: sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /esbuild-freebsd-64/0.15.18: - resolution: {integrity: sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: false - optional: true - - /esbuild-freebsd-arm64/0.15.18: - resolution: {integrity: sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-32/0.15.18: - resolution: {integrity: sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-64/0.15.18: - resolution: {integrity: sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-arm/0.15.18: - resolution: {integrity: sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-arm64/0.15.18: - resolution: {integrity: sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-mips64le/0.15.18: - resolution: {integrity: sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-ppc64le/0.15.18: - resolution: {integrity: sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-riscv64/0.15.18: - resolution: {integrity: sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-s390x/0.15.18: - resolution: {integrity: sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-netbsd-64/0.15.18: - resolution: {integrity: sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: false - optional: true - - /esbuild-openbsd-64/0.15.18: - resolution: {integrity: sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: false - optional: true - - /esbuild-sunos-64/0.15.18: - resolution: {integrity: sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: false - optional: true - - /esbuild-windows-32/0.15.18: - resolution: {integrity: sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /esbuild-windows-64/0.15.18: - resolution: {integrity: sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /esbuild-windows-arm64/0.15.18: - resolution: {integrity: sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /esbuild/0.15.18: - resolution: {integrity: sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.15.18 - '@esbuild/linux-loong64': 0.15.18 - esbuild-android-64: 0.15.18 - esbuild-android-arm64: 0.15.18 - esbuild-darwin-64: 0.15.18 - esbuild-darwin-arm64: 0.15.18 - esbuild-freebsd-64: 0.15.18 - esbuild-freebsd-arm64: 0.15.18 - esbuild-linux-32: 0.15.18 - esbuild-linux-64: 0.15.18 - esbuild-linux-arm: 0.15.18 - esbuild-linux-arm64: 0.15.18 - esbuild-linux-mips64le: 0.15.18 - esbuild-linux-ppc64le: 0.15.18 - esbuild-linux-riscv64: 0.15.18 - esbuild-linux-s390x: 0.15.18 - esbuild-netbsd-64: 0.15.18 - esbuild-openbsd-64: 0.15.18 - esbuild-sunos-64: 0.15.18 - esbuild-windows-32: 0.15.18 - esbuild-windows-64: 0.15.18 - esbuild-windows-arm64: 0.15.18 - dev: false - /esbuild/0.16.17: resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} engines: {node: '>=12'} From 95595dafcb9e18d3d30cab590d678e9728aeca4c Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 24 Jan 2023 15:13:25 -0800 Subject: [PATCH 09/17] fix: :bug: signin with ipv6 co-authored-by: Syuilo --- packages/backend/src/misc/get-ip-hash.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/misc/get-ip-hash.ts b/packages/backend/src/misc/get-ip-hash.ts index caf832f904..3bafaee5df 100644 --- a/packages/backend/src/misc/get-ip-hash.ts +++ b/packages/backend/src/misc/get-ip-hash.ts @@ -1,9 +1,14 @@ import IPCIDR from "ip-cidr"; export function getIpHash(ip: string) { - // because a single person may control many IPv6 addresses, - // only a /64 subnet prefix of any IP will be taken into account. - // (this means for IPv4 the entire address is used) - const prefix = IPCIDR.createAddress(ip).mask(64); - return `ip-${BigInt(`0b${prefix}`).toString(36)}`; + try { + // because a single person may control many IPv6 addresses, + // only a /64 subnet prefix of any IP will be taken into account. + // (this means for IPv4 the entire address is used) + const prefix = IPCIDR.createAddress(ip).mask(64); + return `ip-${BigInt(`0b${prefix}`).toString(36)}`; + } catch (e) { + const prefix = IPCIDR.createAddress(ip.replace(/:[0-9]+$/, "")).mask(64); + return `ip-${BigInt(`0b${prefix}`).toString(36)}`; + } } From 61e290e32a75d380a027d417da770454f6daf206 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 24 Jan 2023 15:18:30 -0800 Subject: [PATCH 10/17] improve MkTab --- packages/client/src/components/MkTab.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/MkTab.vue b/packages/client/src/components/MkTab.vue index 3c2e47ba7a..8920e4155d 100644 --- a/packages/client/src/components/MkTab.vue +++ b/packages/client/src/components/MkTab.vue @@ -10,20 +10,18 @@ export default defineComponent({ render() { const options = this.$slots.default(); - return withDirectives(h('div', { + return h('div', { class: 'pxhvhrfw', }, options.map(option => withDirectives(h('button', { - class: ['_button', { active: this.modelValue === option.props.value }], + class: ['_button', { active: this.modelValue === option.props?.value }], key: option.key, - disabled: this.modelValue === option.props.value, + disabled: this.modelValue === option.props?.value, onClick: () => { - this.$emit('update:modelValue', option.props.value); + this.$emit('update:modelValue', option.props?.value); }, }, option.children), [ [resolveDirective('click-anime')], - ]))), [ - [resolveDirective('size'), { max: [500] }], - ]); + ]))); }, }); From d19e33485deebf2b6d9977dd757f1552673ff03b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Dec 2022 16:52:05 +0900 Subject: [PATCH 11/17] fix(client): use proxied image for instance icon --- packages/client/src/components/MkInstanceCardMini.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/MkInstanceCardMini.vue b/packages/client/src/components/MkInstanceCardMini.vue index b4ff5bdc35..11952e46ca 100644 --- a/packages/client/src/components/MkInstanceCardMini.vue +++ b/packages/client/src/components/MkInstanceCardMini.vue @@ -1,6 +1,6 @@