mirror of
https://github.com/markbeep/AudioBookRequest.git
synced 2026-01-25 07:29:50 -06:00
27 lines
692 B
HTML
27 lines
692 B
HTML
<link rel="stylesheet"
|
|
type="text/css"
|
|
href="{{ base_url }}/static/toastify.css?v={{ version }}" />
|
|
<script type="text/javascript"
|
|
src="{{ base_url }}/static/toastify.js?v={{ version }}"></script>
|
|
<script>
|
|
const toast = (message, type = "success") => {
|
|
const classNames = {
|
|
success: "success-alert",
|
|
error: "error-alert",
|
|
info: "info-alert",
|
|
};
|
|
Toastify({
|
|
text: message,
|
|
duration: type === "error" ? 10000 : 3000,
|
|
close: true,
|
|
gravity: "top",
|
|
position: "right",
|
|
stopOnFocus: true,
|
|
className: classNames[type],
|
|
style: {
|
|
background: "unset",
|
|
},
|
|
}).showToast();
|
|
};
|
|
</script>
|