From 95e658e0b923d0cb8ecd312b1d9e4a014280d2d3 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sat, 18 Nov 2017 21:33:47 +0000 Subject: [PATCH 1/6] add initial etherpad Widget logic --- config/integrations/etherpad_widget.yaml | 7 ++ web/app/app.module.ts | 5 +- .../etherpad/etherpad-config.component.html | 118 ++++++++++++++++++ .../etherpad/etherpad-config.component.scss | 4 + .../etherpad/etherpad-config.component.ts | 116 +++++++++++++++++ web/app/configs/widget/widget.component.ts | 4 +- web/app/riot/riot.component.ts | 5 +- web/app/shared/integration.service.ts | 3 + web/app/shared/models/widget.ts | 1 + 9 files changed, 259 insertions(+), 4 deletions(-) create mode 100644 config/integrations/etherpad_widget.yaml create mode 100644 web/app/configs/widget/etherpad/etherpad-config.component.html create mode 100644 web/app/configs/widget/etherpad/etherpad-config.component.scss create mode 100644 web/app/configs/widget/etherpad/etherpad-config.component.ts diff --git a/config/integrations/etherpad_widget.yaml b/config/integrations/etherpad_widget.yaml new file mode 100644 index 0000000..53aeb5a --- /dev/null +++ b/config/integrations/etherpad_widget.yaml @@ -0,0 +1,7 @@ +# All this configuration does is make "Etherpad Widget" available in the UI +type: "widget" +integrationType: "etherpad" +enabled: true +name: "Etherpad" +about: "Etherpad is a collaborative text editor. With this widget you can embed Etherpad directly in to your Matrix chat rooms so that you can securely collaborate on documents." +avatar: "img/avatars/etherpad.png" diff --git a/web/app/app.module.ts b/web/app/app.module.ts index b62fe1e..04eeb30 100644 --- a/web/app/app.module.ts +++ b/web/app/app.module.ts @@ -29,6 +29,7 @@ import { ToggleFullscreenDirective } from "./shared/toggle-fullscreen.directive" import { FullscreenButtonComponent } from "./fullscreen-button/fullscreen-button.component"; import { YoutubeWidgetConfigComponent } from "./configs/widget/youtube/youtube-config.component"; import { TwitchWidgetConfigComponent } from "./configs/widget/twitch/twitch-config.component"; +import { EtherpadWidgetConfigComponent } from "./configs/widget/etherpad/etherpad-config.component"; import { VideoWidgetWrapperComponent } from "./widget_wrappers/video/video.component"; @NgModule({ @@ -60,6 +61,7 @@ import { VideoWidgetWrapperComponent } from "./widget_wrappers/video/video.compo FullscreenButtonComponent, YoutubeWidgetConfigComponent, TwitchWidgetConfigComponent, + EtherpadWidgetConfigComponent, VideoWidgetWrapperComponent, // Vendor @@ -80,7 +82,8 @@ import { VideoWidgetWrapperComponent } from "./widget_wrappers/video/video.compo IrcConfigComponent, CustomWidgetConfigComponent, YoutubeWidgetConfigComponent, - TwitchWidgetConfigComponent + TwitchWidgetConfigComponent, + EtherpadWidgetConfigComponent, ] }) export class AppModule { diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.html b/web/app/configs/widget/etherpad/etherpad-config.component.html new file mode 100644 index 0000000..09d4f19 --- /dev/null +++ b/web/app/configs/widget/etherpad/etherpad-config.component.html @@ -0,0 +1,118 @@ +
+ +
+ +

Configure Etherpad widgets

+
+
+
+
+

Loading widgets...

+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+ {{ widget.name || widget.url }} (added by {{ widget.ownerId }}) + + +
+
+
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+
+
+ + +
+
+
+
+
+
+
+
diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.scss b/web/app/configs/widget/etherpad/etherpad-config.component.scss new file mode 100644 index 0000000..92dce18 --- /dev/null +++ b/web/app/configs/widget/etherpad/etherpad-config.component.scss @@ -0,0 +1,4 @@ +// component styles are encapsulated and only applied to their components +.widget-item { + margin-top: 3px; +} diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.ts b/web/app/configs/widget/etherpad/etherpad-config.component.ts new file mode 100644 index 0000000..6183f89 --- /dev/null +++ b/web/app/configs/widget/etherpad/etherpad-config.component.ts @@ -0,0 +1,116 @@ +import { Component } from "@angular/core"; +import { ModalComponent, DialogRef } from "ngx-modialog"; +import { WidgetComponent } from "../widget.component"; +import { ScalarService } from "../../../shared/scalar.service"; +import { ConfigModalContext } from "../../../integration/integration.component"; +import { ToasterService } from "angular2-toaster"; +import { Widget, WIDGET_DIM_ETHERPAD, WIDGET_SCALAR_ETHERPAD } from "../../../shared/models/widget"; + +@Component({ + selector: "my-etherpadwidget-config", + templateUrl: "etherpad-config.component.html", + styleUrls: ["etherpad-config.component.scss", "./../../config.component.scss"], +}) +export class EtherpadWidgetConfigComponent extends WidgetComponent implements ModalComponent { + + public newEtherpadServerUrl: string = ""; + public useCustomServer = false; + public editUseCustomServer = false; + + constructor(public dialog: DialogRef, + toaster: ToasterService, + scalarService: ScalarService, + window: Window) { + super( + toaster, + scalarService, + dialog.context.roomId, + window, + WIDGET_DIM_ETHERPAD, + WIDGET_SCALAR_ETHERPAD, + dialog.context.integrationId, + "Etherpad Widget", + "generic", // wrapper + "etherpad" // scalar wrapper + ); + } + + getPadURL(widget?: Widget): string { + if (widget) { + if (this.editUseCustomServer) { + const url = widget.data.newPadServer + widget.data.newPadName; + return url; + } else { + const url = "https://demo.riot.im/etherpad/p/" + widget.data.newPadName; + return url; + } + } else { + if (this.useCustomServer) { + const url = this.newEtherpadServerUrl + this.newWidgetUrl; + return url; + } else { + const url = "https://demo.riot.im/etherpad/p/" + this.newWidgetUrl; + return url; + } + } + } + + private checkPadURL(url: string, widget?: Widget): boolean { + if (widget) { + if (this.editUseCustomServer) { + return url === widget.data.newPadServer; + } else { + return url === "https://demo.riot.im/etherpad/p/"; + } + } else { + if (this.useCustomServer) { + return url === this.newEtherpadServerUrl; + } else { + return url === "https://demo.riot.im/etherpad/p/"; + } + } + } + + public wrapUrl(url: string): string { + return this.wrapperUrl + encodeURIComponent(url + "?userName=") + "$matrix_user_id"; + } + + public validateAndAddWidget() { + const url = this.getPadURL(); + + if (this.checkPadURL(url)) { + this.toaster.pop("warning", "Please enter a Pad Name"); + return; + } + + const originalUrl = this.newWidgetUrl; + this.newWidgetUrl = url; + this.addWidget({padName: originalUrl, padSuffix: originalUrl, padServer: this.newEtherpadServerUrl}); + } + + public validateAndSaveWidget(widget: Widget) { + const url = this.getPadURL(); + + if (this.checkPadURL(url, widget)) { + this.toaster.pop("warning", "Please enter a Pad Name"); + return; + } + + if (!widget.data) widget.data = {}; + + widget.newUrl = url; + widget.data.padName = widget.data.newPadName; + widget.data.padServer = widget.data.newPadServer; + this.saveWidget(widget); + } + + editWidget(widget: Widget) { + widget.data.newPadName = widget.data.padName; + widget.data.newPadServer = widget.data.padServer; + if (widget.data.newPadServer !== "https://demo.riot.im/etherpad/p/") { + this.editUseCustomServer = true + } + super.editWidget(widget); + } + +} diff --git a/web/app/configs/widget/widget.component.ts b/web/app/configs/widget/widget.component.ts index 4692e45..ca82087 100644 --- a/web/app/configs/widget/widget.component.ts +++ b/web/app/configs/widget/widget.component.ts @@ -18,7 +18,7 @@ export class WidgetComponent { public newWidgetName: string = ""; private toggledWidgetIds: string[] = []; - private wrapperUrl = ""; + public wrapperUrl = ""; private scalarWrapperUrls: string[] = []; constructor(protected toaster: ToasterService, @@ -87,7 +87,7 @@ export class WidgetComponent { return url; } - private wrapUrl(url: string): string { + public wrapUrl(url: string): string { return this.wrapperUrl + encodeURIComponent(url); } diff --git a/web/app/riot/riot.component.ts b/web/app/riot/riot.component.ts index 83fd31f..2094a7c 100644 --- a/web/app/riot/riot.component.ts +++ b/web/app/riot/riot.component.ts @@ -6,7 +6,7 @@ import { ToasterService } from "angular2-toaster"; import { Integration } from "../shared/models/integration"; import { IntegrationService } from "../shared/integration.service"; import * as _ from "lodash"; -import { WIDGET_DIM_CUSTOM, WIDGET_DIM_YOUTUBE, WIDGET_DIM_TWITCH } from "../shared/models/widget"; +import { WIDGET_DIM_CUSTOM, WIDGET_DIM_YOUTUBE, WIDGET_DIM_TWITCH, WIDGET_DIM_ETHERPAD } from "../shared/models/widget"; import { IntegrationComponent } from "../integration/integration.component"; @Component({ @@ -79,6 +79,9 @@ export class RiotComponent { } else if (this.requestedScreen === "type_" + WIDGET_DIM_TWITCH) { type = "widget"; integrationType = "twitch"; + } else if (this.requestedScreen === "type_" + WIDGET_DIM_ETHERPAD) { + type = "widget"; + integrationType = "etherpad"; } else { console.log("Unknown screen requested: " + this.requestedScreen); } diff --git a/web/app/shared/integration.service.ts b/web/app/shared/integration.service.ts index 46f2229..2a429e0 100644 --- a/web/app/shared/integration.service.ts +++ b/web/app/shared/integration.service.ts @@ -7,6 +7,7 @@ import { TravisCiConfigComponent } from "../configs/travisci/travisci-config.com import { CustomWidgetConfigComponent } from "../configs/widget/custom_widget/custom_widget-config.component"; import { YoutubeWidgetConfigComponent } from "../configs/widget/youtube/youtube-config.component"; import { TwitchWidgetConfigComponent } from "../configs/widget/twitch/twitch-config.component"; +import { EtherpadWidgetConfigComponent } from "../configs/widget/etherpad/etherpad-config.component"; @Injectable() export class IntegrationService { @@ -24,6 +25,7 @@ export class IntegrationService { "customwidget": true, "youtube": true, "twitch": true, + "etherpad": true, }, }; @@ -39,6 +41,7 @@ export class IntegrationService { "customwidget": CustomWidgetConfigComponent, "youtube": YoutubeWidgetConfigComponent, "twitch": TwitchWidgetConfigComponent, + "etherpad": EtherpadWidgetConfigComponent, }, }; diff --git a/web/app/shared/models/widget.ts b/web/app/shared/models/widget.ts index 2186add..e921e0e 100644 --- a/web/app/shared/models/widget.ts +++ b/web/app/shared/models/widget.ts @@ -14,6 +14,7 @@ export const WIDGET_SCALAR_TWITCH = ""; export const WIDGET_DIM_CUSTOM = "dimension-customwidget"; export const WIDGET_DIM_YOUTUBE = "dimension-youtube"; export const WIDGET_DIM_TWITCH = "dimension-twitch"; +export const WIDGET_DIM_ETHERPAD = "dimension-etherpad"; export interface Widget { id: string; From 43e16f047b1dbdfdfb88e74c61f81c0953a20703 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sat, 18 Nov 2017 22:05:15 +0000 Subject: [PATCH 2/6] fix etherpad widget editing --- .../etherpad/etherpad-config.component.ts | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.ts b/web/app/configs/widget/etherpad/etherpad-config.component.ts index 6183f89..8ecfd6b 100644 --- a/web/app/configs/widget/etherpad/etherpad-config.component.ts +++ b/web/app/configs/widget/etherpad/etherpad-config.component.ts @@ -58,15 +58,15 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo private checkPadURL(url: string, widget?: Widget): boolean { if (widget) { if (this.editUseCustomServer) { - return url === widget.data.newPadServer; + return Boolean(url === widget.data.newPadServer); } else { - return url === "https://demo.riot.im/etherpad/p/"; + return Boolean(url === "https://demo.riot.im/etherpad/p/"); } } else { if (this.useCustomServer) { - return url === this.newEtherpadServerUrl; + return Boolean(url === this.newEtherpadServerUrl); } else { - return url === "https://demo.riot.im/etherpad/p/"; + return Boolean(url === "https://demo.riot.im/etherpad/p/"); } } } @@ -85,11 +85,16 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo const originalUrl = this.newWidgetUrl; this.newWidgetUrl = url; - this.addWidget({padName: originalUrl, padSuffix: originalUrl, padServer: this.newEtherpadServerUrl}); + + if (this.useCustomServer) { + this.addWidget({padName: originalUrl, padSuffix: originalUrl, padServer: this.newEtherpadServerUrl}); + } else { + this.addWidget({padName: originalUrl, padSuffix: originalUrl, padServer: "https://demo.riot.im/etherpad/p/"}); + } } public validateAndSaveWidget(widget: Widget) { - const url = this.getPadURL(); + const url = this.getPadURL(widget); if (this.checkPadURL(url, widget)) { this.toaster.pop("warning", "Please enter a Pad Name"); @@ -100,7 +105,15 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo widget.newUrl = url; widget.data.padName = widget.data.newPadName; - widget.data.padServer = widget.data.newPadServer; + if (this.editUseCustomServer) { + widget.data.padServer = widget.data.newPadServer; + } else { + widget.data.padServer = "https://demo.riot.im/etherpad/p/" + } + + delete widget.data.newPadServer; + delete widget.data.newPadName; + this.saveWidget(widget); } From e9f6543d2ee07b23931835098e42130a4a2331d6 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sat, 18 Nov 2017 22:23:43 +0000 Subject: [PATCH 3/6] prefix etherpad name with roomID --- .../widget/etherpad/etherpad-config.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.ts b/web/app/configs/widget/etherpad/etherpad-config.component.ts index 8ecfd6b..6b46bff 100644 --- a/web/app/configs/widget/etherpad/etherpad-config.component.ts +++ b/web/app/configs/widget/etherpad/etherpad-config.component.ts @@ -38,18 +38,18 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo getPadURL(widget?: Widget): string { if (widget) { if (this.editUseCustomServer) { - const url = widget.data.newPadServer + widget.data.newPadName; + const url = widget.data.newPadServer + this.roomId + "_" + widget.data.newPadName; return url; } else { - const url = "https://demo.riot.im/etherpad/p/" + widget.data.newPadName; + const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + widget.data.newPadName; return url; } } else { if (this.useCustomServer) { - const url = this.newEtherpadServerUrl + this.newWidgetUrl; + const url = this.newEtherpadServerUrl + this.roomId + "_" + this.newWidgetUrl; return url; } else { - const url = "https://demo.riot.im/etherpad/p/" + this.newWidgetUrl; + const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + this.newWidgetUrl; return url; } } @@ -83,7 +83,7 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo return; } - const originalUrl = this.newWidgetUrl; + const originalUrl = this.roomId + "_" + this.newWidgetUrl; this.newWidgetUrl = url; if (this.useCustomServer) { @@ -105,6 +105,7 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo widget.newUrl = url; widget.data.padName = widget.data.newPadName; + widget.data.padSuffix = this.roomId + "_" + widget.data.newPadName; if (this.editUseCustomServer) { widget.data.padServer = widget.data.newPadServer; } else { From e58d52d6ade7b88c19399f48147042c0bfb9efb6 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 18 Nov 2017 23:49:26 +0100 Subject: [PATCH 4/6] Add etherpad.png avatar --- web/public/img/avatars/etherpad.png | Bin 0 -> 6395 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 web/public/img/avatars/etherpad.png diff --git a/web/public/img/avatars/etherpad.png b/web/public/img/avatars/etherpad.png new file mode 100644 index 0000000000000000000000000000000000000000..037415888f3b4386aa1de976ab2fa35fc31b4d48 GIT binary patch literal 6395 zcmb7J2{@GPyML8J$r4{pWXYNmO-8b2i^f`(Fp(t87}>Iqtx{CRGS-HyV=1PHv9BpA zGz>=e)Fl*XC&vyUr-~GGq=Y3xfFPRx0*eA3P0DuGV zi~1G-z-9`5(>V8nJu23_u;35-ZC$t(C-@2Fycq*tb9rC1yA1$5ZxwvGG;@P3gdVDuf^NFV92Yj3f*sM&6z|6qBx4gW2=+FJg6@r@l`U^7z zqs2Ft;!$Or7Xw0G$;3!S-k04j9(9W3jIt8fKD+;BU_fE^hGgrbO-{z#iXYjp+0j~X zXD&S3>+)n0y>H8}nm-{@H`lw8w6eQBef1(<4&@4YpoE3?t!$KM5`1u3X_c0g0Ju69 z8jn$9*p&RUwHE^`2vO z-TVW4#sza9)}32=BXG6QItD>SlyKRl(Z7xo{rHZZ}>PmP86P_>R0jMWBR|m zee4$H6qH3;sdyxJocHsN)EJID?S-gt?G_VQ*dwQdywMdB64JmS7V2#Wd9Wjn%9T>2 zWnC+hpq+K@s($qLOFmrX-Zul}jegcN(V)-vaLx8~XWT-O0q@0iS3dSY*)dMMKrWY? zh=|AG zOp2Es4cg$SuBy5w zP1Bv%^vH4rjd}2~qmw+@v5$M+TwM-}ct+SsfJxG>-3TyONZaTdCZV(8b^I_&re zby|_wwP#jMvZ!E6qZCq`a`>Kj%`uumk1eO^<`Xb(cStKj@Fd(qfzBv}Lh3T;~%giHbtUf4SSUTsFB9r| zhp+}+K}(0#+bit!JvbnI0{Y_dUOl9%t)XE@4M=T?beO@?rd^P=#bpaG5~8uFxq0V) zxuE)dWnbL8X@i8yCgoYN_oxUN$EA;oK(hn*lVDygDkZNBjr z>zqbwe9kw{z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-Mzfx{kuPj<%ZHR6T-Bo^1zV)TzN-(lj|I9 zfJ!Yy^%cHtl#fh)a?U5O(Cn$uM%}~MP$k!{i#O~5Ih<9T)IofbthpKU>Ws^WWPPeM zj15+x$D=Bh=r6$4y|NOp^oI%H%)jcu7zF2ToZsXD@}c3IKlQ1mb8}=J4w2-33V;V+ zKp1;08p*>Z7OYKx#Vg=5$-(+JX|~9!%1S8`EK(+oJov*wk0aR@`OUYMkh-_$Ph400 z8(pRM&2j*&+Qba65y5l4@{B6V*GxcL>Bi{p9zWdZGw_V;@hc@gB%1oNA=RE_!fFe- sa*jYzyO3&d9*2MA3(o9{-{DX$bSU;$^>PRQQ31d&nCZXJy?*yU0Qt?O@Bjb+ literal 0 HcmV?d00001 From 6e342f107536ccf1de33bbadbcf23053f1bc3689 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sun, 19 Nov 2017 09:32:58 +0000 Subject: [PATCH 5/6] fix etherpad avatar --- web/public/img/avatars/etherpad.png | Bin 6395 -> 4045 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/web/public/img/avatars/etherpad.png b/web/public/img/avatars/etherpad.png index 037415888f3b4386aa1de976ab2fa35fc31b4d48..c420f309292ba0f7271794a33c39aa9684eb799c 100644 GIT binary patch literal 4045 zcma)9c{r47|G&pf8Chm1amW_RA)Gl0S;v;0bC5j|B_?Fw$D|G_TO--2Y)2YP8k+1W z9miHWhA<|SA$x;qEY0sx?|WVE@1OU2pX-`==6?t5~^b-b<`=OhA$e)*>8zR)u+yMz)aY&yOXv}lf%q0{6ftPz9ShkXYIP~zR zFcar6`=CohXxPz&3T-~Q zJs#aICx>X5Tq%m2WEIfzPV+#B|Mv@f+iC)SfBV?6V=c0#={t64goeddN?A$HQ>&pD zyag>6NxELCY+G}B168udvAVpfs!C%f|EIUoApS&7FKJb0B~mURM~yn$g(C`BZ26bl z=X_K zHd4Qpm*JY%59t%vD@#jD&%bYtjV!kuyoMAc=>4W}NQF1?1I)Wm;@0fS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d+!yiqh_b16iDLp;CGJX>L6RT+FNs(blI z=aKHJsxWuP4$bC3z z-Mzfx{kuPj<%ZHR6T-Bo^1zV)TzN-(lj|I9 zfJ!Yy^%cHtl#fh)a?U5O(Cn$uM%}~MP$k!{i#O~5Ih<9T)IofbthpKU>Ws^WWPPeM zj15+x$D=Bh=r6$4y|NOp^oI%H%)jcu7zF2ToZsXD@}c3IKlQ1mb8}=J4w2-33V;V+ zKp1;08p*>Z7OYKx#Vg=5$-(+JX|~9!%1S8`EK(+oJov*wk0aR@`OUYMkh-_$Ph400 z8(pRM&2j*&+Qba65y5l4@{B6V*GxcL>Bi{p9zWdZGw_V;@hc@gB%1oNA=RE_!fFe- sa*jYzyO3&d9*2MA3(o9{-{DX$bSU;$^>PRQQ31d&nCZXJy?*yU0Qt?O@Bjb+ From 2915f6df0a1bef71730e50cecff0505d7cf923e5 Mon Sep 17 00:00:00 2001 From: MTRNord Date: Sun, 19 Nov 2017 11:34:41 +0000 Subject: [PATCH 6/6] rework etherpad wrapUrl() hack --- .../etherpad/etherpad-config.component.ts | 22 +++++++------------ web/app/configs/widget/widget.component.ts | 15 ++++++++++--- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/web/app/configs/widget/etherpad/etherpad-config.component.ts b/web/app/configs/widget/etherpad/etherpad-config.component.ts index 6b46bff..0400fb7 100644 --- a/web/app/configs/widget/etherpad/etherpad-config.component.ts +++ b/web/app/configs/widget/etherpad/etherpad-config.component.ts @@ -36,23 +36,21 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo } getPadURL(widget?: Widget): string { + let url: string; if (widget) { if (this.editUseCustomServer) { - const url = widget.data.newPadServer + this.roomId + "_" + widget.data.newPadName; - return url; + url = widget.data.newPadServer + this.roomId + "_" + widget.data.newPadName; } else { - const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + widget.data.newPadName; - return url; + url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + widget.data.newPadName; } } else { if (this.useCustomServer) { - const url = this.newEtherpadServerUrl + this.roomId + "_" + this.newWidgetUrl; - return url; + url = this.newEtherpadServerUrl + this.roomId + "_" + this.newWidgetUrl; } else { - const url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + this.newWidgetUrl; - return url; + url = "https://demo.riot.im/etherpad/p/" + this.roomId + "_" + this.newWidgetUrl; } } + return url; } private checkPadURL(url: string, widget?: Widget): boolean { @@ -71,12 +69,8 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo } } - public wrapUrl(url: string): string { - return this.wrapperUrl + encodeURIComponent(url + "?userName=") + "$matrix_user_id"; - } - public validateAndAddWidget() { - const url = this.getPadURL(); + const url = this.getPadURL() + "?userName=$matrix_user_id"; if (this.checkPadURL(url)) { this.toaster.pop("warning", "Please enter a Pad Name"); @@ -94,7 +88,7 @@ export class EtherpadWidgetConfigComponent extends WidgetComponent implements Mo } public validateAndSaveWidget(widget: Widget) { - const url = this.getPadURL(widget); + const url = this.getPadURL(widget) + "?userName=$matrix_user_id"; if (this.checkPadURL(url, widget)) { this.toaster.pop("warning", "Please enter a Pad Name"); diff --git a/web/app/configs/widget/widget.component.ts b/web/app/configs/widget/widget.component.ts index ca82087..f3a966e 100644 --- a/web/app/configs/widget/widget.component.ts +++ b/web/app/configs/widget/widget.component.ts @@ -18,7 +18,7 @@ export class WidgetComponent { public newWidgetName: string = ""; private toggledWidgetIds: string[] = []; - public wrapperUrl = ""; + private wrapperUrl = ""; private scalarWrapperUrls: string[] = []; constructor(protected toaster: ToasterService, @@ -87,8 +87,17 @@ export class WidgetComponent { return url; } - public wrapUrl(url: string): string { - return this.wrapperUrl + encodeURIComponent(url); + private wrapUrl(url: string): string { + let encodedURL = this.wrapperUrl + encodeURIComponent(url); + + //don't URL encode $vars of the widget Spec + //TODO do the same with vars from the data object + encodedURL = encodedURL.replace(encodeURIComponent("$matrix_user_id"), "$matrix_user_id"); + encodedURL = encodedURL.replace(encodeURIComponent("$matrix_room_id"), "$matrix_room_id"); + encodedURL = encodedURL.replace(encodeURIComponent("$matrix_display_name"), "$matrix_display_name"); + encodedURL = encodedURL.replace(encodeURIComponent("$matrix_avatar_url"), "$matrix_avatar_url"); + + return encodedURL; } private setWidgetUrl(widget: Widget) {