Added link to terms to box of credits history entries.

This commit is contained in:
23rd 2024-05-25 03:11:58 +03:00 committed by John Preston
parent 0bd780b20f
commit c942034ca4
3 changed files with 23 additions and 0 deletions

View file

@ -2316,6 +2316,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_credits_box_out_sure#other" = "Do you want to buy **\"{text}\"** in **{bot}** for **{count} Stars**?";
"lng_credits_box_out_confirm#one" = "Confirm and Pay {emoji} {count} Star";
"lng_credits_box_out_confirm#other" = "Confirm and Pay {emoji} {count} Stars";
"lng_credits_box_out_about" = "Review the {link} for Stars.";
"lng_credits_summary_in_toast_title" = "Stars Acquired";
"lng_credits_summary_in_toast_about#one" = "**{count}** Star added to your balance.";
"lng_credits_summary_in_toast_about#other" = "**{count}** Stars added to your balance.";

View file

@ -481,6 +481,24 @@ void ReceiptCreditsBox(
box->verticalLayout(),
e);
Ui::AddSkip(content);
box->addRow(object_ptr<Ui::CenterWrap<>>(
box,
object_ptr<Ui::FlatLabel>(
box,
tr::lng_credits_box_out_about(
lt_link,
tr::lng_payments_terms_link(
) | rpl::map([](const QString &t) {
using namespace Ui::Text;
return Link(t, u"https://telegram.org/tos"_q);
}),
Ui::Text::WithEntities),
st::creditsBoxAboutDivider)));
Ui::AddSkip(content);
const auto button = box->addButton(tr::lng_box_ok(), [=] {
box->closeBox();
});

View file

@ -39,3 +39,7 @@ creditsBoxAbout: FlatLabel(defaultFlatLabel) {
creditsBoxAboutTitle: FlatLabel(settingsPremiumUserTitle) {
minWidth: 256px;
}
creditsBoxAboutDivider: FlatLabel(boxDividerLabel) {
align: align(top);
}