File tree Expand file tree Collapse file tree 4 files changed +21
-3
lines changed
Expand file tree Collapse file tree 4 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 823823 },
824824 "share" : " Copy share link" ,
825825 "openInBrowser" : " Open in browser" ,
826- "copyText" : " Copy Text"
826+ "copyText" : " Copy Text" ,
827+ "copyPid" : " Copy pid (${pid: String})"
827828 },
828829 "packetCard" : {
829830 "title" : " Packet" ,
Original file line number Diff line number Diff line change 823823 },
824824 "share" : " 复制分享链接" ,
825825 "openInBrowser" : " 在浏览器中打开" ,
826- "copyText" : " 复制文字"
826+ "copyText" : " 复制文字" ,
827+ "copyPid" : " 复制pid(${pid: String})"
827828 },
828829 "packetCard" : {
829830 "title" : " 红包" ,
Original file line number Diff line number Diff line change 823823 },
824824 "share" : " 複製分享連結" ,
825825 "openInBrowser" : " 在瀏覽器中開啟" ,
826- "copyText" : " 複製文字"
826+ "copyText" : " 複製文字" ,
827+ "copyPid" : " 複製pid(${pid: String})"
827828 },
828829 "packetCard" : {
829830 "title" : " 紅包" ,
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ enum _PostCardActions {
5959
6060 /// Open the dialog to copy contents.
6161 openAndCopy,
62+
63+ /// Copy post id.
64+ copyPid,
6265}
6366
6467/// Card for a [Post] model.
@@ -345,6 +348,16 @@ class _PostCardState extends State<PostCard> with AutomaticKeepAliveClientMixin
345348 ],
346349 ),
347350 ),
351+ PopupMenuItem (
352+ value: _PostCardActions .copyPid,
353+ child: Row (
354+ children: [
355+ const Icon (Icons .numbers_outlined),
356+ sizedBoxPopupMenuItemIconSpacing,
357+ Text (context.t.postCard.copyPid (pid: widget.post.postID)),
358+ ],
359+ ),
360+ ),
348361 ],
349362 ],
350363 onSelected: (value) async {
@@ -394,6 +407,8 @@ class _PostCardState extends State<PostCard> with AutomaticKeepAliveClientMixin
394407 .join () ??
395408 '' ;
396409 await showCopySelectContentDialog (context: context, data: data);
410+ case _PostCardActions .copyPid:
411+ await copyToClipboard (context, widget.post.postID);
397412 }
398413 },
399414 ),
You can’t perform that action at this time.
0 commit comments