aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/helpers')
-rw-r--r--client/src/app/helpers/utils.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/helpers/utils.ts b/client/src/app/helpers/utils.ts
index 879f697f4..9bf22f62f 100644
--- a/client/src/app/helpers/utils.ts
+++ b/client/src/app/helpers/utils.ts
@@ -45,6 +45,16 @@ function getAbsoluteAPIUrl () {
45 return absoluteAPIUrl 45 return absoluteAPIUrl
46} 46}
47 47
48function getAbsoluteEmbedUrl () {
49 let absoluteEmbedUrl = environment.embedUrl
50 if (!absoluteEmbedUrl) {
51 // The Embed is on the same domain
52 absoluteEmbedUrl = window.location.origin
53 }
54
55 return absoluteEmbedUrl
56}
57
48const datePipe = new DatePipe('en') 58const datePipe = new DatePipe('en')
49function dateToHuman (date: string) { 59function dateToHuman (date: string) {
50 return datePipe.transform(date, 'medium') 60 return datePipe.transform(date, 'medium')
@@ -201,6 +211,7 @@ export {
201 dateToHuman, 211 dateToHuman,
202 immutableAssign, 212 immutableAssign,
203 objectToFormData, 213 objectToFormData,
214 getAbsoluteEmbedUrl,
204 objectLineFeedToHtml, 215 objectLineFeedToHtml,
205 removeElementFromArray, 216 removeElementFromArray,
206 importModule, 217 importModule,