refactor: replace icons
This commit is contained in:
parent
07d39100d7
commit
020852f0ab
|
@ -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';
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -42,7 +42,7 @@ class BbUserScreen extends StatelessWidget {
|
|||
},
|
||||
action: isViewer
|
||||
? ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/settings',
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -178,7 +178,7 @@ class GePullScreen extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
Ionicons.chevron_forward,
|
||||
color: theme.palette.border,
|
||||
),
|
||||
],
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -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<ThemeModel>()
|
||||
.showConfirm(context, Text('Mark all as read?'));
|
||||
if (value) {
|
||||
await context
|
||||
.read<AuthModel>()
|
||||
.ghClient
|
||||
.activity
|
||||
.markNotificationsRead();
|
||||
refresh();
|
||||
}
|
||||
},
|
||||
),
|
||||
// actionBuilder: (_, refresh) => ActionEntry(
|
||||
// iconData: Ionicons.checkmark_done,
|
||||
// onTap: () async {
|
||||
// final value = await context
|
||||
// .read<ThemeModel>()
|
||||
// .showConfirm(context, Text('Mark all as read?'));
|
||||
// if (value) {
|
||||
// await context
|
||||
// .read<AuthModel>()
|
||||
// .ghClient
|
||||
// .activity
|
||||
// .markNotificationsRead();
|
||||
// refresh();
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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, _) {
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@ class GlUserScreen extends StatelessWidget {
|
|||
},
|
||||
action: isViewer
|
||||
? ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/settings',
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -33,7 +33,7 @@ class GoObjectScreen extends StatelessWidget {
|
|||
return null;
|
||||
} else {
|
||||
return ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/choose-code-theme',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class GoUserScreen extends StatelessWidget {
|
|||
},
|
||||
action: isViewer
|
||||
? ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/settings',
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -32,7 +32,7 @@ class GtObjectScreen extends StatelessWidget {
|
|||
return null;
|
||||
} else {
|
||||
return ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/choose-code-theme',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class GtUserScreen extends StatelessWidget {
|
|||
},
|
||||
action: isViewer
|
||||
? ActionEntry(
|
||||
iconData: Icons.settings,
|
||||
iconData: Ionicons.cog,
|
||||
url: '/settings',
|
||||
)
|
||||
: null,
|
||||
|
|
|
@ -80,7 +80,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
),
|
||||
),
|
||||
(index == auth.activeAccountIndex)
|
||||
? Icon(Icons.check)
|
||||
? Icon(Ionicons.checkmark)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
|
@ -99,7 +99,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Icon(Icons.add),
|
||||
Icon(Ionicons.add),
|
||||
SizedBox(width: 4),
|
||||
Icon(brand),
|
||||
SizedBox(width: 8),
|
||||
|
@ -200,7 +200,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
),
|
||||
_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<LoginScreen> {
|
|||
),
|
||||
_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<LoginScreen> {
|
|||
),
|
||||
_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<LoginScreen> {
|
|||
),
|
||||
_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(
|
||||
|
|
|
@ -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<ThemeModel>(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',
|
||||
),
|
||||
])
|
||||
],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class _NotificationItemState extends State<NotificationItem> {
|
|||
Widget _buildCheckIcon() {
|
||||
final theme = Provider.of<ThemeModel>(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,
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue