mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
Merge branch 'master' of https://github.com/Miodec/monkeytype
This commit is contained in:
commit
ece2aa4273
|
@ -52,6 +52,7 @@ import {
|
|||
} from "../test/test-config";
|
||||
|
||||
export const gmailProvider = new GoogleAuthProvider();
|
||||
let canCall = true;
|
||||
|
||||
export function sendVerificationEmail(): void {
|
||||
Loader.show();
|
||||
|
@ -350,6 +351,31 @@ export function signIn(): void {
|
|||
});
|
||||
}
|
||||
|
||||
export async function forgotPassword(email: any): Promise<void> {
|
||||
if (!canCall) {
|
||||
return Notifications.add(
|
||||
"Please wait before requesting another password reset link",
|
||||
0,
|
||||
5000
|
||||
);
|
||||
}
|
||||
if (!email) return Notifications.add("Please enter an email!", -1);
|
||||
|
||||
try {
|
||||
await sendPasswordResetEmail(Auth, email);
|
||||
Notifications.add("Email sent", 1, 2);
|
||||
} catch (error) {
|
||||
Notifications.add(
|
||||
Misc.createErrorMessage(error, "Failed to send email"),
|
||||
-1
|
||||
);
|
||||
}
|
||||
canCall = false;
|
||||
setTimeout(function () {
|
||||
canCall = true;
|
||||
}, 10000);
|
||||
}
|
||||
|
||||
export async function signInWithGoogle(): Promise<void> {
|
||||
UpdateConfig.setChangedBeforeDb(false);
|
||||
LoginPage.showPreloader();
|
||||
|
@ -602,17 +628,7 @@ $(".pageLogin #forgotPasswordButton").on("click", () => {
|
|||
const emailField =
|
||||
($(".pageLogin .login input")[0] as HTMLInputElement).value || "";
|
||||
const email = prompt("Email address", emailField);
|
||||
if (email) {
|
||||
sendPasswordResetEmail(Auth, email)
|
||||
.then(function () {
|
||||
// Email sent.
|
||||
Notifications.add("Email sent", 1, 2);
|
||||
})
|
||||
.catch(function (error) {
|
||||
// An error happened.
|
||||
Notifications.add(error.message, -1);
|
||||
});
|
||||
}
|
||||
forgotPassword(email);
|
||||
});
|
||||
|
||||
$(".pageLogin .login input").keyup((e) => {
|
||||
|
|
|
@ -340,7 +340,8 @@
|
|||
"code_sql",
|
||||
"code_perl",
|
||||
"code_php",
|
||||
"code_vim"
|
||||
"code_vim",
|
||||
"code_opencl"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -191,6 +191,7 @@
|
|||
,"code_perl"
|
||||
,"code_php"
|
||||
,"code_vim"
|
||||
,"code_opencl"
|
||||
,"hindi"
|
||||
,"hindi_1k"
|
||||
,"macedonian"
|
||||
|
|
228
frontend/static/languages/code_opencl.json
Normal file
228
frontend/static/languages/code_opencl.json
Normal file
|
@ -0,0 +1,228 @@
|
|||
{
|
||||
"name": "code_opencl",
|
||||
"leftToRight": true,
|
||||
"noLazyMode": true,
|
||||
"words": [
|
||||
"static",
|
||||
"union",
|
||||
"struct",
|
||||
"typedef",
|
||||
"while",
|
||||
"for",
|
||||
"if",
|
||||
"else",
|
||||
"extern",
|
||||
"volatile",
|
||||
"return",
|
||||
"as_float",
|
||||
"continue",
|
||||
"break",
|
||||
"#define",
|
||||
"unsigned",
|
||||
"bool",
|
||||
"char",
|
||||
"short",
|
||||
"int",
|
||||
"long",
|
||||
"float",
|
||||
"double",
|
||||
"size_t",
|
||||
"ptrdiff_t",
|
||||
"intptr_t",
|
||||
"uintptr_t",
|
||||
"void",
|
||||
"half",
|
||||
"complex",
|
||||
"imaginary",
|
||||
"float2",
|
||||
"float3",
|
||||
"float4",
|
||||
"double2",
|
||||
"double3",
|
||||
"double4",
|
||||
"(float2)",
|
||||
"(float3)",
|
||||
"(float4)",
|
||||
"(double2)",
|
||||
"(double3)",
|
||||
"(double4)",
|
||||
".xx",
|
||||
".yy",
|
||||
".xy",
|
||||
".yx",
|
||||
".xxx",
|
||||
".yyy",
|
||||
".zzz",
|
||||
".xyz",
|
||||
".xzy",
|
||||
".yxz",
|
||||
".yzx",
|
||||
".zxy",
|
||||
".zyx",
|
||||
".xxxx",
|
||||
".yyyy",
|
||||
".zzzz",
|
||||
".wwww",
|
||||
".xyzw",
|
||||
".hi",
|
||||
".lo",
|
||||
"image_2d_t",
|
||||
"image_3d_t",
|
||||
"__global",
|
||||
"__local",
|
||||
"__constant",
|
||||
"__private",
|
||||
"__generic",
|
||||
"__kernel",
|
||||
"__read_only",
|
||||
"__write_only",
|
||||
"__read_write",
|
||||
"uniform",
|
||||
"pipe",
|
||||
"-",
|
||||
"+",
|
||||
"--",
|
||||
"++",
|
||||
"*",
|
||||
"/",
|
||||
"+=",
|
||||
"-=",
|
||||
"*=",
|
||||
"/=",
|
||||
">",
|
||||
"<",
|
||||
">=",
|
||||
"<=",
|
||||
"==",
|
||||
"!=",
|
||||
"!",
|
||||
"&",
|
||||
"|",
|
||||
"^",
|
||||
"~",
|
||||
"&&",
|
||||
"||",
|
||||
"?:",
|
||||
">>",
|
||||
"<<",
|
||||
"sizeof",
|
||||
"=",
|
||||
"get_work_dim",
|
||||
"get_global_size",
|
||||
"get_global_id",
|
||||
"get_local_size",
|
||||
"get_local_id",
|
||||
"acos",
|
||||
"acosh",
|
||||
"acospi",
|
||||
"asin",
|
||||
"asinh",
|
||||
"asinpi",
|
||||
"atan",
|
||||
"atan2",
|
||||
"atanh",
|
||||
"atanpi",
|
||||
"atan2pi",
|
||||
"cbrt",
|
||||
"ceil",
|
||||
"copysign",
|
||||
"cos",
|
||||
"cosh",
|
||||
"cospi",
|
||||
"erfc",
|
||||
"erf",
|
||||
"exp",
|
||||
"exp2",
|
||||
"exp10",
|
||||
"expm1",
|
||||
"fabs",
|
||||
"fdim",
|
||||
"floor",
|
||||
"fma",
|
||||
"mfax",
|
||||
"fmod",
|
||||
"fract",
|
||||
"frexp",
|
||||
"ilogb",
|
||||
"ldexp",
|
||||
"lgamma",
|
||||
"log",
|
||||
"log2",
|
||||
"log10",
|
||||
"log1p",
|
||||
"logb",
|
||||
"mad",
|
||||
"maxmag",
|
||||
"minmag",
|
||||
"modf",
|
||||
"nan",
|
||||
"nextafter",
|
||||
"pown",
|
||||
"powr",
|
||||
"remainder",
|
||||
"remquo",
|
||||
"rint",
|
||||
"rootn",
|
||||
"round",
|
||||
"rsqrt",
|
||||
"sin",
|
||||
"sincos",
|
||||
"sinh",
|
||||
"sinpi",
|
||||
"sqrt",
|
||||
"tan",
|
||||
"tanh",
|
||||
"tanpi",
|
||||
"tgamma",
|
||||
"trunc",
|
||||
"half_cos",
|
||||
"half_divide",
|
||||
"half_exp",
|
||||
"half_exp2",
|
||||
"half_exp10",
|
||||
"half_log",
|
||||
"half_log2",
|
||||
"half_log10",
|
||||
"half_powr",
|
||||
"half_recip",
|
||||
"half_rsqrt",
|
||||
"half_sin",
|
||||
"half_sqrt",
|
||||
"half_tan",
|
||||
"MAXFLOAT",
|
||||
"HUGE_VALF",
|
||||
"INFINITY",
|
||||
"NAN",
|
||||
"clamp",
|
||||
"degrees",
|
||||
"max",
|
||||
"min",
|
||||
"mix",
|
||||
"radians",
|
||||
"step",
|
||||
"smoothstep",
|
||||
"cross",
|
||||
"dot",
|
||||
"distance",
|
||||
"length",
|
||||
"normalize",
|
||||
"fast_distance",
|
||||
"fast_length",
|
||||
"fast_normalize",
|
||||
"vload2",
|
||||
"vload3",
|
||||
"vload4",
|
||||
"vstore2",
|
||||
"vstore3",
|
||||
"vstore4",
|
||||
"barrier",
|
||||
"work_group_barrier",
|
||||
"sub_group_barrier",
|
||||
"mem_fence",
|
||||
"read_mem_fence",
|
||||
"write_mem_fence",
|
||||
"to_global",
|
||||
"to_local",
|
||||
"to_private"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue