From b7c50d0289b9801042e0310e53e0868bee2b56e2 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 19 May 2022 20:21:55 +0200 Subject: [PATCH 1/4] Enable URL tooltips for Element Desktop Closes: #6532 Signed-off-by: Johannes Marbach --- src/vector/platform/ElectronPlatform.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 92ef511eb2b..d3f05cf3e1e 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -360,6 +360,10 @@ export default class ElectronPlatform extends VectorBasePlatform { electron.send('loudNotification'); } + needsUrlTooltips(): boolean { + return true; + } + async getAppVersion(): Promise { return this.ipcCall('getAppVersion'); } From bd23b8466675c0102764eada5d3e629dac0cd329 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 19 May 2022 20:38:08 +0200 Subject: [PATCH 2/4] Fix access level Co-authored-by: Travis Ralston --- src/vector/platform/ElectronPlatform.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index d3f05cf3e1e..303aaa2ad9f 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -360,7 +360,7 @@ export default class ElectronPlatform extends VectorBasePlatform { electron.send('loudNotification'); } - needsUrlTooltips(): boolean { + public needsUrlTooltips(): boolean { return true; } From ef639e3b14138ef75c84ee6383d5545d37f882c2 Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 19 May 2022 20:42:18 +0200 Subject: [PATCH 3/4] Add explicit access level where it exists in base class --- src/vector/platform/ElectronPlatform.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 303aaa2ad9f..4be5edb31cb 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -328,7 +328,7 @@ export default class ElectronPlatform extends VectorBasePlatform { return true; } - displayNotification(title: string, msg: string, avatarUrl: string, room: Room, ev?: MatrixEvent): Notification { + public displayNotification(title: string, msg: string, avatarUrl: string, room: Room, ev?: MatrixEvent): Notification { // GNOME notification spec parses HTML tags for styling... // Electron Docs state all supported linux notification systems follow this markup spec // https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#linux @@ -515,7 +515,7 @@ export default class ElectronPlatform extends VectorBasePlatform { return this.ipcCall('getAvailableSpellCheckLanguages'); } - getSSOCallbackUrl(fragmentAfterLogin: string): URL { + protected getSSOCallbackUrl(fragmentAfterLogin: string): URL { const url = super.getSSOCallbackUrl(fragmentAfterLogin); url.protocol = "element"; url.searchParams.set("element-desktop-ssoid", this.ssoID); From b29e987d63ea4caeaeecf48426745c927ee2b2bc Mon Sep 17 00:00:00 2001 From: Johannes Marbach Date: Thu, 19 May 2022 20:45:47 +0200 Subject: [PATCH 4/4] Appease the linker --- src/vector/platform/ElectronPlatform.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 4be5edb31cb..9a202e7da60 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -328,7 +328,13 @@ export default class ElectronPlatform extends VectorBasePlatform { return true; } - public displayNotification(title: string, msg: string, avatarUrl: string, room: Room, ev?: MatrixEvent): Notification { + public displayNotification( + title: string, + msg: string, + avatarUrl: string, + room: Room, + ev?: MatrixEvent, + ): Notification { // GNOME notification spec parses HTML tags for styling... // Electron Docs state all supported linux notification systems follow this markup spec // https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#linux