Skip to content

Commit

Permalink
Indicate running state
Browse files Browse the repository at this point in the history
  • Loading branch information
dz0ny committed Jan 19, 2022
1 parent 8332f78 commit c7c4aa2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
BlueprintName = "ParetoSecurityTests"
ReferencedContainer = "container:Pareto Security.xcodeproj">
</BuildableReference>
<SkippedTests>
<Test
Identifier = "TeamsTest">
</Test>
</SkippedTests>
</TestableReference>
<TestableReference
skipped = "YES">
Expand Down
2 changes: 1 addition & 1 deletion Pareto/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>4026</string>
<string>4085</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
21 changes: 18 additions & 3 deletions Pareto/Views/StatusBarIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,28 @@ class StatusBarModel: ObservableObject {

struct StatusBarIcon: View {
@ObservedObject var statusBarModel: StatusBarModel
let imageNames: [String] = [StatusBarState.ok.rawValue, StatusBarState.warning.rawValue]

var body: some View {
ZStack {
// Moves in from leading out, out to trailing edge.
Image(statusBarModel.state.rawValue)
.resizable()
.frame(width: 22, height: 20, alignment: .center)
if statusBarModel.isRunning {
ZStack {
Image(statusBarModel.state.rawValue)
.resizable()
.blur(radius: 0.8)
.frame(width: 22, height: 20, alignment: .center)
ProgressView()
.frame(width: 5.0, height: 5.0)
.blur(radius: 0.8)
.scaleEffect(x: 0.5, y: 0.5, anchor: .center)
}

} else {
Image(statusBarModel.state.rawValue)
.resizable()
.frame(width: 22, height: 20, alignment: .center)
}

}.frame(width: 26, height: 20, alignment: .center).padding(.horizontal, 2)
.padding(.vertical, 2)
Expand Down

0 comments on commit c7c4aa2

Please sign in to comment.