Merge remote-tracking branch 'origin/dev'

This commit is contained in:
Flummi 2022-05-07 14:09:41 +02:00
commit f4815d95e5

View File

@ -287,6 +287,7 @@ const flash = ({ type, msg }) => {
textfield.addEventListener("keyup", async e => { textfield.addEventListener("keyup", async e => {
if(e.key === 'Enter') { if(e.key === 'Enter') {
parent.removeChild(textfield);
// send // send
let res = await fetch('/api/v2/admin/tags/' + encodeURIComponent(oldtag), { let res = await fetch('/api/v2/admin/tags/' + encodeURIComponent(oldtag), {
method: 'PUT', method: 'PUT',
@ -303,7 +304,7 @@ const flash = ({ type, msg }) => {
switch(status) { switch(status) {
case 200: // success, change case 200: // success, change
case 201: case 201:
parent.removeChild(textfield); //parent.removeChild(textfield);
parent.insertAdjacentElement('afterbegin', old); parent.insertAdjacentElement('afterbegin', old);
parent.querySelector('a:last-child').style.display = ''; parent.querySelector('a:last-child').style.display = '';
old.href = `/tag/${res.tag}`; old.href = `/tag/${res.tag}`;