From 2f76a24dff0e56690ee727ace601e0300f3486b0 Mon Sep 17 00:00:00 2001 From: GRL Date: Mon, 23 Aug 2021 17:30:07 +0200 Subject: [PATCH] Contact page only if environment variable exist --- .../src/Components/Menu/ContactSubMenu.svelte | 88 +----------------- front/src/Components/Menu/Menu.svelte | 7 +- front/src/Components/images/discord_64x64.png | Bin 666 -> 0 bytes .../src/Components/images/facebook_64x64.png | Bin 507 -> 0 bytes .../src/Components/images/instagram_64x64.png | Bin 754 -> 0 bytes .../src/Components/images/linkedin_64x64.png | Bin 506 -> 0 bytes front/src/Components/images/twitter_64x64.png | Bin 484 -> 0 bytes front/src/Components/images/youtube_64x64.png | Bin 463 -> 0 bytes front/src/Enum/EnvironmentVariable.ts | 1 + front/webpack.config.ts | 1 + 10 files changed, 11 insertions(+), 86 deletions(-) delete mode 100644 front/src/Components/images/discord_64x64.png delete mode 100644 front/src/Components/images/facebook_64x64.png delete mode 100644 front/src/Components/images/instagram_64x64.png delete mode 100644 front/src/Components/images/linkedin_64x64.png delete mode 100644 front/src/Components/images/twitter_64x64.png delete mode 100644 front/src/Components/images/youtube_64x64.png diff --git a/front/src/Components/Menu/ContactSubMenu.svelte b/front/src/Components/Menu/ContactSubMenu.svelte index fcca3619..6cca0609 100644 --- a/front/src/Components/Menu/ContactSubMenu.svelte +++ b/front/src/Components/Menu/ContactSubMenu.svelte @@ -1,93 +1,15 @@ -
-
-
-

- The WorkAdventure team is always happy to give you some guidance and advice. - If you have any question, issue, new features or improvements you'd like to see or if you'd like to give us some feedback, - please don't hesitate to reach out! -

-
-
-

Our Office

-

- Let's grab a coffee and have a chat on our virtual office .... on WorkAdventure. Our team loves meeting new people! -

- Visit us -
-
-

Our Mail

-

You'd rather send us an email? Please, feel free to do so, although we hope we could meet you on our virtual office soon enough.

- hello@workadventu.re -
-
-

Our web site

-

Do you want to know more about us? Just follow the link to our website.

- About us -
-
-

Our social media

-

Follow us and keep you updated on the latest news and upcoming new features!

- - {'Discord'} - - - {'Facebook'} - - - {'Instagram'} - - - {'LinkedIn'} - - - {'Twitter'} - - - {'Youtube'} - -
-
-
- + \ No newline at end of file diff --git a/front/src/Components/Menu/Menu.svelte b/front/src/Components/Menu/Menu.svelte index de053b84..28ae17eb 100644 --- a/front/src/Components/Menu/Menu.svelte +++ b/front/src/Components/Menu/Menu.svelte @@ -11,6 +11,7 @@ import {onMount} from "svelte"; import {get} from "svelte/store"; import {sendMenuClickedEvent} from "../../Api/iframe/Ui/MenuItem"; + import {CONTACT_URL} from "../../Enum/EnvironmentVariable"; let activeSubMenu: string = SubMenusInterface.settings; let activeComponent: typeof SettingsSubMenu = SettingsSubMenu; @@ -20,9 +21,9 @@ subMenusStore.removeMenu(SubMenusInterface.globalMessages); } - //Until we can add iframe to a menu and change contact for self-hosted version - //we remove the contact sub-menu - subMenusStore.removeMenu(SubMenusInterface.contact); + if(CONTACT_URL === undefined) { + subMenusStore.removeMenu(SubMenusInterface.contact); + } switchMenu(SubMenusInterface.settings); }) diff --git a/front/src/Components/images/discord_64x64.png b/front/src/Components/images/discord_64x64.png deleted file mode 100644 index 89c7de1bcd5090bb7a3517b8c070d698e75b3920..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 666 zcmV;L0%iS)P)Px%R7pfZRCt{2o6k!EK@`WoBkCeT;w>l;BKrsWC%Sa=-l?--P=7-~Lg!B2yLIW- zrK{&4MGy+QiGhd-+93zqhr6>sW_McWeNMYOJF{=!`_7vms{$UhJ41Q6^tvY_2molE z)ixI9QZ?ltBIH5q`ps2PF8%tZS}9~&0i*F;0KjCra9wX-9RXkkAiv?-5?Fg|GM%Mq zPZCfCi@ztKN`;g0F&t=(|uk=xs($CP^}aIumX_Bs*gyIY(by*g^p_0D}Wtf z+5pqA156uWnoTpoNZel5eajooE&!mmx8r-?@Z$>r@NjqRd*8)PFNAg8Sg!!l?hIYy z;`?W~d4MYN6jkJOw@2CEbzJAHfT#+fk&=B}MbI3eg64>zN?-*LVvhn|**$DuRzV{y zpQ{=zRImc#HV`)gLD8)!iS-I#2bea%G@)}qQhhNl(yp*GL+cg54lr$iX%crpquC9- zPS8;=EY>R^@MruQ$16~ahwCxE}=;~0l4-mIrR9FE?HB4t_L32pd zdQo8oB>jM>5lm~%VZ8#_0j3QwO>76GHD^!ixz;Nn^p_#8>`bGfd$%}f`>GuwUJDSk zeH)bMR)Vg`OIQJf#C{*3dt`_kc?m0k5L*FRgB3u?Kfk=XF4PYX44IM+^nI;Y06W06 z0j9}g^&c9?DFOg`{ef##$a+rb^#`tV$0-T`n9aTcumaZqpgKK&l80NZ0Ic5m@%{t= zD`4ZUuy0Pt8nn+-tXF{WD)7n)8N}7+Db_3C2i~LAOr>!eMgRZ+07*qoM6N<$f=G=a A9smFU diff --git a/front/src/Components/images/facebook_64x64.png b/front/src/Components/images/facebook_64x64.png deleted file mode 100644 index 915801491a0e4ccc6107648da94b8b383605c4e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 507 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Ea{HEjtmSN`)Ym%PG(?W+~n!v z7*a9k?QBE8!v+$q^MluiBz6Q?A99=_Xx_k?*LbAkh;BlYv_cx2L{+=dwpB(ZS>X$K z);7*qGI8pu_3QrUcfH+GRav_~+r86?ce%O#vx2~KKLrhjid}Z=WPJ8`-E^8_X<@Tl zn|Dd3IKze4>5l3NHm5`xM2@bx^8a52r-Kkf?8WU2b+Vi1atl}=e3h^Ki$%lucE7tN z!vc*o$Llr1nYThg`WRFgFGO7JC`@6`s?+_pKk5so0P_u|8zF0%SMbQ|Mb-X$@#o&l zKQDw8*fy|kSa_Z>H+!G%MRfvpXBI=jP;F^M6XLE5lEx1m?! zfY^a!x2+O_fB#$deqwb~Uk76jW6lwVZ474UisBaJ^}gHXKB2lv+6~p@7YAQQuT0MW z-=K1o|Jzr$`3zvAkG+zewPf=hu`|mjU;6xI;d#!_FPB{Lvx;IoaQ*r5O>g5bl`Z`I zT${n6tjK%XBlgdyXTP4t67ps3T;UrxOz*bDe*S;#wl~-8`7ASL8N4|)C*k@Y-!Gg$ Z*gijvUf5P(ejgZ{44$rjF6*2UngDvP+bjS8 diff --git a/front/src/Components/images/instagram_64x64.png b/front/src/Components/images/instagram_64x64.png deleted file mode 100644 index fe968f3385fed0b1549522c5a3457ab39b812ca2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 754 zcmVPx%tVu*cRCt{2n?Gn2K@`Tn(IuxbNKR2OM=VlEOoHMWD+>!n5NxzCHYo!lrqMQ? zrC<>R3+>W~g(-prlvGxN9x7%JB&b0WC2-`5{PB{ISj551^KR!hv+MIR@7LVU&YPLX z+wZ;I*}GGy!O-xWKHR8fQx9FQf4B^{(zzPiOcVg*pI)!pxhr9R8V;ooF5f5`9S2)8 z0D$(kmWEcq;>^4PfXe)masEPh2Y@I5L6vhG08lDdu=TSRV-Gu{R~S6BEywC*qWh)I zgeq8VZHNMNwf{D|0Kk658=XwH830hY_5^?^00DmINPAlg0Qa1~clJdr2lC~QM!V43 z6WM=$@^)lw0we(34setDUVzpF8y_C!>_!RVy#gcv+zxOP zy9NYT&HH-X9Jg^|!2DjqRul5$51iKXUI7vSZU?wg;YhFXJHcbePeu;defn`^f6_I9 zLTeDkws)AC{%W+nSAYb7+W~G=IMNFM$n4n*0I2+2PP8VZP28N%G&ODhi)>{DfG7Y# zSO4Z)VXcInj=u7J#peJ-0af<`3iwkKJ{8|b|8ul>#>s)nw~J2W*QYxo`)SToL;?Ch k*8sR=aaDc&pK7o`Kb4YB)v=l}o!07*qoM6N<$f_Su7MgRZ+ diff --git a/front/src/Components/images/linkedin_64x64.png b/front/src/Components/images/linkedin_64x64.png deleted file mode 100644 index 5fd3b1af8cd105b845a91c9c8994535b776e58c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Ea{HEjtmSN`)Ym%PG(?W-011z z7*a9k?QC1W!ww=X=@WyObYF6{V{~oV!8pBR!SW@IR;H#VQ(ij8D492$VC7vadeP;j zhKAF|oGGz4?qIb;YSN%30RC zYPXfQG1s1PFH~O;^C~-L?c1-%wHYQcq=;t!k~Z(#dG2WY?1Zh>o_35`x8I&#YParM z;q^WJ4;|DM z^7q98mH7;Y4Z01z5(mT%Ec+U(Fir2h@=uly#vI0+CRwn268Y&Z|O&i%o0~gdhI@R`B-B4|JxIO5w;)B#{nag!PC{xWt~$(699R;XDqb?6%35wUG=xC8!j?wp~0u zVdiZ6y1gCNjJHpn*|_GY><&xj1)L7oE?sB1-#7K^jG}+6_6Pk$Ciyqq$lAZw$34>f zN_JgG>OBsIHR8`KezK%ktPy;Dg5_F`{=Z1wpDZgFa~N}Otz-V@vf1jb?DXT#6Ia?f z{r|Gw!;UeFA(}zjv_ZF_SL%S+0XNTu@4bxVD1zFZJ2JNvr?tGqSqbJn5gUbr$^X=cE z<|*0v_nf55qJJi3;BSN-uVb?CG>l?3-YHMu#>0+_KyAk1Y|~_*pfqmfQD| zWBmR-buNmIQ9q*BUV66l?VL^l7ngnCelKs9Z}yT@483(i|MSlZ5y6SUvHUBaKdm`d z`Q$VA$GbI5lLWu>`PQDzZh75Z!KAWen}2rdHIw|g4WE+)UGnax*)dK%Vme=DrYY~r zx%9I*B~3{ebcU%Y3on|Au#$M^H*=i4#nG3Yk1y=N%xmFIKaf4_za zq{R0l--7Eq+7K4}QNR8@Zm-ER;Rhf`95So6OYqf{?1F>6Tvv+KCP33Xl^(ph-yax5-R@RAGPqOWf*DyuZpSoLmXo;{wVc+a&j-NSy ZurFC)6<^-ra}gLr44$rjF6*2UngAe6#<&0g diff --git a/front/src/Enum/EnvironmentVariable.ts b/front/src/Enum/EnvironmentVariable.ts index b63f4f07..907162d4 100644 --- a/front/src/Enum/EnvironmentVariable.ts +++ b/front/src/Enum/EnvironmentVariable.ts @@ -18,6 +18,7 @@ export const MAX_USERNAME_LENGTH = parseInt(process.env.MAX_USERNAME_LENGTH || " export const MAX_PER_GROUP = parseInt(process.env.MAX_PER_GROUP || "4"); export const DISPLAY_TERMS_OF_USE = process.env.DISPLAY_TERMS_OF_USE == "true"; export const NODE_ENV = process.env.NODE_ENV || "development"; +export const CONTACT_URL = process.env.CONTACT_URL || undefined; export const isMobile = (): boolean => window.innerWidth <= 800 || window.innerHeight <= 600; diff --git a/front/webpack.config.ts b/front/webpack.config.ts index 39a00828..9d9a4a7b 100644 --- a/front/webpack.config.ts +++ b/front/webpack.config.ts @@ -190,6 +190,7 @@ module.exports = { PUSHER_URL: undefined, UPLOADER_URL: null, ADMIN_URL: undefined, + CONTACT_URL: null, DEBUG_MODE: null, STUN_SERVER: null, TURN_SERVER: null,