mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-04 16:35:19 +00:00
sort langs #2948
This commit is contained in:
1 parent
ef62869bcc
commit
968b3642a9
2 files changed
+51
-49
No files matched your search
+7
-1
@@ -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