mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-23 16:29:47 +00:00
remove comments
This commit is contained in:
@@ -9,9 +9,6 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// User's avatar + name with a preview badge at the selected level, rendered via NameWithBadge
|
||||
// so the preview matches how the badge appears on the name elsewhere. Callers can inject a
|
||||
// picker affordance (e.g. a chevron) into the name row via `trailing`.
|
||||
struct BadgeUserPreview<Trailing: View>: View {
|
||||
@EnvironmentObject var chatModel: ChatModel
|
||||
let level: BadgeLevel
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Draft explanation of how private badges work. TODO [badges]: replace lorem ipsum with the real
|
||||
// copy once the badge protocol and privacy properties are documented.
|
||||
// TODO [badges]: replace lorem ipsum with the real copy once the badge protocol and privacy properties are documented.
|
||||
struct BadgesHowItWorksView: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Draft billing periods used by the badges UI while the API/state machine is still being designed.
|
||||
// TODO [badges]: replace with types produced by the badge purchase API when it lands.
|
||||
enum BadgePeriod: String, CaseIterable, Identifiable {
|
||||
case oneMonth
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Draft entry-point for redeeming an investor badge code. TODO [badges]: implement input field,
|
||||
// server verification and success/failure states when the redeem API is defined.
|
||||
// TODO [badges]: implement input field, server verification and success/failure states when the redeem API is defined.
|
||||
struct BadgesRedeemCodeView: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Entry point for badges management. Subsequent screens push via NavigationLink; the enclosing
|
||||
// NavigationView (settings or the chat-list banner sheet) provides the sliding animation.
|
||||
struct BadgesSupportSimplexView: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
@@ -130,8 +128,6 @@ struct BadgesSupportSimplexView: View {
|
||||
}
|
||||
}
|
||||
|
||||
// Hero image reused across badges views and WhatsNewView v7.1. Fallback (no SIMPLEX_ASSETS) is a
|
||||
// gradient card carrying the small supporter badge glyph.
|
||||
struct PhoneSupporterHero: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Draft levels used by the badges UI while the API/state machine is still being designed. TODO [badges]:
|
||||
// replace with types produced by the badge purchase API when it lands.
|
||||
// TODO [badges]: replace with types produced by the badge purchase API when it lands.
|
||||
enum BadgeLevel: String, CaseIterable, Identifiable {
|
||||
case supporter
|
||||
case legend
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
import SwiftUI
|
||||
import SimpleXChat
|
||||
|
||||
// Dumb chat-list card promoting the badges purchase flow. Both the show gate and the dismissal
|
||||
// persistence live in ChatListView; this view just renders and reports taps.
|
||||
struct SupportSimpleXBanner: View {
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
@Environment(\.colorScheme) var colorScheme: ColorScheme
|
||||
|
||||
-3
@@ -17,9 +17,6 @@ import chat.simplex.common.views.helpers.NameWithBadge
|
||||
import chat.simplex.common.views.helpers.ProfileImage
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// User's avatar + name with a preview badge at the selected level, rendered via NameWithBadge
|
||||
// so the preview matches how the badge appears on the name elsewhere. Callers can inject a
|
||||
// picker affordance (e.g. a chevron) into the name row via `trailing`.
|
||||
@Composable
|
||||
fun BadgeUserPreview(level: BadgeLevel, modifier: Modifier = Modifier, trailing: @Composable () -> Unit = {}) {
|
||||
val user = chatModel.currentUser.value
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import dev.icerock.moko.resources.compose.stringResource
|
||||
import chat.simplex.common.platform.ColumnWithScrollBar
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Draft explanation of how private badges work. TODO [badges]: replace lorem ipsum with the real
|
||||
// copy once the badge protocol and privacy properties are documented.
|
||||
// TODO [badges]: replace lorem ipsum with the real copy once the badge protocol and privacy properties are documented.
|
||||
@Composable
|
||||
fun BadgesHowItWorksView() {
|
||||
ColumnWithScrollBar(
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ import chat.simplex.common.views.helpers.*
|
||||
import chat.simplex.common.views.onboarding.OnboardingActionButton
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Draft billing periods used by the badges UI while the API/state machine is still being designed.
|
||||
// TODO [badges]: replace with types produced by the badge purchase API when it lands.
|
||||
enum class BadgePeriod {
|
||||
OneMonth,
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ import dev.icerock.moko.resources.compose.stringResource
|
||||
import chat.simplex.common.platform.ColumnWithScrollBar
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Draft entry-point for redeeming an investor badge code. TODO [badges]: implement input field,
|
||||
// server verification and success/failure states when the redeem API is defined.
|
||||
// TODO [badges]: implement input field, server verification and success/failure states when the redeem API is defined.
|
||||
@Composable
|
||||
fun BadgesRedeemCodeView() {
|
||||
ColumnWithScrollBar(
|
||||
|
||||
-4
@@ -30,8 +30,6 @@ import chat.simplex.common.views.onboarding.OnboardingActionButton
|
||||
import chat.simplex.common.views.onboarding.TextButtonBelowOnboardingButton
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Entry point for badges management. Subsequent screens push via ModalManager; the enclosing
|
||||
// modal (settings or the chat-list banner sheet) provides the sliding animation.
|
||||
@Composable
|
||||
fun BadgesSupportSimplexView() {
|
||||
// TODO [badges] gate on user badge status (no badge → this view, active → "Manage your badge")
|
||||
@@ -96,8 +94,6 @@ private fun ChooseLevelButton() {
|
||||
}
|
||||
|
||||
|
||||
// Hero image reused across badges views and WhatsNewView v7.1. Fallback (no SIMPLEX_ASSETS) is a
|
||||
// gradient card carrying the small supporter badge glyph.
|
||||
@Composable
|
||||
fun PhoneSupporterHero(modifier: Modifier = Modifier) {
|
||||
val isDark = isInDarkTheme()
|
||||
|
||||
+1
-2
@@ -23,8 +23,7 @@ import chat.simplex.common.views.onboarding.OnboardingActionButton
|
||||
import chat.simplex.common.views.onboarding.TextButtonBelowOnboardingButton
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Draft levels used by the badges UI while the API/state machine is still being designed. TODO [badges]:
|
||||
// replace with types produced by the badge purchase API when it lands.
|
||||
// TODO [badges]: replace with types produced by the badge purchase API when it lands.
|
||||
enum class BadgeLevel {
|
||||
Supporter,
|
||||
Legend;
|
||||
|
||||
-2
@@ -29,8 +29,6 @@ import chat.simplex.common.views.newchat.gradientPoints
|
||||
import chat.simplex.common.views.newchat.lightStops
|
||||
import chat.simplex.res.MR
|
||||
|
||||
// Dumb chat-list card promoting the badges purchase flow. Both the show gate and the dismissal
|
||||
// persistence live in ChatListView; this view just renders and reports taps.
|
||||
@Composable
|
||||
fun SupportSimpleXBanner(onTap: () -> Unit, onDismiss: () -> Unit) {
|
||||
val cardCornerRadius = 16.dp
|
||||
|
||||
Reference in New Issue
Block a user