From 2718d86171f7f8407cc62aaaa58ea6981de73e1e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 22 Apr 2023 16:04:03 +0900 Subject: [PATCH 1/3] :art: --- packages/frontend/src/components/MkSignupDialog.rules.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index 5bdc530195..6da81c3bcb 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -5,6 +5,10 @@
+
+ {{ i18n.ts.invitationRequiredToRegister }} +
+
{{ i18n.ts.pleaseConfirmBelowBeforeSignup }}
@@ -54,6 +58,7 @@ import { i18n } from '@/i18n'; import MkButton from '@/components/MkButton.vue'; import MkFolder from '@/components/MkFolder.vue'; import MkSwitch from '@/components/MkSwitch.vue'; +import MkInfo from '@/components/MkInfo.vue'; const availableServerRules = instance.serverRules.length > 0; const availableTos = instance.tosUrl != null; From eb0e2ceef79c66a03b98842c783134716e4a6440 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 22 Apr 2023 17:11:13 +0900 Subject: [PATCH 2/3] :art: --- packages/frontend/src/components/MkVisitorDashboard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index 9de5200ef0..6226768127 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -137,8 +137,8 @@ function exploreOtherServers() { .mainIcon { width: 85px; margin-top: -47px; - border-radius: 100%; vertical-align: bottom; + filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); } .mainMenu { From 5ddffa728af444fc59322f5226da326e3872952f Mon Sep 17 00:00:00 2001 From: tinaxd <31384595+tinaxd@users.noreply.github.com> Date: Sat, 22 Apr 2023 17:18:57 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E3=83=89=E3=83=A9=E3=82=A4=E3=83=96?= =?UTF-8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC=E3=83=89=E3=81=A7?= =?UTF-8?q?413=E3=81=8C=E8=BF=94=E3=81=A3=E3=81=A6=E3=81=8D=E3=81=9F?= =?UTF-8?q?=E3=81=A8=E3=81=8D=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=83=A1?= =?UTF-8?q?=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=20(#10680)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/en-US.yml | 1 + locales/ja-JP.yml | 1 + packages/frontend/src/scripts/upload.ts | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index e2407bd3e7..f1b97200d4 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -905,6 +905,7 @@ remoteOnly: "Remote only" failedToUpload: "Upload failed" cannotUploadBecauseInappropriate: "This file could not be uploaded because parts of it have been detected as potentially NSFW." cannotUploadBecauseNoFreeSpace: "Upload failed due to lack of Drive capacity." +cannotUploadBecauseExceedsFileSizeLimit: "This file could not be uploaded because it exceeds the maximum allowed size." beta: "Beta" enableAutoSensitive: "Automatic NSFW-Marking" enableAutoSensitiveDescription: "Allows automatic detection and marking of NSFW media through Machine Learning where possible. Even if this option is disabled, it may be enabled instance-wide." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 2ff2700c28..24a4b9fbb2 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -909,6 +909,7 @@ remoteOnly: "リモートのみ" failedToUpload: "アップロード失敗" cannotUploadBecauseInappropriate: "不適切な内容を含む可能性があると判定されたためアップロードできません。" cannotUploadBecauseNoFreeSpace: "ドライブの空き容量が無いためアップロードできません。" +cannotUploadBecauseExceedsFileSizeLimit: "ファイルサイズの制限を超えているためアップロードできません。" beta: "ベータ" enableAutoSensitive: "自動NSFW判定" enableAutoSensitiveDescription: "利用可能な場合は、機械学習を利用して自動でメディアにNSFWフラグを設定します。この機能をオフにしても、サーバーによっては自動で設定されることがあります。" diff --git a/packages/frontend/src/scripts/upload.ts b/packages/frontend/src/scripts/upload.ts index 9a39652ef5..2dd11c9fa2 100644 --- a/packages/frontend/src/scripts/upload.ts +++ b/packages/frontend/src/scripts/upload.ts @@ -83,7 +83,13 @@ export function uploadFile( // TODO: 消すのではなくて(ネットワーク的なエラーなら)再送できるようにしたい uploads.value = uploads.value.filter(x => x.id !== id); - if (ev.target?.response) { + if (xhr.status === 413) { + alert({ + type: 'error', + title: i18n.ts.failedToUpload, + text: i18n.ts.cannotUploadBecauseExceedsFileSizeLimit, + }); + } else if (ev.target?.response) { const res = JSON.parse(ev.target.response); if (res.error?.id === 'bec5bd69-fba3-43c9-b4fb-2894b66ad5d2') { alert({