1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-11-28 23:08:17 +09:00

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

This commit is contained in:
syuilo 2022-01-21 18:27:37 +09:00
commit 43baafbebb
2 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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');