Skip to content
Snippets Groups Projects
Commit 43baafbe authored by syuilo's avatar syuilo
Browse files

Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop

parents e3a5584d 76db7ba7
No related branches found
No related tags found
No related merge requests found
......@@ -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<CaptchaProvider, string>)[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<Captcha>(() => window[variable.value] || {} as unknown as Captcha);
......
......@@ -98,10 +98,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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment