Merge pull request #1286 from Kingtous/flutter_desktop
feat: file transfer selectable navigation tools & search bar
This commit is contained in:
commit
f797125ae2
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,22 @@ class FileModel extends ChangeNotifier {
|
||||
return isLocal ? currentLocalDir : currentRemoteDir;
|
||||
}
|
||||
|
||||
String getCurrentShortPath(bool isLocal) {
|
||||
final currentDir = getCurrentDir(isLocal);
|
||||
final currentHome = getCurrentHome(isLocal);
|
||||
if (currentDir.path.startsWith(currentHome)) {
|
||||
var path = currentDir.path.replaceFirst(currentHome, "");
|
||||
if (path.length == 0) return "";
|
||||
if (path[0] == "/" || path[0] == "\\") {
|
||||
// remove more '/' or '\'
|
||||
path = path.replaceFirst(path[0], "");
|
||||
}
|
||||
return path;
|
||||
} else {
|
||||
return currentDir.path.replaceFirst(currentHome, "");
|
||||
}
|
||||
}
|
||||
|
||||
String get currentHome => _isLocal ? _localOption.home : _remoteOption.home;
|
||||
|
||||
String getCurrentHome(bool isLocal) {
|
||||
@ -716,6 +732,7 @@ class FileModel extends ChangeNotifier {
|
||||
job.totalSize = total_size.toInt();
|
||||
}
|
||||
debugPrint("update folder files: ${info}");
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get remoteSortAscending => _remoteSortAscending;
|
||||
|
@ -239,6 +239,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.0.12"
|
||||
desktop_drop:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: desktop_drop
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.3"
|
||||
desktop_multi_window:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -817,7 +824,7 @@ packages:
|
||||
name: qr_code_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -69,6 +69,7 @@ dependencies:
|
||||
get: ^4.6.5
|
||||
visibility_detector: ^0.3.3
|
||||
contextmenu: ^3.0.0
|
||||
desktop_drop: ^0.3.3
|
||||
|
||||
dev_dependencies:
|
||||
flutter_launcher_icons: ^0.9.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user