const html = require('choo/html'); const Component = require('choo/component'); class Footer extends Component { constructor(name, state) { super(name); this.state = state; } update() { return false; } createElement() { const translate = this.state.translate; // Add additional links from configuration if available var links = []; if (this.state != undefined && this.state.WEB_UI != undefined) { const WEB_UI = this.state.WEB_UI; if (WEB_UI.FOOTER_DONATE_URL != '') { links.push(html`
  • ${translate('footerLinkDonate')}
  • `); } if (WEB_UI.FOOTER_CLI_URL != '') { links.push(html`
  • ${translate('footerLinkCli')}
  • `); } if (WEB_UI.FOOTER_DMCA_URL != '') { links.push(html`
  • ${translate('footerLinkDmca')}
  • `); } if (WEB_UI.FOOTER_SOURCE_URL != '') { links.push(html`
  • ${translate('footerLinkSource')}
  • `); } } else { links.push(html`
  • ${translate('footerLinkSource')}
  • `); } return html` `; } } module.exports = Footer;