diff --git a/lib/providers/desktop_navigator.dart b/lib/providers/desktop_navigator.dart index 3719dc2f..9f6dca70 100644 --- a/lib/providers/desktop_navigator.dart +++ b/lib/providers/desktop_navigator.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:maid/ui/desktop/settings_panels/app_settings_panel.dart'; +import 'package:maid/ui/desktop/settings_panels/log_panel.dart'; import 'package:maid/ui/desktop/settings_panels/user_panel.dart'; import 'package:maid/ui/desktop/side_panels/characters_panel.dart'; import 'package:maid/ui/desktop/side_panels/model_settings_panel.dart'; @@ -23,7 +24,8 @@ class DesktopNavigator extends ChangeNotifier { final Map _settingsPanelRoutes = { "/user-settings": (context) => const UserPanel(), - "/settings": (context) => const AppSettingsPanel() + "/settings": (context) => const AppSettingsPanel(), + "/log": (context) => const LogPanel(), }; bool get sidePanelOpen => _sidePanelOpen; diff --git a/lib/ui/desktop/layout/side_bar.dart b/lib/ui/desktop/layout/side_bar.dart index 02980544..d0742b79 100644 --- a/lib/ui/desktop/layout/side_bar.dart +++ b/lib/ui/desktop/layout/side_bar.dart @@ -60,10 +60,10 @@ class SideBar extends StatelessWidget { return Column( children: [ IconButton( - tooltip: 'Toggle Terminal', + tooltip: 'Toggle Log', icon: const Icon(Icons.terminal_rounded), onPressed: () { - DesktopNavigator.of(context).navigateSettingsPanel("/terminal"); + DesktopNavigator.of(context).navigateSettingsPanel("/log"); }, ), IconButton( diff --git a/lib/ui/desktop/settings_panels/log_panel.dart b/lib/ui/desktop/settings_panels/log_panel.dart new file mode 100644 index 00000000..849c6341 --- /dev/null +++ b/lib/ui/desktop/settings_panels/log_panel.dart @@ -0,0 +1,33 @@ +import 'package:flutter/material.dart'; +import 'package:maid/providers/app_data.dart'; +import 'package:maid/providers/app_preferences.dart'; +import 'package:maid/providers/user.dart'; +import 'package:maid/static/logger.dart'; +import 'package:provider/provider.dart'; + +class LogPanel extends StatelessWidget { + const LogPanel({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Consumer3( + builder: buildLog, + ), + ); + } + + Widget buildLog(BuildContext context, AppData appData, AppPreferences appPreferences, User user, Widget? child) { + return Container( + padding: const EdgeInsets.all(8.0), + color: Colors.black, + child: SelectableText( + Logger.getLog, + style: const TextStyle( + color: Colors.white, + fontFamily: 'monospace', + ), + ) + ); + } +} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 9be79172..4809702a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -501,7 +501,7 @@ packages: path: "packages/maid_llm" relative: true source: path - version: "1.0.2" + version: "1.0.1" matcher: dependency: transitive description: