mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
tweak connectivity html (#2549)
* escape strings added to html * use more common emojis for connectivity report all emojis are from 2010 and older now. an alternative would have been to use css, however, that may have other issues and as the whole report is subject to change anyway, i go for the easy solution. * use 'modern' meta pattern, remove unused div and styles * use css instead emojis; looks better that way also, we have the same look on all systems. * add connectivity command to repl tool
This commit is contained in:
@@ -351,6 +351,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
configure\n\
|
||||
connect\n\
|
||||
disconnect\n\
|
||||
connectivity\n\
|
||||
maybenetwork\n\
|
||||
housekeeping\n\
|
||||
help imex (Import/Export)\n\
|
||||
@@ -511,6 +512,14 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
"info" => {
|
||||
println!("{:#?}", context.get_info().await);
|
||||
}
|
||||
"connectivity" => {
|
||||
let file = dirs::home_dir()
|
||||
.unwrap_or_default()
|
||||
.join("connectivity.html");
|
||||
let html = context.get_connectivity_html().await;
|
||||
fs::write(&file, html)?;
|
||||
println!("Report written to: {:#?}", file);
|
||||
}
|
||||
"maybenetwork" => {
|
||||
context.maybe_network().await;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ const IMEX_COMMANDS: [&str; 12] = [
|
||||
"stop",
|
||||
];
|
||||
|
||||
const DB_COMMANDS: [&str; 9] = [
|
||||
const DB_COMMANDS: [&str; 10] = [
|
||||
"info",
|
||||
"set",
|
||||
"get",
|
||||
@@ -162,6 +162,7 @@ const DB_COMMANDS: [&str; 9] = [
|
||||
"configure",
|
||||
"connect",
|
||||
"disconnect",
|
||||
"connectivity",
|
||||
"maybenetwork",
|
||||
"housekeeping",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user