helper.js 2.4KB

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