Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,8 @@ define({
"CHECKING": "Checking\u2026",
"CHECKING_STATUS": "Checking login status\u2026",
"NOT_SIGNED_IN_YET": "Not signed in yet. Please complete sign-in in the other tab.",
"WELCOME_BACK": "Welcome back, {0}!",
"WELCOME_BACK": "Welcome back",
"WELCOME_BACK_USER": "Welcome back, {0}!",
"POPUP_BLOCKED": "Pop-up blocked. Please allow pop-ups and try again, or manually navigate to {0}",

// Collapse Folders
Expand Down
6 changes: 5 additions & 1 deletion src/services/login-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,12 @@ define(function (require, exports, module) {
function _onLoginSuccess() {
if (loginWaitingDialog) {
const $template = loginWaitingDialog.getElement();
const welcomeBackMessage = Phoenix.isNativeApp ?
StringUtils.format(Strings.WELCOME_BACK_USER, userProfile.firstName): Strings.WELCOME_BACK;
// in desktop app, the apis return full username so we can show `Welcome back, alice`, but in
// browser app, we only get name like `a***` due to security posture, so we show `Welcome back` in browser.
$template.find('#login-status')
.text(StringUtils.format(Strings.WELCOME_BACK, userProfile.firstName))
.text(welcomeBackMessage)
.css('color', '#10b981');
setTimeout(() => {
_cancelLoginWaiting();
Expand Down
Loading