-
-
Notifications
You must be signed in to change notification settings - Fork 121
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 #29 from bostrot/additional_features
Additional features
- Loading branch information
Showing
24 changed files
with
931 additions
and
246 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
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
build/windows/runner/Release/data/flutter_assets/AssetManifest.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/fluent_ui/assets/AcrylicNoise.png":["packages/fluent_ui/assets/AcrylicNoise.png"],"packages/fluent_ui/fonts/FluentIcons.ttf":["packages/fluent_ui/fonts/FluentIcons.ttf"]} | ||
{"packages/fluent_ui/assets/AcrylicNoise.png":["packages/fluent_ui/assets/AcrylicNoise.png"],"packages/fluent_ui/fonts/FluentIcons.ttf":["packages/fluent_ui/fonts/FluentIcons.ttf"]} |
2 changes: 1 addition & 1 deletion
2
build/windows/runner/Release/data/flutter_assets/FontManifest.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"family":"packages/fluent_ui/FluentIcons","fonts":[{"asset":"packages/fluent_ui/fonts/FluentIcons.ttf"}]}] | ||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/fluent_ui/FluentIcons","fonts":[{"asset":"packages/fluent_ui/fonts/FluentIcons.ttf"}]}] |
Binary file not shown.
Binary file removed
BIN
-277 KB
...ows/runner/Release/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
build/windows/runner/Release/url_launcher_windows_plugin.dll
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import 'package:fluent_ui/fluent_ui.dart'; | ||
import 'package:wsl2distromanager/components/api.dart'; | ||
import 'package:wsl2distromanager/components/theme.dart'; | ||
|
||
class Console extends StatefulWidget { | ||
const Console( | ||
{Key? key, | ||
required this.item, | ||
required this.cmds, | ||
required this.afterInit}) | ||
: super(key: key); | ||
final String item; | ||
final String cmds; | ||
final Function afterInit; | ||
@override | ||
State<Console> createState() => _ConsoleState(); | ||
} | ||
|
||
class _ConsoleState extends State<Console> { | ||
String output = ''; | ||
ScrollController scrollController = ScrollController(); | ||
|
||
@override | ||
void initState() { | ||
WSLApi().execCmds(widget.item, widget.cmds.split('\n'), onMsg: (msg) { | ||
try { | ||
setState(() { | ||
output += msg; | ||
}); | ||
} catch (e) { | ||
// ignore if state is already disposed | ||
} | ||
// Scroll to bottom | ||
scrollController.animateTo( | ||
scrollController.position.maxScrollExtent + 100.0, | ||
duration: const Duration(milliseconds: 200), | ||
curve: Curves.easeOut); | ||
}, onDone: () { | ||
output += '\n\n== Done =='; | ||
}); | ||
super.initState(); | ||
widget.afterInit(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
color: themeData.activeColor.withOpacity(0.1), | ||
height: 100.0, | ||
width: double.infinity, | ||
child: SingleChildScrollView( | ||
controller: scrollController, | ||
child: SingleChildScrollView( | ||
child: Padding( | ||
padding: const EdgeInsets.all(8.0), | ||
child: SelectableText( | ||
output, | ||
style: TextStyle(color: themeData.activeColor.withOpacity(0.5)), | ||
), | ||
)))); | ||
} | ||
} |
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 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
Oops, something went wrong.