luci/applications/luci-app-ttyd/htdocs/luci-static/resources/view/ttyd/term.js
Jo-Philipp Wich 70f3ae5072 luci-app-ttyd: fix markup which is not valid XHTML
Replace `<br>` with `<br />` as XHTML does not allow self-closing tags.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-08 19:53:09 +02:00

23 lines
715 B
JavaScript

'use strict';
'require view';
'require uci';
return view.extend({
load: function() {
return uci.load('ttyd');
},
render: function() {
var port = uci.get_first('ttyd', 'ttyd', 'port') || '7681',
ssl = uci.get_first('ttyd', 'ttyd', 'ssl') || '0';
if (port === '0')
return E('div', { class: 'alert-message warning' },
_('Random ttyd port (port=0) is not supported.<br />Change to a fixed port and try again.'));
return E('iframe', {
src: (ssl === '1' ? 'https' : 'http') + '://' + window.location.hostname + ':' + port,
style: 'width: 100%; min-height: 500px; border: none; border-radius: 3px; resize: vertical;'
});
},
handleSaveApply: null,
handleSave: null,
handleReset: null
});