diff --git a/Telegram/Resources/icons/profile/profile_manage.png b/Telegram/Resources/icons/profile/profile_manage.png new file mode 100644 index 0000000000..38f1a731dd Binary files /dev/null and b/Telegram/Resources/icons/profile/profile_manage.png differ diff --git a/Telegram/Resources/icons/profile/profile_manage@2x.png b/Telegram/Resources/icons/profile/profile_manage@2x.png new file mode 100644 index 0000000000..e5ab30a518 Binary files /dev/null and b/Telegram/Resources/icons/profile/profile_manage@2x.png differ diff --git a/Telegram/Resources/icons/profile/profile_manage@3x.png b/Telegram/Resources/icons/profile/profile_manage@3x.png new file mode 100644 index 0000000000..8bf97111c7 Binary files /dev/null and b/Telegram/Resources/icons/profile/profile_manage@3x.png differ diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 289cb3c6e9..1e7e095af4 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1694,6 +1694,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_profile_action_short_report" = "Report"; "lng_profile_action_short_leave" = "Leave"; "lng_profile_action_short_more" = "More"; +"lng_profile_action_short_manage" = "Manage"; "lng_media_type_photos" = "Photos"; "lng_media_type_gifs" = "GIFs"; diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index b837fd8328..6296e670b2 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -453,6 +453,7 @@ infoProfileTopBarActionJoin: icon{{ "profile/join-23x23", windowBoldFg }}; infoProfileTopBarActionReport: icon{{ "profile/report-23x23", windowBoldFg }}; infoProfileTopBarActionLeave: icon{{ "profile/leave-23x23", windowBoldFg }}; infoProfileTopBarActionMore: icon{{ "profile/profile_more", windowBoldFg }}; +infoProfileTopBarActionManage: icon{{ "profile/profile_manage", windowBoldFg }}; infoProfileTopBarTopicStatusButton: RoundButton(defaultTableSmallButton) { radius: 4px; diff --git a/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp b/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp index 48bee5a7c6..dccaf31ea2 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp @@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/timer_rpl.h" #include "base/timer.h" #include "base/unixtime.h" +#include "boxes/peers/edit_peer_info_box.h" // EditPeerInfoBox::Available. #include "boxes/moderate_messages_box.h" #include "boxes/report_messages_box.h" #include "boxes/star_gift_box.h" @@ -793,6 +794,20 @@ void TopBar::setupActions(not_null controller) { if (chechMax()) { return; } + if (EditPeerInfoBox::Available(peer)) { + const auto manage = Ui::CreateChild( + this, + tr::lng_profile_action_short_manage(tr::now), + st::infoProfileTopBarActionManage); + manage->setClickedCallback([=, window = controller] { + window->showEditPeerBox(peer); + }); + buttons.push_back(manage); + _actions->add(manage); + } + if (chechMax()) { + return; + } { const auto channel = peer->asBroadcast(); if (!user && !channel) {