MCPcopy Create free account
hub / github.com/scriptscat/scriptcat / showImportResult

Function showImportResult

src/pages/components/layout/MainLayout.tsx:173–197  ·  view source on GitHub ↗
(stat: TImportStat)

Source from the content-addressed store, hash-verified

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

Callers 2

importByUrlsLocalFunction · 0.85
onDropFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected