Skip to content

Commit

Permalink
Change to one loader, and Fetching Catalog text
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH committed Sep 29, 2024
1 parent b127452 commit 0009ba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Support/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
"welcome.main_page.title" = "Main Page";
"welcome.grid.bookmarks.title" = "Bookmarks";
"welcome.actions.open_file" = "Open File";
"welcome.button.status.fetching.text" = "Fetching...";
"welcome.button.status.fetching_catalog.text" = "Fetching Catalog...";
"welcome.button.status.fetch_catalog.text" = "Fetch Catalog";

"commands.button.actual_size" = "Actual Size";
Expand Down
15 changes: 5 additions & 10 deletions Views/Welcome.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ struct Welcome: View {
ZStack {
LogoView()
welcomeContent
if library.state == .inProgress {
LoadingView()
}
}.ignoresSafeArea()
} else {
LazyVGrid(
Expand Down Expand Up @@ -82,7 +85,6 @@ struct Welcome: View {
VStack(spacing: 20) {
Spacer()
.frame(height: geometry.size.height * 0.618)
Divider()
actions
Text("library_refresh_error.retrieve.description".localized)
.foregroundColor(.red)
Expand Down Expand Up @@ -114,7 +116,7 @@ struct Welcome: View {

/// Onboarding actions, open a zim file or refresh catalog
private var actions: some View {
HStack {
VStack {
OpenFileButton(context: .onBoarding) {
HStack {
Spacer()
Expand All @@ -128,14 +130,7 @@ struct Welcome: View {
HStack {
Spacer()
if library.state == .inProgress {
#if os(macOS)
Text("welcome.button.status.fetching.text".localized)
#elseif os(iOS)
HStack(spacing: 6) {
ProgressView().frame(maxHeight: 10)
Text("welcome.button.status.fetching.text".localized)
}
#endif
Text("welcome.button.status.fetching_catalog.text".localized)
} else {
Text("welcome.button.status.fetch_catalog.text".localized)
}
Expand Down

0 comments on commit 0009ba4

Please sign in to comment.