You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
747 B

  1. const tabs = require('modulekit-tabs')
  2. const Browser = require('./Browser')
  3. let tab
  4. function moreCategoriesIndex () {
  5. let content = tab.content
  6. content.innerHTML = '<h3>' + lang('more_categories') + '</h3>'
  7. const dom = document.createElement('div')
  8. content.appendChild(dom)
  9. const browser = new Browser('more-categories', dom)
  10. browser.buildPage({})
  11. browser.on('close', () => tab.unselect())
  12. }
  13. register_hook('init', function (callback) {
  14. tab = new tabs.Tab({
  15. id: 'moreCategories'
  16. })
  17. global.tabs.add(tab)
  18. tab.header.innerHTML = '<i class="fa fa-plus" aria-hidden="true"></i>'
  19. tab.header.title = lang('more_categories')
  20. tab.on('select', () => {
  21. tab.content.innerHTML = ''
  22. moreCategoriesIndex()
  23. })
  24. })