Chore: moves localstorage helper as a shared utility (#6838)
* Chore: moves localstorage helper as a shared utility and refactors constants * Refactors constants file * Fixes merge conflicts * Delete constants.js --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
17ff1f11a7
commit
09ce85b30d
29
app/javascript/dashboard/constants/globals.js
Normal file
29
app/javascript/dashboard/constants/globals.js
Normal file
@@ -0,0 +1,29 @@
|
||||
export default {
|
||||
GRAVATAR_URL: 'https://www.gravatar.com/avatar/',
|
||||
ASSIGNEE_TYPE: {
|
||||
ME: 'me',
|
||||
UNASSIGNED: 'unassigned',
|
||||
ALL: 'all',
|
||||
},
|
||||
STATUS_TYPE: {
|
||||
OPEN: 'open',
|
||||
RESOLVED: 'resolved',
|
||||
PENDING: 'pending',
|
||||
SNOOZED: 'snoozed',
|
||||
ALL: 'all',
|
||||
},
|
||||
ARTICLE_STATUS_TYPES: {
|
||||
DRAFT: 0,
|
||||
PUBLISH: 1,
|
||||
ARCHIVE: 2,
|
||||
},
|
||||
LAYOUT_TYPES: {
|
||||
CONDENSED: 'condensed',
|
||||
EXPANDED: 'expanded',
|
||||
},
|
||||
DOCS_URL: '//www.chatwoot.com/docs/product/',
|
||||
TESTIMONIAL_URL: 'https://testimonials.cdn.chatwoot.com/content.json',
|
||||
SMALL_SCREEN_BREAKPOINT: 1024,
|
||||
AVAILABILITY_STATUS_KEYS: ['online', 'busy', 'offline'],
|
||||
};
|
||||
export const DEFAULT_REDIRECT_URL = '/app/';
|
||||
5
app/javascript/dashboard/constants/localStorage.js
Normal file
5
app/javascript/dashboard/constants/localStorage.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export const LOCAL_STORAGE_KEYS = {
|
||||
DISMISSED_UPDATES: 'dismissedUpdates',
|
||||
WIDGET_BUILDER: 'widgetBubble_',
|
||||
DRAFT_MESSAGES: 'draftMessages',
|
||||
};
|
||||
Reference in New Issue
Block a user