feat: tela de apps com logos/menu de exclusao, correcao de tema nas mini apps e sidebar de navegacao
Some checks failed
Main Deploy Workflow / deploy_web (push) Has been cancelled
Main Deploy Workflow / deploy_playstore_internal (push) Has been cancelled
Close stale issues and PRs / stale (push) Has been cancelled

This commit is contained in:
2026-09-19 00:08:35 -03:00
parent 1f692b1e4e
commit 6c689d1f34
23 changed files with 1039 additions and 114 deletions

View File

@@ -23,12 +23,19 @@ const List<MiniAppConfig> availableMiniApps = [
id: miniAppTasksId,
icon: Icons.checklist_rounded,
color: Color(0xFF00D084),
category: 'productivity',
description:
'A simple task checklist that lives in your Matrix account data.',
inChat: false,
htmlAsset: 'assets/miniapps/tasks.html',
),
MiniAppConfig(
id: miniAppAccountDataId,
icon: Icons.storage_rounded,
color: Color(0xFF1F8EF1),
category: 'developer',
description: 'Read and edit the account data of your Matrix account.',
inChat: false,
htmlAsset: 'assets/miniapps/accountdata.html',
),
];
@@ -41,6 +48,14 @@ class MiniAppConfig {
final IconData icon;
final Color color;
final String? name;
final String? category;
final String? description;
/// Logo of the app: either an http(s) URL or a `data:` URI.
final String? logo;
/// Whether the mini app can run inside a chat room.
final bool inChat;
final String? htmlAsset;
final String? html;
@@ -49,6 +64,10 @@ class MiniAppConfig {
required this.icon,
required this.color,
this.name,
this.category,
this.description,
this.logo,
this.inChat = false,
this.htmlAsset,
this.html,
});
@@ -58,12 +77,20 @@ class MiniAppConfig {
MiniAppConfig.custom({
required String id,
String? name,
String? category,
String? description,
String? logo,
bool inChat = false,
String? html,
}) : this(
id: id,
icon: Icons.web_asset_rounded,
color: const Color(0xFF9C27B0),
name: name,
category: category,
description: description,
logo: logo,
inChat: inChat,
html: html,
);
@@ -86,6 +113,10 @@ MiniAppConfig? resolveMiniAppConfig(Client client, String appId) {
return MiniAppConfig.custom(
id: appId,
name: client.getMiniAppName(appId),
category: client.getMiniAppCategory(appId),
description: client.getMiniAppDescription(appId),
logo: client.getMiniAppLogo(appId),
inChat: client.getMiniAppInChat(appId),
html: html,
);
}
@@ -107,6 +138,10 @@ List<MiniAppConfig> installedMiniAppConfigs(Client client) {
MiniAppConfig.custom(
id: id,
name: client.getMiniAppName(id),
category: client.getMiniAppCategory(id),
description: client.getMiniAppDescription(id),
logo: client.getMiniAppLogo(id),
inChat: client.getMiniAppInChat(id),
html: client.getMiniAppSource(id),
),
];

View File

@@ -15,6 +15,9 @@ abstract class FluffyThemes {
static const double navRailWidth = 80.0;
/// Width of the navigation sidebar (column mode only).
static const double sidebarWidth = 280.0;
static bool isColumnModeByWidth(double width) =>
width > columnWidth * 2 + navRailWidth;