mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
notification mark read
This commit is contained in:
@@ -30,8 +30,7 @@ import createError from '../../../components/error';
|
||||
|
||||
import VIEWS from '../../../views/v1/routes';
|
||||
|
||||
const BTN = <HTMLElement>document.querySelector('.sitekey-form__submit');
|
||||
const key = BTN.dataset.sitekey;
|
||||
const BTN_CLASS = document.querySelector('sitekey-form__submit');
|
||||
|
||||
const submit = async (e: Event) => {
|
||||
e.preventDefault();
|
||||
@@ -44,6 +43,9 @@ const submit = async (e: Event) => {
|
||||
const levels = LEVELS.getLevels();
|
||||
console.debug(`[form submition]: levels: ${levels}`);
|
||||
|
||||
const btn = <HTMLElement>document.querySelector(`${BTN_CLASS}`);
|
||||
const key = btn.dataset.sitekey;
|
||||
|
||||
const payload = {
|
||||
levels,
|
||||
duration,
|
||||
|
||||
@@ -44,6 +44,7 @@ include!("../../navbar/index.html"); .>
|
||||
</td>
|
||||
<td class="sitekey-list__key">
|
||||
<div class="sitekey-list__edit">
|
||||
<. let key = format!("/sitekey/{}", &sitekey.key); .>
|
||||
<. include!("../view/__edit-sitekey-icon.html"); .>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<a href="./edit/">
|
||||
<a href="<.= key .>/edit/">
|
||||
<img class="sitekey-form__edit" src="<.=
|
||||
crate::FILES.get("./static/cache/img/svg/edit.svg").unwrap() .>" alt="Edit
|
||||
sitekey" />
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
/>
|
||||
</a>
|
||||
<. if READONLY { .>
|
||||
<. let key = "."; .>
|
||||
<. include!("./__edit-sitekey-icon.html"); .>
|
||||
<. } .>
|
||||
</h1>
|
||||
|
||||
Reference in New Issue
Block a user