Skip to content

Commit dba89aa

Browse files
authored
ui: Fixed before release v0.1 (#44)
1 parent 32626ad commit dba89aa

File tree

5 files changed

+38
-36
lines changed

5 files changed

+38
-36
lines changed

ui/lib/common/request.dart

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
import 'package:get/get.dart';
1+
// import 'package:get/get.dart';
2+
import 'package:flutter/foundation.dart' as Foundation;
23
import 'package:graphql_flutter/graphql_flutter.dart';
34

4-
import 'shared_prefs.dart';
5+
// import 'shared_prefs.dart';
56

6-
import '../routes/index.dart';
7+
// import '../routes/index.dart';
78

89
Future<QueryResult> queryGraphQL(QueryOptions options) async {
9-
String server = await getConfig("server");
10+
// Support login page later
11+
// String server = await getConfig("server");
12+
//
13+
// if (server == null) {
14+
// Get.toNamed(Routes.login);
15+
//
16+
// return QueryResult(source: QueryResultSource.optimisticResult);
17+
// }
1018

11-
if (server == null) {
12-
Get.toNamed(Routes.login);
13-
14-
return QueryResult(source: QueryResultSource.optimisticResult);
15-
}
19+
String server = Foundation.kDebugMode ? "http://0.0.0.0:7436" : "";
1620

1721
GraphQLClient client = GraphQLClient(
1822
cache: GraphQLCache(), link: HttpLink("$server/graphql"));
@@ -21,7 +25,6 @@ Future<QueryResult> queryGraphQL(QueryOptions options) async {
2125

2226
if (result.hasException) {
2327
// todo exception
24-
// print(result.exception.toString());
2528
}
2629

2730
return result;

ui/lib/modules/layout/header.dart

+23-18
Original file line numberDiff line numberDiff line change
@@ -37,28 +37,33 @@ class Header extends StatelessWidget implements PreferredSizeWidget {
3737
child: Row(
3838
mainAxisSize: MainAxisSize.max,
3939
children: [
40-
Image(
41-
image: AssetImage("images/logo.png"),
42-
height: 32,
40+
// Logo in v1.0
41+
// Image(
42+
// image: AssetImage("images/logo.png"),
43+
// height: 32,
44+
// ),
45+
SelectableText(
46+
"Project name".tr,
47+
style: Theme.of(context).appBarTheme.textTheme.headline4
4348
),
4449
Expanded(
4550
child: Text(""),
4651
),
47-
Obx(() => SelectableText(
48-
c.userName.value,
49-
style: Theme.of(context).appBarTheme.textTheme.headline6),
50-
),
51-
Padding(
52-
padding: EdgeInsets.only(left: 20.0),
53-
child: IconButton(
54-
icon: Icon(
55-
Icons.logout, color: Colors.white,
56-
),
57-
iconSize: 20.0,
58-
tooltip: "Logout".tr,
59-
onPressed: () => c.logout(),
60-
),
61-
),
52+
// Obx(() => SelectableText(
53+
// c.userName.value,
54+
// style: Theme.of(context).appBarTheme.textTheme.headline6),
55+
// ),
56+
// Padding(
57+
// padding: EdgeInsets.only(left: 20.0),
58+
// child: IconButton(
59+
// icon: Icon(
60+
// Icons.logout, color: Colors.white,
61+
// ),
62+
// iconSize: 20.0,
63+
// tooltip: "Logout".tr,
64+
// onPressed: () => c.logout(),
65+
// ),
66+
// ),
6267
],
6368
),
6469
);

ui/lib/modules/layout/navigators.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class Navigators extends StatelessWidget {
2424
),
2525
),
2626
SideLink(title: "Tasks", icon: Icons.dashboard, path: Routes.main),
27-
SideLink(title: "Endpoints", icon: Icons.album, path: Routes.endpoints),
28-
SideLink(title: "Agents", icon: Icons.source, path: "/agents"),
27+
// SideLink(title: "Endpoints", icon: Icons.album, path: Routes.endpoints),
28+
// SideLink(title: "Agents", icon: Icons.source, path: "/agents"),
2929
],
3030
)
3131
);

ui/web/favicon.ico

-105 KB
Binary file not shown.

ui/web/favicon.svg

-6
This file was deleted.

0 commit comments

Comments
 (0)