mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: typo
This commit is contained in:
@@ -1,7 +1,39 @@
|
||||
PODS:
|
||||
- countly_flutter (22.09.0):
|
||||
- Flutter
|
||||
- DKImagePickerController/Core (4.3.4):
|
||||
- DKImagePickerController/ImageDataManager
|
||||
- DKImagePickerController/Resource
|
||||
- DKImagePickerController/ImageDataManager (4.3.4)
|
||||
- DKImagePickerController/PhotoGallery (4.3.4):
|
||||
- DKImagePickerController/Core
|
||||
- DKPhotoGallery
|
||||
- DKImagePickerController/Resource (4.3.4)
|
||||
- DKPhotoGallery (0.0.17):
|
||||
- DKPhotoGallery/Core (= 0.0.17)
|
||||
- DKPhotoGallery/Model (= 0.0.17)
|
||||
- DKPhotoGallery/Preview (= 0.0.17)
|
||||
- DKPhotoGallery/Resource (= 0.0.17)
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Core (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Preview
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Model (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Preview (0.0.17):
|
||||
- DKPhotoGallery/Model
|
||||
- DKPhotoGallery/Resource
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- DKPhotoGallery/Resource (0.0.17):
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- file_picker (0.0.1):
|
||||
- DKImagePickerController/PhotoGallery
|
||||
- Flutter
|
||||
- Flutter (1.0.0)
|
||||
- flutter_native_splash (0.0.1):
|
||||
@@ -13,8 +45,12 @@ PODS:
|
||||
- Flutter
|
||||
- r_upgrade (0.0.1):
|
||||
- Flutter
|
||||
- SDWebImage (5.15.7):
|
||||
- SDWebImage/Core (= 5.15.7)
|
||||
- SDWebImage/Core (5.15.7)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- SwiftyGif (5.4.4)
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
|
||||
@@ -29,6 +65,13 @@ DEPENDENCIES:
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
countly_flutter:
|
||||
:path: ".symlinks/plugins/countly_flutter/ios"
|
||||
@@ -51,15 +94,19 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
countly_flutter: 135f1a4930f8e26ba223a14201d3f265ea7b4c83
|
||||
file_picker: 1d63c4949e05e386da864365f8c13e1e64787675
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
file_picker: 63d7a9f5a3b5fe8fa001b1af955065e42a6c7b3e
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
|
||||
plain_notification_token: b36467dc91939a7b6754267c701bbaca14996ee1
|
||||
r_upgrade: 44d715c61914cce3d01ea225abffe894fd51c114
|
||||
SDWebImage: 25bac438318faf37e35650619ebc288a9061d292
|
||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
||||
|
||||
PODFILE CHECKSUM: 7fb15c416f8685fca4966867a8da218ec592ec2e
|
||||
PODFILE CHECKSUM: 8fb0b88ad9ca0fa16f109f46126189158d7c8607
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
COCOAPODS: 1.12.1
|
||||
|
||||
@@ -26,21 +26,21 @@ Future<bool> shareFiles(BuildContext context, List<String> filePaths) async {
|
||||
} else {
|
||||
text = '${filePaths.length} ${S.of(context)!.files}';
|
||||
}
|
||||
_app.setMoveBg(false);
|
||||
_app.setCanMoveBg(false);
|
||||
// ignore: deprecated_member_use
|
||||
await Share.shareFiles(filePaths, text: 'ServerBox -> $text');
|
||||
_app.setMoveBg(true);
|
||||
_app.setCanMoveBg(true);
|
||||
return filePaths.isNotEmpty;
|
||||
}
|
||||
|
||||
void copy(String text) {
|
||||
void copy2Clipboard(String text) {
|
||||
Clipboard.setData(ClipboardData(text: text));
|
||||
}
|
||||
|
||||
Future<String?> pickOneFile() async {
|
||||
_app.setMoveBg(false);
|
||||
_app.setCanMoveBg(false);
|
||||
final result = await FilePicker.platform.pickFiles(type: FileType.any);
|
||||
_app.setMoveBg(true);
|
||||
_app.setCanMoveBg(true);
|
||||
return result?.files.single.path;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class AppProvider extends BusyProvider {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setMoveBg(bool moveBg) {
|
||||
void setCanMoveBg(bool moveBg) {
|
||||
_moveBg = moveBg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
return Scaffold(
|
||||
drawer: _buildDrawer(),
|
||||
appBar: AppBar(
|
||||
title: Text(tabTitleName(context, _selectIndex)),
|
||||
title: const Text(BuildData.name),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.developer_mode, size: 23),
|
||||
|
||||
@@ -98,6 +98,7 @@ class _ServerPageState extends State<ServerPage>
|
||||
pro.serverOrder.move(oldIndex, newIndex);
|
||||
}),
|
||||
children: pro.serverOrder
|
||||
.where((e) => pro.servers.containsKey(e))
|
||||
.map((e) => _buildEachServerCard(pro.servers[e]))
|
||||
.toList(),
|
||||
);
|
||||
@@ -168,8 +169,8 @@ class _ServerPageState extends State<ServerPage>
|
||||
child: Text(ss.failedInfo ?? _s.unknownError),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
copy(ss.failedInfo ?? _s.unknownError),
|
||||
onPressed: () => copy2Clipboard(
|
||||
ss.failedInfo ?? _s.unknownError),
|
||||
child: Text(_s.copy),
|
||||
)
|
||||
],
|
||||
|
||||
@@ -395,7 +395,7 @@ class _SettingPageState extends State<SettingPage> {
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () {
|
||||
if (_pushToken != null) {
|
||||
copy(_pushToken!);
|
||||
copy2Clipboard(_pushToken!);
|
||||
showSnackBar(context, Text(_s.success));
|
||||
} else {
|
||||
showSnackBar(context, Text(_s.getPushTokenFailed));
|
||||
@@ -421,9 +421,10 @@ class _SettingPageState extends State<SettingPage> {
|
||||
}
|
||||
|
||||
Widget _buildFont() {
|
||||
final fontName = getFileName(_setting.fontPath.fetch());
|
||||
return ListTile(
|
||||
title: Text(_s.chooseFontFile),
|
||||
trailing: Text(getFileName(_setting.fontPath.fetch()) ?? _s.notSelected),
|
||||
title: Text(_s.choose),
|
||||
trailing: Text(fontName ?? _s.notSelected),
|
||||
onTap: () {
|
||||
showRoundDialog(
|
||||
context: context,
|
||||
|
||||
@@ -222,7 +222,10 @@ class _SSHPageState extends State<SSHPage> {
|
||||
_paste();
|
||||
break;
|
||||
case VirtualKeyFunc.copy:
|
||||
copy(terminalSelected);
|
||||
final selected = terminalSelected;
|
||||
if (selected != null) {
|
||||
copy2Clipboard(selected);
|
||||
}
|
||||
break;
|
||||
case VirtualKeyFunc.snippet:
|
||||
showSnippetDialog(context, _s, (s) {
|
||||
@@ -241,10 +244,10 @@ class _SSHPageState extends State<SSHPage> {
|
||||
});
|
||||
}
|
||||
|
||||
String get terminalSelected {
|
||||
String? get terminalSelected {
|
||||
final range = _terminalController.selection;
|
||||
if (range == null) {
|
||||
return '';
|
||||
return null;
|
||||
}
|
||||
return _terminal.buffer.getText(range);
|
||||
}
|
||||
@@ -255,37 +258,16 @@ class _SSHPageState extends State<SSHPage> {
|
||||
return;
|
||||
}
|
||||
final selected = terminalSelected;
|
||||
if (selected.trim().isEmpty) {
|
||||
// _menuController.show(
|
||||
// context: context,
|
||||
// contextMenuBuilder: (context) {
|
||||
// return TextSelectionToolbar(
|
||||
// anchorAbove: details.globalPosition,
|
||||
// anchorBelow: details.globalPosition,
|
||||
// children: [
|
||||
// TextButton(
|
||||
// child: Text(
|
||||
// _s.paste,
|
||||
// style: _menuTextStyle,
|
||||
// ),
|
||||
// onPressed: () async {
|
||||
// _paste();
|
||||
// _menuController.remove();
|
||||
// },
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
return;
|
||||
}
|
||||
_menuController.show(
|
||||
context: context,
|
||||
contextMenuBuilder: (context) {
|
||||
return TextSelectionToolbar(
|
||||
anchorAbove: details.globalPosition,
|
||||
anchorBelow: details.globalPosition,
|
||||
children: [
|
||||
final children = <Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
_paste();
|
||||
},
|
||||
child: Text(_s.paste),
|
||||
),
|
||||
];
|
||||
if (selected?.trim().isNotEmpty ?? false) {
|
||||
children.add(
|
||||
TextButton(
|
||||
child: Text(
|
||||
_s.copy,
|
||||
@@ -293,11 +275,21 @@ class _SSHPageState extends State<SSHPage> {
|
||||
),
|
||||
onPressed: () {
|
||||
_terminalController.setSelection(null);
|
||||
copy(selected);
|
||||
if (selected != null) {
|
||||
copy2Clipboard(selected);
|
||||
}
|
||||
_menuController.remove();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
_menuController.show(
|
||||
context: context,
|
||||
contextMenuBuilder: (context) {
|
||||
return TextSelectionToolbar(
|
||||
anchorAbove: details.globalPosition,
|
||||
anchorBelow: details.globalPosition,
|
||||
children: children,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user