Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lindongchen committed Jun 7, 2024
1 parent 7397df4 commit 742b5e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gui/src/layout/Apps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const pages = computed(()=>{
});
const appPageSize = 8;
const openWebview = (app)=>{
const proxy = "socks5://"+(app?.port?.listen?.ip||'127.0.0.1')+':'+app?.port?.listen?.port;
store.commit('webview/setTarget', {
icon: app.icon,
name: app.name,
Expand All @@ -34,12 +33,17 @@ const openWebview = (app)=>{
try{
// const appWindow = new Window(`${app.name}-window`);
const webview = new WebviewWindow(`${app.name}-webview`, {
const options = {
url: app.url,
proxyUrl: app.proxy,
title: app.name,
width:960
});
};
if(!app.url){
options.url = "http://"+(app?.port?.listen?.ip||'127.0.0.1')+':'+app?.port?.listen?.port;;
delete options.proxyUrl;
}
const webview = new WebviewWindow(`${app.name}-webview`, options);
webview.once('tauri://created', function (d) {
console.log('tauri://created')
console.log(d)
Expand Down

0 comments on commit 742b5e6

Please sign in to comment.