-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
149 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
GitHubContributionsMenuBar/Model/Entity/Contributions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// Contributions.swift | ||
// GitHubContributionsMenuBar | ||
// | ||
// Created by 宮本大新 on 2023/01/10. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Contributions { | ||
var levels: [[GitHub.Contribution.Level]] = [] | ||
var count: Int = .zero | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ViewType.swift | ||
// GitHubContributionsMenuBar | ||
// | ||
// Created by 宮本大新 on 2023/01/10. | ||
// | ||
|
||
import Foundation | ||
|
||
enum ViewType { | ||
case contributions | ||
case settings | ||
case emptyUserName | ||
case error(Error) | ||
case progress | ||
} | ||
|
||
extension ViewType { | ||
static func == (lhs: ViewType, rhs: ViewType) -> Bool { | ||
switch (lhs, rhs) { | ||
case (.contributions, .contributions), | ||
(.settings, .settings), | ||
(.emptyUserName, .emptyUserName), | ||
(.progress, .progress): | ||
return true | ||
case let (.error(lhsError), .error(rhsError)): | ||
return lhsError.localizedDescription == rhsError.localizedDescription | ||
default: | ||
return false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.