mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add browser warning for superadmin
This commit is contained in:
1 parent
05f47e5515
commit
6acd1fed9f
4 files changed
+37
-10
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user