mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: allow using html in markdown
This commit is contained in:
1 parent
9632b425d5
commit
5c745fff82
8 files changed
+151
-77
No files matched your search
@@ -1,7 +1,14 @@
|
||||
import { AutoloadPage } from 'vj/misc/Page';
|
||||
import Notification from 'vj/components/notification/index';
|
||||
import i18n from 'vj/utils/i18n';
|
||||
|
||||
export default new AutoloadPage('notificationPage', () => {
|
||||
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);
|
||||
});
|
||||
Reference in new issue
Block a user