1
0
Fork 0
This commit is contained in:
ChaotiCryptidz 2022-01-21 22:38:19 +00:00
parent 59bd8286e6
commit 222512af05
3 changed files with 20 additions and 20 deletions

View file

@ -36,4 +36,4 @@ export async function pageChecks(url: string, api: API, settings: Settings): Pro
return true;
}
return false;
}
}

View file

@ -1,22 +1,22 @@
import i18next from "i18next";
import UIkit from "uikit";
import i18next from "i18next";
export function addClipboardNotifications(clipboard: ClipboardJS, timeout = 1000): void {
clipboard.on("success", () => {
UIkit.notification(i18next.t("notification_copy_success"), {
status: "success",
timeout: timeout,
});
});
clipboard.on("error", function (e: Error) {
UIkit.notification(
i18next.t("notification_copy_error", {
error: e.message,
}),
{
status: "danger",
timeout: timeout,
},
);
clipboard.on("success", () => {
UIkit.notification(i18next.t("notification_copy_success"), {
status: "success",
timeout: timeout,
});
});
clipboard.on("error", function (e: Error) {
UIkit.notification(
i18next.t("notification_copy_error", {
error: e.message,
}),
{
status: "danger",
timeout: timeout,
},
);
});
}

View file

@ -35,8 +35,8 @@ export function dumpData(data: Record<string, unknown>, space = 4, syntax = "jso
} else if (syntax == "yaml") {
return yaml.dump(data, {
indent: space,
quotingType: "\"",
forceQuotes: true
quotingType: '"',
forceQuotes: true,
});
}
}