ui: add browser warning for superadmin

This commit is contained in:
undefined committed 2022-10-21 13:55:11 +08:00
1 parent 05f47e5515
commit 6acd1fed9f
4 files changed
+37 -10

No files matched your search

+3 -5
View File
@@ -16,11 +16,9 @@ export default function tpl(pieces: TemplateStringsArray, ...substitutions: Subs
}
tpl.typoMsg = function (msg: string, raw = false) {
return tpl`
<div class="typo">
<p>${raw ? { html: msg, templateRaw: true } : msg}</p>
</div>
`;
if (raw) return `<div class="typo"><p>${msg}</p></div>`;
const lines = msg.trim().split('\n');
return `<div class="typo">${lines.map((i) => `<p>${_.escape(i)}</p>`).join('\n')}</div>`;
};
export function rawHtml(html: string) {