diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-10-18 23:59:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 23:59:17 +0300 |
commit | 0f742298deab3d2718a532fe36a473d2d3a6b38c (patch) | |
tree | e5bb1724ebe0db3b5f626ceb34dd9020f3816588 | |
parent | ddb2c93818fe1132116c6efaebc9bd3afd012187 (diff) |
SL-20376 Clarify group membership status and leave-group confirmation dialog
-rw-r--r-- | indra/newview/llgroupactions.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpanelgroup.cpp | 21 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 18 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_general.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 8 |
5 files changed, 50 insertions, 14 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 5db8424b99..1cdac686d7 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -366,7 +366,16 @@ void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id) args["GROUP"] = gdatap->mName; LLSD payload; payload["group_id"] = group_id; - LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup); + if (gdatap->mMembershipFee > 0) + { + args["COST"] = gdatap->mMembershipFee; + LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup); + } + else + { + LLNotificationsUtil::add("GroupLeaveConfirmMemberNoFee", args, payload, onLeaveGroup); + } + } // static diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 57742f16a7..0ab0d85c78 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -273,8 +273,15 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data) void LLPanelGroup::onBtnJoin() { - LL_DEBUGS() << "joining group: " << mID << LL_ENDL; - LLGroupActions::join(mID); + if (LLGroupActions::isInGroup(mID)) + { + LLGroupActions::leave(mID); + } + else + { + LL_DEBUGS() << "joining group: " << mID << LL_ENDL; + LLGroupActions::join(mID); + } } void LLPanelGroup::changed(LLGroupChange gc) @@ -312,12 +319,17 @@ void LLPanelGroup::update(LLGroupChange gc) LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery(); - bool join_btn_visible = !is_member && gdatap->mOpenEnrollment; + bool join_btn_visible = is_member || gdatap->mOpenEnrollment; mButtonJoin->setVisible(join_btn_visible); mJoinText->setVisible(join_btn_visible); - if(join_btn_visible) + if (is_member) + { + mJoinText->setValue(getString("group_member")); + mButtonJoin->setLabel(getString("leave_txt")); + } + else if(join_btn_visible) { LLStringUtil::format_map_t string_args; std::string fee_buff; @@ -332,6 +344,7 @@ void LLPanelGroup::update(LLGroupChange gc) fee_buff = getString("group_join_free", string_args); } mJoinText->setValue(fee_buff); + mButtonJoin->setLabel(getString("join_txt")); } } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5115bcb27f..7b1449ea92 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4399,8 +4399,22 @@ Are you sure you want to return the selected objects to their owners? Transferab icon="alert.tga" name="GroupLeaveConfirmMember" type="alert"> -You are currently a member of the group <nolink>[GROUP]</nolink>. -Leave Group? +Leave the group '<nolink>[GROUP]</nolink>'? +Currently, the fee to join this "group" is L$ [COST]. + <tag>group</tag> + <tag>confirm</tag> + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="OK"/> + </notification> + + <notification + icon="alert.tga" + name="GroupLeaveConfirmMemberNoFee" + type="alert"> +Leave the group '<nolink>[GROUP]</nolink>'? +There is currently no fee to join this group. <tag>group</tag> <tag>confirm</tag> <usetemplate diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index 5eafb5cdf1..472eb319bb 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -65,7 +65,7 @@ Hover your mouse over the options for more help. width="168" /> <text font="SansSerifMedium" - text_color="EmphasisColor" + text_color="white" type="string" follows="left|top" height="16" @@ -75,14 +75,14 @@ Hover your mouse over the options for more help. top_pad="10" visible="true" width="190"> - Free + No charge to join </text> <button follows="left|top" left_delta="0" top_pad="6" height="23" - label="JOIN NOW!" + label="Join group" name="btn_join" visible="true" width="120" /> diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 05de249d22..d2b0eb4b7c 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -22,10 +22,10 @@ background_visible="true" name="group_join_btn"> Join (L$[AMOUNT]) </panel.string> - <panel.string - name="group_join_free"> - Free - </panel.string> + <panel.string name="group_join_free">No charge to join</panel.string> + <panel.string name="group_member">You are a member</panel.string> + <panel.string name="join_txt">Join group</panel.string> + <panel.string name="leave_txt">Leave</panel.string> <panel name="group_info_top" follows="top|left" |