(stat: TImportStat)
| 171 | const { t } = useTranslation(); |
| 172 | |
| 173 | const showImportResult = (stat: TImportStat) => { |
| 174 | if (!stat) return; |
| 175 | modal.info!({ |
| 176 | title: t("script_import_result"), |
| 177 | content: ( |
| 178 | <Space direction="vertical" style={{ width: "100%" }}> |
| 179 | <div style={{ textAlign: "center" }}> |
| 180 | <Space size="small" style={{ fontSize: 18 }}> |
| 181 | <IconCheckCircle style={{ color: "green" }} /> |
| 182 | {stat.success} |
| 183 | {""} |
| 184 | <IconCloseCircle style={{ color: "red" }} /> |
| 185 | {stat.fail} |
| 186 | </Space> |
| 187 | </div> |
| 188 | {stat.msg.length > 0 && ( |
| 189 | <> |
| 190 | <b>{t("failure_info") + ":"}</b> |
| 191 | {stat.msg} |
| 192 | </> |
| 193 | )} |
| 194 | </Space> |
| 195 | ), |
| 196 | }); |
| 197 | }; |
| 198 | |
| 199 | const importByUrlsLocal = async (urls: string[]): Promise<void> => { |
| 200 | const stat = await importByUrls(urls); |
no outgoing calls
no test coverage detected