Front end of the Slack clone application.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. 'use strict'
  2. var consoleControl = require('console-control-strings')
  3. var ThemeSet = require('./theme-set.js')
  4. var themes = module.exports = new ThemeSet()
  5. themes.addTheme('ASCII', {
  6. preProgressbar: '[',
  7. postProgressbar: ']',
  8. progressbarTheme: {
  9. complete: '#',
  10. remaining: '.'
  11. },
  12. activityIndicatorTheme: '-\\|/',
  13. preSubsection: '>'
  14. })
  15. themes.addTheme('colorASCII', themes.getTheme('ASCII'), {
  16. progressbarTheme: {
  17. preComplete: consoleControl.color('inverse'),
  18. complete: ' ',
  19. postComplete: consoleControl.color('stopInverse'),
  20. preRemaining: consoleControl.color('brightBlack'),
  21. remaining: '.',
  22. postRemaining: consoleControl.color('reset')
  23. }
  24. })
  25. themes.addTheme('brailleSpinner', {
  26. preProgressbar: '⸨',
  27. postProgressbar: '⸩',
  28. progressbarTheme: {
  29. complete: '░',
  30. remaining: '⠂'
  31. },
  32. activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏',
  33. preSubsection: '>'
  34. })
  35. themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), {
  36. progressbarTheme: {
  37. preComplete: consoleControl.color('inverse'),
  38. complete: ' ',
  39. postComplete: consoleControl.color('stopInverse'),
  40. preRemaining: consoleControl.color('brightBlack'),
  41. remaining: '░',
  42. postRemaining: consoleControl.color('reset')
  43. }
  44. })
  45. themes.setDefault({}, 'ASCII')
  46. themes.setDefault({hasColor: true}, 'colorASCII')
  47. themes.setDefault({platform: 'darwin', hasUnicode: true}, 'brailleSpinner')
  48. themes.setDefault({platform: 'darwin', hasUnicode: true, hasColor: true}, 'colorBrailleSpinner')