mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-07-27 10:31:38 +08:00
49 lines
945 B
JavaScript
49 lines
945 B
JavaScript
'use strict';
|
|
'require form';
|
|
'require view';
|
|
'require ui';
|
|
|
|
return view.extend({
|
|
render: function () {
|
|
const m = new form.Map('system', '');
|
|
const s = m.section(form.NamedSection, 'iframe_section', 'settings');
|
|
s.anonymous = true;
|
|
|
|
s.render = function () {
|
|
const host = window.location.origin;
|
|
|
|
const iframeContainer = E('div', {
|
|
'class': 'iframe-container',
|
|
'style': `
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
max-width: 1600px;
|
|
height: calc(100vh - 180px);
|
|
min-height: 800px;
|
|
overflow: hidden;
|
|
border-radius: 10px;
|
|
`
|
|
}, [
|
|
E('iframe', {
|
|
'src': `/cgi-bin/luci/quickfile?host=${encodeURIComponent(host)}`,
|
|
'style': `
|
|
width: 100%;
|
|
height: 100%;
|
|
border: none;
|
|
border-radius: 10px;
|
|
`
|
|
})
|
|
]);
|
|
|
|
return iframeContainer;
|
|
};
|
|
|
|
return m.render();
|
|
},
|
|
|
|
handleSave: null,
|
|
handleSaveApply: null,
|
|
handleReset: null
|
|
});
|