From 19035c676cd1a8afc1d798ff85147a523df95985 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 12:39:24 +0000 Subject: [PATCH 01/13] =?UTF-8?q?/proxy=E3=81=A7emoji,=20avatar=E3=81=AA?= =?UTF-8?q?=E3=81=A9=E3=81=AE=E5=91=BD=E4=BB=A4=E3=81=8C=E3=81=82=E3=82=8A?= =?UTF-8?q?=E3=81=8B=E3=81=A4=E7=94=BB=E5=83=8F=E3=81=A7=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=81=AA=E3=82=89404=E3=82=92=E8=BF=94=E3=81=99=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/server/FileServerService.ts | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index 4bd6d0f55..49ded6c28 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -255,8 +255,21 @@ export class FileServerService { const isConvertibleImage = isMimeImage(file.mime, 'sharp-convertible-image'); const isAnimationConvertibleImage = isMimeImage(file.mime, 'sharp-animation-convertible-image'); + if ( + 'emoji' in request.query || + 'avatar' in request.query || + 'static' in request.query || + 'preview' in request.query || + 'badge' in request.query + ) { + if (!isConvertibleImage) { + // 画像でないなら404でお茶を濁す + throw new StatusError('Unexpected mime', 404); + } + } + let image: IImageStreamable | null = null; - if (('emoji' in request.query || 'avatar' in request.query) && isConvertibleImage) { + if ('emoji' in request.query || 'avatar' in request.query) { if (!isAnimationConvertibleImage && !('static' in request.query)) { image = { data: fs.createReadStream(file.path), @@ -277,16 +290,11 @@ export class FileServerService { type: 'image/webp', }; } - } else if ('static' in request.query && isConvertibleImage) { + } else if ('static' in request.query) { image = this.imageProcessingService.convertToWebpStream(file.path, 498, 280); - } else if ('preview' in request.query && isConvertibleImage) { + } else if ('preview' in request.query) { image = this.imageProcessingService.convertToWebpStream(file.path, 200, 200); } else if ('badge' in request.query) { - if (!isConvertibleImage) { - // 画像でないなら404でお茶を濁す - throw new StatusError('Unexpected mime', 404); - } - const mask = sharp(file.path) .resize(96, 96, { fit: 'inside', From 35eeeb25e35b269211864351f8ea684a0b4ba145 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 15:05:23 +0000 Subject: [PATCH 02/13] update pnpm to 7.27.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 578bcb76a..59e331be9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://github.com/misskey-dev/misskey.git" }, - "packageManager": "pnpm@7.24.3", + "packageManager": "pnpm@7.27.0", "workspaces": [ "packages/frontend", "packages/backend", From 83fb629f0b09f6799151b0115e3b4dc7ed17ce01 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 15:34:49 +0000 Subject: [PATCH 03/13] :art: --- .../frontend/src/ui/_common_/navbar-for-mobile.vue | 13 +++++++++---- packages/frontend/src/ui/_common_/navbar.vue | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue index 989d861d2..357db5599 100644 --- a/packages/frontend/src/ui/_common_/navbar-for-mobile.vue +++ b/packages/frontend/src/ui/_common_/navbar-for-mobile.vue @@ -35,7 +35,7 @@ {{ i18n.ts.note }} @@ -168,20 +168,25 @@ function more() { display: flex; align-items: center; padding-left: 30px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; width: 100%; text-align: left; box-sizing: border-box; margin-top: 16px; > .avatar { + display: block; + flex-shrink: 0; position: relative; width: 32px; aspect-ratio: 1; margin-right: 8px; } + + > .text { + display: block; + flex-shrink: 1; + padding-right: 8px; + } } } diff --git a/packages/frontend/src/ui/_common_/navbar.vue b/packages/frontend/src/ui/_common_/navbar.vue index e90098397..3c161f679 100644 --- a/packages/frontend/src/ui/_common_/navbar.vue +++ b/packages/frontend/src/ui/_common_/navbar.vue @@ -45,7 +45,7 @@ {{ i18n.ts.note }} @@ -217,20 +217,25 @@ function more(ev: MouseEvent) { display: flex; align-items: center; padding-left: 30px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; width: 100%; text-align: left; box-sizing: border-box; margin-top: 16px; > .avatar { + display: block; + flex-shrink: 0; position: relative; width: 32px; aspect-ratio: 1; margin-right: 8px; } + + > .text { + display: block; + flex-shrink: 1; + padding-right: 8px; + } } } From 686a709e87b6358e066ce32a6edc06034b4a3760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Fri, 10 Feb 2023 00:36:05 +0900 Subject: [PATCH 04/13] chore: determine dimensions of the helix of cat ears based on the size of avatars (#9836) * chore: determine dimensions of the helix of cat ears based on the size of avatars * Update MkAvatar.vue * Update packages/frontend/src/components/global/MkAvatar.vue --------- Co-authored-by: tamaina --- .../src/components/global/MkAvatar.vue | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/components/global/MkAvatar.vue b/packages/frontend/src/components/global/MkAvatar.vue index 812f30439..9ad06545f 100644 --- a/packages/frontend/src/components/global/MkAvatar.vue +++ b/packages/frontend/src/components/global/MkAvatar.vue @@ -1,11 +1,19 @@ @@ -110,32 +118,41 @@ watch(() => props.user.avatarBlurhash, () => { } .cat { - &:before, &:after { - background: #df548f; - border: solid 4px currentColor; - box-sizing: border-box; - content: ''; + > .earLeft, + > .earRight { + contain: strict; display: inline-block; height: 50%; width: 50%; + background: currentColor; + + &::before { + contain: strict; + content: ''; + display: block; + width: 60%; + height: 60%; + margin: 20%; + background: #df548f; + } } - &:before { + > .earLeft { border-radius: 0 75% 75%; transform: rotate(37.5deg) skew(30deg); } - &:after { + > .earRight { border-radius: 75% 0 75% 75%; transform: rotate(-37.5deg) skew(-30deg); } &:hover { - &:before { + > .earLeft { animation: earwiggleleft 1s infinite; } - &:after { + > .earRight { animation: earwiggleright 1s infinite; } } From ca0d53ec5df747bbfba583f161a38af9dfe4d96c Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 17:18:27 +0000 Subject: [PATCH 05/13] =?UTF-8?q?enhance(client):=20/auth=E3=81=8A?= =?UTF-8?q?=E3=82=88=E3=81=B3MiAuth=E3=81=AEUI=E3=82=92=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=83=83=E3=82=B7=E3=83=A5=E3=82=A2=E3=83=83=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #9742 --- CHANGELOG.md | 9 ++ locales/ja-JP.yml | 2 + packages/frontend/src/pages/auth.form.vue | 108 +++++++------- packages/frontend/src/pages/auth.vue | 170 ++++++++++++---------- packages/frontend/src/pages/miauth.vue | 78 ++++++---- 5 files changed, 207 insertions(+), 160 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9bda3534..d3ccb5f86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ You should also include the user name that made the change. --> +## 13.x.x (unreleased) + +### Improvements +- 非ログイン時にMiAuthを踏んだ際にMiAuthであることを表示する +- /auth/のUIをアップデート + +### Bugfixes +- + ## 13.5.4 (2023/02/09) ### Improvements diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 09069e780..60f492d66 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1628,12 +1628,14 @@ _permissions: "write:gallery-likes": "ギャラリーのいいねを操作する" _auth: + shareAccessTitle: "アプリへのアクセス許可" shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" shareAccessAsk: "アカウントへのアクセスを許可しますか?" permissionAsk: "このアプリは次の権限を要求しています" pleaseGoBack: "アプリケーションに戻ってやっていってください" callback: "アプリケーションに戻っています" denied: "アクセスを拒否しました" + pleaseLogin: "アプリケーションにアクセス許可を与えるには、ログインが必要です。" _antennaSources: all: "全てのノート" diff --git a/packages/frontend/src/pages/auth.form.vue b/packages/frontend/src/pages/auth.form.vue index 801295fce..1a1cd55ee 100644 --- a/packages/frontend/src/pages/auth.form.vue +++ b/packages/frontend/src/pages/auth.form.vue @@ -1,60 +1,66 @@ - + + diff --git a/packages/frontend/src/pages/auth.vue b/packages/frontend/src/pages/auth.vue index b7727ca30..50afffc46 100644 --- a/packages/frontend/src/pages/auth.vue +++ b/packages/frontend/src/pages/auth.vue @@ -1,93 +1,105 @@ - - diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue index 9a4019e5b..0a82ef8e4 100644 --- a/packages/frontend/src/pages/miauth.vue +++ b/packages/frontend/src/pages/miauth.vue @@ -1,41 +1,39 @@ - From 512e451f2411b468860e286d88b8cd6118c249f4 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 17:29:22 +0000 Subject: [PATCH 06/13] =?UTF-8?q?app=20auth=20/=20miauth=E3=81=AE=E6=96=87?= =?UTF-8?q?=E8=A8=80=E7=B7=A8=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 1 + packages/frontend/src/pages/auth.form.vue | 2 +- packages/frontend/src/pages/miauth.vue | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 60f492d66..9edaa53a9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1631,6 +1631,7 @@ _auth: shareAccessTitle: "アプリへのアクセス許可" shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" shareAccessAsk: "アカウントへのアクセスを許可しますか?" + permission: "{name}は次の権限を要求しています" permissionAsk: "このアプリは次の権限を要求しています" pleaseGoBack: "アプリケーションに戻ってやっていってください" callback: "アプリケーションに戻っています" diff --git a/packages/frontend/src/pages/auth.form.vue b/packages/frontend/src/pages/auth.form.vue index 1a1cd55ee..f8484185f 100644 --- a/packages/frontend/src/pages/auth.form.vue +++ b/packages/frontend/src/pages/auth.form.vue @@ -1,7 +1,7 @@ - - - - + + + From adad4bcfe3a8dac2c8f6b053b2e0229852b5cd47 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 10 Feb 2023 10:45:32 +0900 Subject: [PATCH 09/13] =?UTF-8?q?=E3=82=AF=E3=83=AD=E3=83=83=E3=83=97?= =?UTF-8?q?=E6=99=82=E3=81=AE=E8=B3=AA=E5=95=8F=E3=82=92=E5=88=86=E3=81=8B?= =?UTF-8?q?=E3=82=8A=E3=82=84=E3=81=99=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 2 ++ packages/frontend/src/components/MkDialog.vue | 6 ++++-- packages/frontend/src/os.ts | 2 ++ packages/frontend/src/pages/settings/profile.vue | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 14ab9d7c7..79b78f3f9 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -864,6 +864,8 @@ failedToFetchAccountInformation: "アカウント情報の取得に失敗しま rateLimitExceeded: "レート制限を超えました" cropImage: "画像のクロップ" cropImageAsk: "画像をクロップしますか?" +cropYes: "クロップする" +cropNo: "そのまま使う" file: "ファイル" recentNHours: "直近{n}時間" recentNDays: "直近{n}日" diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue index 74cb53485..da4db6340 100644 --- a/packages/frontend/src/components/MkDialog.vue +++ b/packages/frontend/src/components/MkDialog.vue @@ -28,8 +28,8 @@
- {{ (showCancelButton || input || select) ? i18n.ts.ok : i18n.ts.gotIt }} - {{ i18n.ts.cancel }} + {{ okText ?? ((showCancelButton || input || select) ? i18n.ts.ok : i18n.ts.gotIt) }} + {{ cancelText ?? i18n.ts.cancel }}
{{ action.text }} @@ -82,6 +82,8 @@ const props = withDefaults(defineProps<{ showOkButton?: boolean; showCancelButton?: boolean; cancelableByBgClick?: boolean; + okText?: string; + cancelText?: string; }>(), { type: 'info', showOkButton: true, diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 52469b6d0..e21a21ef7 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -171,6 +171,8 @@ export function confirm(props: { type: 'error' | 'info' | 'success' | 'warning' | 'waiting' | 'question'; title?: string | null; text?: string | null; + okText?: string; + cancelText?: string; }): Promise<{ canceled: boolean }> { return new Promise((resolve, reject) => { popup(MkDialog, { diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index da7d3d370..3647e90ce 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -150,6 +150,8 @@ function changeAvatar(ev) { const { canceled } = await os.confirm({ type: 'question', text: i18n.t('cropImageAsk'), + okText: i18n.ts.cropYes, + cancelText: i18n.ts.cropNo, }); if (!canceled) { @@ -174,6 +176,8 @@ function changeBanner(ev) { const { canceled } = await os.confirm({ type: 'question', text: i18n.t('cropImageAsk'), + okText: i18n.ts.cropYes, + cancelText: i18n.ts.cropNo, }); if (!canceled) { From 3c504b4b08ee22af1f2b668e97929aafa03c60ad Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 10 Feb 2023 11:04:11 +0900 Subject: [PATCH 10/13] chore(client): improve usability --- packages/frontend/src/components/MkCwButton.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkCwButton.vue b/packages/frontend/src/components/MkCwButton.vue index 651b20cef..e0885f555 100644 --- a/packages/frontend/src/components/MkCwButton.vue +++ b/packages/frontend/src/components/MkCwButton.vue @@ -1,5 +1,5 @@