style: enhance plugin installation page and improve file selection handling

- Updated the plugin installation page to provide a console warning when no plugin file is selected, improving user feedback.
- Added a file tree for easier selection of plugin files, enhancing user experience during plugin installation.
- Adjusted the form layout for better alignment and consistency.
This commit is contained in:
Zack Spear
2025-05-29 14:13:01 -07:00
parent 75d9fe5f7e
commit d9963cb51e
2 changed files with 10 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ Tag="download"
return;
}
file = file.trim();
if (!file) return;
if (!file) return console.warn('No plugin file selected');
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php', {
cmd: 'alert'
}, function(data) {
@@ -47,11 +47,19 @@ Tag="download"
e.preventDefault();
installPlugin($('#plugin_file').val());
});
$('#plugin_tree').fileTree({
root: '/boot/',
top: '/boot/',
filter:'plg',
}, function(file) {
$('#plugin_file').val(file);
});
});
</script>
<form name="plugin_install" method="POST" target="progressFrame">
<form class="max-w-20 mx-auto" name="plugin_install" method="POST" target="progressFrame">
<p><strong>_(Enter URL of remote plugin file or local plugin file)_</strong></p>
<div>
<input type="text" name="file" id="plugin_file" maxlength="1024" value="">

View File

@@ -145,7 +145,6 @@ function loadlist(id,check) {
}
$(function() {
initlist();
$('#plugin_tree').fileTree({root:'/boot/',top:'/boot/',filter:'plg'}, function(file) {$('#plugin_file').val(file);});
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value=\"_(Check For Updates)_\" onclick='openPlugin(\"checkall\",\"_(Plugin Update Check)_\",\":return\")' disabled></span>");
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Update All Plugins)_\" onclick='updateList()'></span>");
$('.tabs').append("<span id='removeall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Remove Selected Plugins)_\" onclick='removeList()'></span>");