diff --git a/client/src/services/environment.ts b/client/src/services/environment.ts index 783d0389887..2d81e120dee 100644 --- a/client/src/services/environment.ts +++ b/client/src/services/environment.ts @@ -63,32 +63,37 @@ function getTrialServers(): Array { const CLEAN_APP_VERSION = `${APP_VERSION.slice(0, APP_VERSION.indexOf('+') === -1 ? undefined : APP_VERSION.indexOf('+'))}`; const APP_VERSION_PREFIX = `v${CLEAN_APP_VERSION}`; +async function openUrl(url: string): Promise { + window.electronAPI.log('debug', `Opening ${url}`); + window.open(url, '_blank'); +} + async function openDocumentationLink(): Promise { - window.open(I18n.translate({ key: 'MenuPage.documentationLink', data: { version: APP_VERSION_PREFIX } }), '_blank'); + await openUrl(I18n.translate({ key: 'MenuPage.documentationLink', data: { version: APP_VERSION_PREFIX } })); } async function openContactLink(): Promise { - window.open(I18n.translate({ key: 'MenuPage.contactLink', data: { signUrl: getSignUrl() } }), '_blank'); + await openUrl(I18n.translate({ key: 'MenuPage.contactLink', data: { signUrl: getSignUrl() } })); } async function openLicenseLink(): Promise { - window.open(I18n.translate({ key: 'app.licenseLink', data: { version: APP_VERSION_PREFIX } }), '_blank'); + await openUrl(I18n.translate({ key: 'app.licenseLink', data: { version: APP_VERSION_PREFIX } })); } async function openChangelogLink(version?: string): Promise { - window.open(I18n.translate({ key: 'app.history', data: { version: version ?? APP_VERSION_PREFIX } }), '_blank'); + await openUrl(I18n.translate({ key: 'app.history', data: { version: version ?? APP_VERSION_PREFIX } })); } async function openSourcesLink(): Promise { - window.open(I18n.translate('app.projectSources'), '_blank'); + await openUrl(I18n.translate('app.projectSources')); } async function openDeveloperLink(): Promise { - window.open(I18n.translate('app.developerLink'), '_blank'); + await openUrl(I18n.translate('app.developerLink')); } async function openTOS(tosLink: string): Promise { - window.open(tosLink, '_blank'); + await openUrl(tosLink); } export const Env = { diff --git a/client/src/views/about/AboutView.vue b/client/src/views/about/AboutView.vue index ca906d6b910..7351ce338c1 100644 --- a/client/src/views/about/AboutView.vue +++ b/client/src/views/about/AboutView.vue @@ -33,7 +33,7 @@ v{{ APP_VERSION }} {{ $msTranslate('AboutPage.update.showChangelog') }} @@ -47,7 +47,7 @@ {{ $msTranslate('app.developer') }} @@ -62,7 +62,7 @@ {{ $msTranslate('app.license') }} @@ -77,7 +77,7 @@