Add OpenWrt remote hub

This commit is contained in:
kzolotarev95 committed 2026-06-29 02:14:50 +04:00
1 parent 48cba62f21
commit 38a92b0b1f
19 files changed
+2080 -2123

No files matched your search

@@ -1,11 +1,10 @@
'use strict';
'require view';
'require fs';
'require ui';
return view.extend({
load: function() {
return fs.read('/etc/owrt-full-backup/web.key').catch(function() {
return fs.read('/etc/owrt-remote/web.key').catch(function() {
return '';
});
},
@@ -15,24 +14,24 @@ return view.extend({
if (!key) {
return E('div', { 'class': 'cbi-map' }, [
E('h2', {}, _('OpenWrt Full Backup')),
E('h2', {}, _('OpenWrt Remote')),
E('div', { 'class': 'alert-message warning' }, [
_('Веб-ключ не найден. Переустанови модуль командой install.sh.')
_('Web key not found. Reinstall the module or create /etc/owrt-remote/web.key.')
])
]);
}
var url = '/cgi-bin/owrt-full-backup?key=' + encodeURIComponent(key);
var url = '/cgi-bin/owrt-remote?key=' + encodeURIComponent(key);
window.setTimeout(function() {
window.location.replace(url);
}, 100);
return E('div', { 'class': 'cbi-map' }, [
E('h2', {}, _('OpenWrt Full Backup')),
E('p', {}, _('Открываю веб-панель полного бэкапа...')),
E('h2', {}, _('OpenWrt Remote')),
E('p', {}, _('Opening remote access panel...')),
E('p', {}, [
E('a', { 'class': 'btn cbi-button cbi-button-apply', 'href': url }, _('Открыть панель'))
E('a', { 'class': 'btn cbi-button cbi-button-apply', 'href': url }, _('Open panel'))
])
]);
},
@@ -41,3 +40,4 @@ return view.extend({
handleSave: null,
handleReset: null
});