mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 00:48:36 +08:00
feat: change the success notice colour
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user