limter
This commit is contained in:
parent
59bd8286e6
commit
222512af05
|
@ -36,4 +36,4 @@ export async function pageChecks(url: string, api: API, settings: Settings): Pro
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
import i18next from "i18next";
|
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export function addClipboardNotifications(clipboard: ClipboardJS, timeout = 1000): void {
|
export function addClipboardNotifications(clipboard: ClipboardJS, timeout = 1000): void {
|
||||||
clipboard.on("success", () => {
|
clipboard.on("success", () => {
|
||||||
UIkit.notification(i18next.t("notification_copy_success"), {
|
UIkit.notification(i18next.t("notification_copy_success"), {
|
||||||
status: "success",
|
status: "success",
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
});
|
|
||||||
});
|
|
||||||
clipboard.on("error", function (e: Error) {
|
|
||||||
UIkit.notification(
|
|
||||||
i18next.t("notification_copy_error", {
|
|
||||||
error: e.message,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
status: "danger",
|
|
||||||
timeout: timeout,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
clipboard.on("error", function (e: Error) {
|
||||||
|
UIkit.notification(
|
||||||
|
i18next.t("notification_copy_error", {
|
||||||
|
error: e.message,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
status: "danger",
|
||||||
|
timeout: timeout,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,8 @@ export function dumpData(data: Record<string, unknown>, space = 4, syntax = "jso
|
||||||
} else if (syntax == "yaml") {
|
} else if (syntax == "yaml") {
|
||||||
return yaml.dump(data, {
|
return yaml.dump(data, {
|
||||||
indent: space,
|
indent: space,
|
||||||
quotingType: "\"",
|
quotingType: '"',
|
||||||
forceQuotes: true
|
forceQuotes: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue