Skip to content

一些易用性上的升级 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Cleaner4Xcode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1100;
LastUpgradeCheck = 1110;
LastUpgradeCheck = 1310;
ORGANIZATIONNAME = Baye;
TargetAttributes = {
B4096D1F233887E1006E0959 = {
Expand Down Expand Up @@ -265,6 +265,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -326,6 +327,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -361,9 +363,9 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 44;
CURRENT_PROJECT_VERSION = 45;
DEVELOPMENT_ASSET_PATHS = "\"Cleaner4Xcode/Preview Content\"";
DEVELOPMENT_TEAM = 67Q6744L7B;
DEVELOPMENT_TEAM = D3FXKEY64K;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Cleaner4Xcode/Info.plist;
Expand All @@ -387,9 +389,9 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 44;
CURRENT_PROJECT_VERSION = 45;
DEVELOPMENT_ASSET_PATHS = "\"Cleaner4Xcode/Preview Content\"";
DEVELOPMENT_TEAM = 67Q6744L7B;
DEVELOPMENT_TEAM = D3FXKEY64K;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = Cleaner4Xcode/Info.plist;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1140"
LastUpgradeVersion = "1310"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Binary file added Cleaner4Xcode/Assets.xcassets/.DS_Store
Binary file not shown.
66 changes: 33 additions & 33 deletions Cleaner4Xcode/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16.png",
"scale" : "1x"
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32.png",
"scale" : "1x"
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128.png",
"scale" : "1x"
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256.png",
"scale" : "1x"
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512.png",
"scale" : "1x"
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
Binary file modified Cleaner4Xcode/Assets.xcassets/AppIcon.appiconset/icon_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Cleaner4Xcode/Assets.xcassets/AppIcon.appiconset/icon_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Cleaner4Xcode/Assets.xcassets/AppIcon.appiconset/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions Cleaner4Xcode/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
6 changes: 3 additions & 3 deletions Cleaner4Xcode/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -21,7 +19,9 @@
<key>CFBundleShortVersionString</key>
<string>4.0.5</string>
<key>CFBundleVersion</key>
<string>44</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down
29 changes: 20 additions & 9 deletions Cleaner4Xcode/MainWindowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ struct ItemRow: View {
var body: some View {
HStack {
Text(item.displayName)
.font(.subheadline)
.font(.headline)
.lineLimit(1)

Spacer()

Text(humanize(item.totalSize))
.font(.subheadline)
.font(.body)
.bold()
.padding(.horizontal)

Text(dateFormatter.string(from: item.modifyDate))
.foregroundColor(.secondary)
.font(Font.subheadline.monospacedDigit())
.font(Font.body.monospacedDigit())
.lineLimit(1)

Button(action: onReveal) {
Expand Down Expand Up @@ -103,8 +104,10 @@ struct ResultsTableView: View {
if analysis.groupedItems.count > 0 {
ForEach(analysis.groupedItems) { group in
Section(header:
Text(group.group)
.foregroundColor(.secondary)
Text(group.group)
.font(.title3)
.foregroundColor(.secondary)
.padding(.vertical)
) {
ForEach(group.items) { item in
ItemRow(
Expand Down Expand Up @@ -147,10 +150,18 @@ struct MainWindowView: View {
var dataView: some View {
VStack(alignment: .leading, spacing: 0) {
HStack(alignment: .top) {
Text(LocalizedStringKey(
data.selectedGroup!.group.describe().summary))
.font(.footnote)
.foregroundColor(.secondary)
if #available(macOS 12.0, *) {
Text(LocalizedStringKey(
data.selectedGroup!.group.describe().summary))
.font(.headline)
.foregroundColor(.secondary)
.textSelection(.enabled)
} else {
Text(LocalizedStringKey(
data.selectedGroup!.group.describe().summary))
.font(.headline)
.foregroundColor(.secondary)
}

Spacer()
}
Expand Down
2 changes: 1 addition & 1 deletion Components/AnalysisView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct AnalysisView: View {
HStack {
VStack(alignment: .leading, spacing: 5) {
Text(title)
.font(.subheadline)
.font(.headline)
.foregroundColor(.primary)

Text(humanize(analysis.totalSize))
Expand Down
4 changes: 2 additions & 2 deletions Components/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct WelcomeView: View {

Text("Selected \(appData.selectedDeveloperPath!)")
.foregroundColor(.secondary)
.font(.caption)
.font(.body)

Text("welcome.button_change_location")
.foregroundColor(.pink)
Expand Down Expand Up @@ -93,7 +93,7 @@ struct WelcomeView: View {

Text("welcome.need_authorize")
.multilineTextAlignment(.center)
.font(.footnote)
.font(.body)
.foregroundColor(.secondary)
.padding(.top, 5)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cleaner for Xcode

做了一些易用性上的升级

This is the new `SwiftUI` version of my original `react-native-macos` powered [XcodeCleaner](https://github.com/waylybaye/XcodeCleaner)

----
Expand Down