Add launch service

This commit is contained in:
chenbaiyu
2022-01-13 19:23:41 +08:00
parent f45a2c7a94
commit 9be6b17a8b
9 changed files with 204 additions and 2 deletions

View File

@@ -307,6 +307,7 @@ class App: Reactor.Component
{handler.is_installed() && !software_update_url && handler.is_installed_lower_version() ? <UpgradeMe /> : ""}
{is_can_screen_recording ? "": <CanScreenRecording />}
{is_can_screen_recording && !handler.is_process_trusted(false) ? <TrustMe /> : ""}
{is_can_screen_recording && handler.is_process_trusted(false) && handler.is_installed_daemon(false) ? <InstallDaemon /> : ""}
{system_error ? <SystemError /> : ""}
{!system_error && handler.is_login_wayland() && !handler.current_is_wayland() ? <FixWayland /> : ""}
{!system_error && handler.current_is_wayland() ? <ModifyDefaultLogin /> : ""}
@@ -491,6 +492,21 @@ class CanScreenRecording: Reactor.Component {
}
}
class InstallDaemon: Reactor.Component {
function render() {
return <div .trust-me>
<div>{translate('Configuration Permissions')}</div>
<div>{translate('install_daemon')}</div>
<div #install-daemon .link>{translate('Configure')}</div>
</div>;
}
event click $(#install-daemon) {
handler.is_installed_daemon(true);
watch_trust();
}
}
class FixWayland: Reactor.Component {
function render() {
return <div .trust-me>