helper.js 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. export const FETCH_CONFIG = {
  2. headers: {
  3. 'Accept': 'application/json',
  4. 'Content-Type': 'application/json',
  5. 'Authorization': 'Basic ' + btoa(`${'admin@admin.admin'}:${'admin@admin.admin'}`)
  6. }
  7. }
  8. export const debug = { // copied from html-documents => outdated
  9. config: {
  10. label: 'Thread',
  11. slug: 'thread',
  12. faIcon: 'comments-o',
  13. hexcolor: '#65c7f2',
  14. creationLabel: 'Write a thread',
  15. domContainer: 'appContainer',
  16. apiUrl: 'http://localhost:6543/api/v2',
  17. mockApiUrl: 'http://localhost:3001',
  18. apiHeader: {
  19. 'Accept': 'application/json',
  20. 'Content-Type': 'application/json'
  21. // 'Authorization': 'Basic ' + btoa(`${'admin@admin.admin'}:${'admin@admin.admin'}`)
  22. },
  23. availableStatuses: [{
  24. label: 'Open',
  25. slug: 'open',
  26. faIcon: 'square-o',
  27. hexcolor: '#3f52e3',
  28. globalStatus: 'open'
  29. }, {
  30. label: 'Validated',
  31. slug: 'closed-validated',
  32. faIcon: 'check-square-o',
  33. hexcolor: '#008000',
  34. globalStatus: 'closed'
  35. }, {
  36. label: 'Cancelled',
  37. slug: 'closed-unvalidated',
  38. faIcon: 'close',
  39. hexcolor: '#f63434',
  40. globalStatus: 'closed'
  41. }, {
  42. label: 'Deprecated',
  43. slug: 'closed-deprecated',
  44. faIcon: 'warning',
  45. hexcolor: '#ababab',
  46. globalStatus: 'closed'
  47. }]
  48. },
  49. loggedUser: { // @FIXME this object is outdated
  50. user_id: 5,
  51. username: 'Smoi',
  52. firstname: 'Côme',
  53. lastname: 'Stoilenom',
  54. email: 'osef@algoo.fr',
  55. avatar_url: 'https://avatars3.githubusercontent.com/u/11177014?s=460&v=4'
  56. },
  57. content: {
  58. author: {
  59. avatar_url: null,
  60. public_name: 'Global manager',
  61. user_id: 1 // -1 or 1 for debug
  62. },
  63. content_id: 48, // 1 or 22 for debug
  64. content_type: 'thread',
  65. created: '2018-06-18T14:59:26Z',
  66. current_revision_id: 11,
  67. is_archived: false,
  68. is_deleted: false,
  69. label: 'Current Menu',
  70. last_modifier: {
  71. avatar_url: null,
  72. public_name: 'Global manager',
  73. user_id: 1
  74. },
  75. modified: '2018-06-18T14:59:26Z',
  76. parent_id: 2,
  77. raw_content: '',
  78. show_in_ui: true,
  79. slug: 'current-menu',
  80. status: 'open',
  81. sub_content_types: ['thread', 'html-documents', 'file', 'folder'],
  82. workspace_id: 1
  83. },
  84. timeline: [] // timelineDebugData
  85. }