-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2440 from acterglobal/kumar/boost-share-improvements
RefDetail enhancement on Space Objects
- Loading branch information
Showing
23 changed files
with
422 additions
and
647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- [New] : Boost Actions : Now you can share space objects as boost action of any space in which you are part of. There is not selected space restriction anymore. | ||
- [Enhancement] : Attachment List on space object details screen got event better by having separate reference attachments list from general attachment list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart'; | ||
import 'package:atlas_icons/atlas_icons.dart'; | ||
import 'package:flutter_easyloading/flutter_easyloading.dart'; | ||
import 'package:flutter_gen/gen_l10n/l10n.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:phosphor_flutter/phosphor_flutter.dart'; | ||
|
||
class ReferenceDetailsItem extends StatelessWidget { | ||
final RefDetails refDetails; | ||
|
||
const ReferenceDetailsItem({ | ||
super.key, | ||
required this.refDetails, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final refTitle = refDetails.title() ?? L10n.of(context).unknown; | ||
final refType = refDetails.typeStr(); | ||
final roomName = refDetails.roomDisplayName().toString(); | ||
return Card( | ||
margin: EdgeInsets.symmetric(vertical: 6, horizontal: 12), | ||
child: ListTile( | ||
leading: Icon(getIconByType(refType), size: 25), | ||
title: Text(refTitle), | ||
subtitle: Text(refType), | ||
onTap: () => EasyLoading.showError( | ||
L10n.of(context).noObjectAccess(refType, roomName), | ||
duration: const Duration(seconds: 3), | ||
), | ||
), | ||
); | ||
} | ||
|
||
IconData getIconByType(String refType) { | ||
final defaultIcon = PhosphorIconsThin.tagChevron; | ||
switch (refType) { | ||
case 'pin': | ||
return Atlas.pin; | ||
case 'calendar-event': | ||
return Atlas.calendar; | ||
case 'task-list': | ||
return Atlas.list; | ||
default: | ||
return defaultIcon; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.