Skip to content

Commit

Permalink
Feat: add about / donate / projects info
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackiu1997 committed Feb 2, 2023
1 parent 4b6a5b4 commit f6be507
Show file tree
Hide file tree
Showing 28 changed files with 717 additions and 244 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ A Flutter application for android and ios, which can make you watch lives with e
<table>
<tr>
<td style="text-align: center">
<img src="./screenshots/alipay.jpg" width="200"/>
<img src="./assets/images/alipay.jpg" width="200"/>
</td>
<td style="text-align: center">
<img src="./screenshots/wechat.png" width="228"/>
<img src="./assets/images/wechat.png" width="228"/>
</td>
</tr>
</table>
Expand Down
Binary file removed assets/CustomIcons.ttf
Binary file not shown.
Binary file added assets/icons/CustomIcons.ttf
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
11 changes: 11 additions & 0 deletions lib/common/utils/version_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ class VersionUtil {
static const String projectUrl = 'https://github.com/Jackiu1997/hot_live';
static const String releaseUrl =
'https://api.github.com/repos/Jackiu1997/hot_live/releases';
static const String issuesUrl =
'https://github.com/Jackiu1997/hot_live/issues';
static const String kanbanUrl =
'https://jackiu-notes.notion.site/50bc0d3d377445eea029c6e3d4195671?v=663125e639b047cea5e69d8264926b8b';

static const String githubUrl = 'https://github.com/Jackiu1997';
static const String email = '[email protected]';
static const String emailUrl =
'mailto:[email protected]?subject=HotLive Feedback';
static const String telegramGroup = 't.me/pure_live_channel';
static const String telegramGroupUrl = 'https://t.me/pure_live_channel';

static String latestVersion = version;
static String latestUpdateLog = '';
Expand Down
40 changes: 31 additions & 9 deletions lib/common/widgets/custom_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
/// fonts:
/// - asset: fonts/CustomIcons.ttf
///
///
///
/// * Font Awesome 5, Copyright (C) 2016 by Dave Gandy
/// Author: Dave Gandy
/// License: SIL (https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt)
/// Homepage: http://fortawesome.github.com/Font-Awesome/
/// * Font Awesome 4, Copyright (C) 2016 by Dave Gandy
/// Author: Dave Gandy
/// License: SIL ()
Expand All @@ -27,12 +31,30 @@ class CustomIcons {
static const _kFontFam = 'CustomIcons';
static const String? _kFontPkg = null;

static const IconData danmaku_close = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData danmaku_open = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData danmaku_setting = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData popular = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData float_window = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData cast = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData github_circled = IconData(0xf09b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData danmaku_close =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData danmaku_open =
IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData danmaku_setting =
IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData popular =
IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData search =
IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData qq_1 =
IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData float_window =
IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData cast =
IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData github_circled =
IconData(0xf09b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData mail_squared =
IconData(0xf199, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData wechat =
IconData(0xf1d7, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData telegram =
IconData(0xf2c6, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData alipay =
IconData(0xf642, fontFamily: _kFontFam, fontPackage: _kFontPkg);
}
3 changes: 3 additions & 0 deletions lib/common/widgets/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ export './empty_view.dart';
export './custom_icons.dart';
export './onloading_footer.dart';
export './barrage_wall.dart';
export './menu_button.dart';
export './search_button.dart';
export './section_listtile.dart';
89 changes: 89 additions & 0 deletions lib/common/widgets/menu_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import 'package:hot_live/common/index.dart';
import 'package:hot_live/pages/index.dart';

class MenuButton extends StatelessWidget {
const MenuButton({Key? key}) : super(key: key);

final menuRoutes = const [
SettingsPage(),
AboutPage(),
AboutPage(),
];

@override
Widget build(BuildContext context) {
return PopupMenuButton(
tooltip: 'menu',
color: Theme.of(context).colorScheme.surfaceVariant,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
offset: const Offset(12, 0),
position: PopupMenuPosition.under,
icon: const Icon(Icons.menu_rounded),
onSelected: (int index) => Navigator.push(
context,
MaterialPageRoute(builder: (context) => menuRoutes[index]),
),
itemBuilder: (context) => [
PopupMenuItem(
value: 0,
padding: const EdgeInsets.symmetric(horizontal: 12),
child: MenuListTile(
leading: const Icon(Icons.settings_rounded),
text: S.of(context).settings_title,
),
),
PopupMenuItem(
value: 1,
padding: const EdgeInsets.symmetric(horizontal: 12),
child: MenuListTile(
leading: const Icon(Icons.info_outline_rounded),
text: S.of(context).about,
),
),
PopupMenuItem(
value: 2,
padding: const EdgeInsets.symmetric(horizontal: 12),
child: MenuListTile(
leading: const Icon(Icons.help_outline_rounded),
text: S.of(context).help,
),
),
],
);
}
}

class MenuListTile extends StatelessWidget {
final Widget? leading;
final String text;
final Widget? trailing;

const MenuListTile({
Key? key,
required this.leading,
required this.text,
this.trailing,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return Row(
children: [
if (leading != null) ...[
leading!,
const SizedBox(width: 12),
],
Text(
text,
style: Theme.of(context).textTheme.labelMedium,
),
if (trailing != null) ...[
const SizedBox(width: 24),
trailing!,
],
],
);
}
}
25 changes: 25 additions & 0 deletions lib/common/widgets/search_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'package:hot_live/common/index.dart';
import 'package:hot_live/pages/index.dart';

class SearchButton extends StatelessWidget {
const SearchButton({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const SearchPage()),
);
},
icon: const Icon(CustomIcons.search),
),
const SizedBox(width: 4),
],
);
}
}
61 changes: 61 additions & 0 deletions lib/common/widgets/section_listtile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CupertinoSwitchListTile extends StatelessWidget {
const CupertinoSwitchListTile({
Key? key,
required this.value,
required this.onChanged,
this.leading,
this.title,
this.subtitle,
this.activeColor,
}) : super(key: key);

final Widget? leading;
final Widget? title;
final Widget? subtitle;
final Color? activeColor;
final bool value;
final void Function(bool)? onChanged;

@override
Widget build(BuildContext context) {
return ListTile(
leading: leading,
title: title,
subtitle: subtitle,
onTap: () {
if (onChanged != null) onChanged!(!value);
},
trailing: CupertinoSwitch(
value: value,
activeColor: activeColor,
onChanged: onChanged,
),
);
}
}

class SectionTitle extends StatelessWidget {
final String title;

const SectionTitle({
required this.title,
Key? key,
}) : super(key: key);

@override
Widget build(BuildContext context) {
return ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
title: Text(
title,
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.w500,
),
),
);
}
}
24 changes: 22 additions & 2 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class MessageLookup extends MessageLookupByLibrary {

static String m2(version) => "New version found: v${version}";

static String m3(roomid, platform, nickname, title, livestatus) =>
static String m3(number) => "GroupNo.: ${number}";

static String m4(roomid, platform, nickname, title, livestatus) =>
"RoomId: ${roomid}\nPlatform: ${platform}\nName: ${nickname}\nTitle: ${title}\nLiveStatus: ${livestatus}";

final messages = _notInlinedMessages(_notInlinedMessages);
Expand Down Expand Up @@ -55,12 +57,15 @@ class MessageLookup extends MessageLookupByLibrary {
"Change form light / dark / system modes"),
"check_update": MessageLookupByLibrary.simpleMessage("Check Update"),
"confirm": MessageLookupByLibrary.simpleMessage("Confirm"),
"contact": MessageLookupByLibrary.simpleMessage("Contact"),
"custom": MessageLookupByLibrary.simpleMessage("Custom"),
"develop_progress": MessageLookupByLibrary.simpleMessage("Development"),
"dlan_button_info":
MessageLookupByLibrary.simpleMessage("DLNA Broadcast"),
"dlan_device_not_found":
MessageLookupByLibrary.simpleMessage("DLNA device not found"),
"dlan_title": MessageLookupByLibrary.simpleMessage("DLNA"),
"email": MessageLookupByLibrary.simpleMessage("Email"),
"empty_areas_room_subtitle":
MessageLookupByLibrary.simpleMessage("Pull down to refresh data"),
"empty_areas_room_title":
Expand Down Expand Up @@ -132,10 +137,15 @@ class MessageLookup extends MessageLookupByLibrary {
"follow": MessageLookupByLibrary.simpleMessage("Follow"),
"followed": MessageLookupByLibrary.simpleMessage("Followed"),
"general": MessageLookupByLibrary.simpleMessage("General"),
"github": MessageLookupByLibrary.simpleMessage("Github"),
"help": MessageLookupByLibrary.simpleMessage("Help"),
"hide_offline_rooms":
MessageLookupByLibrary.simpleMessage("Hide Offline Rooms"),
"info_is_offline": m0,
"info_is_replay": m1,
"issue_feedback":
MessageLookupByLibrary.simpleMessage("Issue Feedback"),
"license": MessageLookupByLibrary.simpleMessage("License"),
"loading_canload":
MessageLookupByLibrary.simpleMessage("release to load"),
"loading_failed":
Expand All @@ -157,8 +167,14 @@ class MessageLookup extends MessageLookupByLibrary {
MessageLookupByLibrary.simpleMessage("Resolution Preference"),
"prefer_resolution_subtitle": MessageLookupByLibrary.simpleMessage(
"When enter live play, first resolution choice"),
"project": MessageLookupByLibrary.simpleMessage("Project"),
"project_alert": MessageLookupByLibrary.simpleMessage("Project Alert"),
"project_page":
MessageLookupByLibrary.simpleMessage("Project Homepage"),
"qq_group": MessageLookupByLibrary.simpleMessage("QQ Group"),
"qq_group_num": m3,
"remove": MessageLookupByLibrary.simpleMessage("Remove"),
"room_info_content": m3,
"room_info_content": m4,
"search_input_hint":
MessageLookupByLibrary.simpleMessage("Input live room keyword"),
"settings_danmaku_amount":
Expand All @@ -176,10 +192,14 @@ class MessageLookup extends MessageLookupByLibrary {
"settings_title": MessageLookupByLibrary.simpleMessage("Settings"),
"show_offline_rooms":
MessageLookupByLibrary.simpleMessage("Show Offline Rooms"),
"support_donate":
MessageLookupByLibrary.simpleMessage("Donate Support"),
"switch_platform":
MessageLookupByLibrary.simpleMessage("Switch platform"),
"telegram": MessageLookupByLibrary.simpleMessage("Telegram"),
"unfollow": MessageLookupByLibrary.simpleMessage("Unfollow"),
"update": MessageLookupByLibrary.simpleMessage("Update"),
"version": MessageLookupByLibrary.simpleMessage("Version"),
"video": MessageLookupByLibrary.simpleMessage("Video"),
"what_is_new": MessageLookupByLibrary.simpleMessage("New Features")
};
Expand Down
Loading

0 comments on commit f6be507

Please sign in to comment.