diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 4d98d50e9b..b9ac440c7f 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -15354,3 +15354,16 @@ Error: %8$@"; "ScheduleMessage.PremiumRequired.Title" = "Premium Required"; "ScheduleMessage.PremiumRequired.Text" = "Subscribe to **Telegram Premium** to schedule repeating messages."; "ScheduleMessage.PremiumRequired.Add" = "Add"; + +"Stars.Transaction.GiftAuctionBid" = "Gift Auction Bid"; +"Stars.Intro.Transaction.GiftAuctionBid" = "Gift Auction Bid"; + +"Stars.Intro.Transaction.LiveStreamReaction" = "Live Stream Reaction"; +"Stars.Transaction.LiveStreamReaction" = "Live Stream Reaction"; +"Stars.Transaction.LiveStreamReaction.Text" = "You receive **%@%** of the amount of each reaction."; + +"Stars.Intro.Transaction.LiveStreamPaidMessage_1" = "Fee for %@ Live Stream Message"; +"Stars.Intro.Transaction.LiveStreamPaidMessage_any" = "Fee for %@ Live Stream Messages"; +"Stars.Transaction.LiveStreamPaidMessage_1" = "Fee for %@ Live Stream Message"; +"Stars.Transaction.LiveStreamPaidMessage_any" = "Fee for %@ Live Stream Messages"; +"Stars.Transaction.LiveStreamPaidMessage.Text" = "You receive **%@%** of the price that you charge for each incoming message."; diff --git a/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift b/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift index 5443b39d29..a6c8458664 100644 --- a/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift +++ b/submodules/TelegramUI/Components/Chat/ChatQrCodeScreen/Sources/ChatQrCodeScreen.swift @@ -890,7 +890,7 @@ private class ChatQrCodeScreenNode: ViewControllerTracingNode, ASScrollViewDeleg self.animationNode = AnimationNode(animation: self.isDarkAppearance ? "anim_sun_reverse" : "anim_sun", colors: iconColors(theme: self.presentationData.theme), scale: 1.0) self.animationNode.isUserInteractionEnabled = false - self.doneButton = SolidRoundedButtonNode(theme: SolidRoundedButtonTheme(theme: self.presentationData.theme), height: 52.0, cornerRadius: 11.0) + self.doneButton = SolidRoundedButtonNode(theme: SolidRoundedButtonTheme(theme: self.presentationData.theme), glass: true, height: 52.0, cornerRadius: 26.0) switch controller.subject { case .peer: self.doneButton.title = self.presentationData.strings.InviteLink_QRCode_Share diff --git a/submodules/TelegramUI/Components/ListSwitchItemComponent/Sources/ListSwitchItemComponent.swift b/submodules/TelegramUI/Components/ListSwitchItemComponent/Sources/ListSwitchItemComponent.swift index f72667e980..33eeb18f9d 100644 --- a/submodules/TelegramUI/Components/ListSwitchItemComponent/Sources/ListSwitchItemComponent.swift +++ b/submodules/TelegramUI/Components/ListSwitchItemComponent/Sources/ListSwitchItemComponent.swift @@ -57,9 +57,9 @@ public final class ListSwitchItemComponent: Component { self.state = state self.backgroundColor = component.theme.list.itemBlocksBackgroundColor - self.layer.cornerRadius = 12.0 + self.layer.cornerRadius = 26.0 - let size = CGSize(width: availableSize.width, height: 44.0) + let size = CGSize(width: availableSize.width, height: 52.0) let rightInset: CGFloat = 16.0 let leftInset: CGFloat = 16.0 let spacing: CGFloat = 8.0 diff --git a/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/EmojiListInputComponent.swift b/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/EmojiListInputComponent.swift index 6b0f0bb93f..07f3547936 100644 --- a/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/EmojiListInputComponent.swift +++ b/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/EmojiListInputComponent.swift @@ -174,7 +174,7 @@ final class EmojiListInputComponent: Component { let minSideInset: CGFloat = 12.0 self.backgroundColor = component.theme.list.itemBlocksBackgroundColor - self.layer.cornerRadius = 12.0 + self.layer.cornerRadius = 26.0 let maxItemsWidth = availableSize.width - minSideInset * 2.0 let itemsPerRow = Int(floor((maxItemsWidth + minItemSize * itemSpacingFactor) / (minItemSize + minItemSize * itemSpacingFactor))) diff --git a/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/PeerAllowedReactionsScreen.swift b/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/PeerAllowedReactionsScreen.swift index 47251d6b62..0842e3d366 100644 --- a/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/PeerAllowedReactionsScreen.swift +++ b/submodules/TelegramUI/Components/PeerAllowedReactionsScreen/Sources/PeerAllowedReactionsScreen.swift @@ -1259,6 +1259,7 @@ final class PeerAllowedReactionsScreenComponent: Component { transition: transition, component: AnyComponent(ListSectionComponent( theme: environment.theme, + style: .glass, header: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( string: environment.strings.PeerInfo_AllowedReactions_MaxCountSectionTitle, @@ -1350,6 +1351,7 @@ final class PeerAllowedReactionsScreenComponent: Component { transition: transition, component: AnyComponent(ListSectionComponent( theme: environment.theme, + style: .glass, header: nil, footer: AnyComponent(MultilineTextComponent( text: .plain(paidReactionsFooterText), @@ -1534,10 +1536,12 @@ final class PeerAllowedReactionsScreenComponent: Component { )))) } + let buttonInsets = ContainerViewLayout.concentricInsets(bottomInset: environment.safeInsets.bottom, innerDiameter: 52.0, sideInset: 30.0) let buttonSize = self.actionButton.update( transition: transition, component: AnyComponent(ButtonComponent( background: ButtonComponent.Background( + style: .glass, color: environment.theme.list.itemCheckColors.fillColor, foreground: environment.theme.list.itemCheckColors.foregroundColor, pressedColor: environment.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.8) @@ -1556,7 +1560,7 @@ final class PeerAllowedReactionsScreenComponent: Component { } )), environment: {}, - containerSize: CGSize(width: availableSize.width - sideInset * 2.0, height: 50.0) + containerSize: CGSize(width: availableSize.width - buttonInsets.left - buttonInsets.right, height: 52.0) ) contentHeight += buttonSize.height @@ -1650,7 +1654,7 @@ final class PeerAllowedReactionsScreenComponent: Component { buttonY = availableSize.height - bottomInset - environment.safeInsets.bottom - buttonSize.height } - let buttonFrame = CGRect(origin: CGPoint(x: sideInset, y: buttonY), size: buttonSize) + let buttonFrame = CGRect(origin: CGPoint(x: buttonInsets.left, y: buttonY), size: buttonSize) if let buttonView = self.actionButton.view { if buttonView.superview == nil { self.addSubview(buttonView) diff --git a/submodules/TelegramUI/Components/PeerInfo/PostSuggestionsSettingsScreen/Sources/PostSuggestionsSettingsScreen.swift b/submodules/TelegramUI/Components/PeerInfo/PostSuggestionsSettingsScreen/Sources/PostSuggestionsSettingsScreen.swift index 18ae438dcf..2ee1e33879 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PostSuggestionsSettingsScreen/Sources/PostSuggestionsSettingsScreen.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PostSuggestionsSettingsScreen/Sources/PostSuggestionsSettingsScreen.swift @@ -17,7 +17,6 @@ import ListSectionComponent import BundleIconComponent import LottieComponent import ListSwitchItemComponent -import ListSwitchItemComponent import ListActionItemComponent import Markdown import TelegramStringFormatting diff --git a/submodules/TelegramUI/Components/Settings/CollectibleItemInfoScreen/Sources/CollectibleItemInfoScreen.swift b/submodules/TelegramUI/Components/Settings/CollectibleItemInfoScreen/Sources/CollectibleItemInfoScreen.swift index 13caa5adc4..8ad146fd48 100644 --- a/submodules/TelegramUI/Components/Settings/CollectibleItemInfoScreen/Sources/CollectibleItemInfoScreen.swift +++ b/submodules/TelegramUI/Components/Settings/CollectibleItemInfoScreen/Sources/CollectibleItemInfoScreen.swift @@ -425,6 +425,7 @@ private final class CollectibleItemInfoScreenContentComponent: Component { transition: transition, component: AnyComponent(ButtonComponent( background: ButtonComponent.Background( + style: .glass, color: environment.theme.list.itemCheckColors.fillColor, foreground: environment.theme.list.itemCheckColors.foregroundColor, pressedColor: environment.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.8) @@ -450,9 +451,9 @@ private final class CollectibleItemInfoScreenContentComponent: Component { } )), environment: {}, - containerSize: CGSize(width: availableSize.width - sideInset * 2.0, height: 50.0) + containerSize: CGSize(width: availableSize.width - 30.0 * 2.0, height: 52.0) ) - let buttonFrame = CGRect(origin: CGPoint(x: sideInset, y: contentHeight), size: buttonSize) + let buttonFrame = CGRect(origin: CGPoint(x: 30.0, y: contentHeight), size: buttonSize) if let buttonView = self.button.view { if buttonView.superview == nil { self.addSubview(buttonView) @@ -618,6 +619,7 @@ private final class CollectibleItemInfoScreenComponent: Component { }) } )), + style: .glass, backgroundColor: .color(environment.theme.list.plainBackgroundColor), animateOut: self.sheetAnimateOut )), diff --git a/submodules/TelegramUI/Components/Stars/StarsTransactionScreen/Sources/StarsTransactionScreen.swift b/submodules/TelegramUI/Components/Stars/StarsTransactionScreen/Sources/StarsTransactionScreen.swift index e0b9a853aa..ef4d1c7bae 100644 --- a/submodules/TelegramUI/Components/Stars/StarsTransactionScreen/Sources/StarsTransactionScreen.swift +++ b/submodules/TelegramUI/Components/Stars/StarsTransactionScreen/Sources/StarsTransactionScreen.swift @@ -354,7 +354,11 @@ private final class StarsTransactionSheetContent: CombinedComponent { if let starGift = transaction.starGift { switch starGift { case .generic: - titleText = strings.Stars_Transaction_Gift_Title + if transaction.flags.contains(.isStarGiftAuctionBid) { + titleText = strings.Stars_Transaction_GiftAuctionBid + } else { + titleText = strings.Stars_Transaction_Gift_Title + } descriptionText = "" case let .unique(gift): titleText = gift.title @@ -418,7 +422,24 @@ private final class StarsTransactionSheetContent: CombinedComponent { isGift = true } else if let starrefCommissionPermille = transaction.starrefCommissionPermille { isRefProgram = true - if transaction.flags.contains(.isPaidMessage) { + if transaction.flags.contains(.isLiveStreamPaidMessage) { + isPaidMessage = true + if transaction.flags.contains(.isReaction) { + titleText = strings.Stars_Transaction_LiveStreamReaction + } else { + titleText = strings.Stars_Transaction_LiveStreamPaidMessage(transaction.paidMessageCount ?? 1) + } + if !transaction.flags.contains(.isRefund) { + countOnTop = true + if transaction.flags.contains(.isReaction) { + descriptionText = strings.Stars_Transaction_LiveStreamReaction_Text(formatPermille(1000 - starrefCommissionPermille)).string + } else { + descriptionText = strings.Stars_Transaction_LiveStreamPaidMessage_Text(formatPermille(1000 - starrefCommissionPermille)).string + } + } else { + descriptionText = "" + } + } else if transaction.flags.contains(.isPaidMessage) { isPaidMessage = true titleText = strings.Stars_Transaction_PaidMessage(transaction.paidMessageCount ?? 1) if !transaction.flags.contains(.isRefund) { @@ -468,6 +489,13 @@ private final class StarsTransactionSheetContent: CombinedComponent { if let months = transaction.premiumGiftMonths { premiumGiftMonths = months titleText = strings.Stars_Transaction_TelegramPremium(months) + } else if transaction.flags.contains(.isLiveStreamPaidMessage) { + isPaidMessage = true + if transaction.flags.contains(.isReaction) { + titleText = strings.Stars_Transaction_LiveStreamReaction + } else { + titleText = strings.Stars_Transaction_LiveStreamPaidMessage(transaction.paidMessageCount ?? 1) + } } else if transaction.flags.contains(.isPaidMessage) { isPaidMessage = true titleText = strings.Stars_Transaction_PaidMessage(transaction.paidMessageCount ?? 1) diff --git a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift index ee625122fd..25aaa96892 100644 --- a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift +++ b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift @@ -311,11 +311,21 @@ final class StarsTransactionsListPanelComponent: Component { itemTitle = environment.strings.Stars_Intro_Transaction_SearchFee itemSubtitle = "" itemPeer = .search + } else if item.flags.contains(.isLiveStreamPaidMessage) { + itemTitle = peer.displayTitle(strings: environment.strings, displayOrder: .firstLast) + if item.flags.contains(.isReaction) { + itemSubtitle = environment.strings.Stars_Intro_Transaction_LiveStreamReaction + } else { + itemSubtitle = environment.strings.Stars_Intro_Transaction_LiveStreamPaidMessage(item.paidMessageCount ?? 1) + } } else if item.flags.contains(.isPaidMessage) { itemTitle = peer.displayTitle(strings: environment.strings, displayOrder: .firstLast) itemSubtitle = environment.strings.Stars_Intro_Transaction_PaidMessage(item.paidMessageCount ?? 1) } else if let starGift = item.starGift { - if item.flags.contains(.isStarGiftPrepaidUpgrade) { + if item.flags.contains(.isStarGiftAuctionBid), case let .generic(gift) = starGift { + itemTitle = gift.title ?? "Gift" + itemSubtitle = environment.strings.Stars_Intro_Transaction_GiftAuctionBid + } else if item.flags.contains(.isStarGiftPrepaidUpgrade) { itemTitle = peer.displayTitle(strings: environment.strings, displayOrder: .firstLast) itemSubtitle = environment.strings.Stars_Intro_Transaction_PrepaidGiftUpgrade } else if item.flags.contains(.isStarGiftDropOriginalDetails), case let .unique(gift) = starGift { diff --git a/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift b/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift index 6f8141ddb2..8ce36001b8 100644 --- a/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift +++ b/submodules/TelegramUI/Sources/OverlayPlayerControlsNode.swift @@ -1126,10 +1126,10 @@ final class OverlayPlayerControlsNode: ASDisplayNode { } else { profileAudioComponent = AnyComponent(ButtonComponent( background: ButtonComponent.Background( + style: .glass, color: self.presentationData.theme.list.itemCheckColors.fillColor, foreground: self.presentationData.theme.list.itemCheckColors.foregroundColor, pressedColor: self.presentationData.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.9), - cornerRadius: 10.0 ), content: AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent( HStack([