修复粘贴订阅私有仓库字段

This commit is contained in:
whyour 2022-06-05 11:56:48 +08:00
parent 7f2d6d159c
commit cb004cfbf5

View File

@ -204,13 +204,15 @@ const SubscriptionModal = ({
] = text ] = text
.split(' ') .split(' ')
.map((x) => x.trim().replace(/\"/g, '').replace(/\'/, '')); .map((x) => x.trim().replace(/\"/g, '').replace(/\'/, ''));
const _type =
type === 'raw'
? 'file'
: url.startsWith('http')
? 'public-repo'
: 'private-repo';
form.setFieldsValue({ form.setFieldsValue({
type: type: _type,
type === 'raw'
? 'file'
: url.startsWith('http')
? 'public-repo'
: 'private-repo',
url, url,
whitelist, whitelist,
blacklist, blacklist,
@ -219,6 +221,7 @@ const SubscriptionModal = ({
extensions, extensions,
alias: formatAlias(url, branch), alias: formatAlias(url, branch),
}); });
setType(_type);
} }
}, []); }, []);