summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-07-17 23:17:29 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-07-17 23:18:04 +0300
commit4c848c8258aa0f8a29aed0bebf9cdbcf32a2c96f (patch)
tree6b0d38fd8d65d7d2a2689a8b9137e9e90af63986 /indra/newview/llpanelprofile.cpp
parentc37140dd89051317216bbf7a2cb08198c62535e0 (diff)
parentec4135da63a3f3877222fba4ecb59b15650371fe (diff)
Merge branch 'main' (DRTVWR-580) into DRTVWR-587-maint-V
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp60
1 files changed, 58 insertions, 2 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 708ff26ced..8ac1efe8e7 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -159,6 +159,7 @@ void request_avatar_properties_coro(std::string cap_url, LLUUID agent_id)
avatar_data->fl_about_text = result["fl_about_text"].asString();
avatar_data->born_on = result["member_since"].asDate();
avatar_data->profile_url = getProfileURL(agent_id.asString());
+ avatar_data->customer_type = result["customer_type"].asString();
avatar_data->flags = 0;
@@ -1051,6 +1052,8 @@ void LLPanelProfileSecondLife::resetData()
mCantEditObjectsIcon->setEnabled(false);
childSetVisible("partner_layout", FALSE);
+ childSetVisible("badge_layout", FALSE);
+ childSetVisible("partner_spacer_layout", TRUE);
}
void LLPanelProfileSecondLife::processProfileProperties(const LLAvatarData* avatar_data)
@@ -1258,6 +1261,59 @@ void LLPanelProfileSecondLife::fillAccountStatus(const LLAvatarData* avatar_data
std::string caption_text = getString("CaptionTextAcctInfo", args);
getChild<LLUICtrl>("account_info")->setValue(caption_text);
+
+ const S32 LINDEN_EMPLOYEE_INDEX = 3;
+ LLDate sl_release;
+ sl_release.fromYMDHMS(2003, 6, 23, 0, 0, 0);
+ std::string customer_lower = avatar_data->customer_type;
+ LLStringUtil::toLower(customer_lower);
+ if (avatar_data->caption_index == LINDEN_EMPLOYEE_INDEX)
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Linden");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLinden"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (avatar_data->born_on < sl_release)
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBeta"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "beta_lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Beta_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeBetaLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "lifetime")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgeLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "secondlifetime_premium")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Premium_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else if (customer_lower == "secondlifetime_premium_plus")
+ {
+ getChild<LLUICtrl>("badge_icon")->setValue("Profile_Badge_Pplus_Lifetime");
+ getChild<LLUICtrl>("badge_text")->setValue(getString("BadgePremiumPlusLifetime"));
+ childSetVisible("badge_layout", TRUE);
+ childSetVisible("partner_spacer_layout", FALSE);
+ }
+ else
+ {
+ childSetVisible("badge_layout", FALSE);
+ childSetVisible("partner_spacer_layout", TRUE);
+ }
}
void LLPanelProfileSecondLife::fillRightsData()
@@ -1412,7 +1468,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
}
else
{
- childSetVisible("frind_layout", false);
+ childSetVisible("friend_layout", false);
childSetVisible("online_layout", false);
childSetVisible("offline_layout", false);
}
@@ -1420,7 +1476,7 @@ void LLPanelProfileSecondLife::updateOnlineStatus()
void LLPanelProfileSecondLife::processOnlineStatus(bool is_friend, bool show_online, bool online)
{
- childSetVisible("frind_layout", is_friend);
+ childSetVisible("friend_layout", is_friend);
childSetVisible("online_layout", online && show_online);
childSetVisible("offline_layout", !online && show_online);
}