🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI app for FileBrowser
LUCI_DEPENDS:=+filebrowser
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -0,0 +1,85 @@
'use strict';
'require form';
'require poll';
'require rpc';
'require uci';
'require view';
'require fs';
function getServiceStatus() {
let isRunning = false;
return isRunning;
}
function renderStatus(isRunning, port) {
let spanTemp = '<span style="color:%s"><strong>%s %s</strong></span>';
let renderHTML;
if (isRunning) {
let button = String.format('&#160;<a class="btn cbi-button" href="http://%s:%s" target="_blank" rel="noreferrer noopener">%s</a>',
window.location.hostname, port, _('Open Web Interface'));
renderHTML = spanTemp.format('green', _('FileBrowser'), _('RUNNING')) + button;
} else {
renderHTML = spanTemp.format('red', _('FileBrowser'), _('NOT RUNNING'));
}
return renderHTML;
}
return view.extend({
load: async function () {
const promises = await Promise.all([
L.resolveDefault(fs.stat('/var/run/filebrowser.pid'), null),
uci.load('filebrowser')
]);
const data = {
isRunning: promises[0],
conf: promises[1]
};
return data;
},
render(data) {
let m, s, o;
let webport = (uci.get(data.conf, 'config', 'listen_port') || '8989');
m = new form.Map('filebrowser', _('FileBrowser'),
_('FileBrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files..') + '<br />'+
_('Default login username is %s and password is %s.').format('<code>admin</code>', '<code>admin</code>'));
s = m.section(form.TypedSection);
s.anonymous = true;
s.render = function() {
poll.add(function() {
return Promise.resolve().then(function() {
let view = document.getElementById('service_status');
view.innerHTML = renderStatus(data.isRunning, webport);
});
});
return E('div', { class: 'cbi-section', id: 'status_bar' }, [
E('p', { id: 'service_status' }, _('Collecting data...'))
]);
}
s = m.section(form.NamedSection, 'config', 'filebrowser');
o = s.option(form.Flag, 'enabled', _('Enable'));
o.default = o.disabled;
o.rmempty = false;
o = s.option(form.Value, 'listen_port', _('Listen port'));
o.datatype = 'port';
o.default = '8989';
o.rmempty = false;
o = s.option(form.Value, 'root_path', _('Root directory'));
o.default = '/';
o.rmempty = false;
o = s.option(form.Value, 'base_url', _('Base url'));
o.default = '/';
o.rmempty = false;
return m.render();
}
});
@@ -0,0 +1,55 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:63
msgid "Collecting data..."
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:50
msgid "Default login username is %s and password is %s."
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:82
msgid "Disable Command Runner feature"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:69
msgid "Enable"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:31
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:33
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:48
#: applications/luci-app-filebrowser-go/root/usr/share/luci/menu.d/luci-app-filebrowser.json:3
msgid "FileBrowser"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:49
msgid ""
"FileBrowser provides a file managing interface within a specified directory "
"and it can be used to upload, delete, preview, rename and edit your files.."
msgstr ""
#: applications/luci-app-filebrowser-go/root/usr/share/rpcd/acl.d/luci-app-filebrowser.json:3
msgid "Grant UCI access for luci-app-filebrowser"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:73
msgid "Listen port"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:33
msgid "NOT RUNNING"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:30
msgid "Open Web Interface"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:31
msgid "RUNNING"
msgstr ""
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:78
msgid "Root directory"
msgstr ""
+1
View File
@@ -0,0 +1 @@
zh_Hans
@@ -0,0 +1,64 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh-Hans\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:63
msgid "Collecting data..."
msgstr "正在收集数据中..."
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:50
msgid "Default login username is %s and password is %s."
msgstr "默认登录用户名为 %s,密码为 %s。"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:82
msgid "Disable Command Runner feature"
msgstr "禁用命令执行功能"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:69
msgid "Enable"
msgstr "启用"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:31
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:33
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:48
#: applications/luci-app-filebrowser-go/root/usr/share/luci/menu.d/luci-app-filebrowser.json:3
msgid "FileBrowser"
msgstr "FileBrowser"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:49
msgid ""
"FileBrowser provides a file managing interface within a specified directory "
"and it can be used to upload, delete, preview, rename and edit your files.."
msgstr ""
"FileBrowser 提供指定目录下的文件管理界面,可用于上传、删除、预览、重命名和编"
"辑文件。"
#: applications/luci-app-filebrowser-go/root/usr/share/rpcd/acl.d/luci-app-filebrowser.json:3
msgid "Grant UCI access for luci-app-filebrowser"
msgstr "授予 luci-app-filebrowser 访问 UCI 配置的权限"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:73
msgid "Listen port"
msgstr "监听端口"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:33
msgid "NOT RUNNING"
msgstr "未运行"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:30
msgid "Open Web Interface"
msgstr "打开 Web 界面"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:31
msgid "RUNNING"
msgstr "运行中"
#: applications/luci-app-filebrowser-go/htdocs/luci-static/resources/view/filebrowser.js:78
msgid "Root directory"
msgstr "根目录"
@@ -0,0 +1,14 @@
{
"admin/services/filebrowser": {
"title": "FileBrowser",
"action": {
"order": 30,
"type": "view",
"path": "filebrowser"
},
"depends": {
"acl": [ "luci-app-filebrowser" ],
"uci": { "filebrowser": true }
}
}
}
@@ -0,0 +1,14 @@
{
"luci-app-filebrowser": {
"description": "Grant UCI access for luci-app-filebrowser",
"read": {
"ubus": {
"service": [ "list" ]
},
"uci": [ "filebrowser" ]
},
"write": {
"uci": [ "filebrowser" ]
}
}
}
@@ -0,0 +1,4 @@
{
"config": "filebrowser",
"init": "filebrowser"
}