From 7c5d27d7cee1b2e71f250b270c54808c40bfda5b Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 9 Feb 2022 19:59:30 +0300 Subject: [PATCH] Add "Telegram Features" to the main settings page. --- Telegram/Resources/icons/settings/tips.png | Bin 0 -> 403 bytes Telegram/Resources/icons/settings/tips@2x.png | Bin 0 -> 684 bytes Telegram/Resources/icons/settings/tips@3x.png | Bin 0 -> 915 bytes Telegram/Resources/langs/lang.strings | 2 ++ Telegram/SourceFiles/settings/settings.style | 1 + Telegram/SourceFiles/settings/settings_main.cpp | 11 ++++++++++- 6 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Telegram/Resources/icons/settings/tips.png create mode 100644 Telegram/Resources/icons/settings/tips@2x.png create mode 100644 Telegram/Resources/icons/settings/tips@3x.png diff --git a/Telegram/Resources/icons/settings/tips.png b/Telegram/Resources/icons/settings/tips.png new file mode 100644 index 0000000000000000000000000000000000000000..505aac9510fde3c7884eb33ff7b9132285d57f1a GIT binary patch literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1SIoCSFHz9jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uv49!D1}S`GTDlfU{q=Nl46zV= z8|296;vkTcTf@L!ZvIinzUUKU{)B?^1Ff(BHMneI?`*!?B|3BFyvWVf*Osq)wd&I4 zM2YafwTzcd9$Tzi^=hZ6l*5GmtiSffiyZA1@#rbp{2?;)l)9Mm-Mt@JHgUN-EZ8b? z?%+?31_y19s_glET33*t+VD~-YufwG4<^_ zDWA(zmaTkj(VigVK7n0C>gmmErMjnu_<5Qb=GmN|tiq`Iqcl;Xt$*!>7gc(5Uoqu> XD3gnvJ?ZOGP=I*4`njxgN@xNA*-($` literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/settings/tips@2x.png b/Telegram/Resources/icons/settings/tips@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..af7604a24e82fdefb47cb1af0403b8c9b018962e GIT binary patch literal 684 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1SD@H2K8|TrRb8Bq>I5>?`AUIV55H zc`{PDy~ z8d*FpF7=xXS30c}`9E1)MXhTBPww{H4%2NFfUKL_&VCaV=u}d1?mnt?A(cN#urg(R z*y`!0UGHvw6?#GO&^;fPLZg{0f>(t*_6z*=<%mE2w{HD8t!P%mfBo8K&5OU)*qz>V z>d^v$^BI17cimlgZ7N4XfW^!gbINw_z5O=jtH9$1MxXF+6Xz)Jh|merYutP@XY6gA`6MbbHUh!1UMC#W5s< z^=;Jte#1bK*!@;5W!zi+6uA}#t}t07)akbH^Ky1_m+;V62>u-)f{#Zt?zrNn|rPcBKvu!VX_lfo!#m>F+$>y`AXT_%b zW(r*mG3Vm$MpkU>GI`l$|NL&RYx6ob7aNU*zsv4CK5X^jU6-dyxLu!+Mu~s-#~qg~ zYV^CVuD$(s-}I$cKtY#eMYA?j>$USjMRp2oG<@T-#%syb$=rg{hre~HUD4`_>DY1c z&in6i>#wi!a{BkM;KR=v7KM*}mNG8xYrIs%mCUx?%zD@c+ZfRsVu3O|QdOO1;r{1)-tKI=)xf+}eIgfo1I? z1Kxr^`z+_5Kl{GnkH(6)N9>pLlmFEHudtaGu78S!bA`!_wG){pyZ>F>a!hhX<@bqR zOF#XzIk?_$xv^9)heO*2<~F{B!_jNQKBh)~so2r0EGh8G?`A;Tzl4nud#36MGX|`e zI@`U`L&fQ`J6qSO%sig^Z(OFHd7QGKBkc2Ixm2!JrGvF_5{ci-2)ILxUh$|-pcDMfzopr0CCZas{jB1 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 46da8ec3c..ba5d9f1ae 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -3034,6 +3034,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_sponsored_info_description1" = "Unlike other apps, Telegram never uses your private data to target ads. Sponsored messages on Telegram are based solely on the topic of the public channels in which they are shown. This means that no user data is mined or analyzed to display ads, and every user viewing a channel on Telegram sees the same sponsored messages.\n\nUnlike other apps, Telegram doesn't track whether you tapped on a sponsored message and doesn't profile you based on your activity. We also prevent external links in sponsored messages to ensure that third parties can’t spy on our users. We believe that everyone has the right to privacy, and technological platforms should respect that.\n\nTelegram offers a free and unlimited service to hundreds of millions of users, which involves significant server and traffic costs. In order to remain independent and stay true to its values, Telegram developed a paid tool to promote messages with user privacy in mind. We welcome responsible advertisers at:"; "lng_sponsored_info_description2" = "Sponsored Messages are currently in test mode. Once they are fully launched and allow Telegram to cover its basic costs, we will start sharing ad revenue with the owners of public channels in which sponsored messages are displayed.\n\nOnline ads should no longer be synonymous with abuse of user privacy. Let us redefine how a tech company should operate – together."; +"lng_telegram_features_url" = "https://t.me/TelegramTips"; + // Wnd specific "lng_wnd_choose_program_menu" = "Choose Default Program..."; diff --git a/Telegram/SourceFiles/settings/settings.style b/Telegram/SourceFiles/settings/settings.style index 594a50e85..6ead14055 100644 --- a/Telegram/SourceFiles/settings/settings.style +++ b/Telegram/SourceFiles/settings/settings.style @@ -62,6 +62,7 @@ settingsIconInterfaceScale: icon {{ "settings/interface_scale", settingsIconFg } settingsIconFaq: icon {{ "settings/faq", settingsIconFg }}; settingsIconCalls: icon {{ "settings/calls", settingsIconFg }}; settingsIconAskQuestion: icon {{ "settings/ask_question", settingsIconFg }}; +settingsIconTips: icon {{ "settings/tips", settingsIconFg }}; settingsIconStickers: icon {{ "settings/stickers", settingsIconFg }}; settingsIconEmoji: icon {{ "settings/emoji", settingsIconFg }}; settingsIconThemes: icon {{ "settings/palette", settingsIconFg }}; diff --git a/Telegram/SourceFiles/settings/settings_main.cpp b/Telegram/SourceFiles/settings/settings_main.cpp index f32130c00..801e9d7ec 100644 --- a/Telegram/SourceFiles/settings/settings_main.cpp +++ b/Telegram/SourceFiles/settings/settings_main.cpp @@ -466,11 +466,20 @@ void SetupHelp( SetupFaq(container); + AddButton( + container, + rpl::single(u"Telegram Features"_q), + st::settingsSectionButton, + { &st::settingsIconTips, kIconLightOrange } + )->setClickedCallback([=] { + UrlClickHandler::Open(tr::lng_telegram_features_url(tr::now)); + }); + const auto button = AddButton( container, tr::lng_settings_ask_question(), st::settingsSectionButton, - { &st::settingsIconAskQuestion, kIconLightOrange }); + { &st::settingsIconAskQuestion, kIconGreen }); const auto requestId = button->lifetime().make_state(); button->lifetime().add([=] { if (*requestId) {