Add option to change nickname (close #21)
This commit is contained in:
parent
b67ab6cddf
commit
b0fe39e4e8
@ -15,6 +15,15 @@ var settings = [
|
||||
type: "toggle",
|
||||
restart: true
|
||||
},
|
||||
{
|
||||
setting: "nickname",
|
||||
title: "Nickname",
|
||||
text: "Change your player name.",
|
||||
icon: "fas fa-user-edit",
|
||||
color: "blue",
|
||||
onclick: "changeNickname()",
|
||||
type: "link"
|
||||
},
|
||||
{
|
||||
setting: "munzee",
|
||||
title: "Link Munzee account",
|
||||
@ -61,6 +70,18 @@ var settings = [
|
||||
}
|
||||
];
|
||||
|
||||
function changeNickname() {
|
||||
app.dialog.prompt('New Name', function (name) {
|
||||
callAPI("changenick", {
|
||||
nick: name
|
||||
}, function (success) {
|
||||
app.dialog.alert('You are now known as ' + success.name);
|
||||
}, function (error) {
|
||||
app.dialog.alert(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadSettings() {
|
||||
$("#settings-bin").html("");
|
||||
settings.forEach(function (item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user