added prj editing page, must change to dialog bcz page too big
All checks were successful
Build CI / AMD64 Build (push) Successful in 3m23s
Build CI / ARM64 Build (push) Successful in 7m16s

This commit is contained in:
2026-02-15 19:06:08 +05:30
parent 985d7e5e21
commit ec3e69ffa9
8 changed files with 203 additions and 32 deletions

View File

@@ -14,8 +14,6 @@ class EditorCard extends StatelessWidget {
Widget build(BuildContext context) {
GlobalModel gm = Provider.of<GlobalModel>(context);
final Editor edt = gm.nthEdt(id);
final String icon =
"${edt.name.substring(0, 1).toUpperCase()}${edt.name.substring(1, 2).toLowerCase()}";
return YaruBanner(
padding: .only(
left: kYaruPagePadding,
@@ -28,7 +26,7 @@ class EditorCard extends StatelessWidget {
child: Row(
children: [
Text("$icon", style: TextStyle(fontSize: 50)),
Text("${edt.sname}", style: TextStyle(fontSize: 50)),
VerticalDivider(width: 20, thickness: 2),
Flexible(
child: Column(

View File

@@ -10,6 +10,7 @@ class ProjFAB extends StatelessWidget {
Widget build(BuildContext context) {
TextEditingController nameController = TextEditingController();
TextEditingController locationController = TextEditingController();
TextEditingController languageController = TextEditingController();
return FloatingActionButton(
onPressed: () {
showDialog(
@@ -33,6 +34,13 @@ class ProjFAB extends StatelessWidget {
decoration: InputDecoration(labelText: "Path"),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
controller: languageController,
decoration: InputDecoration(labelText: "Language"),
),
),
Row(
mainAxisAlignment: .end,
@@ -47,7 +55,7 @@ class ProjFAB extends StatelessWidget {
Provider.of<GlobalModel>(context, listen: false).addPrj(
Project.newValidated(
nameController.text,
"Rust",
languageController.text,
locationController.text,
[],
true,

View File

@@ -23,10 +23,14 @@ class ProjectCard extends StatelessWidget {
),
onHover: (st) => gm.setHoverShow(id, st),
onTap: () {
var shell = Shell();
Editor edt1 = gm.editors[0];
String comm = edt1.commandTemplate.replaceAll("\$path", prj.path.path);
shell.run(comm);
// var shell = Shell();
// Editor edt1 = gm.editors[0];
// String comm = edt1.commandTemplate.replaceAll("\$path", prj.path.path);
// shell.run(comm);
// ScaffoldMessenger.of(context).showSnackBar(
// SnackBar(content: Text("Launched "), duration: Duration(seconds: 3)),
// );
Navigator.pushNamed(context, "/manageprj", arguments: id);
},
child: Center(
child: Column(
@@ -46,15 +50,15 @@ class ProjectCard extends StatelessWidget {
],
),
gm.getHoverShow(id) ? Text("${prj.path.path}") : Container(),
gm.getHoverShow(id)
? IconButton(
icon: Icon(Icons.close),
onPressed: () => gm.delPrj(id),
style: IconButton.styleFrom(
overlayColor: Color(0xffff0000),
),
)
: Container(),
// gm.getHoverShow(id)
// ? IconButton(
// icon: Icon(Icons.close),
// onPressed: () => gm.delPrj(id),
// style: IconButton.styleFrom(
// overlayColor: Color(0xffff0000),
// ),
// )
// : Container(),
],
),
),