Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Bitkit/Views/Widgets/BlocksWidgetPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ struct BlocksWidgetPreviewView: View {

@StateObject private var viewModel = BlocksViewModel.shared

@State private var carouselPage: Int = 0
// TODO: revert to 0 to re-enable the compact widget preview
@State private var carouselPage: Int = 1
@State private var showDeleteAlert = false

private let widgetType: WidgetType = .blocks
Expand Down Expand Up @@ -51,8 +52,10 @@ struct BlocksWidgetPreviewView: View {
carousel

sizeLabel
.padding(.bottom, 16)
Comment on lines 54 to +55
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This label alone doesn't make any sense in this state, better to hide it too.


pageIndicator
// Page indicator hidden while only the wide widget is shown
// pageIndicator
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

Expand Down Expand Up @@ -111,7 +114,8 @@ struct BlocksWidgetPreviewView: View {

private var carousel: some View {
TabView(selection: $carouselPage) {
compactPage.tag(0)
// Compact preview temporarily hidden — only the wide widget can be added for now
// compactPage.tag(0)
widePage.tag(1)
}
.tabViewStyle(.page(indexDisplayMode: .never))
Expand Down
10 changes: 7 additions & 3 deletions Bitkit/Views/Widgets/FactsWidgetPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ struct FactsWidgetPreviewView: View {

@StateObject private var viewModel = FactsViewModel.shared

@State private var carouselPage: Int = 0
// TODO: revert to 0 to re-enable the compact widget preview
@State private var carouselPage: Int = 1
@State private var showDeleteAlert = false

private let widgetType: WidgetType = .facts
Expand All @@ -34,8 +35,10 @@ struct FactsWidgetPreviewView: View {
carousel

sizeLabel
.padding(.bottom, 16)

pageIndicator
// Page indicator hidden while only the wide widget is shown
// pageIndicator
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

Expand All @@ -60,7 +63,8 @@ struct FactsWidgetPreviewView: View {

private var carousel: some View {
TabView(selection: $carouselPage) {
compactPage.tag(0)
// Compact preview temporarily hidden — only the wide widget can be added for now
// compactPage.tag(0)
widePage.tag(1)
}
.tabViewStyle(.page(indexDisplayMode: .never))
Expand Down
12 changes: 8 additions & 4 deletions Bitkit/Views/Widgets/NewsWidgetPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ struct NewsWidgetPreviewView: View {

@StateObject private var viewModel = NewsViewModel.shared

@State private var carouselPage: Int = 0
// TODO: revert to 0 to re-enable the compact widget preview
@State private var carouselPage: Int = 1
@State private var showDeleteAlert = false

private let widgetType: WidgetType = .news
Expand Down Expand Up @@ -51,8 +52,10 @@ struct NewsWidgetPreviewView: View {
carousel

sizeLabel
.padding(.bottom, 16)

pageIndicator
// Page indicator hidden while only the wide widget is shown
// pageIndicator
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

Expand Down Expand Up @@ -111,8 +114,9 @@ struct NewsWidgetPreviewView: View {

private var carousel: some View {
TabView(selection: $carouselPage) {
compactPage
.tag(0)
// Compact preview temporarily hidden — only the wide widget can be added for now
// compactPage
// .tag(0)

widePage
.tag(1)
Expand Down
12 changes: 8 additions & 4 deletions Bitkit/Views/Widgets/PriceWidgetPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ struct PriceWidgetPreviewView: View {

@StateObject private var viewModel = PriceViewModel.shared

@State private var carouselPage: Int = 0
// TODO: revert to 0 to re-enable the compact widget preview
@State private var carouselPage: Int = 1
@State private var showDeleteAlert = false

private let widgetType: WidgetType = .price
Expand Down Expand Up @@ -60,8 +61,10 @@ struct PriceWidgetPreviewView: View {
carousel

sizeLabel
.padding(.bottom, 16)

pageIndicator
// Page indicator hidden while only the wide widget is shown
// pageIndicator
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

Expand Down Expand Up @@ -121,8 +124,9 @@ struct PriceWidgetPreviewView: View {

private var carousel: some View {
TabView(selection: $carouselPage) {
compactPage
.tag(0)
// Compact preview temporarily hidden — only the wide widget can be added for now
// compactPage
// .tag(0)

widePage
.tag(1)
Expand Down
10 changes: 7 additions & 3 deletions Bitkit/Views/Widgets/WeatherWidgetPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ struct WeatherWidgetPreviewView: View {

@StateObject private var viewModel = WeatherViewModel.shared

@State private var carouselPage: Int = 0
// TODO: revert to 0 to re-enable the compact widget preview
@State private var carouselPage: Int = 1
@State private var showDeleteAlert = false

private let widgetType: WidgetType = .weather
Expand Down Expand Up @@ -52,8 +53,10 @@ struct WeatherWidgetPreviewView: View {
carousel

sizeLabel
.padding(.bottom, 16)

pageIndicator
// Page indicator hidden while only the wide widget is shown
// pageIndicator
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

Expand Down Expand Up @@ -113,7 +116,8 @@ struct WeatherWidgetPreviewView: View {

private var carousel: some View {
TabView(selection: $carouselPage) {
compactPage.tag(0)
// Compact preview temporarily hidden — only the wide widget can be added for now
// compactPage.tag(0)
widePage.tag(1)
}
.tabViewStyle(.page(indexDisplayMode: .never))
Expand Down
Loading