luci-app-rclone: sync with upstream source
This commit is contained in:
parent
97664c8564
commit
1670c00a2c
@ -10,11 +10,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI support for Rclone
|
||||
LUCI_DEPENDS:=+rclone +rclone-webui-react +rclone-ng +fuse-utils
|
||||
LUCI_DEPENDS:=+rclone +rclone-webui-react +rclone-ng +fuse-utils \
|
||||
+PACKAGE_luci-app-rclone_INCLUDE_rclone-webui:rclone-webui-react \
|
||||
+PACKAGE_luci-app-rclone_INCLUDE_rclone-ng:rclone-ng
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_NAME:=luci-app-rclone
|
||||
PKG_VERSION:=1.4.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=GPLv3.0+
|
||||
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>
|
||||
|
||||
@ -32,6 +34,20 @@ define Package/luci-app-rclone/description
|
||||
Yandex Disk, The local root/usr/binystem.
|
||||
endef
|
||||
|
||||
define Package/luci-app-rclone/conffiles
|
||||
/etc/config/rclone
|
||||
endef
|
||||
|
||||
define Package/luci-app-rclone/config
|
||||
config PACKAGE_luci-app-rclone_INCLUDE_rclone-webui
|
||||
bool "Include rclone-webui"
|
||||
default y
|
||||
|
||||
config PACKAGE_luci-app-rclone_INCLUDE_rclone-ng
|
||||
bool "Include rclone-ng"
|
||||
default y
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
require('luci.sys')
|
||||
require('luci.util')
|
||||
|
||||
local ipkg = require('luci.model.ipkg')
|
||||
|
||||
local fs = require 'nixio.fs'
|
||||
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
@ -31,6 +33,7 @@ else
|
||||
address_msg = ''
|
||||
end
|
||||
|
||||
if ipkg.installed("rclone-webui-react") and ipkg.installed("rclone-ng") then
|
||||
m =
|
||||
Map(
|
||||
'rclone',
|
||||
@ -46,6 +49,44 @@ m =
|
||||
translate('RcloneNg') ..
|
||||
" \" onclick=\"window.open('http://'+window.location.hostname+'/RcloneNg')\"/> <br/><br/>"
|
||||
)
|
||||
elseif ipkg.installed("rclone-webui-react") then
|
||||
m =
|
||||
Map(
|
||||
'rclone',
|
||||
translate('Rclone'),
|
||||
translate('Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers.') ..
|
||||
' <br/> <br/> ' .. translate('rclone state') .. ' : ' .. state_msg .. '<br/> <br/>'
|
||||
.. address_msg ..
|
||||
translate('Installed Web Interface') ..
|
||||
|
||||
' <input type="button" class="cbi-button" style="margin: 0 5px;" value=" ' ..
|
||||
translate('Webui React') ..
|
||||
" \" onclick=\"window.open('http://'+window.location.hostname+'/rclone-webui-react')\"/>"
|
||||
)
|
||||
elseif ipkg.installed("rclone-ng") then
|
||||
m =
|
||||
Map(
|
||||
'rclone',
|
||||
translate('Rclone'),
|
||||
translate('Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers.') ..
|
||||
' <br/> <br/> ' .. translate('rclone state') .. ' : ' .. state_msg .. '<br/> <br/>'
|
||||
.. address_msg ..
|
||||
translate('Installed Web Interface') ..
|
||||
|
||||
' <input type="button" class="cbi-button" style="margin: 0 5px;" value=" ' ..
|
||||
translate('RcloneNg') ..
|
||||
" \" onclick=\"window.open('http://'+window.location.hostname+'/RcloneNg')\"/> <br/><br/>"
|
||||
)
|
||||
else
|
||||
m =
|
||||
Map(
|
||||
'rclone',
|
||||
translate('Rclone'),
|
||||
translate('Rclone ("rsync for cloud storage") is a command line program to sync root/usr/bin and directories to and from different cloud storage providers.') ..
|
||||
' <br/> <br/> ' .. translate('rclone state') .. ' : ' .. state_msg .. '<br/> <br/>'
|
||||
.. address_msg
|
||||
)
|
||||
end
|
||||
|
||||
s = m:section(TypedSection, 'global', translate('global'))
|
||||
s.addremove = false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user