|
@ -1,10 +1,27 @@ |
|
|
<h2>NOTIFICATION BAR</h2> |
|
|
<h2>NOTIFICATION BAR</h2> |
|
|
|
|
|
|
|
|
<% if flash %> |
|
|
|
|
|
|
|
|
<% if flash.count.positive? %> |
|
|
<script type="module"> |
|
|
<script type="module"> |
|
|
import { Notyf } from 'notyf'; |
|
|
import { Notyf } from 'notyf'; |
|
|
const notyf=new Notyf |
|
|
|
|
|
notyf.success('<%=notice%>') |
|
|
|
|
|
|
|
|
import Toastify from 'toastify-js' |
|
|
|
|
|
|
|
|
|
|
|
const notyf=new Notyf({ |
|
|
|
|
|
duration: 3000, |
|
|
|
|
|
position: { |
|
|
|
|
|
x: 'center', |
|
|
|
|
|
y: 'top', |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
<% if flash.alert %> |
|
|
notyf.error('<%=alert%>') |
|
|
notyf.error('<%=alert%>') |
|
|
|
|
|
Toastify({ text: "<%=alert%>", gravity: "top", oldestFirst: false, close: true, position: "center", style: { background: "red" }}).showToast(); |
|
|
|
|
|
<%end%> |
|
|
|
|
|
|
|
|
|
|
|
<% if flash.notice %> |
|
|
|
|
|
notyf.success('<%=notice%>') |
|
|
|
|
|
Toastify({ text: "<%=notice%>", gravity: "top", oldestFirst: false, close: true, position: "center", style: { background: "green" }}).showToast(); |
|
|
|
|
|
<%end%> |
|
|
|
|
|
|
|
|
|
|
|
console.log('notification loaded') |
|
|
</script> |
|
|
</script> |
|
|
<%end%> |
|
|
<%end%> |