feat: change the success notice colour

This commit is contained in:
2024-07-15 14:15:10 +01:00
parent bb522db9a2
commit 3a814b8390

View File

@@ -18,13 +18,6 @@ export async function uploadCommandNext(
const { notionAPI, databaseID } = dbDetails; const { notionAPI, databaseID } = dbDetails;
// Check if NNon exists
// if (NNon === undefined) {
// const NNonmessage = i18nConfig.NNonMissing;
// new Notice(NNonmessage);
// return;
// }
// Check if the user has set up the Notion API and database ID // Check if the user has set up the Notion API and database ID
if (notionAPI === "" || databaseID === "") { if (notionAPI === "" || databaseID === "") {
const setAPIMessage = i18nConfig["set-api-id"]; const setAPIMessage = i18nConfig["set-api-id"];
@@ -56,7 +49,7 @@ export async function uploadCommandNext(
if (res.status === 200) { if (res.status === 200) {
new Notice(`${i18nConfig["sync-preffix"]} ${basename} ${i18nConfig["sync-success"]}`).noticeEl.style.color = "green"; new Notice(`${i18nConfig["sync-preffix"]} ${basename} ${i18nConfig["sync-success"]}`).noticeEl.style.color = "green";
} else { } else {
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000).noticeEl.style.color = "red"; new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
} }
} }
@@ -122,7 +115,7 @@ export async function uploadCommandCustom(
const res = await upload.syncMarkdownToNotionCustom(cover, customValues, markDownData, nowFile, this.app); const res = await upload.syncMarkdownToNotionCustom(cover, customValues, markDownData, nowFile, this.app);
if (res.status === 200) { if (res.status === 200) {
new Notice(`${i18nConfig["sync-success"]}${basename}`); new Notice(`${i18nConfig["sync-success"]}${basename}`).noticeEl.style.color = "green";
} else { } else {
new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000); new Notice(`${i18nConfig["sync-fail"]}${basename}`, 5000);
} }