Merge branch 'master' of github.com-rustdesk:rustdesk/rustdesk

This commit is contained in:
rustdesk 2022-07-28 11:09:49 +08:00
commit eebac1eaa5
6 changed files with 45 additions and 44 deletions

6
Cargo.lock generated
View File

@ -319,9 +319,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]] [[package]]
name = "bitvec" name = "bitvec"
version = "1.0.0" version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
dependencies = [ dependencies = [
"funty", "funty",
"radium", "radium",
@ -2212,7 +2212,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]] [[package]]
name = "hwcodec" name = "hwcodec"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/21pages/hwcodec#890204e0703a3d361fc7a45f035fe75c0575bb1d" source = "git+https://github.com/21pages/hwcodec#91d1cd327c88490f917457072aeef0676ddb2be7"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",

View File

@ -54,14 +54,9 @@ pub enum Display {
WAYLAND(wayland::Display), WAYLAND(wayland::Display),
} }
#[inline]
pub fn is_x11() -> bool {
"x11" == hbb_common::platform::linux::get_display_server()
}
impl Display { impl Display {
pub fn primary() -> io::Result<Display> { pub fn primary() -> io::Result<Display> {
Ok(if is_x11() { Ok(if super::is_x11() {
Display::X11(x11::Display::primary()?) Display::X11(x11::Display::primary()?)
} else { } else {
Display::WAYLAND(wayland::Display::primary()?) Display::WAYLAND(wayland::Display::primary()?)
@ -69,7 +64,7 @@ impl Display {
} }
pub fn all() -> io::Result<Vec<Display>> { pub fn all() -> io::Result<Vec<Display>> {
Ok(if is_x11() { Ok(if super::is_x11() {
x11::Display::all()? x11::Display::all()?
.drain(..) .drain(..)
.map(|x| Display::X11(x)) .map(|x| Display::X11(x))

View File

@ -59,3 +59,9 @@ pub trait TraitCapturer {
#[cfg(windows)] #[cfg(windows)]
fn set_gdi(&mut self) -> bool; fn set_gdi(&mut self) -> bool;
} }
#[cfg(x11)]
#[inline]
pub fn is_x11() -> bool {
"x11" == hbb_common::platform::linux::get_display_server()
}

View File

@ -35,9 +35,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "Tentang"), ("About", "Tentang"),
("Mute", "Bisukan"), ("Mute", "Bisukan"),
("Audio Input", "Masukkan Audio"), ("Audio Input", "Masukkan Audio"),
("Enhancements", ""), ("Enhancements", "Peningkatan"),
("Hardware Codec", ""), ("Hardware Codec", "Codec Perangkat Keras"),
("Adaptive Bitrate", ""), ("Adaptive Bitrate", "Kecepatan Bitrate Adaptif"),
("ID Server", "Server ID"), ("ID Server", "Server ID"),
("Relay Server", "Server Relay"), ("Relay Server", "Server Relay"),
("API Server", "API Server"), ("API Server", "API Server"),
@ -268,7 +268,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("android_start_service_tip", "Ketuk izin [Mulai Layanan] atau BUKA [Tangkapan Layar] untuk memulai layanan berbagi layar."), ("android_start_service_tip", "Ketuk izin [Mulai Layanan] atau BUKA [Tangkapan Layar] untuk memulai layanan berbagi layar."),
("Account", "Akun"), ("Account", "Akun"),
("Overwrite", "Timpa"), ("Overwrite", "Timpa"),
("This file exists, skip or overwrite this file?", ""), ("This file exists, skip or overwrite this file?", "File ini sudah ada, lewati atau timpa file ini?"),
("Quit", "Keluar"), ("Quit", "Keluar"),
("doc_mac_permission", "https://rustdesk.com/docs/en/manual/mac/#enable-permissions"), ("doc_mac_permission", "https://rustdesk.com/docs/en/manual/mac/#enable-permissions"),
("Help", "Bantuan"), ("Help", "Bantuan"),
@ -283,21 +283,21 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Turned off", "Matikan"), ("Turned off", "Matikan"),
("In privacy mode", "Dalam mode privasi"), ("In privacy mode", "Dalam mode privasi"),
("Out privacy mode", "Keluar dari mode privasi"), ("Out privacy mode", "Keluar dari mode privasi"),
("Language", ""), ("Language", "Bahasa"),
("Keep RustDesk background service", ""), ("Keep RustDesk background service", "Pertahankan RustDesk berjalan pada background service"),
("Ignore Battery Optimizations", ""), ("Ignore Battery Optimizations", "Abaikan Pengoptimalan Baterai"),
("android_open_battery_optimizations_tip", ""), ("android_open_battery_optimizations_tip", ""),
("Connection not allowed", ""), ("Connection not allowed", "Koneksi tidak dijinkan"),
("Use temporary password", ""), ("Use temporary password", "Gunakan kata sandi sementara"),
("Use permanent password", ""), ("Use permanent password", "Gunakan kata sandi permanaen"),
("Use both passwords", ""), ("Use both passwords", "Gunakan kedua kata sandi "),
("Set permanent password", ""), ("Set permanent password", "Setel kata sandi permanen"),
("Set temporary password length", ""), ("Set temporary password length", "Setel panjang kata sandi sementara"),
("Enable Remote Restart", ""), ("Enable Remote Restart", "Aktifkan Restart Jarak Jauh"),
("Allow remote restart", ""), ("Allow remote restart", "Ijinkan Restart Jarak Jauh"),
("Restart Remote Device", ""), ("Restart Remote Device", "Restart Perangkat Jarak Jauh"),
("Are you sure you want to restart", ""), ("Are you sure you want to restart", "Apakah Anda yakin untuk memulai ulang"),
("Restarting Remote Device", ""), ("Restarting Remote Device", "Memulai Ulang Perangkat Jarak Jauh"),
("remote_restarting_tip", ""), ("remote_restarting_tip", ""),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -35,9 +35,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("About", "О RustDesk"), ("About", "О RustDesk"),
("Mute", "Отключить звук"), ("Mute", "Отключить звук"),
("Audio Input", "Аудиовход"), ("Audio Input", "Аудиовход"),
("Enhancements", ""), ("Enhancements", "Улучшения"),
("Hardware Codec", ""), ("Hardware Codec", "Аппаратный кодек"),
("Adaptive Bitrate", ""), ("Adaptive Bitrate", "Адаптивная скорость потока"),
("ID Server", "ID-сервер"), ("ID Server", "ID-сервер"),
("Relay Server", "Сервер ретрансляции"), ("Relay Server", "Сервер ретрансляции"),
("API Server", "API-сервер"), ("API Server", "API-сервер"),
@ -288,16 +288,16 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Ignore Battery Optimizations", "Игнорировать оптимизацию батареи"), ("Ignore Battery Optimizations", "Игнорировать оптимизацию батареи"),
("android_open_battery_optimizations_tip", "Перейдите на следующую страницу настроек "), ("android_open_battery_optimizations_tip", "Перейдите на следующую страницу настроек "),
("Connection not allowed", "Подключение не разрешено"), ("Connection not allowed", "Подключение не разрешено"),
("Use temporary password", ""), ("Use temporary password", "Использовать временный пароль"),
("Use permanent password", ""), ("Use permanent password", "Использовать постоянный пароль"),
("Use both passwords", ""), ("Use both passwords", "Использовать оба пароля"),
("Set permanent password", ""), ("Set permanent password", "Установить постоянный пароль"),
("Set temporary password length", ""), ("Set temporary password length", "Длина временного пароля"),
("Enable Remote Restart", ""), ("Enable Remote Restart", "Включить удаленный перезапуск"),
("Allow remote restart", ""), ("Allow remote restart", "Разрешить удаленный перезапуск"),
("Restart Remote Device", ""), ("Restart Remote Device", "Перезапустить удаленное устройство"),
("Are you sure you want to restart", ""), ("Are you sure you want to restart", "Вы уверены, что хотите выполнить перезапуск?"),
("Restarting Remote Device", ""), ("Restarting Remote Device", "Перезагрузка удаленного устройства"),
("remote_restarting_tip", ""), ("remote_restarting_tip", "Удаленное устройство перезапускается. Пожалуйста, закройте это сообщение и через некоторое время переподключитесь, используя постоянный пароль."),
].iter().cloned().collect(); ].iter().cloned().collect();
} }

View File

@ -212,8 +212,8 @@ class Enhancements: Reactor.Component {
self.timer(1ms, function() { me.toggleMenuState() }); self.timer(1ms, function() { me.toggleMenuState() });
return <li>{translate('Enhancements')} return <li>{translate('Enhancements')}
<menu #enhancements-menu> <menu #enhancements-menu>
{has_hwcodec ? <li #enable-hwcodec><span>{svg_checkmark}</span>{translate("Hardware Codec")}{"(beta)"}</li> : ""} {has_hwcodec ? <li #enable-hwcodec><span>{svg_checkmark}</span>{translate("Hardware Codec")} (beta)</li> : ""}
<li #enable-abr><span>{svg_checkmark}</span>{translate("Adaptive Bitrate")}{"(beta)"}</li> <li #enable-abr><span>{svg_checkmark}</span>{translate("Adaptive Bitrate")} (beta)</li>
</menu> </menu>
</li>; </li>;
} }