mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-08-01 16:15:56 +10:00
feat: add contact UI helpers and path editor for routing management
- Implemented contactTypeIcon and contactTypeColor functions for better UI representation of contact types. - Created colorForName and firstCharacterOrEmoji functions to enhance contact display. - Developed PathEditorSheet widget for managing contact paths with a user-friendly interface. - Introduced RoutingSheet for managing contact routing modes and displaying path history. - Added a script for generating proof of concept (PoC) payloads for clipboard contact import validation.
This commit is contained in:
+177
-140
@@ -92,6 +92,24 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get common_disable => 'Вимкнути';
|
||||
|
||||
@override
|
||||
String get common_undo => 'Undo';
|
||||
|
||||
@override
|
||||
String get messageStatus_sent => 'Sent';
|
||||
|
||||
@override
|
||||
String get messageStatus_delivered => 'Delivered';
|
||||
|
||||
@override
|
||||
String get messageStatus_pending => 'Sending';
|
||||
|
||||
@override
|
||||
String get messageStatus_failed => 'Failed to send';
|
||||
|
||||
@override
|
||||
String get messageStatus_repeated => 'Heard repeated';
|
||||
|
||||
@override
|
||||
String get common_reboot => 'Перезавантажити';
|
||||
|
||||
@@ -789,11 +807,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get appSettings_maxMessageRetriesSubtitle =>
|
||||
'Кількість спроб повторного відправлення повідомлення перед тим, як позначити його як невдале';
|
||||
|
||||
@override
|
||||
String path_routeWeight(String weight, String max) {
|
||||
return '$weight/$max';
|
||||
}
|
||||
|
||||
@override
|
||||
String get appSettings_battery => 'Батарея';
|
||||
|
||||
@@ -995,6 +1008,15 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get contacts_newGroup => 'Нова група';
|
||||
|
||||
@override
|
||||
String get contacts_moreOptions => 'More options';
|
||||
|
||||
@override
|
||||
String get contacts_searchOpen => 'Search contacts';
|
||||
|
||||
@override
|
||||
String get contacts_searchClose => 'Close search';
|
||||
|
||||
@override
|
||||
String get contacts_groupName => 'Назва групи';
|
||||
|
||||
@@ -1474,35 +1496,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get debugFrame_hexDump => 'Дамп Hex:';
|
||||
|
||||
@override
|
||||
String get chat_pathManagement => 'Керування шляхами';
|
||||
|
||||
@override
|
||||
String get chat_ShowAllPaths => 'Показати всі шляхи';
|
||||
|
||||
@override
|
||||
String get chat_routingMode => 'Режим маршрутизації';
|
||||
|
||||
@override
|
||||
String get chat_autoUseSavedPath => 'Авто (використовувати збережений шлях)';
|
||||
|
||||
@override
|
||||
String get chat_forceFloodMode => 'Примусово через всю мережу';
|
||||
|
||||
@override
|
||||
String get chat_recentAckPaths =>
|
||||
'Підтверджені шляхи (натисніть, щоб використати):';
|
||||
|
||||
@override
|
||||
String get chat_pathHistoryFull =>
|
||||
'Історія шляхів заповнена. Видаліть записи, щоб додати нові.';
|
||||
|
||||
@override
|
||||
String get chat_hopSingular => 'Перехід';
|
||||
|
||||
@override
|
||||
String get chat_hopPlural => 'переходів';
|
||||
|
||||
@override
|
||||
String chat_hopsCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
@@ -1516,12 +1509,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
return '$count $_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get chat_successes => 'Успішно';
|
||||
|
||||
@override
|
||||
String get chat_score => 'Оцінка';
|
||||
|
||||
@override
|
||||
String get chat_removePath => 'Видалити шлях';
|
||||
|
||||
@@ -1529,54 +1516,144 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
String get chat_noPathHistoryYet =>
|
||||
'Історія шляхів недоступна.\nНадішліть повідомлення, щоб виявити шляхи.';
|
||||
|
||||
@override
|
||||
String get chat_pathActions => 'Дії зі шляхом:';
|
||||
|
||||
@override
|
||||
String get chat_setCustomPath => 'Встановити власний шлях';
|
||||
|
||||
@override
|
||||
String get chat_setCustomPathSubtitle => 'Вказати шлях маршрутизації вручну';
|
||||
|
||||
@override
|
||||
String get chat_clearPath => 'Очистити шлях';
|
||||
|
||||
@override
|
||||
String get chat_clearPathSubtitle =>
|
||||
'Примусово повторити пошук при наступному надсиланні';
|
||||
|
||||
@override
|
||||
String get chat_pathCleared =>
|
||||
'Шлях очищено. Наступне повідомлення оновить маршрут.';
|
||||
|
||||
@override
|
||||
String get chat_floodModeSubtitle =>
|
||||
'Використовувати перемикач маршрутизації в панелі застосунку';
|
||||
|
||||
@override
|
||||
String get chat_floodModeEnabled =>
|
||||
'Увімкнено режим «через всю мережу». Перемикайте через іконку маршрутизації на панелі інструментів.';
|
||||
|
||||
@override
|
||||
String get chat_fullPath => 'Повний шлях';
|
||||
|
||||
@override
|
||||
String get chat_pathDetailsNotAvailable =>
|
||||
'Деталі шляху ще недоступні. Спробуйте надіслати повідомлення для оновлення.';
|
||||
String get routing_title => 'Routing';
|
||||
|
||||
@override
|
||||
String chat_pathSetHops(int hopCount, String status) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
hopCount,
|
||||
locale: localeName,
|
||||
other: 'переходів',
|
||||
many: 'переходів',
|
||||
few: 'переходи',
|
||||
one: 'перехід',
|
||||
);
|
||||
return 'Шлях встановлено: $hopCount $_temp0 - $status';
|
||||
String get routing_modeAuto => 'Auto';
|
||||
|
||||
@override
|
||||
String get routing_modeFlood => 'Flood';
|
||||
|
||||
@override
|
||||
String get routing_modeManual => 'Manual';
|
||||
|
||||
@override
|
||||
String get routing_modeAutoHint =>
|
||||
'Picks the best known path automatically, flooding when none is known.';
|
||||
|
||||
@override
|
||||
String get routing_modeFloodHint =>
|
||||
'Broadcasts through every repeater. Most reliable, but uses more airtime.';
|
||||
|
||||
@override
|
||||
String get routing_modeManualHint =>
|
||||
'Always sends along the exact path you set.';
|
||||
|
||||
@override
|
||||
String get routing_currentRoute => 'Current route';
|
||||
|
||||
@override
|
||||
String get routing_directNoHops => 'Direct — no repeater hops';
|
||||
|
||||
@override
|
||||
String get routing_noPathYet =>
|
||||
'No path yet. The next message floods until a route is discovered.';
|
||||
|
||||
@override
|
||||
String get routing_floodBroadcast => 'Broadcast through every repeater';
|
||||
|
||||
@override
|
||||
String get routing_editPath => 'Edit path';
|
||||
|
||||
@override
|
||||
String get routing_forgetPath => 'Forget path';
|
||||
|
||||
@override
|
||||
String get routing_knownPaths => 'Known paths';
|
||||
|
||||
@override
|
||||
String get routing_knownPathsHint => 'Tap a path to switch to it.';
|
||||
|
||||
@override
|
||||
String get routing_inUse => 'In use';
|
||||
|
||||
@override
|
||||
String get routing_qualityStrong => 'Strong first hop';
|
||||
|
||||
@override
|
||||
String get routing_qualityGood => 'Good first hop';
|
||||
|
||||
@override
|
||||
String get routing_qualityFair => 'Fair first hop';
|
||||
|
||||
@override
|
||||
String get routing_qualityWorked => 'Has delivered';
|
||||
|
||||
@override
|
||||
String get routing_qualityFlood => 'Heard via flood';
|
||||
|
||||
@override
|
||||
String get routing_qualityUntested => 'Untested';
|
||||
|
||||
@override
|
||||
String routing_lastWorked(String when) {
|
||||
return 'worked $when';
|
||||
}
|
||||
|
||||
@override
|
||||
String get routing_neverWorked => 'never confirmed';
|
||||
|
||||
@override
|
||||
String routing_deliveryCounts(int successes, int failures) {
|
||||
return '$successes delivered, $failures failed';
|
||||
}
|
||||
|
||||
@override
|
||||
String get routing_floodDelivery => 'Flood delivery';
|
||||
|
||||
@override
|
||||
String get pathEditor_title => 'Build Path';
|
||||
|
||||
@override
|
||||
String pathEditor_hopCounter(int count) {
|
||||
return '$count of 64 hops';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pathEditor_noHops =>
|
||||
'No hops yet. Tap repeaters below to add them in order, or save with no hops to send direct.';
|
||||
|
||||
@override
|
||||
String get pathEditor_addHops => 'Add hops in order';
|
||||
|
||||
@override
|
||||
String get pathEditor_searchRepeaters => 'Search repeaters';
|
||||
|
||||
@override
|
||||
String get pathEditor_advancedHex => 'Advanced: raw hex path';
|
||||
|
||||
@override
|
||||
String get pathEditor_hexLabel => 'Hex prefixes';
|
||||
|
||||
@override
|
||||
String get pathEditor_hexHelper =>
|
||||
'Two hex characters per hop, separated by commas';
|
||||
|
||||
@override
|
||||
String pathEditor_invalidTokens(String tokens) {
|
||||
return 'Invalid: $tokens';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pathEditor_tooManyHops => 'Maximum 64 hops';
|
||||
|
||||
@override
|
||||
String get pathEditor_usePath => 'Use this path';
|
||||
|
||||
@override
|
||||
String get pathEditor_removeHop => 'Remove hop';
|
||||
|
||||
@override
|
||||
String get pathEditor_unknownHop => 'Unknown repeater';
|
||||
|
||||
@override
|
||||
String get chat_pathSavedLocally =>
|
||||
'Збережено локально. Підключіться для синхронізації.';
|
||||
@@ -2043,67 +2120,13 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get common_clear => 'Очистити';
|
||||
|
||||
@override
|
||||
String path_currentPath(String path) {
|
||||
return 'Поточний шлях: $path';
|
||||
}
|
||||
|
||||
@override
|
||||
String path_usingHopsPath(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: 'переходами',
|
||||
many: 'переходами',
|
||||
few: 'переходами',
|
||||
one: 'переходом',
|
||||
);
|
||||
return 'Використання шляху з $count $_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get path_enterCustomPath => 'Ввести власний шлях';
|
||||
|
||||
@override
|
||||
String get path_currentPathLabel => 'Поточний шлях';
|
||||
|
||||
@override
|
||||
String get path_hexPrefixInstructions =>
|
||||
'Введіть 2-символьні hex-префікси для кожного переходу, розділені комами.';
|
||||
|
||||
@override
|
||||
String get path_hexPrefixExample =>
|
||||
'Приклад: A1,F2,3C (кожен вузол використовує перший байт свого відкритого ключа).';
|
||||
|
||||
@override
|
||||
String get path_labelHexPrefixes => 'Hex-префікси';
|
||||
|
||||
@override
|
||||
String get path_helperMaxHops =>
|
||||
'Макс. 64 переходи. Кожен префікс — 2 шістнадцяткові символи (1 байт)';
|
||||
|
||||
@override
|
||||
String get path_selectFromContacts => 'Вибрати з контактів:';
|
||||
|
||||
@override
|
||||
String get path_noRepeatersFound =>
|
||||
'Ретрансляторів або серверів кімнат не знайдено.';
|
||||
|
||||
@override
|
||||
String get path_customPathsRequire =>
|
||||
'Власні шляхи вимагають проміжних вузлів, які можуть передавати повідомлення.';
|
||||
|
||||
@override
|
||||
String path_invalidHexPrefixes(String prefixes) {
|
||||
return 'Некоректні hex-префікси: $prefixes';
|
||||
}
|
||||
|
||||
@override
|
||||
String get path_tooLong => 'Шлях занадто довгий. Максимум 64 переходи.';
|
||||
|
||||
@override
|
||||
String get path_setPath => 'Встановити шлях';
|
||||
|
||||
@override
|
||||
String get repeater_management => 'Керування ретранслятором';
|
||||
|
||||
@@ -2168,16 +2191,6 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
@override
|
||||
String get repeater_routingMode => 'Режим маршрутизації';
|
||||
|
||||
@override
|
||||
String get repeater_autoUseSavedPath =>
|
||||
'Авто (використовувати збережений шлях)';
|
||||
|
||||
@override
|
||||
String get repeater_forceFloodMode => 'Примусово через всю мережу';
|
||||
|
||||
@override
|
||||
String get repeater_pathManagement => 'Керування шляхами';
|
||||
|
||||
@override
|
||||
String get repeater_refresh => 'Оновити';
|
||||
|
||||
@@ -4454,4 +4467,28 @@ class AppLocalizationsUk extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get contact_typeUnknown => 'Невідомо';
|
||||
|
||||
@override
|
||||
String get map_zoomIn => 'Zoom in';
|
||||
|
||||
@override
|
||||
String get map_zoomOut => 'Zoom out';
|
||||
|
||||
@override
|
||||
String get map_centerMap => 'Center map';
|
||||
|
||||
@override
|
||||
String get chrome_bluetoothRequiresChromium =>
|
||||
'Web Bluetooth requires a Chromium browser';
|
||||
|
||||
@override
|
||||
String channels_communityShortId(String id) {
|
||||
return 'ID: $id...';
|
||||
}
|
||||
|
||||
@override
|
||||
String get pathTrace_legendGpsConfirmed => 'GPS confirmed';
|
||||
|
||||
@override
|
||||
String get pathTrace_legendInferred => 'Inferred position';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user