Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1651e9ad4a | ||
|
|
02c1e2af46 | ||
|
|
b275286b2d | ||
|
|
7818feaf0b | ||
|
|
3970cd2eac | ||
|
|
21b0053ccb | ||
|
|
6dd8790404 | ||
|
|
508abec94e | ||
|
|
b010432796 | ||
|
|
a91e65f72f |
2
platform-darwin/External/Pearl
vendored
2
platform-darwin/External/Pearl
vendored
Submodule platform-darwin/External/Pearl updated: 3480897054...b9da35c5ef
@@ -3370,8 +3370,6 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Source/Mac/MasterPassword.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Source/Mac/MasterPassword.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
|
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch";
|
GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch";
|
||||||
@@ -3410,8 +3408,6 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Source/Mac/MasterPassword.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Source/Mac/MasterPassword.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
|
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch";
|
GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12118" systemVersion="16D32" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||||
@@ -12,11 +12,14 @@
|
|||||||
</customObject>
|
</customObject>
|
||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||||
<menu title="AMainMenu" systemMenu="main" id="29"/>
|
<menu title="AMainMenu" systemMenu="main" id="29">
|
||||||
|
<point key="canvasLocation" x="139" y="155"/>
|
||||||
|
</menu>
|
||||||
<customObject id="494" customClass="MPMacAppDelegate">
|
<customObject id="494" customClass="MPMacAppDelegate">
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="createUserItem" destination="757" id="763"/>
|
<outlet property="createUserItem" destination="757" id="763"/>
|
||||||
<outlet property="deleteUserItem" destination="ZgZ-p2-463" id="smU-PF-mKA"/>
|
<outlet property="deleteUserItem" destination="ZgZ-p2-463" id="smU-PF-mKA"/>
|
||||||
|
<outlet property="diagnosticsItem" destination="GSN-f0-q7s" id="kns-3O-fu0"/>
|
||||||
<outlet property="hidePasswordsItem" destination="9G7-17-PzY" id="qPX-VT-jVx"/>
|
<outlet property="hidePasswordsItem" destination="9G7-17-PzY" id="qPX-VT-jVx"/>
|
||||||
<outlet property="lockItem" destination="720" id="726"/>
|
<outlet property="lockItem" destination="720" id="726"/>
|
||||||
<outlet property="openAtLoginItem" destination="785" id="788"/>
|
<outlet property="openAtLoginItem" destination="785" id="788"/>
|
||||||
@@ -33,7 +36,7 @@
|
|||||||
<items>
|
<items>
|
||||||
<menuItem title="Users" id="755">
|
<menuItem title="Users" id="755">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<menu key="submenu" title="Users" id="756">
|
<menu key="submenu" title="Users" autoenablesItems="NO" id="756">
|
||||||
<items>
|
<items>
|
||||||
<menuItem title="New User" enabled="NO" toolTip="Creating users is not yet supported. Please use the iOS app with iCloud enabled to create users and sites." id="757">
|
<menuItem title="New User" enabled="NO" toolTip="Creating users is not yet supported. Please use the iOS app with iCloud enabled to create users and sites." id="757">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
@@ -47,6 +50,53 @@
|
|||||||
<action selector="deleteUser:" target="494" id="eia-X5-QMc"/>
|
<action selector="deleteUser:" target="494" id="eia-X5-QMc"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
|
<menuItem title="Import User..." id="EFK-zt-EvJ">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="importSites:" target="494" id="CNv-4j-036"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Export User" id="r1P-hr-mh5">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<menu key="submenu" title="Export User" id="fnk-gK-yCi">
|
||||||
|
<items>
|
||||||
|
<menuItem title="Secure Export (recommended)" id="06i-og-eLt">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="exportSitesSecure:" target="494" id="LVH-es-imA"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Your passwords are hidden." enabled="NO" id="ybY-P3-eao">
|
||||||
|
<attributedString key="attributedTitle">
|
||||||
|
<fragment content="Your passwords are not visible.">
|
||||||
|
<attributes>
|
||||||
|
<font key="NSFont" metaFont="user"/>
|
||||||
|
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||||
|
</attributes>
|
||||||
|
</fragment>
|
||||||
|
</attributedString>
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Reveal Passwords" id="fMG-TT-bTn">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="exportSitesReveal:" target="494" id="1IW-VT-Oeu"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Handy for backups - keep it in a safe location!" enabled="NO" id="cQu-oR-SUa">
|
||||||
|
<attributedString key="attributedTitle">
|
||||||
|
<fragment content="Keep this file secure or delete it when you're done with it!">
|
||||||
|
<attributes>
|
||||||
|
<font key="NSFont" metaFont="user"/>
|
||||||
|
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||||
|
</attributes>
|
||||||
|
</fragment>
|
||||||
|
</attributedString>
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
</menuItem>
|
||||||
|
</items>
|
||||||
|
</menu>
|
||||||
|
</menuItem>
|
||||||
<menuItem isSeparatorItem="YES" id="759"/>
|
<menuItem isSeparatorItem="YES" id="759"/>
|
||||||
</items>
|
</items>
|
||||||
</menu>
|
</menu>
|
||||||
@@ -152,53 +202,23 @@
|
|||||||
</attributedString>
|
</attributedString>
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Export Sites" id="r1P-hr-mh5">
|
<menuItem title="Diagnostics" id="GSN-f0-q7s">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Export Sites" id="fnk-gK-yCi">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Secure Export" id="06i-og-eLt">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="exportSitesSecure:" target="494" id="LVH-es-imA"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Your passwords are not visible." enabled="NO" id="ybY-P3-eao">
|
|
||||||
<attributedString key="attributedTitle">
|
|
||||||
<fragment content="Your passwords are not visible.">
|
|
||||||
<attributes>
|
|
||||||
<font key="NSFont" size="12" name="Helvetica"/>
|
|
||||||
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
|
||||||
</attributes>
|
|
||||||
</fragment>
|
|
||||||
</attributedString>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Reveal Passwords" id="fMG-TT-bTn">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="exportSitesReveal:" target="494" id="1IW-VT-Oeu"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Keep this file secure or delete it when you're done with it!" enabled="NO" id="cQu-oR-SUa">
|
|
||||||
<attributedString key="attributedTitle">
|
|
||||||
<fragment content="Keep this file secure or delete it when you're done with it!">
|
|
||||||
<attributes>
|
|
||||||
<font key="NSFont" size="12" name="Helvetica"/>
|
|
||||||
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
|
||||||
</attributes>
|
|
||||||
</fragment>
|
|
||||||
</attributedString>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Import Sites..." id="EFK-zt-EvJ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="importSites:" target="494" id="CNv-4j-036"/>
|
<action selector="togglePreference:" target="494" id="ZNq-yf-fxg"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
|
<menuItem title="Crash and usage information is anonymized and sent to development." enabled="NO" id="WfD-lX-C93">
|
||||||
|
<attributedString key="attributedTitle">
|
||||||
|
<fragment content="Save the password in your keychain so you don't need to enter it again.">
|
||||||
|
<attributes>
|
||||||
|
<font key="NSFont" size="11" name="Helvetica"/>
|
||||||
|
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" firstLineHeadIndent="8"/>
|
||||||
|
</attributes>
|
||||||
|
</fragment>
|
||||||
|
</attributedString>
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
</menuItem>
|
||||||
</items>
|
</items>
|
||||||
</menu>
|
</menu>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
@@ -221,6 +241,7 @@
|
|||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
</items>
|
</items>
|
||||||
|
<point key="canvasLocation" x="140" y="23"/>
|
||||||
</menu>
|
</menu>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *openAtLoginItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *openAtLoginItem;
|
||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *showFullScreenItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *showFullScreenItem;
|
||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *savePasswordItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *savePasswordItem;
|
||||||
|
@property(nonatomic, weak) IBOutlet NSMenuItem *diagnosticsItem;
|
||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *createUserItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *createUserItem;
|
||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *deleteUserItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *deleteUserItem;
|
||||||
@property(nonatomic, weak) IBOutlet NSMenuItem *usersItem;
|
@property(nonatomic, weak) IBOutlet NSMenuItem *usersItem;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#define LOGIN_HELPER_BUNDLE_ID @"com.lyndir.lhunath.MasterPassword.Mac.LoginHelper"
|
#define LOGIN_HELPER_BUNDLE_ID @"com.lyndir.lhunath.MasterPassword.Mac.LoginHelper"
|
||||||
|
|
||||||
|
|
||||||
@implementation MPMacAppDelegate
|
@implementation MPMacAppDelegate
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
@@ -369,6 +370,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
|
|
||||||
- (IBAction)togglePreference:(id)sender {
|
- (IBAction)togglePreference:(id)sender {
|
||||||
|
|
||||||
|
if (sender == self.diagnosticsItem)
|
||||||
|
[MPConfig get].sendInfo = @(self.diagnosticsItem.state != NSOnState);
|
||||||
if (sender == self.hidePasswordsItem)
|
if (sender == self.hidePasswordsItem)
|
||||||
[MPConfig get].hidePasswords = @(self.hidePasswordsItem.state != NSOnState);
|
[MPConfig get].hidePasswords = @(self.hidePasswordsItem.state != NSOnState);
|
||||||
if (sender == self.rememberPasswordItem)
|
if (sender == self.rememberPasswordItem)
|
||||||
@@ -579,10 +582,13 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
|
|
||||||
- (void)updateUsers {
|
- (void)updateUsers {
|
||||||
|
|
||||||
[[[self.usersItem submenu] itemArray] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
BOOL foundSeparator = NO;
|
||||||
if (idx > 2)
|
for (NSMenuItem *item in [[self.usersItem submenu] itemArray]) {
|
||||||
[[self.usersItem submenu] removeItem:obj];
|
if (foundSeparator)
|
||||||
}];
|
[[self.usersItem submenu] removeItem:item];
|
||||||
|
else if (item.isSeparatorItem)
|
||||||
|
foundSeparator = YES;
|
||||||
|
}
|
||||||
|
|
||||||
NSManagedObjectContext *mainContext = [MPMacAppDelegate managedObjectContextForMainThreadIfReady];
|
NSManagedObjectContext *mainContext = [MPMacAppDelegate managedObjectContextForMainThreadIfReady];
|
||||||
if (!mainContext) {
|
if (!mainContext) {
|
||||||
@@ -712,6 +718,8 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
- (void)updateConfigKey:(NSString *)key {
|
- (void)updateConfigKey:(NSString *)key {
|
||||||
|
|
||||||
PearlMainQueue( ^{
|
PearlMainQueue( ^{
|
||||||
|
if (!key || [key isEqualToString:NSStringFromSelector( @selector( sendInfo ) )])
|
||||||
|
self.diagnosticsItem.state = [[MPConfig get].sendInfo boolValue]? NSOnState: NSOffState;
|
||||||
if (!key || [key isEqualToString:NSStringFromSelector( @selector( hidePasswords ) )])
|
if (!key || [key isEqualToString:NSStringFromSelector( @selector( hidePasswords ) )])
|
||||||
self.hidePasswordsItem.state = [[MPConfig get].hidePasswords boolValue]? NSOnState: NSOffState;
|
self.hidePasswordsItem.state = [[MPConfig get].hidePasswords boolValue]? NSOnState: NSOffState;
|
||||||
if (!key || [key isEqualToString:NSStringFromSelector( @selector( rememberLogin ) )])
|
if (!key || [key isEqualToString:NSStringFromSelector( @selector( rememberLogin ) )])
|
||||||
@@ -720,7 +728,10 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
|
|
||||||
// Send info
|
// Send info
|
||||||
if ([[MPConfig get].sendInfo boolValue]) {
|
if ([[MPConfig get].sendInfo boolValue]) {
|
||||||
[Countly.sharedInstance giveConsentForAllFeatures];
|
PearlMainQueue( ^{
|
||||||
|
[Countly.sharedInstance giveConsentForAllFeatures];
|
||||||
|
[Countly.sharedInstance askForNotificationPermission];
|
||||||
|
});
|
||||||
|
|
||||||
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
|
||||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||||
@@ -738,13 +749,17 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
prefs[@"encrypted"] = @([PearlDeviceUtils isAppEncrypted]);
|
prefs[@"encrypted"] = @([PearlDeviceUtils isAppEncrypted]);
|
||||||
prefs[@"platform"] = [PearlDeviceUtils platform];
|
prefs[@"platform"] = [PearlDeviceUtils platform];
|
||||||
|
|
||||||
|
[SentrySDK.currentHub getClient].options.enabled = @YES;
|
||||||
[SentrySDK configureScope:^(SentryScope *scope) {
|
[SentrySDK configureScope:^(SentryScope *scope) {
|
||||||
for (NSString *pref in prefs.allKeys)
|
for (NSString *pref in prefs.allKeys)
|
||||||
[scope setExtraValue:prefs[pref] forKey:pref];
|
[scope setExtraValue:prefs[pref] forKey:pref];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
[Countly.sharedInstance cancelConsentForAllFeatures];
|
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||||
|
PearlMainQueue( ^{
|
||||||
|
[Countly.sharedInstance cancelConsentForAllFeatures];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -270,7 +270,9 @@
|
|||||||
|
|
||||||
PearlMainQueue( ^{
|
PearlMainQueue( ^{
|
||||||
self.content = result;
|
self.content = result;
|
||||||
self.displayedContent = displayResult;
|
|
||||||
|
if (!([NSEvent modifierFlags] & NSShiftKeyMask))
|
||||||
|
self.displayedContent = displayResult;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,6 +280,9 @@
|
|||||||
|
|
||||||
PearlMainQueue( ^{
|
PearlMainQueue( ^{
|
||||||
self.loginName = loginName;
|
self.loginName = loginName;
|
||||||
|
|
||||||
|
if ([NSEvent modifierFlags] & NSShiftKeyMask)
|
||||||
|
self.displayedContent = loginName;
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
[self updateUser];
|
[self updateUser];
|
||||||
} );
|
} );
|
||||||
[self observeKeyPath:@"sitesController.selection" withBlock:^(id from, id to, NSKeyValueChange cause, id self) {
|
[self observeKeyPath:@"sitesController.selection" withBlock:^(id from, id to, NSKeyValueChange cause, id self) {
|
||||||
[self updateSelection];
|
[self updateTable];
|
||||||
}];
|
}];
|
||||||
prof_rewind( @"observers" );
|
prof_rewind( @"observers" );
|
||||||
|
|
||||||
@@ -105,14 +105,18 @@
|
|||||||
- (void)flagsChanged:(NSEvent *)theEvent {
|
- (void)flagsChanged:(NSEvent *)theEvent {
|
||||||
|
|
||||||
BOOL shiftPressed = (theEvent.modifierFlags & NSShiftKeyMask) != 0;
|
BOOL shiftPressed = (theEvent.modifierFlags & NSShiftKeyMask) != 0;
|
||||||
if (shiftPressed != self.shiftPressed)
|
if (shiftPressed != self.shiftPressed) {
|
||||||
self.shiftPressed = shiftPressed;
|
self.shiftPressed = shiftPressed;
|
||||||
|
[self.selectedSite updateContent];
|
||||||
|
[self updateSelection];
|
||||||
|
}
|
||||||
|
|
||||||
BOOL alternatePressed = (theEvent.modifierFlags & NSAlternateKeyMask) != 0;
|
BOOL alternatePressed = (theEvent.modifierFlags & NSAlternateKeyMask) != 0;
|
||||||
if (alternatePressed != self.alternatePressed) {
|
if (alternatePressed != self.alternatePressed) {
|
||||||
self.alternatePressed = alternatePressed;
|
self.alternatePressed = alternatePressed;
|
||||||
self.showVersionContainer = self.alternatePressed || self.selectedSite.outdated;
|
self.showVersionContainer = self.alternatePressed || self.selectedSite.outdated;
|
||||||
[self.selectedSite updateContent];
|
[self.selectedSite updateContent];
|
||||||
|
[self updateSelection];
|
||||||
|
|
||||||
if (self.locked) {
|
if (self.locked) {
|
||||||
NSTextField *passwordField = self.securePasswordField;
|
NSTextField *passwordField = self.securePasswordField;
|
||||||
@@ -261,6 +265,9 @@
|
|||||||
[alert setInformativeText:strf( @"Your login name for: %@", self.selectedSite.name )];
|
[alert setInformativeText:strf( @"Your login name for: %@", self.selectedSite.name )];
|
||||||
NSTextField *loginField = [NSTextField new];
|
NSTextField *loginField = [NSTextField new];
|
||||||
[loginField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginName" options:nil];
|
[loginField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginName" options:nil];
|
||||||
|
[loginField bind:@"enabled" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:@{
|
||||||
|
NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName
|
||||||
|
}];
|
||||||
NSButton *generatedField = [NSButton new];
|
NSButton *generatedField = [NSButton new];
|
||||||
[generatedField setButtonType:NSSwitchButton];
|
[generatedField setButtonType:NSSwitchButton];
|
||||||
[generatedField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:nil];
|
[generatedField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:nil];
|
||||||
@@ -477,7 +484,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Performing action while content is available. Copy it.
|
// Performing action while content is available. Copy it.
|
||||||
[self copyContent:self.shiftPressed? selectedSite.answer: selectedSite.content];
|
[self copyContent:self.shiftPressed? selectedSite.loginName: selectedSite.content];
|
||||||
[NSApp hide:nil];
|
[NSApp hide:nil];
|
||||||
|
|
||||||
NSUserNotification *notification = [NSUserNotification new];
|
NSUserNotification *notification = [NSUserNotification new];
|
||||||
@@ -582,7 +589,7 @@
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)updateSelection {
|
- (void)updateTable {
|
||||||
|
|
||||||
[self.siteTable scrollRowToVisible:(NSInteger)self.sitesController.selectionIndex];
|
[self.siteTable scrollRowToVisible:(NSInteger)self.sitesController.selectionIndex];
|
||||||
|
|
||||||
@@ -596,8 +603,13 @@
|
|||||||
(__bridge id)[NSColor colorWithDeviceWhite:1 alpha:gradientOpacity].CGColor
|
(__bridge id)[NSColor colorWithDeviceWhite:1 alpha:gradientOpacity].CGColor
|
||||||
];
|
];
|
||||||
|
|
||||||
|
[self updateSelection];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateSelection {
|
||||||
self.showVersionContainer = self.alternatePressed || self.selectedSite.outdated;
|
self.showVersionContainer = self.alternatePressed || self.selectedSite.outdated;
|
||||||
[self.sitePasswordTipField setAttributedStringValue:straf( @"Your password for %@:", self.selectedSite.displayedName )];
|
[self.sitePasswordTipField setAttributedStringValue:
|
||||||
|
straf( @"Your %@ for %@:", self.shiftPressed? @"login": @"password", self.selectedSite.displayedName, nil )];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)createNewSite:(NSString *)siteName {
|
- (void)createNewSite:(NSString *)siteName {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>com.apple.developer.aps-environment</key>
|
||||||
|
<string>development</string>
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
|
|||||||
@@ -681,12 +681,14 @@
|
|||||||
prefs[@"reviewedVersion"] = @(YES);
|
prefs[@"reviewedVersion"] = @(YES);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
[SentrySDK.currentHub getClient].options.enabled = @YES;
|
||||||
[SentrySDK configureScope:^(SentryScope *scope) {
|
[SentrySDK configureScope:^(SentryScope *scope) {
|
||||||
for (NSString *pref in prefs.allKeys)
|
for (NSString *pref in prefs.allKeys)
|
||||||
[scope setExtraValue:prefs[pref] forKey:pref];
|
[scope setExtraValue:prefs[pref] forKey:pref];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
[SentrySDK.currentHub getClient].options.enabled = @NO;
|
||||||
[Countly.sharedInstance cancelConsentForAllFeatures];
|
[Countly.sharedInstance cancelConsentForAllFeatures];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ const char *mpw_site_result(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *sitePassword = NULL;
|
|
||||||
if (resultType & MPResultTypeClassTemplate) {
|
if (resultType & MPResultTypeClassTemplate) {
|
||||||
switch (algorithmVersion) {
|
switch (algorithmVersion) {
|
||||||
case MPAlgorithmVersionV0:
|
case MPAlgorithmVersionV0:
|
||||||
@@ -172,7 +171,7 @@ const char *mpw_site_result(
|
|||||||
err( "Unsupported password type: %d", resultType );
|
err( "Unsupported password type: %d", resultType );
|
||||||
}
|
}
|
||||||
|
|
||||||
return sitePassword;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *mpw_site_state(
|
const char *mpw_site_state(
|
||||||
|
|||||||
Reference in New Issue
Block a user