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