Skip to content

Commit

Permalink
add: SwiftGenを使用
Browse files Browse the repository at this point in the history
  • Loading branch information
SNQ-2001 committed Oct 26, 2022
1 parent 3f36b54 commit 90c2835
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
10 changes: 6 additions & 4 deletions GitHubContributionsMenuBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

/* Begin PBXBuildFile section */
1C1787502909248700BFEB6E /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1C17874F2909248700BFEB6E /* Settings.bundle */; };
1C1787542909291900BFEB6E /* Assets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C1787532909291900BFEB6E /* Assets.swift */; };
1C6694922822EA3800ABFED2 /* GitHubContributionsMenuBarApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6694912822EA3800ABFED2 /* GitHubContributionsMenuBarApp.swift */; };
1C6694962822EA3A00ABFED2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1C6694952822EA3A00ABFED2 /* Assets.xcassets */; };
1C6694992822EA3A00ABFED2 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1C6694982822EA3A00ABFED2 /* Preview Assets.xcassets */; };
1C6694A32822EAD900ABFED2 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6694A22822EAD900ABFED2 /* ContentView.swift */; };
1C6694A62822EAFB00ABFED2 /* ContributionsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6694A52822EAFB00ABFED2 /* ContributionsViewModel.swift */; };
Expand All @@ -33,9 +33,10 @@

/* Begin PBXFileReference section */
1C17874F2909248700BFEB6E /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
1C1787532909291900BFEB6E /* Assets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Assets.swift; sourceTree = "<group>"; };
1C17875529092A3800BFEB6E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1C66948E2822EA3800ABFED2 /* Contributions.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Contributions.app; sourceTree = BUILT_PRODUCTS_DIR; };
1C6694912822EA3800ABFED2 /* GitHubContributionsMenuBarApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitHubContributionsMenuBarApp.swift; sourceTree = "<group>"; };
1C6694952822EA3A00ABFED2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
1C6694982822EA3A00ABFED2 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
1C66949A2822EA3A00ABFED2 /* GitHubContributionsMenuBar.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GitHubContributionsMenuBar.entitlements; sourceTree = "<group>"; };
1C6694A12822EAB700ABFED2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -74,15 +75,16 @@
isa = PBXGroup;
children = (
1C17874F2909248700BFEB6E /* Settings.bundle */,
1C17875529092A3800BFEB6E /* Assets.xcassets */,
1C6694A12822EAB700ABFED2 /* Info.plist */,
1C6694952822EA3A00ABFED2 /* Assets.xcassets */,
);
path = Resource;
sourceTree = "<group>";
};
1C17874D290922D200BFEB6E /* Generated */ = {
isa = PBXGroup;
children = (
1C1787532909291900BFEB6E /* Assets.swift */,
);
path = Generated;
sourceTree = "<group>";
Expand Down Expand Up @@ -256,7 +258,6 @@
files = (
1C6694992822EA3A00ABFED2 /* Preview Assets.xcassets in Resources */,
1C1787502909248700BFEB6E /* Settings.bundle in Resources */,
1C6694962822EA3A00ABFED2 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -296,6 +297,7 @@
1C6694AD2822EB9400ABFED2 /* ContributionsView.swift in Sources */,
1CAFD68B282412F500C9A576 /* SettingsLabelStyle.swift in Sources */,
1CAFD6932824186B00C9A576 /* OpenSource.swift in Sources */,
1C1787542909291900BFEB6E /* Assets.swift in Sources */,
1C6694B12822EBD800ABFED2 /* UXView.swift in Sources */,
1C6694A62822EAFB00ABFED2 /* ContributionsViewModel.swift in Sources */,
1CAFD6862823D81100C9A576 /* SettingsView.swift in Sources */,
Expand Down
36 changes: 18 additions & 18 deletions GitHubContributionsMenuBar/Extension/Color+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@ public extension Color {

// MARK: - Tile Border

static var tileBorder: Color = Color("tileBorder")
static var tileBorder: Color = Asset.tileBorder.swiftUIColor

// MARK: - Empty Tile

static var emptyTile: Color = Color("emptyTile")
static var emptyTile: Color = Asset.emptyTile.swiftUIColor

// MARK: - Blue Theme

static let blueLevel1 = Color("BlueLevel1")
static let blueLevel2 = Color("BlueLevel2")
static let blueLevel3 = Color("BlueLevel3")
static let blueLevel4 = Color("BlueLevel4")
static let blueLevel1 = Asset.blueLevel1.swiftUIColor
static let blueLevel2 = Asset.blueLevel2.swiftUIColor
static let blueLevel3 = Asset.blueLevel3.swiftUIColor
static let blueLevel4 = Asset.blueLevel4.swiftUIColor

// MARK: - Green Theme

static let greenLevel1 = Color("GreenLevel1")
static let greenLevel2 = Color("GreenLevel2")
static let greenLevel3 = Color("GreenLevel3")
static let greenLevel4 = Color("GreenLevel4")
static let greenLevel1 = Asset.greenLevel1.swiftUIColor
static let greenLevel2 = Asset.greenLevel2.swiftUIColor
static let greenLevel3 = Asset.greenLevel3.swiftUIColor
static let greenLevel4 = Asset.greenLevel4.swiftUIColor

// MARK: - Red Theme

static let redLevel1 = Color("RedLevel1")
static let redLevel2 = Color("RedLevel2")
static let redLevel3 = Color("RedLevel3")
static let redLevel4 = Color("RedLevel4")
static let redLevel1 = Asset.redLevel1.swiftUIColor
static let redLevel2 = Asset.redLevel2.swiftUIColor
static let redLevel3 = Asset.redLevel3.swiftUIColor
static let redLevel4 = Asset.redLevel4.swiftUIColor

// MARK: - Purple Theme

static let purpleLevel1 = Color("PurpleLevel1")
static let purpleLevel2 = Color("PurpleLevel2")
static let purpleLevel3 = Color("PurpleLevel3")
static let purpleLevel4 = Color("PurpleLevel4")
static let purpleLevel1 = Asset.purpleLevel1.swiftUIColor
static let purpleLevel2 = Asset.purpleLevel2.swiftUIColor
static let purpleLevel3 = Asset.purpleLevel3.swiftUIColor
static let purpleLevel4 = Asset.purpleLevel4.swiftUIColor
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct GitHubContributionsMenuBarApp: App {
MenuBarExtra {
ContentView(viewModel: viewModel)
} label: {
Image(nsImage: NSImage(named: "menubar"))
Image(nsImage: NSImage(named: Asset.menubar.name))
}
.menuBarExtraStyle(.window)
}
Expand Down

0 comments on commit 90c2835

Please sign in to comment.