You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
604 B
JavaScript
15 lines
604 B
JavaScript
import { AutoloadPage } from 'vj/misc/Page';
|
|
import Notification from 'vj/components/notification/index';
|
|
import i18n from 'vj/utils/i18n';
|
|
|
|
export default new AutoloadPage('notificationPage', (pagename) => {
|
|
const message = i18n(`Hint::Page::${pagename}`);
|
|
const item = localStorage.getItem(`hint.${message}`);
|
|
if (message !== `Hint::Page::${pagename}` && !item) {
|
|
Notification.info(message, message.length * 500);
|
|
localStorage.setItem(`hint.${message}`, true);
|
|
}
|
|
const text = new URL(window.location.href).searchParams.get('notification');
|
|
if (text) Notification.success(text);
|
|
});
|