Fix/exe upgrade options (#9001)

* fix: exe upgrade, use previous options

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: msi, shortcuts options, swap pos

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-08-08 22:07:06 +08:00
committed by GitHub
parent 049c334db3
commit f4c40d733e
7 changed files with 94 additions and 13 deletions

View File

@@ -6,13 +6,16 @@ var install_path = "";
class Install: Reactor.Component {
function render() {
const install_options = JSON.parse(view.install_options());
const desktop_icon = { checked: install_options?.DESKTOPSHORTCUTS == '0' ? false : true };
const startmenu_shortcuts = { checked: install_options?.STARTMENUSHORTCUTS == '0' ? false : true };
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()} #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><button|checkbox #startmenu {startmenu_shortcuts}>{translate('Create start menu shortcuts')}</button></div>
<div><button|checkbox #desktopicon {desktop_icon}>{translate('Create desktop icon')}</button></div>
<div #agreement .link style="margin-top: 2em;">{translate('End-user license agreement')}</div>
<div>{translate('agreement_tip')}</div>
<div style="height: 1px; background: gray; margin-top: 1em" />