mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Open external links in web browser
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
parent
d55803d0c7
commit
eebd5d9c61
@ -27,7 +27,7 @@
|
||||
|
||||
<script>
|
||||
import CubeSpinner from "@/components/CubeSpinner";
|
||||
import { webviewTag } from 'electron';
|
||||
import { webviewTag, shell } from 'electron';
|
||||
export default {
|
||||
name: "ClusterPage",
|
||||
components: {
|
||||
@ -92,6 +92,10 @@ export default {
|
||||
lensLoaded: function() {
|
||||
console.log("lens loaded")
|
||||
this.lens.loaded = true;
|
||||
this.lens.webview.getWebContents().on('new-window', (e, url) => {
|
||||
e.preventDefault()
|
||||
shell.openExternal(url)
|
||||
})
|
||||
this.$store.commit("updateLens", this.lens);
|
||||
},
|
||||
// Called only when online state changes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user