From 9a4267f01fb0a8b56a3176778e28115f9d8765cb 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, 21 Jan 2022 17:43:14 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(#8133):=20hCaptcha=20=E3=81=AE=20reCAPT?= =?UTF-8?q?CHA=20=E4=BA=92=E6=8F=9B=E6=8C=99=E5=8B=95=E3=82=92=E7=84=A1?= =?UTF-8?q?=E5=8A=B9=E5=8C=96=E3=81=99=E3=82=8B=20(#8135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(#8133): hCaptcha の reCAPTCHA 互換挙動を無効化する * Update packages/client/src/components/captcha.vue * fix: hCaptcha host Co-authored-by: tamaina --- packages/client/src/components/captcha.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/captcha.vue b/packages/client/src/components/captcha.vue index 7fe499dc8..770804cf4 100644 --- a/packages/client/src/components/captcha.vue +++ b/packages/client/src/components/captcha.vue @@ -55,12 +55,10 @@ const variable = computed(() => { const loaded = computed(() => !!window[variable.value]); const src = computed(() => { - const endpoint = ({ - hcaptcha: 'https://hcaptcha.com/1', - recaptcha: 'https://www.recaptcha.net/recaptcha', - } as Record)[props.provider]; - - return `${typeof endpoint === 'string' ? endpoint : 'about:invalid'}/api.js?render=explicit`; + switch (props.provider) { + case 'hcaptcha': return 'https://js.hcaptcha.com/1/api.js?render=explicit&recaptchacompat=off'; + case 'recaptcha': return 'https://www.recaptcha.net/recaptcha/api.js?render=explicit'; + } }); const captcha = computed(() => window[variable.value] || {} as unknown as Captcha); From 76db7ba7816fdcdba03314c062c9319f02118784 Mon Sep 17 00:00:00 2001 From: nullobsi Date: Fri, 21 Jan 2022 00:43:51 -0800 Subject: [PATCH 2/2] update local copy of file when describing (#8131) --- packages/client/src/components/post-form-attaches.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/post-form-attaches.vue b/packages/client/src/components/post-form-attaches.vue index 0782ce22e..4555fc1a2 100644 --- a/packages/client/src/components/post-form-attaches.vue +++ b/packages/client/src/components/post-form-attaches.vue @@ -99,10 +99,12 @@ export default defineComponent({ }, { done: result => { if (!result || result.canceled) return; - let comment = result.result; + let comment = result.result.length == 0 ? null : result.result; os.api('drive/files/update', { fileId: file.id, - comment: comment.length == 0 ? null : comment + comment: comment, + }).then(() => { + file.comment = comment; }); } }, 'closed');