This commit is contained in:
rustdesk
2023-03-03 11:36:12 +08:00
parent ef62869bcc
commit 968b3642a9
2 changed files with 51 additions and 49 deletions

View File

@@ -636,7 +636,13 @@ pub fn get_async_job_status() -> String {
#[inline]
pub fn get_langs() -> String {
crate::lang::LANGS.to_string()
use serde_json::json;
let mut x: Vec<(&str, String)> = crate::lang::LANGS
.iter()
.map(|a| (a.0, format!("{} - {}", a.1, a.0)))
.collect();
x.sort_by(|a, b| a.0.cmp(b.0));
json!(x).to_string()
}
#[inline]