update 2026-07-28 01:38:11

This commit is contained in:
action committed 2026-07-28 01:38:11 +08:00
1 parent 20b786ab77
commit 25d570431d
6243 files changed
+2850542

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for CloudDrive2
LUCI_DEPENDS:=+clouddrive2
LUCI_PKGARCH:=all
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -0,0 +1,17 @@
module("luci.controller.clouddrive2", package.seeall)
function index()
if not nixio.fs.access("/etc/config/clouddrive2") then
return
end
entry({"admin", "nas"}, firstchild(), _("NAS"), 45).dependent = false
entry({"admin","nas","clouddrive2"},cbi("clouddrive2"),_("CloudDrive2"), 10).acl_depends = { "luci-app-clouddrive2" }
entry({"admin", "nas", "clouddrive2", "status"}, call("act_status")).leaf = true
end
function act_status()
local e={}
e.running=luci.sys.call("pgrep clouddrive >/dev/null")==0
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
@@ -0,0 +1,21 @@
local m, s, o
m = Map("clouddrive2", translate("CloudDrive2"), translate("Configure and manage CloudDrive2"))
m:section(SimpleSection).template="clouddrive2/status"
s = m:section(TypedSection, "clouddrive2", translate("Settings"))
s.anonymous = true
s.addremove = false
o = s:option(Flag, "enabled", translate("Enable"))
o.rmempty = false
o = s:option(Value, "port", translate("Port"))
o.datatype = "port"
o.default = "19798"
o = s:option(Value, "mount_point", translate("Mount Point"))
o.default = "/mnt/clouddrive"
return m
@@ -0,0 +1,27 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[nas]], [[clouddrive2]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('clouddrive_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>CloudDrive2 <%:RUNNING%></font></b></em><input class="cbi-button mar-10" type="button" value="<%:Open Web Interface%>" onclick="openwebui();" />';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b><font color=red>CloudDrive2 <%:NOT RUNNING%></font></b></em>';
}
}
}
);
function openwebui(){
var url = window.location.host+":<%=luci.sys.exec("uci -q get clouddrive2.main.port"):gsub("^%s*(.-)%s*$", "%1")%>";
window.open('http://'+url,'target','');
};
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="clouddrive_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
@@ -0,0 +1,32 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "Configure and manage CloudDrive2"
msgstr "配置和管理CloudDrive2"
msgid "Settings"
msgstr "设置"
msgid "Enable"
msgstr "启用"
msgid "Port"
msgstr "端口"
msgid "Mount Point"
msgstr "挂载点"
msgid "CloudDrive2 Status"
msgstr "CloudDrive2状态"
msgid "Running Status"
msgstr "运行状态"
msgid "Collecting data..."
msgstr "正在收集数据..."
msgid "CloudDrive2 is running"
msgstr "CloudDrive2 正在运行"
msgid "CloudDrive2 is not running"
msgstr "CloudDrive2 未运行"
Whitespace-only changes.
@@ -0,0 +1,11 @@
{
"luci-app-clouddrive2": {
"description": "Grant UCI access for luci-app-clouddrive2",
"read": {
"uci": [ "clouddrive2" ]
},
"write": {
"uci": [ "clouddrive2" ]
}
}
}