Skip to content

An open-source cross-platform alternative to AirDrop

feat: add troubleshoot

Tien Do Nam72d11ca914a3
diff --git a/assets/CHANGELOG.md b/assets/CHANGELOG.md
index dd1540ec..02a43239 100644
--- a/assets/CHANGELOG.md
+++ b/assets/CHANGELOG.md
@@ -1,13 +1,17 @@
+## 1.8.0 (2023-)
+
+- feat: add troubleshoot page
+
## 1.7.0 (2023-02-11)
- feat: improve device discovery by enabling multicast
-- feat: received file history
+- feat: received files history
- feat: show recent IP addresses in manual IP input
-- feat: improve error handling and add possibility to show exact error message for debugging
-- feat: add unencrypted HTTP mode (for debugging)
- feat: separate language settings page
- feat: message input is horizontally scrollable when multiline is unselected
- feat: open message normally in QuickSave mode (instead of saving it into a file)
+- feat: improve error handling and add possibility to show exact error message for debugging
+- feat: add unencrypted HTTP mode (for debugging)
- feat(android): keep file name when saving to photos
- feat(desktop): use bigger default window size if display is big enough
- feat(windows): use "Microsoft YaHei UI" font in Windows which works better with Chinese characters
diff --git a/assets/i18n/_missing_translations_ar.json b/assets/i18n/_missing_translations_ar.json
index dbc9febb..8700f336 100644
--- a/assets/i18n/_missing_translations_ar.json
+++ b/assets/i18n/_missing_translations_ar.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_es_ES.json b/assets/i18n/_missing_translations_es_ES.json
index f35b4802..8b015f95 100644
--- a/assets/i18n/_missing_translations_es_ES.json
+++ b/assets/i18n/_missing_translations_es_ES.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"sendPage": {
"busy": "The recipient is busy with another request."
},
diff --git a/assets/i18n/_missing_translations_fr_FR.json b/assets/i18n/_missing_translations_fr_FR.json
index a2ee2b27..96b8786b 100644
--- a/assets/i18n/_missing_translations_fr_FR.json
+++ b/assets/i18n/_missing_translations_fr_FR.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"sendPage": {
"busy": "The recipient is busy with another request."
},
diff --git a/assets/i18n/_missing_translations_hu.json b/assets/i18n/_missing_translations_hu.json
index 4d914f1b..d9e2505d 100644
--- a/assets/i18n/_missing_translations_hu.json
+++ b/assets/i18n/_missing_translations_hu.json
@@ -1,7 +1,21 @@
{
"@@info": [
"Here are translations that exist in <en> but not in <hu>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=hu' to quickly apply the newly added translations.",
- "Congratulations! There are no missing translations! :)"
- ]
+ "After editing this file, you can run 'flutter pub run slang apply --locale=hu' to quickly apply the newly added translations."
+ ],
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ }
}
\ No newline at end of file
diff --git a/assets/i18n/_missing_translations_in.json b/assets/i18n/_missing_translations_in.json
index 77e3d4ec..942c5f02 100644
--- a/assets/i18n/_missing_translations_in.json
+++ b/assets/i18n/_missing_translations_in.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_it.json b/assets/i18n/_missing_translations_it.json
index 9cda8fc2..4cb0a355 100644
--- a/assets/i18n/_missing_translations_it.json
+++ b/assets/i18n/_missing_translations_it.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_iw.json b/assets/i18n/_missing_translations_iw.json
index 33c5a655..5b10d8e5 100644
--- a/assets/i18n/_missing_translations_iw.json
+++ b/assets/i18n/_missing_translations_iw.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_ja.json b/assets/i18n/_missing_translations_ja.json
index 28376d5b..fafe3a65 100644
--- a/assets/i18n/_missing_translations_ja.json
+++ b/assets/i18n/_missing_translations_ja.json
@@ -1,7 +1,21 @@
{
"@@info": [
"Here are translations that exist in <en> but not in <ja>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=ja' to quickly apply the newly added translations.",
- "Congratulations! There are no missing translations! :)"
- ]
+ "After editing this file, you can run 'flutter pub run slang apply --locale=ja' to quickly apply the newly added translations."
+ ],
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ }
}
\ No newline at end of file
diff --git a/assets/i18n/_missing_translations_ko.json b/assets/i18n/_missing_translations_ko.json
index e2986515..612b75a8 100644
--- a/assets/i18n/_missing_translations_ko.json
+++ b/assets/i18n/_missing_translations_ko.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_ne.json b/assets/i18n/_missing_translations_ne.json
index 0d2b7fc8..956d3e55 100644
--- a/assets/i18n/_missing_translations_ne.json
+++ b/assets/i18n/_missing_translations_ne.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_pl.json b/assets/i18n/_missing_translations_pl.json
index f462db3d..f4f9e827 100644
--- a/assets/i18n/_missing_translations_pl.json
+++ b/assets/i18n/_missing_translations_pl.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_pt_BR.json b/assets/i18n/_missing_translations_pt_BR.json
index 68874fe7..09f93496 100644
--- a/assets/i18n/_missing_translations_pt_BR.json
+++ b/assets/i18n/_missing_translations_pt_BR.json
@@ -9,6 +9,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"sendPage": {
"busy": "The recipient is busy with another request."
},
diff --git a/assets/i18n/_missing_translations_ru.json b/assets/i18n/_missing_translations_ru.json
index 829989b8..2663bffd 100644
--- a/assets/i18n/_missing_translations_ru.json
+++ b/assets/i18n/_missing_translations_ru.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_sv.json b/assets/i18n/_missing_translations_sv.json
index 4f0874f7..41df2e17 100644
--- a/assets/i18n/_missing_translations_sv.json
+++ b/assets/i18n/_missing_translations_sv.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_tr.json b/assets/i18n/_missing_translations_tr.json
index 93a17d83..b2d62899 100644
--- a/assets/i18n/_missing_translations_tr.json
+++ b/assets/i18n/_missing_translations_tr.json
@@ -8,5 +8,20 @@
"multicastGroup": "Multicast",
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
+ },
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
}
}
\ No newline at end of file
diff --git a/assets/i18n/_missing_translations_zh_Hans.json b/assets/i18n/_missing_translations_zh_Hans.json
index 6b564530..4cbabd7b 100644
--- a/assets/i18n/_missing_translations_zh_Hans.json
+++ b/assets/i18n/_missing_translations_zh_Hans.json
@@ -1,7 +1,21 @@
{
"@@info": [
"Here are translations that exist in <en> but not in <zh-Hans>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hans' to quickly apply the newly added translations.",
- "Congratulations! There are no missing translations! :)"
- ]
+ "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hans' to quickly apply the newly added translations."
+ ],
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ }
}
\ No newline at end of file
diff --git a/assets/i18n/_missing_translations_zh_Hant_HK.json b/assets/i18n/_missing_translations_zh_Hant_HK.json
index 80d965ec..bf3b1ff8 100644
--- a/assets/i18n/_missing_translations_zh_Hant_HK.json
+++ b/assets/i18n/_missing_translations_zh_Hant_HK.json
@@ -11,6 +11,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/_missing_translations_zh_Hant_TW.json b/assets/i18n/_missing_translations_zh_Hant_TW.json
index 99a400ef..6bc0eb3e 100644
--- a/assets/i18n/_missing_translations_zh_Hant_TW.json
+++ b/assets/i18n/_missing_translations_zh_Hant_TW.json
@@ -1,7 +1,21 @@
{
"@@info": [
"Here are translations that exist in <en> but not in <zh-Hant-TW>.",
- "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hant-TW' to quickly apply the newly added translations.",
- "Congratulations! There are no missing translations! :)"
- ]
+ "After editing this file, you can run 'flutter pub run slang apply --locale=zh-Hant-TW' to quickly apply the newly added translations."
+ ],
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ }
}
\ No newline at end of file
diff --git a/assets/i18n/strings.i18n.json b/assets/i18n/strings.i18n.json
index 6ab88aa3..c920e74c 100644
--- a/assets/i18n/strings.i18n.json
+++ b/assets/i18n/strings.i18n.json
@@ -100,6 +100,21 @@
"multicastGroupWarning": "You might not be detected by other devices because you are using a custom multicast address. (default: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Troubleshoot",
+ "subTitle": "This app does not work as expected? Here you can find common solutions.",
+ "solution": "Solution:",
+ "fixButton": "Fix automatically",
+ "firewall": {
+ "symptom": "This app can send files to other devices but other devices cannot send files to this device.",
+ "solution": "This is most likely a firewall issue. You can solve this by allowing incoming connections (UDP and TCP) on port {port}.",
+ "openFirewall": "Open Firewall"
+ },
+ "noConnection": {
+ "symptom": "Both devices cannot discover each other nor can they share files.",
+ "solution": "The problem exists on both sides? Then you need to make sure that both devices are in the same wifi network and share the same configuration (port, multicast address, encryption). The wifi may not allow communication between participants. In this case, this option must be enabled on the router."
+ }
+ },
"receiveHistoryPage": {
"title": "History",
"empty": "The history is empty.",
diff --git a/assets/i18n/strings_de.i18n.json b/assets/i18n/strings_de.i18n.json
index ea70a2f6..3853f3d7 100644
--- a/assets/i18n/strings_de.i18n.json
+++ b/assets/i18n/strings_de.i18n.json
@@ -100,6 +100,21 @@
"multicastGroupWarning": "Möglicherweise wirst du von anderen Geräten nicht erkannt, weil du eine benutzerdefinierte Multicast-Adresse verwendest. (Standard: {defaultMulticast})"
}
},
+ "troubleshootTab": {
+ "title": "Fehlerbehebung",
+ "subTitle": "Diese App funktioniert nicht wie erwartet? Hier findest du häufige Lösungsansätze.",
+ "solution": "Lösung:",
+ "fixButton": "Automatisch beheben",
+ "firewall": {
+ "symptom": "Diese App kann Dateien an andere Geräte senden, aber nicht umgekehrt.",
+ "solution": "Dies ist höchstwahrscheinlich ein Firewall-Problem. Du kannst es lösen, indem du eingehende Verbindungen (UDP und TCP) auf Port {port} zulässt.",
+ "openFirewall": "Firewall öffnen"
+ },
+ "noConnection": {
+ "symptom": "Beide Geräte können sich nicht sehen noch können sie Dateien miteinander teilen.",
+ "solution": "Das Problem tritt auf beiden Seiten auf? Dann stelle sicher, dass beide Geräte im selben WLAN sind sowie dieselbe Konfiguration (Port, Multicast-Adresse, Verschlüsselung) haben. Es kann sein, dass das WLAN keine Kommunikation zwischen Teilnehmern erlaubt. In diesem Fall muss am Router diese Option aktiviert werden."
+ }
+ },
"receiveHistoryPage": {
"title": "Verlauf",
"empty": "Der Verlauf ist leer.",
diff --git a/lib/pages/home_page.dart b/lib/pages/home_page.dart
index dc3f98a4..e17cf221 100644
--- a/lib/pages/home_page.dart
+++ b/lib/pages/home_page.dart
@@ -1,3 +1,5 @@
+import 'dart:math';
+
import 'package:desktop_drop/desktop_drop.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
@@ -6,6 +8,7 @@ import 'package:localsend_app/init.dart';
import 'package:localsend_app/pages/tabs/receive_tab.dart';
import 'package:localsend_app/pages/tabs/send_tab.dart';
import 'package:localsend_app/pages/tabs/settings_tab.dart';
+import 'package:localsend_app/pages/tabs/troubleshooting_tab.dart';
import 'package:localsend_app/provider/selection/selected_sending_files_provider.dart';
import 'package:localsend_app/theme.dart';
import 'package:localsend_app/widget/responsive_builder.dart';
@@ -13,7 +16,8 @@ import 'package:localsend_app/widget/responsive_builder.dart';
enum HomeTab {
receive(Icons.wifi),
send(Icons.send),
- settings(Icons.settings);
+ settings(Icons.settings),
+ troubleshoot(Icons.healing);
const HomeTab(this.icon);
@@ -27,6 +31,8 @@ enum HomeTab {
return t.sendTab.title;
case HomeTab.settings:
return t.settingsTab.title;
+ case HomeTab.troubleshoot:
+ return t.troubleshootTab.title;
}
}
}
@@ -127,6 +133,7 @@ class _HomePageState extends ConsumerState<HomePage> {
ReceiveTab(),
SendTab(),
SettingsTab(),
+ TroubleshootingTab(),
],
),
if (_dragAndDropIndicator)
@@ -152,9 +159,15 @@ class _HomePageState extends ConsumerState<HomePage> {
),
bottomNavigationBar: sizingInformation.isMobile
? NavigationBar(
- selectedIndex: _currentTab.index,
+ selectedIndex: sizingInformation.isMobile ? min(_currentTab.index, 2) : _currentTab.index,
onDestinationSelected: _goToPage,
- destinations: HomeTab.values.map((tab) {
+ destinations: [
+ HomeTab.receive,
+ HomeTab.send,
+ HomeTab.settings,
+ if (sizingInformation.isTablet)
+ HomeTab.troubleshoot,
+ ].map((tab) {
return NavigationDestination(icon: Icon(tab.icon), label: tab.label);
}).toList(),
)
diff --git a/lib/pages/tabs/troubleshooting_tab.dart b/lib/pages/tabs/troubleshooting_tab.dart
new file mode 100644
index 00000000..86aa8074
--- /dev/null
+++ b/lib/pages/tabs/troubleshooting_tab.dart
@@ -0,0 +1,187 @@
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:localsend_app/gen/strings.g.dart';
+import 'package:localsend_app/provider/settings_provider.dart';
+import 'package:localsend_app/util/cmd_helper.dart';
+import 'package:localsend_app/util/platform_check.dart';
+import 'package:localsend_app/widget/custom_icon_button.dart';
+import 'package:localsend_app/widget/responsive_list_view.dart';
+
+class TroubleshootingTab extends ConsumerWidget {
+ const TroubleshootingTab({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final settings = ref.watch(settingsProvider);
+ return ResponsiveListView(
+ padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 30),
+ children: [
+ Text(t.troubleshootTab.title, style: Theme.of(context).textTheme.headline6, textAlign: TextAlign.center),
+ const SizedBox(height: 20),
+ Text(t.troubleshootTab.subTitle, textAlign: TextAlign.center),
+ const SizedBox(height: 5),
+ _TroubleshootItem(
+ symptomText: t.troubleshootTab.firewall.symptom,
+ solutionText: t.troubleshootTab.firewall.solution(port: settings.port),
+ platforms: const [TargetPlatform.windows, TargetPlatform.linux],
+ commands: checkPlatform([TargetPlatform.windows]) ? [
+ 'netsh advfirewall firewall add rule name="LocalSend" dir=in action=allow protocol=TCP localport=${settings.port}',
+ 'netsh advfirewall firewall add rule name="LocalSend" dir=in action=allow protocol=UDP localport=${settings.port}',
+ ] : null,
+ secondaryButton: checkPlatform([TargetPlatform.windows]) ? t.troubleshootTab.firewall.openFirewall : null,
+ secondaryAction: checkPlatform([TargetPlatform.windows]) ? () async {
+ await Process.run('wf', [], runInShell: true);
+ } : null,
+ ),
+ _TroubleshootItem(
+ symptomText: t.troubleshootTab.noConnection.symptom,
+ solutionText: t.troubleshootTab.noConnection.solution,
+ ),
+ ],
+ );
+ }
+}
+
+class _TroubleshootItem extends StatefulWidget {
+ final String symptomText;
+ final String solutionText;
+ final List<TargetPlatform>? platforms;
+ final List<String>? commands;
+ final String? secondaryButton;
+ final VoidCallback? secondaryAction;
+
+ const _TroubleshootItem({
+ required this.symptomText,
+ required this.solutionText,
+ this.platforms,
+ this.commands,
+ this.secondaryButton,
+ this.secondaryAction,
+ });
+
+ @override
+ State<_TroubleshootItem> createState() => _TroubleshootItemState();
+}
+
+class _TroubleshootItemState extends State<_TroubleshootItem> {
+ bool _showCommands = false;
+
+ @override
+ Widget build(BuildContext context) {
+ return Padding(
+ padding: const EdgeInsets.only(top: 15),
+ child: Card(
+ child: Padding(
+ padding: const EdgeInsets.all(15),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ if (widget.platforms != null)
+ Padding(
+ padding: const EdgeInsets.only(bottom: 10),
+ child: Wrap(
+ children: widget.platforms!.map((p) {
+ return [
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
+ decoration: BoxDecoration(
+ color: Colors.grey,
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Text(p.humanName, style: const TextStyle(color: Colors.white)),
+ ),
+ const SizedBox(width: 10),
+ ];
+ }).expand((element) => element).toList(),
+ ),
+ ),
+ Wrap(
+ children: [
+ Text(widget.symptomText, style: Theme.of(context).textTheme.subtitle1),
+ ],
+ ),
+ const SizedBox(height: 10),
+ Text(t.troubleshootTab.solution),
+ Text(widget.solutionText),
+ if (widget.commands != null)
+ ...[
+ const SizedBox(height: 10),
+ Wrap(
+ children: [
+ ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Theme.of(context).buttonTheme.colorScheme!.primary,
+ foregroundColor: Theme.of(context).buttonTheme.colorScheme!.onPrimary,
+ ),
+ onPressed: () async {
+ if (checkPlatform([TargetPlatform.windows])) {
+ await runWindowsCommandAsAdmin(widget.commands!);
+ }
+ },
+ child: Text(t.troubleshootTab.fixButton),
+ ),
+ if (widget.secondaryButton != null)
+ ...[
+ const SizedBox(width: 10),
+ ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Theme.of(context).buttonTheme.colorScheme!.primary,
+ foregroundColor: Theme.of(context).buttonTheme.colorScheme!.onPrimary,
+ ),
+ onPressed: widget.secondaryAction!,
+ child: Text(widget.secondaryButton!),
+ ),
+ ],
+ const SizedBox(width: 10),
+ CustomIconButton(
+ onPressed: () {
+ setState(() => _showCommands = !_showCommands);
+ },
+ child: const Icon(Icons.info),
+ ),
+ ],
+ ),
+ AnimatedCrossFade(
+ crossFadeState: _showCommands ? CrossFadeState.showSecond : CrossFadeState.showFirst,
+ duration: const Duration(milliseconds: 200),
+ firstChild: Container(),
+ secondChild: SelectionArea(
+ child: Column(
+ children: widget.commands!.map((cmd) {
+ return Padding(
+ padding: const EdgeInsets.only(top: 10),
+ child: Text(cmd, style: const TextStyle(fontFamily: 'RobotoMono')),
+ );
+ }).toList(),
+ ),
+ ),
+ ),
+ ],
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+extension on TargetPlatform {
+ String get humanName {
+ switch (this) {
+ case TargetPlatform.android:
+ return 'Android';
+ case TargetPlatform.fuchsia:
+ return 'Fuchsia';
+ case TargetPlatform.iOS:
+ return 'iOS';
+ case TargetPlatform.linux:
+ return 'Linux';
+ case TargetPlatform.macOS:
+ return 'MacOS';
+ case TargetPlatform.windows:
+ return 'Windows';
+ }
+ }
+}
diff --git a/lib/util/cmd_helper.dart b/lib/util/cmd_helper.dart
new file mode 100644
index 00000000..f0cf3b6d
--- /dev/null
+++ b/lib/util/cmd_helper.dart
@@ -0,0 +1,17 @@
+import 'dart:io';
+
+/// Runs [commands] in cmd having admin privileges.
+Future<void> runWindowsCommandAsAdmin(List<String> commands) async {
+ try {
+ final joinedCommands = commands.join(' & ');
+ await Process.run(
+ 'powershell',
+ [
+ '-Command',
+ "Start-Process -Verb RunAs cmd.exe -Args '/c', '$joinedCommands & echo. & pause'",
+ ],
+ );
+ } catch (e) {
+ print(e);
+ }
+}