web: stab at a Web UI for SIM swap

This commit is contained in:
Tobias Mueller 2023-10-16 16:36:33 +02:00
parent fa11fc45ca
commit b02faa7adb

View File

@ -829,7 +829,42 @@ function handleSimSwap(ev) {
_('Shutting down modem…') _('Shutting down modem…')
) )
] ]
);
callBlueMerle("shutdown-modem").then(
function(res) {
dlg.appendChild(
E('pre', { 'class': 'result'},
res
) )
);
dlg.appendChild(
E('p', { 'class': 'text'},
_("Generating Random IMEI")
)
);
callBlueMerle("random-imei").then(
function(res) {
E('p', { 'class': 'text'},
_("IMEI set:") + " " + res
),
E('p', { 'class': 'text'},
_("Please shutdown the device and go to another place before booting")
)
}
).catch(
function(err) {
}
);
}
).catch(
function(err) {
dlg.appendChild(
E('p',{'class': 'error'},
_('Error! ') + err
)
)
}
);
} }
function handleOpkg(ev) function handleOpkg(ev)
@ -974,6 +1009,7 @@ return view.extend({
E('button', { 'class': 'btn cbi-button', 'click': handleReset }, [ _('Clear') ]) E('button', { 'class': 'btn cbi-button', 'click': handleReset }, [ _('Clear') ])
]) ])
]), ]),
]),
E('div', {}, [ E('div', {}, [
E('label', {}, _('Actions') + ':'), ' ', E('label', {}, _('Actions') + ':'), ' ',
@ -983,7 +1019,6 @@ return view.extend({
E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Shred config…') ]) E('button', { 'class': 'btn cbi-button-neutral', 'click': handleConfig }, [ _('Shred config…') ])
]) ])
]) ])
])
]); ]);