Skip to content

Commit 329c9bd

Browse files
committed
Repo link
1 parent 94e57ca commit 329c9bd

File tree

1 file changed

+92
-28
lines changed

1 file changed

+92
-28
lines changed

Diff for: lib/main.dart

+92-28
Original file line numberDiff line numberDiff line change
@@ -858,29 +858,42 @@ class HomePageState extends State<HomePage> {
858858
},
859859
child: Padding(
860860
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
861-
child: Column(
861+
child: Row(
862862
children: [
863-
Row(
864-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
865-
children: [
866-
Text(
867-
provider.graphConstructed?provider.dict("constructed_graph"):provider.dict("constructing_graph"),
868-
style: TextStyle(fontSize: 19, fontWeight: FontWeight.bold),
869-
),
870-
Padding(
871-
padding: EdgeInsets.only(bottom: 5),
872-
child: Text(
873-
"${provider.graphDone.length.toString()} / ${provider.graphTotal.length.toString()}", style: TextStyle(fontSize: 16)
863+
Container(
864+
width: scaffoldWidth - 88,
865+
child: Column(
866+
children: [
867+
Row(
868+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
869+
children: [
870+
Text(
871+
provider.graphConstructed?provider.dict("constructed_graph"):provider.dict("constructing_graph"),
872+
style: TextStyle(fontSize: 19, fontWeight: FontWeight.bold),
873+
),
874+
Padding(
875+
padding: EdgeInsets.only(bottom: 5),
876+
child: Text(
877+
"${provider.graphDone.length.toString()} / ${provider.graphTotal.length.toString()}", style: TextStyle(fontSize: 16)
878+
),
879+
),
880+
],
874881
),
875-
),
876-
],
877-
),
878-
SizedBox(
879-
height: 10,
882+
SizedBox(
883+
height: 10,
884+
),
885+
LinearProgressIndicator(
886+
value: provider.graphDone.length == 0?1:provider.graphDone.length/provider.graphTotal.length,
887+
borderRadius: const BorderRadius.all(Radius.circular(3)),
888+
)
889+
],
890+
),
880891
),
881-
LinearProgressIndicator(
882-
value: provider.graphDone.length == 0?1:provider.graphDone.length/provider.graphTotal.length,
883-
borderRadius: const BorderRadius.all(Radius.circular(3)),
892+
Padding(
893+
padding: EdgeInsets.only(left:15),
894+
child: Icon(
895+
Icons.arrow_forward_ios_rounded
896+
),
884897
)
885898
],
886899
),
@@ -1397,6 +1410,60 @@ class SettingsPageState extends State<SettingsPage> {
13971410
),
13981411
),
13991412
),
1413+
Padding(
1414+
padding: EdgeInsets.symmetric(horizontal: 5),
1415+
child: Card(
1416+
color: Theme.of(context).colorScheme.onPrimary,
1417+
clipBehavior: Clip.hardEdge,
1418+
shape: RoundedRectangleBorder(
1419+
borderRadius: BorderRadius.circular(10),
1420+
),
1421+
child: InkWell(
1422+
onTap: (){
1423+
launchUrl(Uri.parse("https://github.com/Puzzak/tgcrawl"), mode: LaunchMode.externalApplication);
1424+
},
1425+
child: Padding(
1426+
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
1427+
child: Row(
1428+
crossAxisAlignment: CrossAxisAlignment.center,
1429+
mainAxisAlignment: MainAxisAlignment.start,
1430+
children: [
1431+
Container(
1432+
width: scaffoldWidth - 88,
1433+
child: Row(
1434+
crossAxisAlignment: CrossAxisAlignment.center,
1435+
mainAxisAlignment: MainAxisAlignment.start,
1436+
children: [
1437+
Column(
1438+
crossAxisAlignment: CrossAxisAlignment.start,
1439+
mainAxisAlignment: MainAxisAlignment.center,
1440+
children: [
1441+
Text(
1442+
provider.dict("repo_title"),
1443+
style: TextStyle(fontSize: 19, fontWeight: FontWeight.bold),
1444+
),
1445+
Padding(
1446+
padding: EdgeInsets.only(bottom: 5),
1447+
child: Text(
1448+
provider.dict("repo_desc"), style: TextStyle(fontSize: 16)
1449+
),
1450+
),
1451+
],
1452+
)
1453+
],
1454+
),
1455+
),
1456+
Padding(
1457+
padding: EdgeInsets.only(left:15),
1458+
child: Icon(
1459+
Icons.arrow_forward_ios_rounded
1460+
),
1461+
)
1462+
],
1463+
),
1464+
),
1465+
),
1466+
))
14001467
],
14011468
),
14021469
),
@@ -1665,7 +1732,7 @@ class IndexPageState extends State<IndexPage> {
16651732
scaffoldWidth = provider.localWidth;
16661733
scaffoldHeight = provider.localHeight;
16671734
return Container(
1668-
height: scaffoldHeight - 23,
1735+
height: scaffoldHeight - 50,
16691736
width: scaffoldWidth,
16701737
child: Column(
16711738
crossAxisAlignment: CrossAxisAlignment.start,
@@ -2121,10 +2188,7 @@ class IndexPageState extends State<IndexPage> {
21212188
secondChild: provider.currentChannel.containsKey("relations")
21222189
? SingleChildScrollView(
21232190
child: Column(
2124-
children: provider.currentChannel["relations"].keys
2125-
.toList()
2126-
.reversed
2127-
.map((relation) {
2191+
children: provider.currentChannel["relations"].keys.toList().map((relation) {
21282192
if (provider.knownChannels.containsKey(relation.toString())) {
21292193
return Padding(
21302194
padding: EdgeInsets.symmetric(horizontal: 5),
@@ -2717,10 +2781,10 @@ class relationsMapState extends State<relationsMap> {
27172781
Offset nodeOffset = Offset.zero;
27182782
Map channel = {};
27192783
if(provider.graphPairs.containsKey(a)){
2720-
if(provider.graphPairs[a].length > 10){
2721-
// nodeOffset = Offset(2.5,2.5);
2722-
}else if(provider.graphPairs[a].length > 1){
2784+
if(provider.graphPairs[a].length > 100){
27232785
nodeOffset = Offset(2.5,2.5);
2786+
}else if(provider.graphPairs[a].length > 10){
2787+
nodeOffset = Offset(0.5,0.5);
27242788
}
27252789
}
27262790
if(provider.currentChannel.isNotEmpty){

0 commit comments

Comments
 (0)