mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 13:29:46 +00:00
Added expired editor for inspector
This commit is contained in:
17
MacPass/MPNodeExpirationViewController.h
Normal file
17
MacPass/MPNodeExpirationViewController.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// MPNodeExpirationViewController.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 22.10.21.
|
||||
// Copyright © 2021 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MPNodeExpirationViewController : NSViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
57
MacPass/MPNodeExpirationViewController.m
Normal file
57
MacPass/MPNodeExpirationViewController.m
Normal file
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// MPNodeExpirationViewController.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 22.10.21.
|
||||
// Copyright © 2021 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPNodeExpirationViewController.h"
|
||||
#import <KeePassKit/KeePassKit.h>
|
||||
|
||||
@interface MPNodeExpirationViewController ()
|
||||
|
||||
@property (nonatomic, readonly, strong) KPKTimeInfo *representedTimeInfo;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPNodeExpirationViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
}
|
||||
|
||||
- (void)setRepresentedObject:(id)representedObject {
|
||||
/*if(self.representedTimeInfo) {
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self name:KPKWillChangeTimeInfo object:self.representedTimeInfo];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self name:KPKDidChangeTimeInfo object:self.representedTimeInfo];
|
||||
}
|
||||
super.representedObject = representedObject;
|
||||
if(self.representedTimeInfo) {
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:(@selector(_willChangeTimeInfo:))
|
||||
name:KPKWillChangeTimeInfoNotification
|
||||
object:self.representedTimeInfo];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:(@selector(_didChangeTimeInfo:))
|
||||
name:KPKDidChangeTimeInfoNotification
|
||||
object:self.representedTimeInfo];
|
||||
|
||||
}
|
||||
_isDefaultAttribute = self.representedAttribute.isDefault;
|
||||
[self _updateValues];*/
|
||||
}
|
||||
|
||||
|
||||
- (void)_updateValues {
|
||||
|
||||
}
|
||||
|
||||
- (void)_willChangeTimeInfo:(NSNotification *)notification {
|
||||
|
||||
}
|
||||
- (void)_didChangeTimeInfo:(NSNotification *)notification {
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
63
MacPass/MPNodeExpirationViewController.xib
Normal file
63
MacPass/MPNodeExpirationViewController.xib
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="MPNodeExpirationViewController">
|
||||
<connections>
|
||||
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Hz6-mo-xeY">
|
||||
<rect key="frame" x="0.0" y="0.0" width="187" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<stackView distribution="fill" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" horizontalHuggingPriority="248" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="l8k-GC-FnL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="187" height="20"/>
|
||||
<subviews>
|
||||
<button horizontalHuggingPriority="249" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="HAQ-Wk-M7P">
|
||||
<rect key="frame" x="-2" y="1" width="150" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Expires" bezelStyle="regularSquare" imagePosition="left" lineBreakMode="truncatingMiddle" state="on" inset="2" id="7kV-WE-lr3">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="G7C-WZ-ad7">
|
||||
<rect key="frame" x="149" y="-7" width="45" height="32"/>
|
||||
<buttonCell key="cell" type="push" bezelStyle="rounded" image="NSActionTemplate" imagePosition="only" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="hgC-Qj-aTs">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="pickExpiryDate:" target="-1" id="EGg-Lx-7s5"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<visibilityPriorities>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="l8k-GC-FnL" secondAttribute="bottom" id="6uR-g8-FVH"/>
|
||||
<constraint firstItem="l8k-GC-FnL" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="AuC-c3-JPv"/>
|
||||
<constraint firstItem="l8k-GC-FnL" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="Qvv-5F-nde"/>
|
||||
<constraint firstAttribute="trailing" secondItem="l8k-GC-FnL" secondAttribute="trailing" id="ckb-kh-R60"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-91" y="-25"/>
|
||||
</customView>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="NSActionTemplate" width="15" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user