Add reload button
This commit is contained in:
parent
13173334bf
commit
3ee17f8dd4
@ -21,6 +21,7 @@
|
||||
<button id="home"><i class="fas fa-home"></i></button>
|
||||
<button id="back"><i class="fas fa-arrow-left"></i></button>
|
||||
<button id="forward" class="disabled"><i class="fas fa-arrow-right"></i></button>
|
||||
<button id="reload"><i class="fas fa-redo"></i></button>
|
||||
</div>
|
||||
|
||||
<div id="service-buttons">
|
||||
|
@ -16,9 +16,7 @@ const icons = [];
|
||||
|
||||
let services = [];
|
||||
let selectedService = null;
|
||||
let homeButton;
|
||||
let forwardButton;
|
||||
let backButton;
|
||||
let homeButton, forwardButton, backButton, reloadButton;
|
||||
let addButton;
|
||||
let emptyPage;
|
||||
let urlPreview;
|
||||
@ -375,6 +373,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
backButton = document.getElementById('back');
|
||||
backButton.addEventListener('click', () => goBack());
|
||||
|
||||
reloadButton = document.getElementById('reload');
|
||||
reloadButton.addEventListener('click', () => reload());
|
||||
|
||||
addButton = document.getElementById('add-button');
|
||||
addButton.addEventListener('click', () => ipcRenderer.send('openServiceSettings', null));
|
||||
});
|
||||
@ -627,6 +628,10 @@ function goBack() {
|
||||
if (view) remote.webContents.fromId(view.getWebContentsId()).goBack();
|
||||
}
|
||||
|
||||
function reload() {
|
||||
reloadService(selectedService);
|
||||
}
|
||||
|
||||
function setContextMenu(webContents) {
|
||||
webContents.on('context-menu', (event, props) => {
|
||||
const menu = new Menu();
|
||||
|
Loading…
Reference in New Issue
Block a user