Skip to content
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
54 changes: 36 additions & 18 deletions PureMac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
826A750D2D7EC14C2AE306A3 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3667D46D8E2004EB4D73835A /* Models.swift */; };
A221744A723582A6D075A7A0 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86105573F4051764E9E46626 /* ContentView.swift */; };
A89DF967EC9E5E8123B2925A /* SmartScanView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BA091943263913276F3CCF /* SmartScanView.swift */; };
AA0000000000000000000004 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000003 /* Localizable.strings */; };
B52938BBD11842631314543D /* CategoryDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10B0AF194677EAC1D5568785 /* CategoryDetailView.swift */; };
B8A524AF7F7DCDFCFCA9EDF6 /* AppViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7FDA1B749FFA61DFB52AB5 /* AppViewModel.swift */; };
D9445C2641A8637B65DA5ACE /* ScanEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = A711CDF5285F68775D9B5513 /* ScanEngine.swift */; };
D9D4E0FA2F8C135400ABB13C /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9D4E0F92F8C135400ABB13C /* AppConstants.swift */; };
DDD6BA35DBF32E7A6B5F6F8B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */; };
EDEF28CAD23E936FBED1783B /* PureMacApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63581B70F9B10231964E3602 /* PureMacApp.swift */; };
F1A2B3C4D5E6F70819203142 /* FullDiskAccessManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */; };
AA0000000000000000000004 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AA0000000000000000000003 /* Localizable.strings */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -33,17 +34,18 @@
311078221878708524283765 /* PureMac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PureMac.app; sourceTree = BUILT_PRODUCTS_DIR; };
3667D46D8E2004EB4D73835A /* Models.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = "<group>"; };
46660271CFF167AB0FE7371D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullDiskAccessManager.swift; sourceTree = "<group>"; };
5402892366B3F00417FD05F9 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
5664D2BDAEAA9AE3A53DB364 /* PureMac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PureMac.entitlements; sourceTree = "<group>"; };
63581B70F9B10231964E3602 /* PureMacApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PureMacApp.swift; sourceTree = "<group>"; };
86105573F4051764E9E46626 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
A1B2C3D4E5F607182930A1B2 /* FullDiskAccessManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullDiskAccessManager.swift; sourceTree = "<group>"; };
A711CDF5285F68775D9B5513 /* ScanEngine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScanEngine.swift; sourceTree = "<group>"; };
AA0000000000000000000001 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
AA0000000000000000000002 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C5ADDC35F31E40780FB5D017 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
D9D4E0F92F8C135400ABB13C /* AppConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConstants.swift; sourceTree = "<group>"; };
DD7FDA1B749FFA61DFB52AB5 /* AppViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppViewModel.swift; sourceTree = "<group>"; };
AA0000000000000000000001 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
AA0000000000000000000002 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXGroup section */
Expand Down Expand Up @@ -110,9 +112,18 @@
path = ViewModels;
sourceTree = "<group>";
};
D9D4E0F82F8C135000ABB13C /* Core */ = {
isa = PBXGroup;
children = (
D9D4E0F92F8C135400ABB13C /* AppConstants.swift */,
);
path = Core;
sourceTree = "<group>";
};
E383F69184F4552E5A41D010 /* PureMac */ = {
isa = PBXGroup;
children = (
D9D4E0F82F8C135000ABB13C /* Core */,
B2EA41E1096FA8E3B916AD13 /* Assets.xcassets */,
AA0000000000000000000003 /* Localizable.strings */,
46660271CFF167AB0FE7371D /* Info.plist */,
Expand All @@ -129,18 +140,6 @@
};
/* End PBXGroup section */

/* Begin PBXVariantGroup section */
AA0000000000000000000003 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
AA0000000000000000000001 /* en */,
AA0000000000000000000002 /* zh-Hans */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin PBXNativeTarget section */
B19E38DEAA0144A77120F39C /* PureMac */ = {
isa = PBXNativeTarget;
Expand Down Expand Up @@ -223,13 +222,26 @@
27F449EDD1B082FE11FEC9DF /* SchedulerService.swift in Sources */,
015C7A8CE16D49F2C445C02A /* SettingsView.swift in Sources */,
0A7B70CBA747ED9FEE20C51A /* SidebarView.swift in Sources */,
D9D4E0FA2F8C135400ABB13C /* AppConstants.swift in Sources */,
A89DF967EC9E5E8123B2925A /* SmartScanView.swift in Sources */,
340E424F759ACCDE7372F99F /* Theme.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
AA0000000000000000000003 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
AA0000000000000000000001 /* en */,
AA0000000000000000000002 /* zh-Hans */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
0794DC5454CB748EC1374422 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -311,7 +323,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PureMac/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_NAME = PureMac;
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -391,7 +406,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PureMac/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_NAME = PureMac;
SDKROOT = macosx;
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
14 changes: 14 additions & 0 deletions PureMac/Core/AppConstants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// AppConstants.swift
// PureMac
//
// Created by Theo Sementa on 12/04/2026.
//

import Foundation

struct AppConstants {

static let appVersion: String = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "0"

}
31 changes: 19 additions & 12 deletions PureMac/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,28 @@ struct TopBarView: View {
}

// Settings button
Button(action: {
if #available(macOS 14.0, *) {
NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil)
} else {
if #available(macOS 14.0, *) {
SettingsLink {
iconGearView
}
.buttonStyle(.plain)
} else {
Button(action: {
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
}) {
iconGearView
}
}) {
Image(systemName: "gearshape.fill")
.font(.system(size: 14))
.foregroundColor(.pmTextSecondary)
.frame(width: 32, height: 32)
.background(Color.pmCard.opacity(0.6))
.cornerRadius(8)
.buttonStyle(.plain)
}
.buttonStyle(.plain)
}
}

var iconGearView: some View {
Image(systemName: "gearshape.fill")
.font(.system(size: 14))
.foregroundColor(.pmTextSecondary)
.frame(width: 32, height: 32)
.background(Color.pmCard.opacity(0.6))
.cornerRadius(8)
}
}
2 changes: 1 addition & 1 deletion PureMac/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ struct AboutTab: View {
Text("PureMac")
.font(.system(size: 24, weight: .bold, design: .rounded))

Text("Version 1.0.0")
Text("Version \(AppConstants.appVersion)")
.font(.system(size: 13))
.foregroundColor(.secondary)

Expand Down
2 changes: 1 addition & 1 deletion PureMac/Views/SidebarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct SidebarView: View {
.padding(.horizontal, 16)
}

Text("v1.0.0")
Text("v\(AppConstants.appVersion)")
.font(.system(size: 10))
.foregroundColor(.pmTextMuted)
.padding(.bottom, 12)
Expand Down