Merge pull request #22 from rucko24/feature/auto-refresh

Feature/auto-refresh
Enhancements
This commit is contained in:
JRGTH
2026-02-16 01:16:46 -04:00
committed by GitHub
4 changed files with 379 additions and 45 deletions

View File

@@ -306,6 +306,23 @@ $(document).ready(function(){
$('#getinfo_bastille').html(data.bastille);
$('#getinfo_ext').html(data.ext);
});
// --- LOGICA DEL CHECKBOX REFRESH (LocalStorage) ---
var $chk = $("#show_refresh_button");
// 1. Leer estado inicial desde LocalStorage
var savedState = localStorage.getItem('bastille_show_refresh_button');
if (savedState === 'true') {
$chk.prop('checked', true);
} else {
$chk.prop('checked', false); // Por defecto deshabilitado
}
// 2. Guardar cambios al hacer click
$chk.change(function() {
var isChecked = $(this).is(':checked');
localStorage.setItem('bastille_show_refresh_button', isChecked);
});
});
//]]>
</script>
@@ -373,6 +390,9 @@ $(document).ready(function(){
<?php html_titleline(gtext("Uninstall"));?>
<?php html_checkbox2('delete_confirm',gtext('Uninstall confirm'),'' ? true : false,gtext('Check to confirm extension uninstall. Note: Jail related content will be preserved by default.'),'',false);?>
<?php html_separator();?>
<?php html_titleline(gtext("Refresh"));?>
<?php html_checkbox2('show_refresh_button',gtext('Show refresh button'),'' ? true : false,gtext('This will display a refresh button in the containers tab.'),'',false);?>
<?php html_separator();?>
</table>
<div id="submit1">
<input name="uninstall" type="submit" class="formbtn" title="<?=gtext("Uninstall Extension");?>" value="<?=gtext("Uninstall");?>" onclick="return confirm('<?=gtext("Bastille Extension and packages will be completely removed, Bastille containers and child directories will not be touched, really to proceed?");?>')" />
@@ -384,4 +404,4 @@ $(document).ready(function(){
<script type="text/javascript">
<!--enable_change(false);-->
</script>
<?php include("fend.inc");?>
<?php include("fend.inc");?>