support for collecting github user in user settings

This commit is contained in:
Peli de Halleux 2015-02-13 10:20:19 -08:00
Родитель 46439471b2
Коммит dc748a248e
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1333,7 +1333,7 @@ module TDev { export module Browser {
Util.httpGetJsonAsync(Cloud.getPrivateApiUrl("me/settings")).done((settings) => {
Browser.setInnerHTML(dialogBody, "")
var nickname, website, twitterhandle, location, area, aboutme, realname, gender, yearofbirth,
var nickname, website, twitterhandle, githubuser, location, area, aboutme, realname, gender, yearofbirth,
culture, howfound, programmingknowledge, occupation, email, emailnewsletter, emailfrequency, pushNotifications,
school;
@ -1350,6 +1350,9 @@ module TDev { export module Browser {
twitterhandle = <HTMLInputElement>textEntry(lf("twitter handle"), HTML.mkTextInput("text", lf("twitter handle")),
lf("Your twitter handle, like @touchdevelop."));
githubuser = <HTMLInputElement>textEntry(lf("github user"), HTML.mkTextInput("text", lf("github user")),
lf("Your GitHub user."));
location = <HTMLInputElement>textEntry(lf("location"), HTML.mkTextInput("text", lf("location")),
lf("Where in the world are you?"))
@ -1490,6 +1493,7 @@ module TDev { export module Browser {
email: email === undefined ? undefined : email.value,
location: location === undefined ? undefined : location.value,
twitterhandle: twitterhandle === undefined ? undefined : twitterhandle.value,
githubuser: githubuser === undefined ? undefined : githubuser.value,
school: school ? school.value : undefined,
}).done(resp => {
progressBar.stop();
@ -1526,6 +1530,7 @@ module TDev { export module Browser {
if (area) { area.textarea.value = settings.aboutme || ""; area.update() }
if (realname) realname.value = settings.realname || "";
if (twitterhandle) twitterhandle.value = settings.twitterhandle || "";
if (githubuser) githubuser.value = settings.githubuser || "";
if (email) email.value = settings.email || "";
if (school) school.value = settings.school || "";

Просмотреть файл

@ -412,6 +412,7 @@ module TDev {
email?: string;
location?: string;
twitterhandle?: string;
githubuser?: string;
editorMode?: string;
school?: string;
wallpaper?: string;