mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improved phrases in top bar from box for giveaway creation with credits.
This commit is contained in:
parent
5196982c98
commit
1e8e660133
2 changed files with 16 additions and 5 deletions
|
@ -2747,6 +2747,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_giveaway_new_title" = "Boosts via Gifts";
|
"lng_giveaway_new_title" = "Boosts via Gifts";
|
||||||
"lng_giveaway_new_about" = "Get more boosts for your channel by gifting Premium to your subscribers.";
|
"lng_giveaway_new_about" = "Get more boosts for your channel by gifting Premium to your subscribers.";
|
||||||
"lng_giveaway_new_about_group" = "Get more boosts for your group by gifting Premium to your subscribers.";
|
"lng_giveaway_new_about_group" = "Get more boosts for your group by gifting Premium to your subscribers.";
|
||||||
|
"lng_giveaway_credits_new_about" = "Get more boosts and subscribers for your channel by giving away prizes.";
|
||||||
|
"lng_giveaway_credits_new_about_group" = "Get more boosts and members for your group by giving away prizes.";
|
||||||
"lng_giveaway_create_option" = "Create Giveaway";
|
"lng_giveaway_create_option" = "Create Giveaway";
|
||||||
"lng_giveaway_create_subtitle" = "winners are chosen randomly";
|
"lng_giveaway_create_subtitle" = "winners are chosen randomly";
|
||||||
"lng_giveaway_award_option" = "Award Specific Users";
|
"lng_giveaway_award_option" = "Award Specific Users";
|
||||||
|
|
|
@ -113,7 +113,7 @@ void AddPremiumTopBarWithDefaultTitleBar(
|
||||||
not_null<Ui::GenericBox*> box,
|
not_null<Ui::GenericBox*> box,
|
||||||
rpl::producer<> showFinished,
|
rpl::producer<> showFinished,
|
||||||
rpl::producer<QString> titleText,
|
rpl::producer<QString> titleText,
|
||||||
bool group) {
|
rpl::producer<TextWithEntities> subtitleText) {
|
||||||
struct State final {
|
struct State final {
|
||||||
Ui::Animations::Simple animation;
|
Ui::Animations::Simple animation;
|
||||||
Ui::Text::String title;
|
Ui::Text::String title;
|
||||||
|
@ -200,9 +200,7 @@ void AddPremiumTopBarWithDefaultTitleBar(
|
||||||
Ui::Premium::TopBarDescriptor{
|
Ui::Premium::TopBarDescriptor{
|
||||||
.clickContextOther = nullptr,
|
.clickContextOther = nullptr,
|
||||||
.title = tr::lng_giveaway_new_title(),
|
.title = tr::lng_giveaway_new_title(),
|
||||||
.about = (group
|
.about = std::move(subtitleText),
|
||||||
? tr::lng_giveaway_new_about_group
|
|
||||||
: tr::lng_giveaway_new_about)(Ui::Text::RichLangValue),
|
|
||||||
.light = true,
|
.light = true,
|
||||||
.optimizeMinistars = false,
|
.optimizeMinistars = false,
|
||||||
});
|
});
|
||||||
|
@ -323,7 +321,18 @@ void CreateGiveawayBox(
|
||||||
hideSpecificUsersOn(),
|
hideSpecificUsersOn(),
|
||||||
tr::lng_giveaway_start(),
|
tr::lng_giveaway_start(),
|
||||||
tr::lng_giveaway_award()),
|
tr::lng_giveaway_award()),
|
||||||
peer->isMegagroup());
|
rpl::conditional(
|
||||||
|
isPrepaidCredits
|
||||||
|
? rpl::single(true)
|
||||||
|
: state->typeValue.value() | rpl::map(
|
||||||
|
rpl::mappers::_1 == GiveawayType::Credits),
|
||||||
|
(peer->isMegagroup()
|
||||||
|
? tr::lng_giveaway_credits_new_about_group()
|
||||||
|
: tr::lng_giveaway_credits_new_about()),
|
||||||
|
(peer->isMegagroup()
|
||||||
|
? tr::lng_giveaway_new_about_group()
|
||||||
|
: tr::lng_giveaway_new_about())
|
||||||
|
) | rpl::map(Ui::Text::RichLangValue));
|
||||||
{
|
{
|
||||||
const auto &padding = st::giveawayGiftCodeCoverDividerPadding;
|
const auto &padding = st::giveawayGiftCodeCoverDividerPadding;
|
||||||
Ui::AddSkip(box->verticalLayout(), padding.bottom());
|
Ui::AddSkip(box->verticalLayout(), padding.bottom());
|
||||||
|
|
Loading…
Add table
Reference in a new issue