-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathconstants.js
More file actions
230 lines (213 loc) · 6.46 KB
/
Copy pathconstants.js
File metadata and controls
230 lines (213 loc) · 6.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
/**
* Used to have the ability to migrate users
* if we change the db schema. When a connection
* to indexedDB is opened with a higher version,
* there will be an onupgradeneeded event called
* which we can use to convert users on older
* paradigms to the current one.
*/
export const DB_VERSION = 5;
/**
* The name of our entire indexedDB instance.
*/
export const DB_NAME = 'RESTED';
/**
* The name of the "table" in indexedDB we use for
* our collections.
*/
export const DB_OBJECT_STORE_NAME = 'collections';
/**
* The name of the "table" in indexedDB we use for
* our URL variables.
*/
export const DB_URL_VARIABLES_STORE_NAME = 'urlVariables';
/**
* The name of the "table" in indexedDB we use for
* storing request history
*/
export const DB_HISTORY_STORE_NAME = 'history';
/**
* The name of the "table" in indexedDB we use for
* storing application options
*/
export const DB_OPTIONS_STORE_NAME = 'options';
/**
* This is the index of the selected collection
* group on load of the application. This is the
* collection that groups will be added to if a
* different collection is not specified by the
* user.
*/
export const DEFAULT_SELECTED_COLLECTION = '0';
/**
* The default max length of the history list.
* The list will be truncated to only allow this
* size. Is overridable as an option.
*/
export const DEFAULT_HISTORY_SIZE = 10;
/**
* The default maximum response size for which
* syntax highlighting is enabled (kilobytes). Any
* value greater than this will have highlighting
* turned off for performance reasons.
*/
export const DEFAULT_SYNTAX_HIGHLIGHTING_RESPONSE_SIZE = 20;
/**
* This is the request used to initialize the
* request panel. This can be either on
* application load or on request reset.
*/
export const DEFAULT_REQUEST = {
method: 'GET',
headers: [{
name: '',
value: '',
}],
formData: [{
name: '',
value: '',
}],
cache: false,
};
/**
* Holds the different types of requests
* that this client supports
*/
export const REQUEST_METHODS = [
'GET',
'POST',
'PUT',
'DELETE',
'PATCH',
'HEAD',
'JSONP',
'CUSTOM',
];
export const DEFAULT_REQUEST_METHOD = 'GET';
/**
* The milliseconds we delay showing spinners
* after a request has been sent.
*/
export const SPINNER_SHOW_DELAY = 300;
/**
* These are the themes available on bootswatch,
* alphabethic order - except application default
* (yeti) first, then bootstrap default (retro).
*/
export const THEMES = [
'yeti',
'retro',
'cerulean',
'cosmo',
'cyborg',
'darkly',
'flatly',
'journal',
'lumen',
'paper',
'readable',
'sandstone',
'simplex',
'slate',
'spacelab',
'superhero',
'united',
];
/**
* Themes that need special handling because of
* being darker than the others
*/
export const DARK_THEMES = [
'cosmo',
'cyborg',
'darkly',
'flatly',
'sandstone',
'slate',
'superhero',
'yeti'
];
/**
* These are the styles we apply to the response
* in the request view. Translation: this applies
* color to the result. (highlight.js)
*/
export const HIGHLIGHT_STYLES = [
{ title: 'Default', style: 'default' },
{ title: 'Dark', style: 'dark' },
{ title: 'Grayscale', style: 'grayscale' },
{ title: 'FAR', style: 'far' },
{ title: 'IDEA', style: 'idea' },
{ title: 'Sunburst', style: 'sunburst' },
{ title: 'Zenburn', style: 'zenburn' },
{ title: 'Visual Studio', style: 'vs' },
{ title: 'Ascetic', style: 'ascetic' },
{ title: 'Magula', style: 'magula' },
{ title: 'GitHub', style: 'github' },
{ title: 'Github Gist', style: 'github-gist' },
{ title: 'Google Code', style: 'googlecode' },
{ title: 'Brown Paper', style: 'brown-paper' },
{ title: 'School Book', style: 'school-book' },
{ title: 'IR Black', style: 'ir-black' },
{ title: 'Solarized - Dark', style: 'solarized-dark' },
{ title: 'Solarized - Light', style: 'solarized-light' },
{ title: 'Arta', style: 'arta' },
{ title: 'Monokai', style: 'monokai' },
{ title: 'Monokai Sublime', style: 'monokai-sublime' },
{ title: 'Agate', style: 'agate' },
{ title: 'Androidstudio', style: 'androidstudio' },
{ title: 'XCode', style: 'xcode' },
{ title: 'Pojoaque', style: 'pojoaque' },
{ title: 'Rainbow', style: 'rainbow' },
{ title: 'Tomorrow', style: 'tomorrow' },
{ title: 'Tomorrow Night', style: 'tomorrow-night' },
{ title: 'Tomorrow Night Bright', style: 'tomorrow-night-bright' },
{ title: 'Tomorrow Night Blue', style: 'tomorrow-night-blue' },
{ title: 'Tomorrow Night Eighties', style: 'tomorrow-night-eighties' },
{ title: 'Railscasts', style: 'railscasts' },
{ title: 'Obsidian', style: 'obsidian' },
{ title: 'Docco', style: 'docco' },
{ title: 'Mono Blue', style: 'mono-blue' },
{ title: 'Foundation', style: 'foundation' },
{ title: 'Atelier Dun - Dark', style: 'atelier-dune-dark' },
{ title: 'Atelier Dun - Light', style: 'atelier-dune-light' },
{ title: 'Atelier Forest - Dark', style: 'atelier-forest-dark' },
{ title: 'Atelier Forest - Light', style: 'atelier-forest-light' },
{ title: 'Atelier Heath - Dark', style: 'atelier-heath-dark' },
{ title: 'Atelier Heath - Light', style: 'atelier-heath-light' },
{ title: 'Atelier Lakeside - Dark', style: 'atelier-lakeside-dark' },
{ title: 'Atelier Lakeside - Light', style: 'atelier-lakeside-light' },
{ title: 'Atelier Seaside - Dark', style: 'atelier-seaside-dark' },
{ title: 'Atelier Seaside - Light', style: 'atelier-seaside-light' },
{ title: 'Paraíso - Dark', style: 'paraiso-dark' },
{ title: 'Paraíso - Light', style: 'paraiso-light' },
{ title: 'Colorbrewer', style: 'color-brewer' },
{ title: 'Codepen.io Embed', style: 'codepen-embed' },
{ title: 'Kimbie - Dark', style: 'kimbie.dark' },
{ title: 'Kimbie - Light', style: 'kimbie.light' },
{ title: 'Hybrid', style: 'hybrid' },
{ title: 'Darkula', style: 'darkula' },
{ title: 'Hopscotch', style: 'hopscotch' },
];
/**
* The URLs shown in the URL bar on load.
* Add more if you want!
* The only rule for these: Nothing NSFW or illegal
* and it should preferably be something amusing!
*/
export const PLACEHOLDER_URLS = [
// Comics
'http://xkcd.com/323/',
'http://cube-drone.com/comics/c/severity-one',
'http://www.phdcomics.com/comics/archive.php?comicid=946',
// Useful sites
'http://news.ycombinator.com/',
'http://reddit.com',
// Random fun stuff
'http://www.aperturescience.com',
'http://www.pennyjuice.com/htmlversion/whoispj.htm',
'http://www.arngren.net/',
'http://www.lingscars.com/',
'http://bojackhorseman.com',
'http://visitnorway.com',
];