Add display name in the settings useradmin menu

This commit is contained in:
yflory 2017-07-11 18:50:41 +02:00
parent fb21a650ce
commit 7f5c301734
3 changed files with 4 additions and 3 deletions

View File

@ -838,7 +838,6 @@ define([
console.error(err);
return;
}
updateDisplayName(toolbar, config);
Cryptpad.changeDisplayName(newName, true);
});
});
@ -846,6 +845,7 @@ define([
});
Cryptpad.onDisplayNameChanged(function () {
Cryptpad.findCancelButton().click();
updateDisplayName(toolbar, config);
});
updateDisplayName(toolbar, config);

View File

@ -67,7 +67,7 @@ define([
displayed: displayed,
ifrw: ifrw,
common: Cryptpad,
hideDisplayName: true,
//hideDisplayName: true,
$container: $bar,
};

View File

@ -101,6 +101,7 @@ define([
displayName = $input.val();
if (displayName === obj[USERNAME_KEY]) { return; }
obj[USERNAME_KEY] = displayName;
Cryptpad.changeDisplayName(displayName);
$spinner.show();
Cryptpad.whenRealtimeSyncs(store.info.realtime, function () {
$spinner.hide();
@ -365,7 +366,6 @@ define([
displayed: displayed,
ifrw: window,
common: Cryptpad,
hideDisplayName: true,
$container: APP.$toolbar,
pageTitle: Messages.settings_title
};
@ -395,6 +395,7 @@ define([
obj.proxy.on('change', [], refresh);
obj.proxy.on('remove', [], refresh);
Cryptpad.onDisplayNameChanged(refresh);
createLeftside();
createUsageButton();