Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 823690aed3 | |||
| a8d397a53e | |||
| d2ef640bc8 | |||
| e118648a37 |
@@ -14,19 +14,32 @@ jobs:
|
|||||||
AMD64:
|
AMD64:
|
||||||
name: AMD64 Build
|
name: AMD64 Build
|
||||||
runs-on: linux-amd64
|
runs-on: linux-amd64
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
channel: master
|
channel: master
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
path: /tmp/.buildx-cache
|
go-version: '1.20'
|
||||||
key: ${{ runner.os }}-buildx-${{ gitea.sha }}
|
|
||||||
|
- name: Generate Pub Hash
|
||||||
|
uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||||||
|
id: pub-hash
|
||||||
|
with:
|
||||||
|
patterns: pubspec.lock
|
||||||
|
|
||||||
|
- name: Cache Pub Dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.pub-cache
|
||||||
|
key: ${{ runner.os }}-pub-${{ steps.pub-hash.outputs.hash }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-buildx-
|
${{ runner.os }}-pub-${{ steps.pub-hash.outputs.hash }}
|
||||||
|
|
||||||
- name: Install Framework Dependencies
|
- name: Install Framework Dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -38,6 +51,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
channel: master
|
channel: master
|
||||||
flutter-version: 3.38.9
|
flutter-version: 3.38.9
|
||||||
|
cache: true
|
||||||
|
|
||||||
- name: Check Flutter Installation
|
- name: Check Flutter Installation
|
||||||
run: flutter doctor -v
|
run: flutter doctor -v
|
||||||
@@ -65,11 +79,11 @@ jobs:
|
|||||||
- name: Save Artifacts
|
- name: Save Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Prod-${{ github.ref_type == 'tag' && github.ref_name || 'master' }}-x86_64.AppImage
|
name: Prod-${{ github.ref_type == 'v*' && github.ref_name || 'master' }}-x86_64.AppImage
|
||||||
path: Prod-latest-x86_64.AppImage
|
path: Prod-latest-x86_64.AppImage
|
||||||
|
|
||||||
- name: Create New Release
|
- name: Create New Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
files: Prod-latest-x86_64.AppImage
|
files: Prod-latest-x86_64.AppImage
|
||||||
prerelease: ${{ github.ref_type == 'tag' }}
|
prerelease: ${{ github.ref_type != 'v*' }}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class MyApp extends StatelessWidget {
|
|||||||
return YaruTheme(
|
return YaruTheme(
|
||||||
builder: (context, yaru, child) {
|
builder: (context, yaru, child) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: yaru.theme,
|
theme: yaruLight,
|
||||||
themeMode: .system,
|
themeMode: .system,
|
||||||
darkTheme: yaru.darkTheme,
|
darkTheme: yaru.darkTheme,
|
||||||
routes: {
|
routes: {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:prod/models/editor.dart';
|
|||||||
import 'package:prod/models/project.dart';
|
import 'package:prod/models/project.dart';
|
||||||
import "package:shared_preferences/shared_preferences.dart";
|
import "package:shared_preferences/shared_preferences.dart";
|
||||||
import "package:prod/models/constants.dart";
|
import "package:prod/models/constants.dart";
|
||||||
// import "package:json_annotation/json_annotation.dart";
|
|
||||||
import "dart:convert";
|
import "dart:convert";
|
||||||
|
|
||||||
class GlobalModel extends ChangeNotifier {
|
class GlobalModel extends ChangeNotifier {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:prod/models/editor.dart";
|
|
||||||
import "package:prod/models/globalModel.dart";
|
import "package:prod/models/globalModel.dart";
|
||||||
import "package:prod/widgets/editorCard.dart";
|
import "package:prod/widgets/editorCard.dart";
|
||||||
import "package:prod/widgets/edtFAB.dart";
|
import "package:prod/widgets/edtFAB.dart";
|
||||||
|
|||||||
@@ -21,16 +21,17 @@ class ManageProject extends StatelessWidget {
|
|||||||
pathController.text = prj.path.path;
|
pathController.text = prj.path.path;
|
||||||
langController.text = prj.language;
|
langController.text = prj.language;
|
||||||
return SimpleDialog(
|
return SimpleDialog(
|
||||||
|
backgroundColor: Color(0xfff6f6f6),
|
||||||
title: Row(
|
title: Row(
|
||||||
mainAxisAlignment: .spaceBetween,
|
mainAxisAlignment: .spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
OutlinedButton(
|
FilledButton(
|
||||||
child: Text("Cancel"),
|
child: Text("Cancel"),
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
),
|
),
|
||||||
Text("Edit Project"),
|
Text("Edit Project"),
|
||||||
FilledButton(
|
ElevatedButton(
|
||||||
child: Text("Save"),
|
child: Text(" Save "),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
prj.name = nameController.text;
|
prj.name = nameController.text;
|
||||||
prj.path = File(pathController.text);
|
prj.path = File(pathController.text);
|
||||||
@@ -38,7 +39,9 @@ class ManageProject extends StatelessWidget {
|
|||||||
gm.updatePrj(id, prj);
|
gm.updatePrj(id, prj);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text("Updated Project Details"),
|
content: Text(
|
||||||
|
"Project Details Updated ✅",
|
||||||
|
), // The empty space as rendered by Zed is a green check mark. Dont remove it.
|
||||||
duration: Duration(milliseconds: 2000),
|
duration: Duration(milliseconds: 2000),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -48,52 +51,109 @@ class ManageProject extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Card(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 1, color: Colors.grey[350]!),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
color: Color(0xffffffff),
|
||||||
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
TextField(
|
||||||
style: TextStyle(fontSize: 50),
|
style: TextStyle(fontSize: 35),
|
||||||
controller: nameController,
|
controller: nameController,
|
||||||
textAlign: .center,
|
textAlign: .left,
|
||||||
// onEditingComplete: () => gm.updateEdited(true),
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: .none,
|
label: Text(
|
||||||
|
"Name",
|
||||||
|
style: TextStyle(color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
// border: .none,
|
||||||
enabledBorder: .none,
|
enabledBorder: .none,
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
Divider(thickness: 1),
|
||||||
TextField(
|
TextField(
|
||||||
style: TextStyle(fontSize: 30),
|
style: TextStyle(fontSize: 20),
|
||||||
controller: pathController,
|
controller: pathController,
|
||||||
textAlign: .center,
|
textAlign: .left,
|
||||||
// onEditingComplete: () => gm.updateEdited(true),
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: "Path",
|
label: Text(
|
||||||
border: .none,
|
"Path",
|
||||||
// enabledBorder: .none,
|
style: TextStyle(color: Colors.grey[700]),
|
||||||
fillColor: Colors.transparent,
|
|
||||||
),
|
),
|
||||||
),
|
isCollapsed: false,
|
||||||
TextField(
|
// border: .none,
|
||||||
style: TextStyle(fontSize: 30),
|
|
||||||
controller: langController,
|
|
||||||
textAlign: .center,
|
|
||||||
// onEditingComplete: () => gm.updateEdited(true),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: "Language",
|
|
||||||
border: .none,
|
|
||||||
enabledBorder: .none,
|
enabledBorder: .none,
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(thickness: 1),
|
||||||
|
TextField(
|
||||||
|
style: TextStyle(fontSize: 20),
|
||||||
|
controller: langController,
|
||||||
|
textAlign: .left,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
label: Text(
|
||||||
|
"Language",
|
||||||
|
style: TextStyle(color: Colors.grey[700]),
|
||||||
|
),
|
||||||
|
// border: .none,
|
||||||
|
enabledBorder: .none,
|
||||||
|
fillColor: Colors.transparent,
|
||||||
|
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
|
),
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(color: Colors.transparent),
|
||||||
|
gapPadding: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Card(
|
child: Card(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(width: 1, color: Colors.grey[350]!),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
color: Color(0xffffffff),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: .spaceEvenly,
|
mainAxisAlignment: .spaceEvenly,
|
||||||
crossAxisAlignment: .start,
|
crossAxisAlignment: .start,
|
||||||
children: [
|
children: [
|
||||||
Text("Select Editors:"),
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Text("Editors:", style: TextStyle(fontSize: 20)),
|
||||||
|
),
|
||||||
SizedBox(height: 10),
|
SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: .spaceEvenly,
|
mainAxisAlignment: .spaceEvenly,
|
||||||
@@ -117,23 +177,20 @@ class ManageProject extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// Row(
|
Padding(
|
||||||
// children: [
|
padding: const EdgeInsets.symmetric(horizontal: 13.0),
|
||||||
// OutlinedButton(
|
child: ElevatedButton(
|
||||||
// child: Text("Delete"),
|
style: ElevatedButton.styleFrom(
|
||||||
// onPressed: () {
|
backgroundColor: Colors.red[100],
|
||||||
// Navigator.pop(context);
|
foregroundColor: Colors.red[900],
|
||||||
// gm.delPrj(id);
|
),
|
||||||
// ScaffoldMessenger.of(context).showSnackBar(
|
onPressed: () {
|
||||||
// SnackBar(
|
gm.delPrj(id);
|
||||||
// content: Text("Deleted ${prj.name}"),
|
Navigator.pop(context);
|
||||||
// duration: Duration(milliseconds: 2350),
|
},
|
||||||
// ),
|
child: Row(mainAxisAlignment: .center, children: [Text("Delete")]),
|
||||||
// );
|
),
|
||||||
// },
|
),
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,30 @@ class EditorFAB extends StatelessWidget {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => SimpleDialog(
|
builder: (context) => SimpleDialog(
|
||||||
title: Text("Add Editor"),
|
title: Row(
|
||||||
|
mainAxisAlignment: .spaceBetween,
|
||||||
|
children: [
|
||||||
|
FilledButton(
|
||||||
|
child: Text("Cancel"),
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
),
|
||||||
|
Text("Add Editor"),
|
||||||
|
ElevatedButton(
|
||||||
|
child: Text(" Add "),
|
||||||
|
onPressed: () {
|
||||||
|
Provider.of<GlobalModel>(context, listen: false).addEdt(
|
||||||
|
Editor.create(
|
||||||
|
nameController.text,
|
||||||
|
commandController.text,
|
||||||
|
commandTemplateController.text,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@@ -45,30 +68,6 @@ class EditorFAB extends StatelessWidget {
|
|||||||
child: const Text("Example: zed -n \$path"),
|
child: const Text("Example: zed -n \$path"),
|
||||||
padding: const EdgeInsets.all(9.0),
|
padding: const EdgeInsets.all(9.0),
|
||||||
),
|
),
|
||||||
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: .end,
|
|
||||||
children: [
|
|
||||||
TextButton(
|
|
||||||
child: Text("Cancel"),
|
|
||||||
onPressed: () => Navigator.pop(context),
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
child: Text("Add"),
|
|
||||||
onPressed: () {
|
|
||||||
Provider.of<GlobalModel>(context, listen: false).addEdt(
|
|
||||||
Editor.create(
|
|
||||||
nameController.text,
|
|
||||||
commandController.text,
|
|
||||||
commandTemplateController.text,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
Navigator.pop(context);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user