Skip to content

Commit

Permalink
TW-1796: Standarlize Appbar and Appgrid popup (#1880)
Browse files Browse the repository at this point in the history
* TW-1796: Change app grid button icon

* TW-1796: Update app bar and app grid overlay

* TW-1796: Update config app grid + Add public link icons

* TW-1769: Update app grid items

* TW-1796: Update size icon Twake logo
  • Loading branch information
hieutbui committed Jun 25, 2024
1 parent b63fcbe commit 613c470
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 116 deletions.
23 changes: 2 additions & 21 deletions assets/images/ic_application_grid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions configurations/app_dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,10 @@
"icon": "ic_twake_mail.svg",
"appLink": "http://tmail.linagora.com/"
},
{
"appName": "Twake Chat",
"icon": "ic_twake_chat.svg",
"appLink": "https://beta.twake.app/"
},
{
"appName": "Twake Drive",
"icon": "ic_twake_drive.svg",
"appLink": "https://tdrive.linagora.com/"
},
{
"appName": "Contacts",
"icon": "ic_twake_contacts.svg",
"appLink": "https://openpaas.linagora.com/contacts/"
},
{
"appName": "Calendar",
"icon": "ic_twake_calendar.svg",
"appLink": "https://openpaas.linagora.com/calendar/"
},
{
"appName": "Teleskop",
"icon": "ic_twake_visio.svg",
"appLink": "https://jitsi.linagora.com/"
}
]
}
10 changes: 7 additions & 3 deletions docs/configurations/app_grid_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"appName": "Twake Chat",
"icon": "ic_twake_chat.svg",
"appLink": "https://beta.twake.app/",
"publicIconUri": "xxx",
}
```

Expand All @@ -26,21 +27,24 @@
{
"appName": "Twake Mail",
"icon": "ic_twake_mail.svg",
"appLink": "http://tmail.linagora.com/"
"appLink": "http://tmail.linagora.com/",
"publicIconUri": "xxx",
},
{
"appName": "Twake Chat",
"icon": "ic_twake_chat.svg",
"appLink": "https://beta.twake.app/"
"appLink": "https://beta.twake.app/",
"publicIconUri": "xxx",
},
...
]
}
```

- `appName`: The name will be showed in App Grid
- `icon`: Name of icon was added in `configurations\icons` folder
- `icon`: Name of icon was added in `configurations\icons` folder, used when `publicIconUri` is null or empty
- `appLink`: Service URL
- `publicIconUri`: Public link for the icon

2. Enable it in [config.sample.json](https://github.com/linagora/twake-on-matrix/blob/main/config.sample.json)
```
Expand Down
3 changes: 3 additions & 0 deletions lib/domain/model/app_grid/linagora_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class LinagoraApp with EquatableMixin {
final String? androidPackageId;
final String? iosUrlScheme;
final String? iosAppStoreLink;
final Uri? publicIconUri;

LinagoraApp(
this.appName,
Expand All @@ -25,6 +26,7 @@ class LinagoraApp with EquatableMixin {
this.androidPackageId,
this.iosUrlScheme,
this.iosAppStoreLink,
this.publicIconUri,
});

factory LinagoraApp.fromJson(Map<String, dynamic> json) =>
Expand All @@ -40,5 +42,6 @@ class LinagoraApp with EquatableMixin {
androidPackageId,
iosUrlScheme,
iosAppStoreLink,
publicIconUri,
];
}
14 changes: 14 additions & 0 deletions lib/domain/model/extensions/linagora_app_extensions.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'package:fluffychat/domain/model/app_grid/linagora_app.dart';

extension LinagoraAppExtension on LinagoraApp {
String getDisplayAppName() {
switch (appName) {
case 'Twake Mail':
return 'Mail';
case 'Twake Drive':
return 'Drive';
default:
return appName;
}
}
}
3 changes: 3 additions & 0 deletions lib/pages/app_grid/app_grid_dashboard_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class AppGridDashboardController extends State<AppGridDashboard> {

final linagoraApplications = ValueNotifier<LinagoraApplications?>(null);

final hoverColor = ValueNotifier<Color>(Colors.transparent);

void _getAppGridConfiguration() {
_getAppGridConfigurationInteractor
.execute(
Expand Down Expand Up @@ -79,6 +81,7 @@ class AppGridDashboardController extends State<AppGridDashboard> {
void dispose() {
isOpenAppGridDashboardNotifier.dispose();
linagoraApplications.dispose();
hoverColor.dispose();
super.dispose();
}

Expand Down
Loading

0 comments on commit 613c470

Please sign in to comment.