Skip to content

Commit

Permalink
Animation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar committed Oct 27, 2023
1 parent 68f5798 commit 2ad723b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "The LLama 2 7B model is already downloaded."
"value" : "The LLama 2 7B model is downloaded."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ struct LocalLLMDownloadView: View {

Spacer()
}
.transition(.opacity)
.animation(.easeInOut, value: isDownloading || modelExists)
}, actionView: {
OnboardingActionsView("LLM_DOWNLOAD_NEXT_BUTTON") {
onboardingNavigationPath.nextStep()
Expand All @@ -91,15 +93,13 @@ struct LocalLLMDownloadView: View {

private var downloadProgressView: some View {
VStack {
ProgressView("LLM_DOWNLOADING_PROGRESS_TEXT", value: downloadProgress, total: 100)
ProgressView("LLM_DOWNLOADING_PROGRESS_TEXT", value: downloadProgress, total: 100.0)
.progressViewStyle(LinearProgressViewStyle())
.padding()

Text("Downloaded \(String(format: "%.2f", downloadProgress))% of 100%")
.padding(.top, 5)
}
.transition(.opacity)
.animation(.easeInOut, value: isDownloading)
}

/// A `Bool` flag indicating if the model is currently being downloaded
Expand Down

0 comments on commit 2ad723b

Please sign in to comment.