Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
glushchenko committed May 30, 2023
1 parent 482c6b9 commit 8ba9841
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
16 changes: 8 additions & 8 deletions FSNotes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5038,7 +5038,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 572;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = 866P6MTE92;
EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -5055,7 +5055,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 6.2.6;
MARKETING_VERSION = 6.3.1;
PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes;
PRODUCT_NAME = FSNotes;
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -5077,7 +5077,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 572;
CURRENT_PROJECT_VERSION = 575;
DEPLOYMENT_LOCATION = NO;
DEVELOPMENT_TEAM = 866P6MTE92;
EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES;
Expand All @@ -5095,7 +5095,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 6.2.6;
MARKETING_VERSION = 6.3.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes;
PRODUCT_NAME = FSNotes;
Expand Down Expand Up @@ -5440,7 +5440,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 573;
CURRENT_PROJECT_VERSION = 575;
DEVELOPMENT_TEAM = 866P6MTE92;
EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES;
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -5456,7 +5456,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 6.3.0;
MARKETING_VERSION = 6.3.1;
OTHER_SWIFT_FLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes;
PRODUCT_NAME = FSNotes;
Expand All @@ -5478,7 +5478,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 573;
CURRENT_PROJECT_VERSION = 575;
DEPLOYMENT_LOCATION = NO;
DEVELOPMENT_TEAM = 866P6MTE92;
EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES;
Expand All @@ -5495,7 +5495,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 6.3.0;
MARKETING_VERSION = 6.3.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = co.fluder.FSNotes;
PRODUCT_NAME = FSNotes;
Expand Down
5 changes: 2 additions & 3 deletions FSNotes/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,7 @@ Gw
<constraint firstAttribute="height" constant="70" id="TuC-Fg-xJn"/>
<constraint firstAttribute="width" constant="67" id="VIF-nP-g4S"/>
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="dockIcon4" id="FCd-Ar-efh"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon" id="FCd-Ar-efh"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uwq-Wq-Zsn">
<rect key="frame" x="208" y="486" width="67" height="17"/>
Expand Down Expand Up @@ -2539,7 +2539,7 @@ All rights reserved.</string>
<rect key="frame" x="18" y="106" width="446" height="32"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" id="sWS-bo-99f">
<font key="font" metaFont="system"/>
<string key="title">Roman Kliuchkovychkmstrr@gmail.com
<string key="title">Dylan Seegerhttps://www.lovably.com
Olena Hlushcneko</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -4911,7 +4911,6 @@ Olena Hlushcneko</string>
<image name="NSLockLockedTemplate" width="19" height="19"/>
<image name="NSQuickLookTemplate" width="26" height="17"/>
<image name="NSShareTemplate" width="19" height="22"/>
<image name="dockIcon4" width="64" height="64"/>
<image name="icon" width="1024" height="1024"/>
<image name="icon_alt" width="1024" height="1024"/>
<image name="lock-closed" width="128" height="128"/>
Expand Down
14 changes: 9 additions & 5 deletions FSNotes/View/EditTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
return
}

if event.keyCode == kVK_Return && !hasMarkedText() {
if event.keyCode == kVK_Return && !hasMarkedText() && isEditable {
breakUndoCoalescing()
let formatter = TextFormatter(textView: self, note: note, shouldScanMarkdown: false)
formatter.newLine()
Expand Down Expand Up @@ -1770,15 +1770,15 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
}

@IBAction func shiftLeft(_ sender: Any) {
guard let note = self.note else { return }
guard let note = self.note, isEditable else { return }
let f = TextFormatter(textView: self, note: note, shouldScanMarkdown: false)

textStorageProcessor?.shouldForceRescan = true
f.unTab()
}

@IBAction func shiftRight(_ sender: Any) {
guard let note = self.note else { return }
guard let note = self.note, isEditable else { return }
let f = TextFormatter(textView: self, note: note, shouldScanMarkdown: false)

textStorageProcessor?.shouldForceRescan = true
Expand Down Expand Up @@ -1813,7 +1813,7 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
}

@IBAction func insertFileOrImage(_ sender: Any) {
guard let note = self.note else { return }
guard let note = self.note, isEditable else { return }

let panel = NSOpenPanel()
panel.allowsMultipleSelection = true
Expand All @@ -1840,6 +1840,8 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
}

@IBAction func insertCodeBlock(_ sender: NSButton) {
guard isEditable else { return }

let currentRange = selectedRange()

if currentRange.length > 0 {
Expand Down Expand Up @@ -1870,6 +1872,8 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
}

@IBAction func insertCodeSpan(_ sender: NSMenuItem) {
guard isEditable else { return }

let currentRange = selectedRange()

if currentRange.length > 0 {
Expand Down Expand Up @@ -1918,7 +1922,7 @@ class EditTextView: NSTextView, NSTextFinderClient, NSSharingServicePickerDelega
}

private func getTextFormatter() -> TextFormatter? {
guard let note = self.note else { return nil }
guard let note = self.note, isEditable else { return nil }

return TextFormatter(textView: self, note: note)
}
Expand Down

0 comments on commit 8ba9841

Please sign in to comment.