From: Valerie Pond Date: Sun, 25 Jun 2023 15:52:23 +0000 (+0100) Subject: Make shit better X-Git-Tag: 0.9~16 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/f2e770d4a1cd1ee639e70fe0a6f9752de16f21e9 Make shit better --- diff --git a/Classes/class-plugin-git.php b/Classes/class-plugin-git.php index f88c7ea..8d34c50 100644 --- a/Classes/class-plugin-git.php +++ b/Classes/class-plugin-git.php @@ -92,7 +92,7 @@
ifInstalledLabel($p->name); ?>

title ?>

- By email" ?>" target="_blank">author ?> + By contact" ?>" target="_blank">author ?>
@@ -100,7 +100,7 @@
title ?> vversion ?>
-

description ?>

+

description ?>

diff --git a/settings/add-plugin.php b/settings/add-plugin.php index adc0016..cf55227 100644 --- a/settings/add-plugin.php +++ b/settings/add-plugin.php @@ -87,11 +87,7 @@ $p = new PluginRepo(); { install_button.innerHTML = (inst == "uninstall") ? "Install" : "Uninstall"; install_button.classList.replace('btn-secondary', (inst == "uninstall") ? 'btn-primary' : 'btn-outline-danger'); - let icomplete = bsModal(((inst == "uninstall") ? "Uninstall" : "Install") + " Plugin", response.success,"
Close
", null, true, true, false); - let closebtn = document.getElementById(name+"closebtn"); - closebtn.addEventListener('click', e => { - location.reload(); - }); + setTimeout(() => { location.reload() }, 500); } } else @@ -100,11 +96,7 @@ $p = new PluginRepo(); { install_button.innerHTML = (inst == "uninstall") ? "Uninstall" : "Install"; install_button.classList.replace('btn-secondary', (inst == "uninstall") ? 'btn-outline-danger' : 'btn-primary'); - let icomplete = bsModal(((inst == "uninstall") ? "Uninstall" : "Install") + " Plugin", response.error,"", null, false, true); - let closebtn = document.getElementById(name+"closebtn"); - closebtn.addEventListener('click', e => { - location.reload(); - }); + setTimeout(() => { location.reload() }, 500); } } } @@ -127,15 +119,50 @@ $p = new PluginRepo(); const modal = bsModal( "Information about " + data.list[i].title + "", // title "
", - "
Close
", null, true, true, false + "
Close
", "lg", true, true, true ); let modalclose = document.getElementById(modal); modalclose.addEventListener('click', (e) => { $("#"+modal).modal('hide'); }); - console.log(modal + '-body'); boobs = document.getElementById(modal + '-body'); - boobs.innerHTML = data.list[i].description; + boobs.innerHTML = ""; + if (data.list[i].screenshot.length) + { + boobs.innerHTML += `
+ ` + data.list[i].screenshot[1] + ` style= +
`; + } + boobs.innerHTML += "

Description:
" + atob(data.list[i].readme.replace(["\n",""],["
","
"])) + "

"; + boobs.innerHTML += `
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Title`+data.list[i].title+`
Description`+data.list[i].description+`
Version`+data.list[i].version+`
Author`+data.list[i].author+`
Min Version Required`+data.list[i].minver+`
Max Version`+data.list[i].maxver+`
+
`; } } })