helper.js 2.2KB

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