mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-28 07:31:01 +03:00
100% open source
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
function self.ready() {
|
||||
centerize(800, 600);
|
||||
centerize(scaleIt(800), scaleIt(600));
|
||||
}
|
||||
|
||||
var install_path = "";
|
||||
|
||||
class Install: Reactor.Component {
|
||||
function render() {
|
||||
return <div .content>
|
||||
<div style="font-size: 2em;">{translate('Installation')}</div>
|
||||
<div style="margin: 2em 0;">{translate('Installation Path')} {": "}<input|text disabled value={view.install_path()} /></div>
|
||||
<div style="margin: 2em 0;">{translate('Installation Path')} {": "}<input|text disabled value={view.install_path()} #path_input />
|
||||
<button .button .outline #path style="margin-left: 1em">{translate('Change Path')}</button>
|
||||
</div>
|
||||
<div><button|checkbox #startmenu checked>{translate('Create start menu shortcuts')}</button></div>
|
||||
<div><button|checkbox #desktopicon checked>{translate('Create desktop icon')}</button></div>
|
||||
<div #aggrement .link style="margin-top: 2em;">{translate('End-user license agreement')}</div>
|
||||
@@ -16,6 +20,9 @@ class Install: Reactor.Component {
|
||||
<progress style={"color:" + color} style="display: none" />
|
||||
<button .button id="cancel" .outline style="margin-right: 2em;">{translate('Cancel')}</button>
|
||||
<button .button id="submit">{translate('Accept and Install')}</button>
|
||||
{handler.show_run_without_install() && <button .button #run-without-install .outline style="margin-left: 2em;">
|
||||
{translate('Run without install')}
|
||||
</button>}
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
@@ -24,6 +31,21 @@ class Install: Reactor.Component {
|
||||
view.close();
|
||||
}
|
||||
|
||||
event click $(#run-without-install) {
|
||||
handler.run_without_install();
|
||||
}
|
||||
|
||||
event click $(#path) {
|
||||
install_path = view.selectFolder() || "";
|
||||
if (install_path) {
|
||||
install_path = install_path.urlUnescape();
|
||||
install_path = install_path.replace("file://", "").replace("/", "\\");
|
||||
if (install_path[install_path.length - 1] != "\\") install_path += "\\";
|
||||
install_path += handler.get_app_name();
|
||||
$(#path_input).value = install_path;
|
||||
}
|
||||
}
|
||||
|
||||
event click $(#aggrement) {
|
||||
view.open_url("http://rustdesk.com/privacy");
|
||||
}
|
||||
@@ -38,7 +60,7 @@ class Install: Reactor.Component {
|
||||
if ($(#desktopicon).value) {
|
||||
args += "desktopicon ";
|
||||
}
|
||||
view.install_me(args);
|
||||
view.install_me(args, install_path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user