Skip to content

Commit

Permalink
Merge pull request #2 from Zarox28/add-modules
Browse files Browse the repository at this point in the history
✨ Bump version to 2.2.0 and add toggle for mouse monitor in settings 🖱️
  • Loading branch information
Zarox28 authored Sep 9, 2024
2 parents b7455b7 + 825aa56 commit 4e4f386
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 63 deletions.
51 changes: 0 additions & 51 deletions CHANGELOG.md

This file was deleted.

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<br />

> Version: **2.1.0**
> Version: **2.2.0**
---

Expand All @@ -17,7 +17,6 @@
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [License](#license)
- [Authors](#authors)
Expand Down Expand Up @@ -69,10 +68,6 @@ brew install ffmpeg
<img src="assets/recording.png" width="500"/>
</div>

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for latest changes.

## Contributing

Contributing is disabled for this repository.
Expand Down
8 changes: 4 additions & 4 deletions SafeLock.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.1.0;
CURRENT_PROJECT_VERSION = 2.2.0;
DEVELOPMENT_ASSET_PATHS = "\"SafeLock/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
Expand All @@ -353,7 +353,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 2.1.0;
MARKETING_VERSION = 2.2.0;
PRODUCT_BUNDLE_IDENTIFIER = Zarox28.SafeLock;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -372,7 +372,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2.1.0;
CURRENT_PROJECT_VERSION = 2.2.0;
DEVELOPMENT_ASSET_PATHS = "\"SafeLock/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
Expand All @@ -386,7 +386,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 2.1.0;
MARKETING_VERSION = 2.2.0;
PRODUCT_BUNDLE_IDENTIFIER = Zarox28.SafeLock;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 3 additions & 1 deletion SafeLock/Views/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ struct MainView: View {
Button("Enable", action: {
if cameraManager.hasRecorded { cameraManager.hasRecorded = false } // Reset hasRecorded
global.lockScreen()
monitorsManager.startMouseMonitoring()
if UserDefaults.standard.bool(forKey: "\(Bundle.main.bundleIdentifier!).mouseModuleState") { // Check if the mouse module is enabled
monitorsManager.startMouseMonitoring()
}

global.currentState = 2 // Set current state to enabled
logsManager.addLog(text: "Alarm enabled", type: 0) // Show message when enabled
Expand Down
5 changes: 4 additions & 1 deletion SafeLock/Views/SettingsView/ModulesSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import SwiftUI
// MARK: - Modules Settings View
/// The modules settings SwiftUI view for the settings screen of the application
struct ModulesSettingsView: View {
@AppStorage("\(Bundle.main.bundleIdentifier!).mouseModuleState") var mouseModuleState: Bool = true // Mouse module setting
var body: some View {
VStack {}
VStack {
Toggle("Mouse monitor", isOn: $mouseModuleState) // Toggle to enable/disable mouse monitor
}
}
}

0 comments on commit 4e4f386

Please sign in to comment.