rustdesk/src/ui/install.tis

46 lines
1.7 KiB
Plaintext
Raw Normal View History

2021-03-29 15:59:14 +08:00
function self.ready() {
centerize(800, 600);
}
class Install: Reactor.Component {
function render() {
return <div .content>
2021-12-25 16:45:22 +08:00
<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><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>
<div>{translate('agreement_tip')}</div>
2021-03-29 15:59:14 +08:00
<div style="height: 1px; background: gray; margin-top: 1em" />
<div style="text-align: right;">
<progress style={"color:" + color} style="display: none" />
2021-12-25 16:45:22 +08:00
<button .button id="cancel" .outline style="margin-right: 2em;">{translate('Cancel')}</button>
<button .button id="submit">{translate('Accept and Install')}</button>
2021-03-29 15:59:14 +08:00
</div>
</div>;
}
event click $(#cancel) {
view.close();
}
event click $(#aggrement) {
view.open_url("http://rustdesk.com/privacy");
}
event click $(#submit) {
for (var el in $$(button)) el.state.disabled = true;
$(progress).style.set{ display: "inline-block" };
var args = "";
if ($(#startmenu).value) {
args += "startmenu ";
}
if ($(#desktopicon).value) {
args += "desktopicon ";
}
view.install_me(args);
}
}
2021-12-25 16:45:22 +08:00
$(body).content(<Install />);