mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Added generateWgKey()
This commit is contained in:
		@@ -348,6 +348,19 @@ function updateBlocklist() {
 | 
			
		||||
function clearBlocklistStatus() {
 | 
			
		||||
    $('#cbxblocklist-status').removeClass('check-updated').addClass('check-hidden');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Handler for the wireguard generate key button
 | 
			
		||||
function generateWgKey() {
 | 
			
		||||
    var entity = $('#wg-srvpubkey').attr('name');
 | 
			
		||||
    console.log(entity);
 | 
			
		||||
    $.post('ajax/networking/get_wgkey.php',{'entity':entity },function(data){
 | 
			
		||||
        var jsonData = JSON.parse(data);
 | 
			
		||||
        console.log(jsonData);
 | 
			
		||||
        $('#wg-srvpubkey').val(jsonData);
 | 
			
		||||
        $('#wg-srvpubkey-status').removeClass('check-hidden').addClass('check-updated').delay(500).animate({ opacity: 1 }, 700);
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Static Array method
 | 
			
		||||
Array.range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user