👔 Article wont show expand attachment list
This commit is contained in:
@ -33,12 +33,14 @@ class AttachmentEditorPopup extends StatefulWidget {
|
||||
final List<String>? initialAttachments;
|
||||
final void Function(String) onAdd;
|
||||
final void Function(String) onRemove;
|
||||
final void Function(String)? onInsert;
|
||||
|
||||
const AttachmentEditorPopup({
|
||||
super.key,
|
||||
required this.pool,
|
||||
required this.onAdd,
|
||||
required this.onRemove,
|
||||
this.onInsert,
|
||||
this.singleMode = false,
|
||||
this.imageOnly = false,
|
||||
this.autoUpload = false,
|
||||
@ -557,6 +559,22 @@ class _AttachmentEditorPopupState extends State<AttachmentEditorPopup> {
|
||||
setState(() => _attachments.removeAt(idx));
|
||||
},
|
||||
),
|
||||
if (widget.onInsert != null)
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
title: Text('insert'.tr),
|
||||
leading: const Icon(Icons.insert_link),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
widget.onInsert!(
|
||||
'',
|
||||
);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -287,6 +287,16 @@ class _AttachmentFullScreenState extends State<AttachmentFullScreen> {
|
||||
'${widget.item.metadata?['width']}x${widget.item.metadata?['height']}',
|
||||
style: metaTextStyle,
|
||||
),
|
||||
if (widget.item.metadata?['ratio'] != null)
|
||||
Text(
|
||||
(widget.item.metadata?['ratio'] as num)
|
||||
.toStringAsFixed(2),
|
||||
style: metaTextStyle,
|
||||
),
|
||||
Text(
|
||||
widget.item.mimetype,
|
||||
style: metaTextStyle,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user