File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,13 @@ const isMacOs = computed(() => {
7575})
7676
7777const openLink = async (url : string ) => {
78- try {
79- if ( appStore . settings . app . open_links_in_browser || isMacOs . value ) {
78+ if ( appStore . settings . app . open_links_in_browser || isMacOs ) {
79+ try {
8080 await TauriAPI .files .urlInBrowser (url )
81- return
81+ } catch (error ) {
82+ console .error (' Failed to open link:' , error )
8283 }
83- } catch (error ) {
84- console .error (' Failed to open link:' , error )
84+ return
8585 }
8686 createNewWindow (url , ` webview-${Date .now ()} ` , ' External Link' )
8787}
Original file line number Diff line number Diff line change @@ -129,12 +129,13 @@ const urlMap = {
129129}
130130
131131const openLink = async (url : string ) => {
132- try {
133- if ( appStore . settings . app . open_links_in_browser || isMacOs ) {
132+ if ( appStore . settings . app . open_links_in_browser || isMacOs ) {
133+ try {
134134 await TauriAPI .files .urlInBrowser (url )
135+ } catch (error ) {
136+ console .error (' Failed to open link:' , error )
135137 }
136- } catch (error ) {
137- console .error (' Failed to open link:' , error )
138+ return
138139 }
139140 createNewWindow (url , ` webview-${Date .now ()} ` , ' External Link' )
140141}
Original file line number Diff line number Diff line change @@ -200,12 +200,13 @@ const toggleFirewallRule = async () => {
200200}
201201
202202const openLink = async (url : string ) => {
203- try {
204- if ( appStore . settings . app . open_links_in_browser || isMacOs ) {
203+ if ( appStore . settings . app . open_links_in_browser || isMacOs ) {
204+ try {
205205 await TauriAPI .files .urlInBrowser (url )
206+ } catch (error ) {
207+ console .error (' Failed to open link:' , error )
206208 }
207- } catch (error ) {
208- console .error (' Failed to open link:' , error )
209+ return
209210 }
210211 createNewWindow (url , ` webview-${Date .now ()} ` , ' External Link' )
211212}
You can’t perform that action at this time.
0 commit comments