mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-14 12:07:35 +00:00
sort langs #2948
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user