mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add confirm dialog (#226)
This commit is contained in:
1 parent
8b9a3c6410
commit
c696f51789
15 files changed
+46
-32
No files matched your search
@@ -18,10 +18,7 @@ const page = new NamedPage(['contest_edit', 'contest_create', 'homework_create',
|
||||
}
|
||||
const message = `Confirm deleting this ${pagename.split('_')[0]}? Its status will be deleted as well.`;
|
||||
return new ConfirmDialog({
|
||||
$body: tpl`
|
||||
<div class="typo">
|
||||
<p>${i18n(message)}</p>
|
||||
</div>`,
|
||||
$body: tpl.typoMsg(i18n(message)),
|
||||
}).open().then((action) => {
|
||||
if (action !== 'yes') return;
|
||||
confirmed = true;
|
||||
|
||||
Reference in new issue
Block a user