Browse Source

【注释回复】删除回复补充

tangchao 5 months ago
parent
commit
b00693d2c9

+ 22 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMore.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "filename" : "nor=nor.pdf",
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "filename" : "nor=nor 1.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 83 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMore.imageset/nor=nor 1.pdf

@@ -0,0 +1,83 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 10.500000 4.500000 cm
+0.262745 0.278431 0.301961 scn
+1.500000 12.000000 m
+2.328427 12.000000 3.000000 12.671573 3.000000 13.500000 c
+3.000000 14.328427 2.328427 15.000000 1.500000 15.000000 c
+0.671573 15.000000 0.000000 14.328427 0.000000 13.500000 c
+0.000000 12.671573 0.671573 12.000000 1.500000 12.000000 c
+h
+3.000000 7.500000 m
+3.000000 6.671573 2.328427 6.000000 1.500000 6.000000 c
+0.671573 6.000000 0.000000 6.671573 0.000000 7.500000 c
+0.000000 8.328427 0.671573 9.000000 1.500000 9.000000 c
+2.328427 9.000000 3.000000 8.328427 3.000000 7.500000 c
+h
+3.000000 1.500000 m
+3.000000 0.671573 2.328427 0.000000 1.500000 0.000000 c
+0.671573 0.000000 0.000000 0.671573 0.000000 1.500000 c
+0.000000 2.328427 0.671573 3.000000 1.500000 3.000000 c
+2.328427 3.000000 3.000000 2.328427 3.000000 1.500000 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  878
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000968 00000 n
+0000000990 00000 n
+0000001163 00000 n
+0000001237 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1296
+%%EOF

+ 83 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMore.imageset/nor=nor.pdf

@@ -0,0 +1,83 @@
+%PDF-1.7
+
+1 0 obj
+  << >>
+endobj
+
+2 0 obj
+  << /Length 3 0 R >>
+stream
+/DeviceRGB CS
+/DeviceRGB cs
+q
+1.000000 0.000000 -0.000000 1.000000 10.500000 4.500000 cm
+0.262745 0.278431 0.301961 scn
+1.500000 12.000000 m
+2.328427 12.000000 3.000000 12.671573 3.000000 13.500000 c
+3.000000 14.328427 2.328427 15.000000 1.500000 15.000000 c
+0.671573 15.000000 0.000000 14.328427 0.000000 13.500000 c
+0.000000 12.671573 0.671573 12.000000 1.500000 12.000000 c
+h
+3.000000 7.500000 m
+3.000000 6.671573 2.328427 6.000000 1.500000 6.000000 c
+0.671573 6.000000 0.000000 6.671573 0.000000 7.500000 c
+0.000000 8.328427 0.671573 9.000000 1.500000 9.000000 c
+2.328427 9.000000 3.000000 8.328427 3.000000 7.500000 c
+h
+3.000000 1.500000 m
+3.000000 0.671573 2.328427 0.000000 1.500000 0.000000 c
+0.671573 0.000000 0.000000 0.671573 0.000000 1.500000 c
+0.000000 2.328427 0.671573 3.000000 1.500000 3.000000 c
+2.328427 3.000000 3.000000 2.328427 3.000000 1.500000 c
+h
+f*
+n
+Q
+
+endstream
+endobj
+
+3 0 obj
+  878
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000034 00000 n
+0000000968 00000 n
+0000000990 00000 n
+0000001163 00000 n
+0000001237 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+1296
+%%EOF

+ 22 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMoreCover.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "filename" : "nor=hov.pdf",
+      "idiom" : "universal"
+    },
+    {
+      "appearances" : [
+        {
+          "appearance" : "luminosity",
+          "value" : "dark"
+        }
+      ],
+      "filename" : "nor=hov 1.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

+ 59 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMoreCover.imageset/nor=hov 1.pdf

@@ -0,0 +1,59 @@
+%PDF-1.7
+
+1 0 obj
+  << /ExtGState << /E1 << /ca 0.100000 >> >> >>
+endobj
+
+2 0 obj
+  << /Filter /FlateDecode
+     /Length 3 0 R
+  >>
+stream
+xm“ËNÄ0E÷þŠ¬‘hój“lyˆ5ð	Ñ µ#¡J|?ÎP_Gt²É�cçÚN¦ãÓéç«žÞ^Ìã;�ú«nôMã³3¹Á^—±"î¡Ž1ˆº’|Ê18†±Dç2‹œì”³Ùê…ÃœÇËx¨v†w^ÆûÁÛâBá"©Ø<;ã£!UR¥©�ÒN݊‡=A!ØZ[ƒ«
D%œ[ø‚w0ˆcµ»*¨…>éLzåç;¾Í�wsv˜xgEü=ÜìSœø(^0XW¸‘öpNR�Ÿ•ü|Ž>u0ˆ`4'7¥Ð¡ &•F1Q·	A9 ¨ÝÁn¬P‡„›¢®ªBt§n˜A«U¾d´œ$¾*›ÅSÌ‚HkdOCkpA½vŽw^&K8	¡ÿ§%�Ã	¤«×M
Ûnj‡?D:Hë~OëÄÿÚ9Þyõeöt´‚t�nj0ˆcmêóÝõ‹ú„üi
+endstream
+endobj
+
+3 0 obj
+  363
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000074 00000 n
+0000000521 00000 n
+0000000543 00000 n
+0000000716 00000 n
+0000000790 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+849
+%%EOF

+ 59 - 0
PDF Office/PDF Master/Class/Appearance/Image.xcassets/LeftSide/Note/KMImageNameBotaNoteReplyMoreCover.imageset/nor=hov.pdf

@@ -0,0 +1,59 @@
+%PDF-1.7
+
+1 0 obj
+  << /ExtGState << /E1 << /ca 0.100000 >> >> >>
+endobj
+
+2 0 obj
+  << /Filter /FlateDecode
+     /Length 3 0 R
+  >>
+stream
+xm“ËNÄ0E÷þŠ¬‘hój“lyˆ5ð	Ñ µ#¡J|?ÎP_Gt²É�cçÚN¦ãÓéç«žÞ^Ìã;�ú«nôMã³3¹Á^—±"î¡Ž1ˆº’|Ê18†±Dç2‹œì”³Ùê…ÃœÇËx¨v†w^ÆûÁÛâBá"©Ø<;ã£!UR¥©�ÒN݊‡=A!ØZ[ƒ«
D%œ[ø‚w0ˆcµ»*¨…>éLzåç;¾Í�wsv˜xgEü=ÜìSœø(^0XW¸‘öpNR�Ÿ•ü|Ž>u0ˆ`4'7¥Ð¡ &•F1Q·	A9 ¨ÝÁn¬P‡„›¢®ªBt§n˜A«U¾d´œ$¾*›ÅSÌ‚HkdOCkpA½vŽw^&K8	¡ÿ§%�Ã	¤«×M
Ûnj‡?D:Hë~OëÄÿÚ9Þyõeöt´‚t�nj0ˆcmêóÝõ‹ú„üi
+endstream
+endobj
+
+3 0 obj
+  363
+endobj
+
+4 0 obj
+  << /Annots []
+     /Type /Page
+     /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
+     /Resources 1 0 R
+     /Contents 2 0 R
+     /Parent 5 0 R
+  >>
+endobj
+
+5 0 obj
+  << /Kids [ 4 0 R ]
+     /Count 1
+     /Type /Pages
+  >>
+endobj
+
+6 0 obj
+  << /Pages 5 0 R
+     /Type /Catalog
+  >>
+endobj
+
+xref
+0 7
+0000000000 65535 f
+0000000010 00000 n
+0000000074 00000 n
+0000000521 00000 n
+0000000543 00000 n
+0000000716 00000 n
+0000000790 00000 n
+trailer
+<< /ID [ (some) (id) ]
+   /Root 6 0 R
+   /Size 7
+>>
+startxref
+849
+%%EOF

+ 22 - 0
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteReplyCellView.swift

@@ -14,6 +14,11 @@ class KMNoteReplyCellView: NSTableCellView, NibLoadable {
     
     @IBOutlet weak var contentLabel: NSTextField!
     
+    @IBOutlet weak var moreBox: NSBox!
+    @IBOutlet weak var moreButton: KMCoverButton!
+    
+    var itemClick: KMCommonClickBlock?
+    
     override func draw(_ dirtyRect: NSRect) {
         super.draw(dirtyRect)
 
@@ -24,6 +29,23 @@ class KMNoteReplyCellView: NSTableCellView, NibLoadable {
         super.awakeFromNib()
         
         self.timeLabel.lineBreakMode = .byTruncatingTail
+        self.titleLabel.textColor = .black
+        
+        self.moreBox.borderWidth = 0
+        self.moreButton.stringValue = ""
+        self.moreButton.target = self
+        self.moreButton.action = #selector(moreAction)
+        self.moreButton.image = NSImage(named: "KMImageNameBotaNoteReplyMore")
+        self.moreButton.coverAction = { btn, act in
+            if act == .enter {
+                btn.image = NSImage(named: "KMImageNameBotaNoteReplyMoreCover")
+            } else if act == .exit {
+                btn.image = NSImage(named: "KMImageNameBotaNoteReplyMore")
+            }
+        }
     }
     
+    @objc func moreAction(_ sender: NSButton) {
+        self.itemClick?(1, sender)
+    }
 }

+ 39 - 22
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Annotation/View/KMNoteReplyCellView.xib

@@ -10,36 +10,43 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <tableCellView id="cJ2-C3-BYm" customClass="KMNoteReplyCellView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="248" height="78"/>
+            <rect key="frame" x="0.0" y="0.0" width="248" height="74"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="Gun-Jd-J23">
-                    <rect key="frame" x="16" y="0.0" width="216" height="78"/>
+                    <rect key="frame" x="16" y="0.0" width="216" height="74"/>
                     <view key="contentView" id="v5i-Rx-mrG">
-                        <rect key="frame" x="1" y="1" width="214" height="76"/>
+                        <rect key="frame" x="1" y="1" width="214" height="72"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YhK-ga-zgX">
-                                <rect key="frame" x="10" y="48" width="37" height="16"/>
+                                <rect key="frame" x="6" y="48" width="37" height="16"/>
                                 <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="e3s-gk-8Zg">
                                     <font key="font" usesAppearanceFont="YES"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                 </textFieldCell>
                             </textField>
-                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="t2z-BK-5kW">
-                                <rect key="frame" x="51" y="48" width="105" height="16"/>
-                                <textFieldCell key="cell" truncatesLastVisibleLine="YES" title="ooooooo0000oo" usesSingleLineMode="YES" id="PEk-7V-T1Z">
-                                    <font key="font" metaFont="system"/>
-                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                </textFieldCell>
-                            </textField>
                             <box boxType="custom" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="jIA-71-L4Q">
-                                <rect key="frame" x="174" y="40" width="36" height="36"/>
+                                <rect key="frame" x="174" y="36" width="36" height="36"/>
                                 <view key="contentView" id="ZKd-Tw-1e4">
                                     <rect key="frame" x="1" y="1" width="34" height="34"/>
                                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                    <subviews>
+                                        <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="XZ6-t2-NDE" customClass="KMCoverButton" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                            <rect key="frame" x="0.0" y="0.0" width="34" height="34"/>
+                                            <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="hxw-Rm-tjD">
+                                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                                <font key="font" metaFont="system"/>
+                                            </buttonCell>
+                                        </button>
+                                    </subviews>
+                                    <constraints>
+                                        <constraint firstAttribute="trailing" secondItem="XZ6-t2-NDE" secondAttribute="trailing" id="MFw-Am-6mr"/>
+                                        <constraint firstItem="XZ6-t2-NDE" firstAttribute="leading" secondItem="ZKd-Tw-1e4" secondAttribute="leading" id="TYX-FU-gt6"/>
+                                        <constraint firstAttribute="bottom" secondItem="XZ6-t2-NDE" secondAttribute="bottom" id="jpH-7l-y8I"/>
+                                        <constraint firstItem="XZ6-t2-NDE" firstAttribute="top" secondItem="ZKd-Tw-1e4" secondAttribute="top" id="xZ9-RF-OS8"/>
+                                    </constraints>
                                 </view>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="36" id="V2t-4Y-H2A"/>
@@ -47,26 +54,34 @@
                                 </constraints>
                             </box>
                             <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="IC2-1d-jhL">
-                                <rect key="frame" x="10" y="16" width="92" height="16"/>
+                                <rect key="frame" x="6" y="16" width="92" height="16"/>
                                 <textFieldCell key="cell" selectable="YES" title="Multiline Label" id="HAk-oO-E2d">
                                     <font key="font" metaFont="system"/>
                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                 </textFieldCell>
                             </textField>
+                            <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="vul-74-pMF">
+                                <rect key="frame" x="43" y="48" width="92" height="16"/>
+                                <textFieldCell key="cell" selectable="YES" title="Multiline Label" id="FwT-2V-3L3">
+                                    <font key="font" metaFont="system"/>
+                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                    <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                </textFieldCell>
+                            </textField>
                         </subviews>
                         <constraints>
-                            <constraint firstItem="t2z-BK-5kW" firstAttribute="leading" secondItem="YhK-ga-zgX" secondAttribute="trailing" constant="8" id="0G6-KJ-2C6"/>
                             <constraint firstItem="jIA-71-L4Q" firstAttribute="top" secondItem="v5i-Rx-mrG" secondAttribute="top" id="6IS-E0-ChE"/>
                             <constraint firstItem="IC2-1d-jhL" firstAttribute="top" secondItem="YhK-ga-zgX" secondAttribute="bottom" constant="16" id="6NK-mB-h4x"/>
-                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="IC2-1d-jhL" secondAttribute="trailing" constant="12" id="Apx-e8-jqR"/>
-                            <constraint firstItem="t2z-BK-5kW" firstAttribute="top" secondItem="v5i-Rx-mrG" secondAttribute="top" constant="12" id="Ldu-rx-ixC"/>
-                            <constraint firstItem="YhK-ga-zgX" firstAttribute="top" secondItem="v5i-Rx-mrG" secondAttribute="top" constant="12" id="RAe-xa-8Pl"/>
-                            <constraint firstItem="YhK-ga-zgX" firstAttribute="leading" secondItem="v5i-Rx-mrG" secondAttribute="leading" constant="12" id="Uz3-mS-fnY"/>
-                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="t2z-BK-5kW" secondAttribute="trailing" constant="44" id="ZnK-SL-nIa"/>
+                            <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="IC2-1d-jhL" secondAttribute="trailing" constant="8" id="Apx-e8-jqR"/>
+                            <constraint firstItem="YhK-ga-zgX" firstAttribute="top" secondItem="v5i-Rx-mrG" secondAttribute="top" constant="8" id="RAe-xa-8Pl"/>
+                            <constraint firstItem="YhK-ga-zgX" firstAttribute="leading" secondItem="v5i-Rx-mrG" secondAttribute="leading" constant="8" id="Uz3-mS-fnY"/>
+                            <constraint firstItem="jIA-71-L4Q" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vul-74-pMF" secondAttribute="trailing" constant="2" id="bTE-26-Ydq"/>
+                            <constraint firstItem="vul-74-pMF" firstAttribute="top" secondItem="v5i-Rx-mrG" secondAttribute="top" constant="8" id="iJ3-TI-B68"/>
+                            <constraint firstItem="vul-74-pMF" firstAttribute="leading" secondItem="YhK-ga-zgX" secondAttribute="trailing" constant="4" id="lhD-Pt-AI7"/>
                             <constraint firstAttribute="trailing" secondItem="jIA-71-L4Q" secondAttribute="trailing" constant="4" id="rPz-Bc-tuR"/>
                             <constraint firstAttribute="bottom" secondItem="IC2-1d-jhL" secondAttribute="bottom" constant="16" id="rX1-E6-ibA"/>
-                            <constraint firstItem="IC2-1d-jhL" firstAttribute="leading" secondItem="v5i-Rx-mrG" secondAttribute="leading" constant="12" id="tKc-r7-kcT"/>
+                            <constraint firstItem="IC2-1d-jhL" firstAttribute="leading" secondItem="v5i-Rx-mrG" secondAttribute="leading" constant="8" id="tKc-r7-kcT"/>
                         </constraints>
                     </view>
                 </box>
@@ -80,7 +95,9 @@
             <connections>
                 <outlet property="backgroundBox" destination="Gun-Jd-J23" id="CCn-fK-BaQ"/>
                 <outlet property="contentLabel" destination="IC2-1d-jhL" id="BgV-ji-YIn"/>
-                <outlet property="timeLabel" destination="t2z-BK-5kW" id="sqp-Ai-tSj"/>
+                <outlet property="moreBox" destination="jIA-71-L4Q" id="pCM-YA-xsh"/>
+                <outlet property="moreButton" destination="XZ6-t2-NDE" id="Kmp-hj-pDj"/>
+                <outlet property="timeLabel" destination="vul-74-pMF" id="KGx-eD-rC1"/>
                 <outlet property="titleLabel" destination="YhK-ga-zgX" id="407-zU-iLQ"/>
             </connections>
             <point key="canvasLocation" x="-41.5" y="22"/>

+ 10 - 3
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -2118,10 +2118,17 @@ extension KMLeftSideViewController: NSOutlineViewDelegate, NSOutlineViewDataSour
                     cell = KMNoteReplyCellView.createFromNib()
                 }
                 cell?.titleLabel.stringValue = data.replyAnno?.userName() ?? ""
-                cell?.timeLabel.stringValue = "2023-0920-15.00"
-                cell?.timeLabel.lineBreakMode = .byTruncatingTail
-                cell?.timeLabel.sizeToFit()
+                if let data = data.replyAnno?.modificationDate() {
+                    cell?.timeLabel.stringValue = KMTools.timeString(timeDate: data)
+                } else {
+                    cell?.timeLabel.stringValue = ""
+                }
                 cell?.contentLabel.stringValue = data.replyAnno?.contents ?? ""
+                cell?.itemClick = { [weak self] idx, params in
+                    if idx == 1 { // 更多
+                        self?.noteReplyHanddler.showReplyMorePopView(sender: params.first as! NSView, anno: data.replyAnno)
+                    }
+                }
                 return cell
             }
             let model = item as? KMBotaAnnotationModel

+ 49 - 1
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Tools/KMNoteReplyHanddler.swift

@@ -193,7 +193,43 @@ class KMNoteReplyHanddler: NSObject {
         popover.setValue(true, forKey: "shouldHideAnchor")
         popover.delegate = self
         
-        popover.show(relativeTo: sender.bounds, of: sender, preferredEdge: .minY)
+        popover.show(relativeTo: sender.bounds, of: sender, preferredEdge: .maxY)
+        self.popover_ = popover
+    }
+    
+    func showReplyMorePopView(sender: NSView, anno: CPDFAnnotation?) {
+        if let _ = self.popover_ {
+            return
+        }
+        //
+        let datas = [NSLocalizedString("Edit", comment: ""), NSLocalizedString("Delete", comment: "")]
+        let vc = KMHomePopViewController(nibName: "KMHomePopViewController", bundle: nil)
+        _ = vc.initWithPopViewDataArr(datas)
+        
+        vc.background = KMAppearance.Layout.bgColor()
+        vc.textColor = KMAppearance.Layout.h0Color()
+        vc.enterFillColor = KMAppearance.Interactive.s0Color()
+        
+        vc.downCallback = { [weak self] result, data in
+            self?.popover_?.close()
+            
+            if data == NSLocalizedString("Edit", comment: "") {
+                self?.editReplyAnnotation()
+            } else if data == NSLocalizedString("Delete", comment: "") {
+                self?.removeReplyAnnotation(anno)
+            }
+            
+            self?.viewC?.reloadAnnotation()
+        }
+
+        let popover = NSPopover()
+        popover.contentViewController = vc
+        popover.animates = true
+        popover.behavior = .semitransient
+        popover.setValue(true, forKey: "shouldHideAnchor")
+        popover.delegate = self
+        
+        popover.show(relativeTo: sender.bounds, of: sender, preferredEdge: .maxY)
         self.popover_ = popover
     }
     
@@ -235,6 +271,18 @@ class KMNoteReplyHanddler: NSObject {
         return a
     }
     
+    func editReplyAnnotation() {
+        KMPrint("editReplyAnnotation")
+    }
+    
+    func removeReplyAnnotation(_ anno: CPDFAnnotation?) {
+        guard let theAnno = anno else {
+            return
+        }
+        
+        theAnno.page.removeAnnotation(theAnno)
+    }
+    
     func fetchReviewState(_ anno: CPDFAnnotation?) -> CPDFAnnotationState? {
         guard let theAnno = self.fetchReviewAnnotation(anno) else {
             return nil