initial import for Open Source 🎉
This commit is contained in:
parent
1898c361f3
commit
9c0dd3b722
2048 changed files with 218743 additions and 0 deletions
8
static/js/constants/highlighted-languages.constant.json
Normal file
8
static/js/constants/highlighted-languages.constant.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
"javascript",
|
||||
"python",
|
||||
"bash",
|
||||
"nginx",
|
||||
"xml",
|
||||
"shell"
|
||||
]
|
16
static/js/constants/injected-values.constant.ts
Normal file
16
static/js/constants/injected-values.constant.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Configuration data set.
|
||||
*/
|
||||
export const INJECTED_CONFIG: any = (<any>window).__config;
|
||||
|
||||
|
||||
/**
|
||||
* REST API route information.
|
||||
*/
|
||||
export const INJECTED_ENDPOINTS: any = (<any>window).__endpoints;
|
||||
|
||||
|
||||
/**
|
||||
* Features information.
|
||||
*/
|
||||
export const INJECTED_FEATURES: any = (<any>window).__features;
|
8
static/js/constants/name-patterns.constant.ts
Normal file
8
static/js/constants/name-patterns.constant.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Regex patterns to for validating account names.
|
||||
*/
|
||||
export const NAME_PATTERNS: any = {
|
||||
TEAM_PATTERN: '^[a-z][a-z0-9]+$',
|
||||
ROBOT_PATTERN: '^[a-z][a-z0-9_]{1,254}$',
|
||||
USERNAME_PATTERN: '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
|
||||
};
|
19
static/js/constants/platform.constant.ts
Normal file
19
static/js/constants/platform.constant.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Type representing current browser platform.
|
||||
* TODO: Add more browser platforms.
|
||||
*/
|
||||
export type BrowserPlatform = "firefox"
|
||||
| "chrome";
|
||||
|
||||
/**
|
||||
* Constant representing current browser platform. Used for determining available features.
|
||||
* TODO Only rudimentary implementation, should prefer specific feature detection strategies instead.
|
||||
*/
|
||||
export const browserPlatform: BrowserPlatform = (() => {
|
||||
if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
|
||||
return 'firefox';
|
||||
}
|
||||
else {
|
||||
return 'chrome';
|
||||
}
|
||||
})();
|
Reference in a new issue