File tree Expand file tree Collapse file tree 3 files changed +52
-1
lines changed
Expand file tree Collapse file tree 3 files changed +52
-1
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,53 @@ class Footer extends Component {
6565 ` ) ;
6666 }
6767
68+ // Defining a custom footer
69+ var footer = [ ] ;
70+ if ( this . state != undefined && this . state . WEB_UI != undefined ) {
71+ const WEB_UI = this . state . WEB_UI ;
72+
73+ if ( WEB_UI . CUSTOM_FOOTER_URL != '' && WEB_UI . CUSTOM_FOOTER_TEXT != '' ) {
74+ footer . push ( html `
75+ < li class ="m-2 ">
76+ < a href ="${ WEB_UI . CUSTOM_FOOTER_URL } " target ="_blank ">
77+ ${ WEB_UI . CUSTOM_FOOTER_TEXT }
78+ </ a >
79+ </ li >
80+ ` ) ;
81+ }
82+ else if ( WEB_UI . CUSTOM_FOOTER_URL != '' ) {
83+ footer . push ( html `
84+ < li class ="m-2 ">
85+ < a href ="${ WEB_UI . CUSTOM_FOOTER_URL } " target ="_blank ">
86+ ${ WEB_UI . CUSTOM_FOOTER_URL }
87+ </ a >
88+ </ li >
89+ ` ) ;
90+ }
91+ else if ( WEB_UI . CUSTOM_FOOTER_TEXT != '' ) {
92+ footer . push ( html `
93+ < li class ="m-2 ">
94+ ${ WEB_UI . CUSTOM_FOOTER_TEXT }
95+ </ li >
96+ ` )
97+ }
98+ else {
99+ footer . push ( html `
100+ < li class ="m-2 ">
101+ ${ translate ( 'footerText' ) }
102+ </ li >
103+ ` ) ;
104+ }
105+ }
106+
68107 return html `
69108 < footer
70109 class ="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between "
71110 >
72111 < ul
73112 class ="flex flex-col md:flex-row items-start md:items-center md:justify-start "
74113 >
75- < li class =" m-2 " > ${ translate ( 'footerText' ) } </ li >
114+ ${ footer }
76115 </ ul >
77116 < ul
78117 class ="flex flex-col md:flex-row items-start md:items-center md:justify-end "
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ module.exports = {
1313 FOOTER_CLI_URL : config . footer_cli_url ,
1414 FOOTER_DMCA_URL : config . footer_dmca_url ,
1515 FOOTER_SOURCE_URL : config . footer_source_url ,
16+ CUSTOM_FOOTER_TEXT : config . custom_footer_text ,
17+ CUSTOM_FOOTER_URL : config . custom_footer_url ,
1618 COLORS : {
1719 PRIMARY : config . ui_color_primary ,
1820 ACCENT : config . ui_color_accent
Original file line number Diff line number Diff line change @@ -253,6 +253,16 @@ const conf = convict({
253253 default : 'https://github.com/timvisee/send' ,
254254 env : 'SEND_FOOTER_SOURCE_URL'
255255 } ,
256+ custom_footer_text : {
257+ format : String ,
258+ default : '' ,
259+ env : 'CUSTOM_FOOTER_TEXT'
260+ } ,
261+ custom_footer_url : {
262+ format : String ,
263+ default : '' ,
264+ env : 'CUSTOM_FOOTER_URL'
265+ } ,
256266 ui_color_primary : {
257267 format : String ,
258268 default : '#0a84ff' ,
You can’t perform that action at this time.
0 commit comments