refact, peer card menu, open in tabs action

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-08-08 13:50:29 +08:00
parent ac88f55f25
commit b5679df7f9
36 changed files with 70 additions and 69 deletions

@ -543,7 +543,7 @@ abstract class BasePeerCard extends StatelessWidget {
await _openNewConnInAction(id, 'Open in Tabs', kOptionOpenInTabs); await _openNewConnInAction(id, 'Open in Tabs', kOptionOpenInTabs);
_openInWindowsAction(String id) async => _openInWindowsAction(String id) async =>
await _openNewConnInAction(id, 'Open in windows', kOptionOpenInWindows); await _openNewConnInAction(id, 'Open with New window', kOptionOpenInWindows);
_openNewConnInOptAction(String id) async => _openNewConnInOptAction(String id) async =>
mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs) mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs)

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "同步最近会话"), ("Sync with recent sessions", "同步最近会话"),
("Sort tags", "对标签进行排序"), ("Sort tags", "对标签进行排序"),
("Open new connections in tabs", "在选项卡中打开新连接"), ("Open new connections in tabs", "在选项卡中打开新连接"),
("Open in tabs", "在选项卡中打开"), ("Open in Tabs", "在选项卡中打开"),
("Open in windows", "在新窗口中打开"), ("Open with New window", "在新窗口中打开"),
("separate window", "独立窗口"), ("separate window", "独立窗口"),
("Move tab to new window", "将标签页移至新窗口"), ("Move tab to new window", "将标签页移至新窗口"),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Synchronisierung mit den letzten Sitzungen"), ("Sync with recent sessions", "Synchronisierung mit den letzten Sitzungen"),
("Sort tags", "Tags sortieren"), ("Sort tags", "Tags sortieren"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", "Separates Fenster"), ("separate window", "Separates Fenster"),
("Move tab to new window", "Tab in neues Fenster verschieben"), ("Move tab to new window", "Tab in neues Fenster verschieben"),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -12,6 +12,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("not_close_tcp_tip", "Don't close this window while you are using the tunnel"), ("not_close_tcp_tip", "Don't close this window while you are using the tunnel"),
("setup_server_tip", "For faster connection, please set up your own server"), ("setup_server_tip", "For faster connection, please set up your own server"),
("Auto Login", "Auto Login (Only valid if you set \"Lock after session end\")"), ("Auto Login", "Auto Login (Only valid if you set \"Lock after session end\")"),
("Always connect via relay", "Always Connect via Relay"),
("whitelist_tip", "Only whitelisted IP can access me"), ("whitelist_tip", "Only whitelisted IP can access me"),
("whitelist_sep", "Separated by comma, semicolon, spaces or new line"), ("whitelist_sep", "Separated by comma, semicolon, spaces or new line"),
("Wrong credentials", "Wrong username or password"), ("Wrong credentials", "Wrong username or password"),

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Sincronizar con sesiones recientes"), ("Sync with recent sessions", "Sincronizar con sesiones recientes"),
("Sort tags", "Ordenar etiquetas"), ("Sort tags", "Ordenar etiquetas"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Sincronizza con le sessioni recenti"), ("Sync with recent sessions", "Sincronizza con le sessioni recenti"),
("Sort tags", "Ordina etichette"), ("Sort tags", "Ordina etichette"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", "Separa finestra"), ("separate window", "Separa finestra"),
("Move tab to new window", "Sposta scheda nella finestra successiva"), ("Move tab to new window", "Sposta scheda nella finestra successiva"),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Recente sessies synchroniseren"), ("Sync with recent sessions", "Recente sessies synchroniseren"),
("Sort tags", "Labels sorteren"), ("Sort tags", "Labels sorteren"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Synchronizacja z ostatnimi sesjami"), ("Sync with recent sessions", "Synchronizacja z ostatnimi sesjami"),
("Sort tags", "Znaczniki sortowania"), ("Sort tags", "Znaczniki sortowania"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", "oddzielne okno"), ("separate window", "oddzielne okno"),
("Move tab to new window", "Przenieś zakładkę do nowego okna"), ("Move tab to new window", "Przenieś zakładkę do nowego okna"),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", "Синхронизация последних сессий"), ("Sync with recent sessions", "Синхронизация последних сессий"),
("Sort tags", "Сортировка меток"), ("Sort tags", "Сортировка меток"),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", "отдельное окно"), ("separate window", "отдельное окно"),
("Move tab to new window", "Переместить вкладку в отдельное окно"), ("Move tab to new window", "Переместить вкладку в отдельное окно"),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();

@ -525,8 +525,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Sync with recent sessions", ""), ("Sync with recent sessions", ""),
("Sort tags", ""), ("Sort tags", ""),
("Open new connections in tabs", ""), ("Open new connections in tabs", ""),
("Open in tabs", ""), ("Open in Tabs", ""),
("Open in windows", ""), ("Open with New window", ""),
("separate window", ""), ("separate window", ""),
("Move tab to new window", ""), ("Move tab to new window", ""),
].iter().cloned().collect(); ].iter().cloned().collect();