aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/infrastructure/electron/impl
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-27 01:52:55 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-03-06 18:56:47 +0100
commit098d6f9bb1fd26f2d192db497992ab95b258ce55 (patch)
tree22905f87e6ad53032b6ff39bb3af274df2f6287c /packages/main/src/infrastructure/electron/impl
parentrefactor: Shared model type factories (diff)
downloadsophie-098d6f9bb1fd26f2d192db497992ab95b258ce55.tar.gz
sophie-098d6f9bb1fd26f2d192db497992ab95b258ce55.tar.zst
sophie-098d6f9bb1fd26f2d192db497992ab95b258ce55.zip
feat: Location bar actions
The buttons and the text field in the location bar shall now affect the BrowserView of the loaded service. Some error handling is still needed, e.g., when loading a web page fails due to a DNS error. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/infrastructure/electron/impl')
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
index 6ff8e21..e5fdf11 100644
--- a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
+++ b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts
@@ -105,6 +105,18 @@ export default class ElectronServiceView implements ServiceView {
105 this.browserView.webContents.goForward(); 105 this.browserView.webContents.goForward();
106 } 106 }
107 107
108 reload(ignoreCache: boolean): void {
109 if (ignoreCache) {
110 this.browserView.webContents.reloadIgnoringCache();
111 } else {
112 this.browserView.webContents.reload();
113 }
114 }
115
116 stop(): void {
117 this.browserView.webContents.stop();
118 }
119
108 setBounds(bounds: BrowserViewBounds): void { 120 setBounds(bounds: BrowserViewBounds): void {
109 this.browserView.setBounds(bounds); 121 this.browserView.setBounds(bounds);
110 } 122 }