diff --git a/lib/models/code.dart b/lib/models/code.dart index ac87f93..15935af 100644 --- a/lib/models/code.dart +++ b/lib/models/code.dart @@ -18,8 +18,8 @@ class CodeModel with ChangeNotifier { 'Cascadia Code', ]; - String _theme = 'tomorrow'; - String _themeDark = 'tomorrow-night'; + String _theme = 'vs'; + String _themeDark = 'vs2015'; int _fontSize = 14; String _fontFamily = 'JetBrains Mono'; diff --git a/lib/screens/bb_object.dart b/lib/screens/bb_object.dart index d1bc13a..f8fa984 100644 --- a/lib/screens/bb_object.dart +++ b/lib/screens/bb_object.dart @@ -37,7 +37,7 @@ class BbObjectScreen extends StatelessWidget { actionBuilder: (p, _) { if (p is String) { return ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/choose-code-theme', ); } else { diff --git a/lib/screens/bb_user.dart b/lib/screens/bb_user.dart index 8aad1c9..d26ab04 100644 --- a/lib/screens/bb_user.dart +++ b/lib/screens/bb_user.dart @@ -42,7 +42,7 @@ class BbUserScreen extends StatelessWidget { }, action: isViewer ? ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ) : null, diff --git a/lib/screens/ge_blob.dart b/lib/screens/ge_blob.dart index 119b662..aacc345 100644 --- a/lib/screens/ge_blob.dart +++ b/lib/screens/ge_blob.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:git_touch/models/auth.dart'; import 'package:git_touch/models/gitee.dart'; import 'package:git_touch/scaffolds/refresh_stateful.dart'; +import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/action_entry.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/blob_view.dart'; @@ -24,7 +25,7 @@ class GeBlobScreen extends StatelessWidget { final res = await auth.fetchGitee('/repos/$owner/$name/git/blobs/$sha'); return GiteeBlob.fromJson(res).content; }, - action: ActionEntry(iconData: Icons.settings, url: '/choose-code-theme'), + action: ActionEntry(iconData: Ionicons.cog, url: '/choose-code-theme'), bodyBuilder: (content, _) { return BlobView(path, base64Text: content); }, diff --git a/lib/screens/ge_pull.dart b/lib/screens/ge_pull.dart index de03a51..8386eb3 100644 --- a/lib/screens/ge_pull.dart +++ b/lib/screens/ge_pull.dart @@ -178,7 +178,7 @@ class GePullScreen extends StatelessWidget { ), ), Icon( - Icons.chevron_right, + Ionicons.chevron_forward, color: theme.palette.border, ), ], diff --git a/lib/screens/ge_user.dart b/lib/screens/ge_user.dart index 2ad12f8..8142895 100644 --- a/lib/screens/ge_user.dart +++ b/lib/screens/ge_user.dart @@ -36,7 +36,7 @@ class GeUserScreen extends StatelessWidget { title: AppBarTitle(isViewer ? 'Me' : login), action: isViewer ? ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ) : null, diff --git a/lib/screens/gh_gist_object.dart b/lib/screens/gh_gist_object.dart index 757073a..9b3ccce 100644 --- a/lib/screens/gh_gist_object.dart +++ b/lib/screens/gh_gist_object.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:git_touch/scaffolds/common.dart'; +import 'package:git_touch/utils/utils.dart'; import 'package:git_touch/widgets/app_bar_title.dart'; import 'package:git_touch/widgets/blob_view.dart'; import 'package:git_touch/widgets/action_entry.dart'; @@ -18,7 +19,7 @@ class GistObjectScreen extends StatelessWidget { return CommonScaffold( title: AppBarTitle(file), action: ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/choose-code-theme', ), body: SingleChildScrollView( diff --git a/lib/screens/gh_issue.dart b/lib/screens/gh_issue.dart index 06c7e08..a631a52 100644 --- a/lib/screens/gh_issue.dart +++ b/lib/screens/gh_issue.dart @@ -237,7 +237,7 @@ class GhIssueScreen extends StatelessWidget { color: Colors.red, fontSize: 15, )), - Icon(Icons.chevron_right, + Icon(Ionicons.chevron_forward, color: theme.palette.border), ], ) diff --git a/lib/screens/gh_notification.dart b/lib/screens/gh_notification.dart index 1cdde63..0a90851 100644 --- a/lib/screens/gh_notification.dart +++ b/lib/screens/gh_notification.dart @@ -131,7 +131,7 @@ ${item.key}: pullRequest(number: ${item.subject.number}) { // await _onSwitchTab(); // TODO: }, child: Icon( - Octicons.check, + Ionicons.checkmark_done, color: theme.palette.tertiaryText, size: 24, ), @@ -176,22 +176,22 @@ ${item.key}: pullRequest(number: ${item.subject.number}) { ], ); }, - actionBuilder: (_, refresh) => ActionEntry( - iconData: Icons.done_all, - onTap: () async { - final value = await context - .read() - .showConfirm(context, Text('Mark all as read?')); - if (value) { - await context - .read() - .ghClient - .activity - .markNotificationsRead(); - refresh(); - } - }, - ), + // actionBuilder: (_, refresh) => ActionEntry( + // iconData: Ionicons.checkmark_done, + // onTap: () async { + // final value = await context + // .read() + // .showConfirm(context, Text('Mark all as read?')); + // if (value) { + // await context + // .read() + // .ghClient + // .activity + // .markNotificationsRead(); + // refresh(); + // } + // }, + // ), ); } } diff --git a/lib/screens/gh_object.dart b/lib/screens/gh_object.dart index f52bfbe..ff3498b 100644 --- a/lib/screens/gh_object.dart +++ b/lib/screens/gh_object.dart @@ -49,7 +49,7 @@ class GhObjectScreen extends StatelessWidget { actionBuilder: (data, _) { if (data.isFile) { return ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/choose-code-theme', ); } else { diff --git a/lib/screens/gh_user.dart b/lib/screens/gh_user.dart index a77ad08..4a1202c 100644 --- a/lib/screens/gh_user.dart +++ b/lib/screens/gh_user.dart @@ -119,7 +119,7 @@ class _User extends StatelessWidget { hasIcon: true, items: [ TableViewItem( - leftIconData: Icons.rss_feed, + leftIconData: Octicons.rss, text: Text(AppLocalizations.of(context).events), url: '/github/$login?tab=events', ), @@ -218,7 +218,7 @@ class _Org extends StatelessWidget { hasIcon: true, items: [ TableViewItem( - leftIconData: Icons.rss_feed, + leftIconData: Octicons.rss, text: Text(AppLocalizations.of(context).events), url: '/github/${p.login}?tab=events', ), @@ -276,7 +276,7 @@ class GhViewer extends StatelessWidget { }, title: AppBarTitle(AppLocalizations.of(context).me), action: ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ), bodyBuilder: (p, _) { diff --git a/lib/screens/gl_blob.dart b/lib/screens/gl_blob.dart index 8c3539c..7cf6a9a 100644 --- a/lib/screens/gl_blob.dart +++ b/lib/screens/gl_blob.dart @@ -24,7 +24,7 @@ class GlBlobScreen extends StatelessWidget { '/projects/$id/repository/files/${path.urlencode}?ref=$ref'); return GitlabBlob.fromJson(res); }, - action: ActionEntry(iconData: Icons.settings, url: '/choose-code-theme'), + action: ActionEntry(iconData: Ionicons.cog, url: '/choose-code-theme'), bodyBuilder: (data, _) { return BlobView(path, base64Text: data.content); }, diff --git a/lib/screens/gl_user.dart b/lib/screens/gl_user.dart index 1d21f0f..a7e4d4c 100644 --- a/lib/screens/gl_user.dart +++ b/lib/screens/gl_user.dart @@ -37,7 +37,7 @@ class GlUserScreen extends StatelessWidget { }, action: isViewer ? ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ) : null, diff --git a/lib/screens/go_object.dart b/lib/screens/go_object.dart index 0f3fe8a..5aa0c05 100644 --- a/lib/screens/go_object.dart +++ b/lib/screens/go_object.dart @@ -33,7 +33,7 @@ class GoObjectScreen extends StatelessWidget { return null; } else { return ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/choose-code-theme', ); } diff --git a/lib/screens/go_user.dart b/lib/screens/go_user.dart index 8d99f4a..e414536 100644 --- a/lib/screens/go_user.dart +++ b/lib/screens/go_user.dart @@ -35,7 +35,7 @@ class GoUserScreen extends StatelessWidget { }, action: isViewer ? ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ) : null, diff --git a/lib/screens/gt_object.dart b/lib/screens/gt_object.dart index e2f0992..3f8f42a 100644 --- a/lib/screens/gt_object.dart +++ b/lib/screens/gt_object.dart @@ -32,7 +32,7 @@ class GtObjectScreen extends StatelessWidget { return null; } else { return ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/choose-code-theme', ); } diff --git a/lib/screens/gt_user.dart b/lib/screens/gt_user.dart index 09f19de..c334d4a 100644 --- a/lib/screens/gt_user.dart +++ b/lib/screens/gt_user.dart @@ -92,7 +92,7 @@ class GtUserScreen extends StatelessWidget { }, action: isViewer ? ActionEntry( - iconData: Icons.settings, + iconData: Ionicons.cog, url: '/settings', ) : null, diff --git a/lib/screens/login.dart b/lib/screens/login.dart index e7e2f68..bd4ec88 100644 --- a/lib/screens/login.dart +++ b/lib/screens/login.dart @@ -80,7 +80,7 @@ class _LoginScreenState extends State { ), ), (index == auth.activeAccountIndex) - ? Icon(Icons.check) + ? Icon(Ionicons.checkmark) : Container(), ], ), @@ -99,7 +99,7 @@ class _LoginScreenState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(Icons.add), + Icon(Ionicons.add), SizedBox(width: 4), Icon(brand), SizedBox(width: 8), @@ -200,7 +200,7 @@ class _LoginScreenState extends State { ), _buildAddItem( text: AppLocalizations.of(context).gitlabAccount, - brand: Ionicons.logo_gitlab, + brand: Ionicons.git_branch_outline, onTap: () async { _domainController.text = 'https://gitlab.com'; final result = await theme.showConfirm( @@ -305,7 +305,7 @@ class _LoginScreenState extends State { ), _buildAddItem( text: AppLocalizations.of(context).giteaAccount, - brand: Octicons.git_branch, // TODO: brand icon + brand: Ionicons.git_branch_outline, // TODO: brand icon onTap: () async { _domainController.text = 'https://gitea.com'; final result = await theme.showConfirm( @@ -340,7 +340,7 @@ class _LoginScreenState extends State { ), _buildAddItem( text: AppLocalizations.of(context).giteeAccount + '(码云)', - brand: Octicons.git_branch, // TODO: brand icon + brand: Ionicons.git_branch_outline, // TODO: brand icon onTap: () async { final result = await theme.showConfirm( context, @@ -358,7 +358,7 @@ class _LoginScreenState extends State { ), _buildAddItem( text: 'Gogs Account', - brand: Octicons.git_branch, // TODO: brand icon + brand: Ionicons.git_branch_outline, // TODO: brand icon onTap: () async { _domainController.text = 'https://gogs.com'; final result = await theme.showConfirm( diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart index 49bc0c5..d2eabf8 100644 --- a/lib/screens/settings.dart +++ b/lib/screens/settings.dart @@ -15,12 +15,6 @@ import 'package:tuple/tuple.dart'; import 'package:flutter_gen/gen_l10n/S.dart'; class SettingsScreen extends StatelessWidget { - // Widget _buildRightWidget(BuildContext context, bool checked) { - // final theme = Provider.of(context); - // if (!checked) return null; - // return Icon(Icons.check, color: theme.palette.primary, size: 24); - // } - // After translation finished, add locale name here to display in settings static const localeNameMap = { 'en': 'English', @@ -198,11 +192,11 @@ class SettingsScreen extends StatelessWidget { TableView(headerText: AppLocalizations.of(context).feedback, items: [ TableViewItem( text: Text(AppLocalizations.of(context).submitAnIssue), - rightWidget: Text('pd4d10/git-touch'), + rightWidget: Text('git-touch/git-touch'), url: (auth.activeAccount.platform == PlatformType.github ? '/github' : 'https://github.com') + - '/pd4d10/git-touch/issues/new', + '/git-touch/git-touch/issues/new', ), TableViewItem( text: Text(AppLocalizations.of(context).rateThisApp), @@ -233,11 +227,11 @@ class SettingsScreen extends StatelessWidget { )), TableViewItem( text: Text(AppLocalizations.of(context).sourceCode), - rightWidget: Text('pd4d10/git-touch'), + rightWidget: Text('git-touch/git-touch'), url: (auth.activeAccount.platform == PlatformType.github ? '/github' : 'https://github.com') + - '/pd4d10/git-touch', + '/git-touch/git-touch', ), ]) ], diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index ebf2177..1596a77 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -10,8 +10,8 @@ import 'package:provider/provider.dart'; import 'package:tuple/tuple.dart'; import 'package:url_launcher/url_launcher.dart'; export 'extensions.dart'; -export 'package:flutter_vector_icons/flutter_vector_icons.dart' show Octicons; -export 'package:ionicons/ionicons.dart'; +export 'package:flutter_vector_icons/flutter_vector_icons.dart' + show Octicons, Ionicons; class StorageKeys { @deprecated diff --git a/lib/widgets/action_button.dart b/lib/widgets/action_button.dart index 66593df..5b74080 100644 --- a/lib/widgets/action_button.dart +++ b/lib/widgets/action_button.dart @@ -49,7 +49,7 @@ class ActionButton extends StatelessWidget { ActionButton({ @required this.title, @required this.items, - this.iconData = Icons.more_vert, + this.iconData = Ionicons.ellipsis_horizontal, this.selected, }); diff --git a/lib/widgets/notification_item.dart b/lib/widgets/notification_item.dart index 6cdd0fb..0097a75 100644 --- a/lib/widgets/notification_item.dart +++ b/lib/widgets/notification_item.dart @@ -70,7 +70,7 @@ class _NotificationItemState extends State { Widget _buildCheckIcon() { final theme = Provider.of(context); return Icon( - payload.unread ? Octicons.check : Octicons.primitive_dot, + payload.unread ? Ionicons.checkmark : Octicons.primitive_dot, color: loading ? theme.palette.grayBackground : theme.palette.tertiaryText, size: 24, diff --git a/lib/widgets/table_view.dart b/lib/widgets/table_view.dart index b87ae1e..fd01dff 100644 --- a/lib/widgets/table_view.dart +++ b/lib/widgets/table_view.dart @@ -103,7 +103,7 @@ class TableView extends StatelessWidget { ], if ((item.onTap != null || item.url != null) && !item.hideRightChevron) - Icon(CupertinoIcons.right_chevron, + Icon(Ionicons.chevron_forward, size: 20, color: theme.palette.tertiaryText) else SizedBox(width: 2), diff --git a/pubspec.lock b/pubspec.lock index a2801ff..654ed44 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -455,13 +455,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.3.4" - ionicons: - dependency: "direct main" - description: - name: ionicons - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.1" js: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 940fb79..ee44765 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,7 +48,6 @@ dependencies: uri: ^0.11.3 url_launcher: ^5.4.1 webview_flutter: ^1.0.5 - ionicons: ^0.1.1 flutter_localizations: sdk: flutter