Skip to content

Commit d80d6cd

Browse files
committed
2.2.2
1 parent 67a8a31 commit d80d6cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+489
-264
lines changed

CalendarX.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
988A82E0279FEC9D000899B5 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 988A82DC279FEC9D000899B5 /* Theme.swift */; };
2525
988A82E1279FEC9D000899B5 /* AppInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 988A82DD279FEC9D000899B5 /* AppInfo.swift */; };
2626
988A82E3279FFB8A000899B5 /* Preference.swift in Sources */ = {isa = PBXBuildFile; fileRef = 988A82E2279FFB8A000899B5 /* Preference.swift */; };
27+
98B5B6C929427A8A00114483 /* TitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98B5B6C829427A8A00114483 /* TitleView.swift */; };
28+
98B5B6CB294289F900114483 /* RecommendationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98B5B6CA294289F900114483 /* RecommendationsView.swift */; };
29+
98B5B6CD2942A6D800114483 /* apps.json in Resources */ = {isa = PBXBuildFile; fileRef = 98B5B6CC2942A6D800114483 /* apps.json */; };
2730
98BE991427A0E08500306061 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 98BE991327A0E08500306061 /* Sparkle */; };
2831
98BE991627A0F6AB00306061 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98BE991527A0F6AB00306061 /* RootView.swift */; };
2932
98BE991827A0F75900306061 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98BE991727A0F75900306061 /* MainView.swift */; };
@@ -75,6 +78,9 @@
7578
988A82DC279FEC9D000899B5 /* Theme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
7679
988A82DD279FEC9D000899B5 /* AppInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppInfo.swift; sourceTree = "<group>"; };
7780
988A82E2279FFB8A000899B5 /* Preference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preference.swift; sourceTree = "<group>"; };
81+
98B5B6C829427A8A00114483 /* TitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleView.swift; sourceTree = "<group>"; };
82+
98B5B6CA294289F900114483 /* RecommendationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendationsView.swift; sourceTree = "<group>"; };
83+
98B5B6CC2942A6D800114483 /* apps.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = apps.json; sourceTree = "<group>"; };
7884
98BE991527A0F6AB00306061 /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
7985
98BE991727A0F75900306061 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
8086
98BE991B27A1397500306061 /* Calendar+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Calendar+.swift"; sourceTree = "<group>"; };
@@ -177,13 +183,15 @@
177183
children = (
178184
98BE991D27A1415F00306061 /* SettingsView.swift */,
179185
98C9BD09290999F600F645AD /* MenuBarSettingsView.swift */,
186+
98B5B6CA294289F900114483 /* RecommendationsView.swift */,
180187
);
181188
path = Settings;
182189
sourceTree = "<group>";
183190
};
184191
98CE8BDC27BBABF2009E5674 /* Resource */ = {
185192
isa = PBXGroup;
186193
children = (
194+
98B5B6CC2942A6D800114483 /* apps.json */,
187195
988530272818DB8A00FD98BC /* palette.json */,
188196
98CE8BE327BDFA12009E5674 /* terms.json */,
189197
98CE8BDA27BBAA93009E5674 /* tiaoxiu.json */,
@@ -280,6 +288,7 @@
280288
98F4347627A24297009F18CC /* ScacleButton.swift */,
281289
98ED365827A354CC00AF578A /* ScacleButtonPicker.swift */,
282290
98CED54A27F3057100E0F758 /* RotationArrow.swift */,
291+
98B5B6C829427A8A00114483 /* TitleView.swift */,
283292
);
284293
path = Component;
285294
sourceTree = "<group>";
@@ -363,6 +372,7 @@
363372
98CED54E27F43CF100E0F758 /* InfoPlist.strings in Resources */,
364373
98CE8BE827BF43EB009E5674 /* solarPF.json in Resources */,
365374
98CE8BEE27BF5105009E5674 /* solarAF.json in Resources */,
375+
98B5B6CD2942A6D800114483 /* apps.json in Resources */,
366376
982DABC027C32FC9002891A3 /* weekSF.json in Resources */,
367377
98D573D627571EB6001C2D8C /* Assets.xcassets in Resources */,
368378
98CE8BE027BDEF1D009E5674 /* chuxi.json in Resources */,
@@ -407,6 +417,7 @@
407417
98BE991627A0F6AB00306061 /* RootView.swift in Sources */,
408418
982DABC627C33343002891A3 /* Bundle+.swift in Sources */,
409419
98F4347727A24297009F18CC /* ScacleButton.swift in Sources */,
420+
98B5B6C929427A8A00114483 /* TitleView.swift in Sources */,
410421
98BE991E27A1415F00306061 /* SettingsView.swift in Sources */,
411422
98C9BD0A290999F600F645AD /* MenuBarSettingsView.swift in Sources */,
412423
982DABC427C332E1002891A3 /* Date+.swift in Sources */,
@@ -431,6 +442,7 @@
431442
98FEAB9F27F6F0EA0034EC1F /* MenuBarStyle.swift in Sources */,
432443
98D247962784324700F2B278 /* MenuBarPopover.swift in Sources */,
433444
98F4347427A23ABE009F18CC /* MainViewModel.swift in Sources */,
445+
98B5B6CB294289F900114483 /* RecommendationsView.swift in Sources */,
434446
);
435447
runOnlyForDeploymentPostprocessing = 0;
436448
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "GitHub.svg",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "mac",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "HostsX.png",
9+
"idiom" : "mac",
10+
"scale" : "2x"
11+
}
12+
],
13+
"info" : {
14+
"author" : "xcode",
15+
"version" : 1
16+
}
17+
}
41.4 KB
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "mac",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "OnlySwitch.png",
9+
"idiom" : "mac",
10+
"scale" : "2x"
11+
}
12+
],
13+
"info" : {
14+
"author" : "xcode",
15+
"version" : 1
16+
}
17+
}
32.3 KB
Loading

CalendarX/Component/ScacleButton.swift

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SwiftUI
1010

1111
struct ScacleButton<Label: View>: View {
1212
let action: VoidClosure
13-
13+
1414
@ViewBuilder
1515
let label: () -> Label
1616

@@ -46,18 +46,15 @@ struct ScacleCapsuleButton: View {
4646
foregroundColor: Color,
4747
backgroundColor: Color,
4848
action: VoidClosure
49-
49+
5050
var body: some View {
5151
ScacleButton(action: action) {
52-
HStack {
53-
Spacer()
54-
Text(title)
55-
Spacer()
56-
}
57-
.padding(.vertical, 5)
58-
.foregroundColor(foregroundColor)
59-
.background(backgroundColor)
60-
.clipShape(Capsule())
52+
Text(title)
53+
.frame(maxWidth: .infinity)
54+
.padding(.vertical, 5)
55+
.foregroundColor(foregroundColor)
56+
.background(backgroundColor)
57+
.clipShape(Capsule())
6158
}
6259
}
6360
}

CalendarX/Component/TitleView.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// TitleView.swift
3+
// CalendarX
4+
//
5+
// Created by zm on 2022/12/9.
6+
//
7+
8+
import SwiftUI
9+
10+
struct TitleView<Title: View, Content: View>: View {
11+
12+
let title: () -> Title
13+
14+
@ViewBuilder
15+
let actions: () -> Content
16+
17+
var body: some View {
18+
ZStack {
19+
title().font(.title2)
20+
HStack(content: actions)
21+
.frame(maxWidth: .infinity, alignment: .trailing)
22+
}
23+
}
24+
}
25+
26+

0 commit comments

Comments
 (0)