mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-13 03:43:41 +00:00
fix: style, performance ,loading bug (#90)
* refactor project in get-cli standard * use local trackers when github is not connectable upgrade stylish_bottom_bar to 1.0.0 responsive view for home_view treeview for file_list_vie fluent ui integrating * improve responsive view. treeView add light theme.fix overflow bugs * responsive view,treeView,file select downloaded and downloading pages file extension icons fix some minor bugs * use local trackers when github is not connectable upgrade stylish_bottom_bar to 1.0.0 responsive view for home_view treeview for file_list_vie fluent ui integrating * improve responsive view. treeView add light theme.fix overflow bugs * bottom bar index fix * refactor project in get-cli standard * fix:locale fix * fix: task list stack progress style fix: translation fix: tree view fix: confirm button loading remove: stylish_bottom_bar(dark mode not supported) * fix: task list stack progress style fix: translation fix: tree view fix: confirm button loading remove: stylish_bottom_bar(dark mode not supported) --------- Co-authored-by: wuke2022 <[email protected]>
This commit is contained in:
1 parent
dbc9c4c121
commit
5b69472ac8
20 files changed
+4390
-217
No files matched your search
@@ -1,5 +1,6 @@
|
||||
findIcon(String ext) {
|
||||
String res = 'document';
|
||||
findIcon(String filename) {
|
||||
String res = 'file';
|
||||
String ext = filename.substring(filename.lastIndexOf('.') + 1);
|
||||
for (var iconMap in iconMaps) {
|
||||
if (iconMap['extensions'].contains(ext)) {
|
||||
res = iconMap['thumbnail'];
|
||||
@@ -57,7 +58,7 @@ const List iconMaps = [
|
||||
'3gp'
|
||||
],
|
||||
'type': 'Video',
|
||||
'thumbnail': 'my_movies_t_v'
|
||||
'thumbnail': 'file_video'
|
||||
},
|
||||
{
|
||||
'extensions': [
|
||||
@@ -73,7 +74,7 @@ const List iconMaps = [
|
||||
'.wma'
|
||||
],
|
||||
'type': 'Audio',
|
||||
'thumbnail': 'music_in_collection_fill'
|
||||
'thumbnail': 'file_audio'
|
||||
},
|
||||
//compressed
|
||||
{
|
||||
@@ -97,23 +98,29 @@ const List iconMaps = [
|
||||
'dockerignore'
|
||||
],
|
||||
'type': 'Archive',
|
||||
'thumbnail': 'package'
|
||||
'thumbnail': 'file_archive'
|
||||
},
|
||||
//office relative
|
||||
{
|
||||
'extensions': ['pdf'],
|
||||
'type': 'Portable Document Format',
|
||||
'thumbnail': 'pdf'
|
||||
'thumbnail': 'file_pdf'
|
||||
},
|
||||
{
|
||||
'extensions': ['txt', 'doc', 'docb', 'docm', 'dot', 'dotm', 'docx', 'rtf'],
|
||||
'type': 'Word Document',
|
||||
'thumbnail': 'text_document_edit'
|
||||
'extensions': ['txt', 'docb', 'rtf'],
|
||||
'type': 'Document',
|
||||
'thumbnail': 'doc_text'
|
||||
},
|
||||
{
|
||||
'extensions': ['doc', 'docm', 'dot', 'dotm', 'docx'],
|
||||
'type': 'Word Document',
|
||||
'thumbnail': 'file_word'
|
||||
},
|
||||
|
||||
{
|
||||
'extensions': ['xlsx', 'xls', 'xlsb', 'xls', 'ods', 'fods', 'csv'],
|
||||
'type': 'Excel Document',
|
||||
'thumbnail': 'excel_document'
|
||||
'thumbnail': 'file_excel'
|
||||
},
|
||||
{
|
||||
'extensions': [
|
||||
@@ -129,13 +136,13 @@ const List iconMaps = [
|
||||
'pptx'
|
||||
],
|
||||
'type': 'Powerpoint Document',
|
||||
'thumbnail': 'power_point_document'
|
||||
'thumbnail': 'file_powerpoint'
|
||||
},
|
||||
//other
|
||||
{
|
||||
'extensions': ['lnk'],
|
||||
'type': 'Shortcut',
|
||||
'thumbnail': 'file_symlink'
|
||||
'thumbnail': 'link_ext'
|
||||
},
|
||||
{
|
||||
'extensions': [
|
||||
@@ -155,12 +162,12 @@ const List iconMaps = [
|
||||
'cfg'
|
||||
],
|
||||
'type': 'Settings',
|
||||
'thumbnail': 'text_document_settings'
|
||||
'thumbnail': 'cog_alt'
|
||||
},
|
||||
{
|
||||
'extensions': ['html', 'htm', 'xhtml', 'html_vm'],
|
||||
'type': 'html',
|
||||
'thumbnail': 'file_h_t_m_l'
|
||||
'thumbnail': 'html5'
|
||||
},
|
||||
//code relative
|
||||
// {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Locale toLocale(String key) {
|
||||
final arr = key.split('_');
|
||||
return Locale(arr[0], arr[1]);
|
||||
}
|
||||
|
||||
String getLocaleKey(Locale locale) {
|
||||
return '${locale.languageCode}_${locale.countryCode}';
|
||||
}
|
||||
|
||||
const debugLocale = Locale('zh', 'CN');
|
||||
const fallbackLocale = Locale('en', 'US');
|
||||
@@ -1,50 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ResponsiveBuilder extends StatelessWidget {
|
||||
const ResponsiveBuilder({
|
||||
required this.narrowBuilder,
|
||||
required this.mediumBuilder,
|
||||
required this.wideBuilder,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
final Widget Function(
|
||||
BuildContext context,
|
||||
BoxConstraints constraints,
|
||||
) narrowBuilder;
|
||||
|
||||
final Widget Function(
|
||||
BuildContext context,
|
||||
BoxConstraints constraints,
|
||||
) mediumBuilder;
|
||||
|
||||
final Widget Function(
|
||||
BuildContext context,
|
||||
BoxConstraints constraints,
|
||||
) wideBuilder;
|
||||
|
||||
static bool isNarrow(BuildContext context) =>
|
||||
MediaQuery.of(context).size.width < 768;
|
||||
|
||||
static bool isMedium(BuildContext context) =>
|
||||
MediaQuery.of(context).size.width < 992 &&
|
||||
MediaQuery.of(context).size.width >= 768;
|
||||
|
||||
static bool isWide(BuildContext context) =>
|
||||
MediaQuery.of(context).size.width >= 992;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
if (constraints.maxWidth >= 992) {
|
||||
return wideBuilder(context, constraints);
|
||||
} else if (constraints.maxWidth >= 768) {
|
||||
return mediumBuilder(context, constraints);
|
||||
} else {
|
||||
return narrowBuilder(context, constraints);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user