🚀 Sync 2023-05-14 23:34

This commit is contained in:
github-actions[bot] 2023-05-14 23:34:53 +08:00
parent 8722ebd8ed
commit fb492b8c77
33 changed files with 804 additions and 190 deletions

77
aliyundrive-fuse/Makefile Normal file
View File

@ -0,0 +1,77 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=aliyundrive-fuse
PKG_VERSION:=0.1.14
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com>
PKG_LIBC:=musl
ifeq ($(ARCH),arm)
PKG_LIBC:=musleabi
ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE))))
ifneq ($(filter $(ARM_CPU_FEATURES),vfp vfpv2),)
PKG_LIBC:=musleabihf
endif
endif
PKG_ARCH=$(ARCH)
ifeq ($(ARCH),i386)
PKG_ARCH:=i686
endif
PKG_SOURCE:=aliyundrive-fuse-v$(PKG_VERSION).$(PKG_ARCH)-unknown-linux-$(PKG_LIBC).tar.gz
PKG_SOURCE_URL:=https://github.com/messense/aliyundrive-fuse/releases/download/v$(PKG_VERSION)/
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/aliyundrive-fuse
SECTION:=multimedia
CATEGORY:=Multimedia
DEPENDS:=+fuse-utils
TITLE:=FUSE for AliyunDrive
URL:=https://github.com/messense/aliyundrive-fuse
endef
define Package/aliyundrive-fuse/description
FUSE for AliyunDrive.
endef
define Package/aliyundrive-fuse/conffiles
/etc/config/aliyundrive-fuse
endef
define Download/sha256sum
FILE:=$(PKG_SOURCE).sha256
URL_FILE:=$(FILE)
URL:=$(PKG_SOURCE_URL)
HASH:=skip
endef
$(eval $(call Download,sha256sum))
define Build/Prepare
mv $(DL_DIR)/$(PKG_SOURCE).sha256 .
cp $(DL_DIR)/$(PKG_SOURCE) .
shasum -a 256 -c $(PKG_SOURCE).sha256
rm $(PKG_SOURCE).sha256 $(PKG_SOURCE)
tar -C $(PKG_BUILD_DIR)/ -zxf $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Compile
echo "aliyundrive-fuse using precompiled binary."
endef
define Package/aliyundrive-fuse/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/aliyundrive-fuse $(1)/usr/bin/aliyundrive-fuse
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/aliyundrive-fuse.init $(1)/etc/init.d/aliyundrive-fuse
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/aliyundrive-fuse.config $(1)/etc/config/aliyundrive-fuse
endef
$(eval $(call BuildPackage,aliyundrive-fuse))

View File

@ -0,0 +1,7 @@
config default
option enable '0'
option debug '0'
option refresh_token ''
option mount_point '/mnt/aliyundrive'
option read_buffer_size '10485760'
option allow_other '1'

View File

@ -0,0 +1,48 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=15
NAME=aliyundrive-fuse
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
start_service() {
local enable=$(uci_get_by_type default enable)
case "$enable" in
1|on|true|yes|enabled)
local refresh_token=$(uci_get_by_type default refresh_token)
local mount_point=$(uci_get_by_type default mount_point)
local read_buf_size=$(uci_get_by_type default read_buffer_size 10485760)
local allow_other=$(uci_get_by_type default allow_other 0)
local extra_options=""
if [ "$allow_other" = "1" ]; then
extra_options="$extra_options --allow-other"
fi
mkdir -p "$mount_point"
procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options -S $read_buf_size --workdir /var/run/$NAME $mount_point >>/var/log/$NAME.log 2>&1"
procd_set_param pidfile /var/run/$NAME.pid
procd_set_param env REFRESH_TOKEN="$refresh_token"
case $(uci_get_by_type default debug) in
1|on|true|yes|enabled)
procd_append_param env RUST_LOG="aliyundrive_fuse=debug" ;;
*) ;;
esac
procd_close_instance ;;
*)
stop_service ;;
esac
}
service_triggers() {
procd_add_reload_trigger "aliyundrive-fuse"
}

View File

@ -0,0 +1,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-aliyundrive-fuse
PKG_VERSION:=0.1.14
PKG_RELEASE:=1
PKG_PO_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com>
LUCI_TITLE:=LuCI Support for aliyundrive-fuse
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+aliyundrive-fuse
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -0,0 +1,40 @@
module("luci.controller.aliyundrive-fuse", package.seeall)
function index()
if not nixio.fs.access("/etc/config/aliyundrive-fuse") then
return
end
local page
page = entry({"admin", "services", "aliyundrive-fuse"}, alias("admin", "services", "aliyundrive-fuse", "client"), _("AliyunDrive FUSE"), 10) -- 首页
page.dependent = true
page.acl_depends = { "luci-app-aliyundrive-fuse" }
entry({"admin", "services", "aliyundrive-fuse", "client"}, cbi("aliyundrive-fuse/client"), _("Settings"), 10).leaf = true -- 客户端配置
entry({"admin", "services", "aliyundrive-fuse", "log"}, form("aliyundrive-fuse/log"), _("Log"), 30).leaf = true -- 日志页面
entry({"admin", "services", "aliyundrive-fuse", "status"}, call("action_status")).leaf = true
entry({"admin", "services", "aliyundrive-fuse", "logtail"}, call("action_logtail")).leaf = true
end
function action_status()
local e = {}
e.running = luci.sys.call("pidof aliyundrive-fuse >/dev/null") == 0
e.application = luci.sys.exec("aliyundrive-fuse --version")
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end
function action_logtail()
local fs = require "nixio.fs"
local log_path = "/var/log/aliyundrive-fuse.log"
local e = {}
e.running = luci.sys.call("pidof aliyundrive-fuse >/dev/null") == 0
if fs.access(log_path) then
e.log = luci.sys.exec("tail -n 100 %s | sed 's/\\x1b\\[[0-9;]*m//g'" % log_path)
else
e.log = ""
end
luci.http.prepare_content("application/json")
luci.http.write_json(e)
end

View File

@ -0,0 +1,30 @@
m = Map("aliyundrive-fuse")
m.title = translate("AliyunDrive FUSE")
m.description = translate("<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">Project GitHub URL</a>")
m:section(SimpleSection).template = "aliyundrive-fuse/aliyundrive-fuse_status"
e = m:section(TypedSection, "default")
e.anonymous = true
enable = e:option(Flag, "enable", translate("Enable"))
enable.rmempty = false
refresh_token = e:option(Value, "refresh_token", translate("Refresh Token"))
refresh_token.description = translate("<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>")
mount_point = e:option(Value, "mount_point", translate("Mount Point"))
mount_point.default = "/mnt/aliyundrive"
read_buffer_size = e:option(Value, "read_buffer_size", translate("Read Buffer Size"))
read_buffer_size.default = "10485760"
read_buffer_size.datatype = "uinteger"
allow_other = e:option(Flag, "allow_other", translate("Allow Other users Access"))
allow_other.description = translate("Allow other users to access the drive, enable this if you share with samba")
allow_other.rmempty = false
debug = e:option(Flag, "debug", translate("Debug Mode"))
debug.rmempty = false
return m

View File

@ -0,0 +1,9 @@
log = SimpleForm("logview")
log.submit = false
log.reset = false
t = log:field(DummyValue, '', '')
t.rawhtml = true
t.template = 'aliyundrive-fuse/aliyundrive-fuse_log'
return log

View File

@ -0,0 +1,15 @@
<%+cbi/valueheader%>
<textarea id="logview" class="cbi-input-textarea" style="width: 100%" rows="30" readonly="readonly"></textarea>
<script type="text/javascript">
const LOG_URL = '<%=luci.dispatcher.build_url("admin", "services", "aliyundrive-fuse", "logtail")%>';
XHR.poll(1, LOG_URL, null, (x, d) => {
let logview = document.getElementById("logview");
if (!d.running) {
XHR.halt();
}
logview.value = d.log;
logview.scrollTop = logview.scrollHeight;
});
</script>
<%+cbi/valuefooter%>

View File

@ -0,0 +1,21 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[aliyundrive-fuse]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('aliyundrive-fuse_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b style=color:green>' + data.application + '<%:RUNNING%></b></em>';
} else {
tb.innerHTML = '<em><b style=color:red>' + data.application + '<%:NOT RUNNING%></b></em>';
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="aliyundrive-fuse_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>

View File

@ -0,0 +1,50 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"
msgid "AliyunDrive"
msgstr "阿里云盘"
msgid "AliyunDrive FUSE"
msgstr "阿里云盘 FUSE"
msgid "Enable"
msgstr "启用"
msgid "Refresh Token"
msgstr "Refresh Token"
msgid "Mount Point"
msgstr "挂载点"
msgid "Read Buffer Size"
msgstr "下载缓冲大小(bytes)"
msgid "Collecting data..."
msgstr "获取数据中..."
msgid "RUNNING"
msgstr "运行中"
msgid "NOT RUNNING"
msgstr "未运行"
msgid "Settings"
msgstr "设置"
msgid "Log"
msgstr "日志"
msgid "Debug Mode"
msgstr "调试模式"
msgid "<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">Project GitHub URL</a>"
msgstr "<a href=\"https://github.com/messense/aliyundrive-fuse\" target=\"_blank\">GitHub 项目地址</a>"
msgid "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>"
msgstr "<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">查看获取 refresh token 的方法</a>"
msgid "Allow Other users Access"
msgstr "允许其他用户访问"
msgid "Allow other users to access the drive, enable this if you share with samba"
msgstr "允许其他用户访问此驱动如果你想用Samba分享请开启此开关"

View File

@ -0,0 +1 @@
zh-cn

View File

@ -0,0 +1,11 @@
#!/bin/sh
uci -q batch <<-EOF >/dev/null
delete ucitrack.@aliyundrive-fuse[-1]
add ucitrack aliyundrive-fuse
set ucitrack.@aliyundrive-fuse[-1].init=aliyundrive-fuse
commit ucitrack
EOF
rm -f /tmp/luci-indexcache
exit 0

View File

@ -0,0 +1,11 @@
{
"luci-app-aliyundrive-fuse": {
"description": "Grant UCI access for luci-app-aliyundrive-fuse",
"read": {
"uci": [ "aliyundrive-fuse" ]
},
"write": {
"uci": [ "aliyundrive-fuse" ]
}
}
}

View File

@ -0,0 +1,11 @@
#!/bin/sh
sed -i 's/git\.openwrt\.org\/project\/luci/github\.com\/openwrt\/luci/g' ./feeds.conf.default
./scripts/feeds update luci
./scripts/feeds install luci
mv ./bin/luci-app-argon-config ./package/
make defconfig
make package/luci-app-argon-config/compile V=s -j$(nproc) BUILD_LOG=1
tar -cJf logs.tar.xz logs
mv logs.tar.xz bin

View File

@ -0,0 +1,41 @@
name: CI
on:
push:
branches:
- master
tags-ignore:
- 'release-*'
paths:
- 'luci-app-argon-config/**'
pull_request:
branches:
- master
jobs:
build:
name: Build the IPK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Prepare
run: |
mkdir -p bin/luci-app-argon-config
cp -rf ./luasrc ./po ./root ./Makefile ./bin/luci-app-argon-config
- name: Docker Build
run: |
docker pull openwrtorg/sdk:x86-64-21.02-SNAPSHOT
docker run --rm -u root -v "$(pwd)"/bin/:/home/build/openwrt/bin -v ${{ github.workspace }}/.github/workflows:/home/build/workflows openwrtorg/sdk:x86-64-21.02-SNAPSHOT /bin/sh /home/build/workflows/build.sh
- name: Upload app
uses: actions/upload-artifact@v2
with:
name: luci-app-argon-config
path: ./bin/packages/x86_64/base/*argon-config*
if-no-files-found: error
- name: Upload Log
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: buildlog
path: bin/logs.tar.xz

View File

@ -0,0 +1,39 @@
name: Release
on:
push:
tags:
- 'release-*'
jobs:
build:
name: Build the IPK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Prepare
run: |
mkdir -p bin/luci-app-argon-config
cp -rf ./luasrc ./po ./root ./Makefile ./bin/luci-app-argon-config
- name: Docker Build
run: |
docker pull openwrtorg/sdk:x86-64-21.02-SNAPSHOT
docker run --rm -u root -v "$(pwd)"/bin/:/home/build/openwrt/bin -v ${{ github.workspace }}/.github/workflows:/home/build/workflows openwrtorg/sdk:x86-64-21.02-SNAPSHOT /bin/sh /home/build/workflows/build.sh
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
assets=()
for asset in ./bin/packages/x86_64/base/*argon-config*.ipk; do
assets+=("-a" "$asset")
done
tag_name=$(basename ${{github.ref}})
hub release create -p "${assets[@]}" -m "$tag_name" "$tag_name"
- name: Upload Log
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: buildlog
path: bin/logs.tar.xz

View File

@ -8,7 +8,7 @@ PKG_MAINTAINER:=jerrykuku <jerrykuku@qq.com>
LUCI_TITLE:=LuCI page for Argon Config
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+luci-compat
LUCI_DEPENDS:=+luci-compat +luci-lib-ipkg +luci-theme-argon
define Package/$(PKG_NAME)/conffiles
/etc/config/argon

View File

@ -121,7 +121,7 @@ function br.handle(self, state, data)
return true
end
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."))
ful = SimpleForm('upload', translate('Upload (Free: ') .. wa.byte_format(free_byte) .. ')', translate("You can upload files such as jpg,png,gif,webp,mp4,webm files, To change the login page background."))
ful.reset = false
ful.submit = false

View File

@ -1,5 +1,5 @@
<%+cbi/valueheader%>
<label class="cbi-value" style="display:inline-block; width: 130px" for="ulfile"><%:Choose local file:%></label>
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, video/mp4, video/webm"/>
<input class="cbi-input-file" style="width: 400px" type="file" id="ulfile" name="ulfile" accept="image/png, image/jpeg, image/gif, image/webp, video/mp4, video/webm"/>
<input type="submit" class="btn cbi-button cbi-input-apply" name="upload" value="<%:Upload%>" />
<%+cbi/valuefooter%>

View File

@ -145,10 +145,10 @@ msgstr "Puede elegir el modo de color del tema aquí"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
msgid ""
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
"You can upload files such as jpg,png,gif,webp,mp4,webm files, To change the login page "
"background."
msgstr ""
"Puede cargar archivos como jpg, png, gif, mp4, webm, para cambiar el fondo de la "
"Puede cargar archivos como jpg, png, gif, webp, mp4, webm, para cambiar el fondo de la "
"página de inicio de sesión."
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:105

View File

@ -126,7 +126,7 @@ msgstr ""
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
msgid ""
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
"You can upload files such as jpg,png,gif,webp,mp4,webm files, To change the login page "
"background."
msgstr ""

View File

@ -74,8 +74,8 @@ msgstr "[暗色模式] 毛玻璃模糊半径"
msgid "Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )"
msgstr "值越大越模糊; ( 建议: 清透 1 或 模糊预设 10 )"
msgid "You can upload files such as jpg,png,gif,mp4,webm files, To change the login page background."
msgstr "你可以上传jpg、png、gif或mp4、webm文件以创建自己喜欢的登录界面"
msgid "You can upload files such as jpg,png,gif,webp,mp4,webm files, To change the login page background."
msgstr "你可以上传jpg、png、gif、webp或mp4、webm文件以创建自己喜欢的登录界面"
msgid "Save Changes"
msgstr "保存更改"

View File

@ -0,0 +1,165 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Victor Tseng <palatis@gmail.com>\n"
"Language-Team: \n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.2.2\n"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:97
msgid "0 transparent - 1 opaque ; ( Suggest: Black translucent preset: 0.5 )"
msgstr "0 全透明 - 1 不透明(建議:黑色半透明 0.5"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:79
msgid ""
"0 transparent - 1 opaque ; ( Suggest: transparent: 0 or translucent preset: 0.5 )"
msgstr "0 全透明 - 1 不透明(建議:全透明 0或半透明 0.5"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:92
msgid "A HEX Color ; ( Default: #483d8b )"
msgstr "十六進制顏色(預設 #483d8b"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:72
msgid "A HEX Color ; ( Default: #5e72e4 )"
msgstr "十六進制顏色(預設 #5e72e4"
#: applications/luci-app-argon-config/luasrc/controller/argon-config.lua:8
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:53
msgid "Argon Config"
msgstr "Argon 設定"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:195
msgid "Background file list"
msgstr "背景檔案清單"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:60
msgid "Bing Wallpapers"
msgstr "必應桌布"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:59
msgid "Built-in"
msgstr "內建"
#: applications/luci-app-argon-config/luasrc/view/argon-config/other_upload.htm:2
msgid "Choose local file:"
msgstr "選擇本地檔案:"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:149
msgid "Create upload file error."
msgstr "建立上傳檔案錯誤。"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:200
msgid "File name"
msgstr "檔案名稱"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:159
msgid "File saved to"
msgstr "檔案已儲存至"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:65
msgid "Follow System"
msgstr "跟隨系統配色"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:67
msgid "Force Dark"
msgstr "強制深色"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:66
msgid "Force Light"
msgstr "強制淺色"
#: applications/luci-app-argon-config/root/usr/share/rpcd/acl.d/luci-app-argon-config.json:3
msgid "Grant UCI access for luci-app-argon-config"
msgstr "為 luci-app-argon-config 授予 UCI 權限"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:53
msgid ""
"Here you can set the blur and transparency of the login page of argon theme, and "
"manage the background pictures and videos.[Chrome is recommended]"
msgstr ""
"您可以在此設定登入畫面的模糊度、透明度、以及管理背景圖片與影片(推薦使用 "
"Chrome。"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:87
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:105
msgid "Larger value will more blurred ; ( Suggest: clear: 1 or blur preset: 10 )"
msgstr "數值越大越模糊(建議:清晰 1或模糊程度 10"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:201
msgid "Modify time"
msgstr "修改時間"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:167
msgid "No specify upload file."
msgstr "沒有選擇要上傳的檔案。"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:203
msgid "Remove"
msgstr "移除"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:110
msgid "Save Changes"
msgstr "保存變更"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:202
msgid "Size"
msgstr "容量"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:64
msgid "Theme mode"
msgstr "佈景主題模式"
#: applications/luci-app-argon-config/luasrc/view/argon-config/other_upload.htm:4
msgid "Upload"
msgstr "上傳"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
msgid "Upload (Free:"
msgstr "上傳(剩餘空間:"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:128
msgid "Upload file to '/www/luci-static/argon/background/'"
msgstr "上傳檔案至「/www/luci-static/argon/background」"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:58
msgid "Wallpaper Source"
msgstr "桌布來源"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:70
msgid "You can choose Theme color mode here"
msgstr "您可以在此選擇佈景主題的顏色模式"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:124
msgid ""
"You can upload files such as jpg,png,gif,mp4,webm files, To change the login page "
"background."
msgstr "您可以上傳諸如 jpg、png、gif、mp4、webm 等類型的檔案來更換登入畫面的背景。"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:105
msgid "[Dark mode] Frosted Glass Radius"
msgstr "《深色模式》模糊效果半徑"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:92
msgid "[Dark mode] Primary Color"
msgstr "《深色模式》主色彩"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:97
msgid "[Dark mode] Transparency"
msgstr "《深色模式》透明度"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:87
msgid "[Light mode] Frosted Glass Radius"
msgstr "《淺色模式》模糊效果半徑"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:72
msgid "[Light mode] Primary Color"
msgstr "《淺色模式》主色彩"
#: applications/luci-app-argon-config/luasrc/model/cbi/argon-config.lua:79
msgid "[Light mode] Transparency"
msgstr "《淺色模式》透明度"

View File

@ -0,0 +1 @@
zh-tw

View File

@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=Argon Theme
LUCI_DEPENDS:=+curl +jsonfilter
PKG_VERSION:=1.7.7
PKG_RELEASE:=20230404
PKG_VERSION:=1.7.8
PKG_RELEASE:=20230505
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -158,10 +158,15 @@ body {
a:link,
a:visited,
a:active {
color: #5e72e4;
color: var(--primary);
color: var(--default);
text-decoration: none;
}
a:-webkit-any-link:not(.main-left a):not(li a):not(.brand):not(.login-container footer .ftc a) {
color: -webkit-link;
cursor: pointer;
color: var(--primary);
text-shadow: 1px 1px 2px #ccc;
}
a:hover {
text-decoration: underline;
}
@ -309,19 +314,28 @@ li {
display: flex;
-webkit-box-align: center;
align-items: center;
margin: 50px auto 100px 50px;
margin: 50px auto 15px auto;
color: #525461;
color: var(--default);
}
.login-page .login-container .login-form .brand .icon {
width: 50px;
height: auto;
margin-right: 25px;
}
.login-page .login-container .login-form .brand .brand-text {
font-size: 1.25rem;
.login-page .login-container .login-form .brand-text {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 85px;
font-family: "TypoGraphica";
width: 420px;
padding: 0 0.5rem 0 0.5rem;
text-align: center;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.login-page .login-container .login-form .brand:hover {
text-decoration: none;
@ -522,13 +536,9 @@ header .fill .container .brand {
footer {
text-align: right;
padding: 1rem;
color: #aaa;
color: var(--footer-color);
font-size: 0.8rem;
}
footer a {
color: #aaa;
color: var(--footer-color);
text-decoration: none;
}
/***********************
@ -1027,12 +1037,14 @@ select {
text-align: center;
}
/*textarea*/
.cbi-input-textarea {
width: 100%;
min-height: 14rem;
padding: 0.8rem;
font-size: 0.8rem;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
textarea {
border: none !important;
outline: none;
min-height: 14rem !important;
padding: 0.8rem !important;
background-color: #fff;
font-family: var(--font-family-monospace) !important;
font-size: inherit;
color: black;
}
/* change */
@ -1773,7 +1785,7 @@ body.lang_pl.node-main-login .cbi-value-title {
}
.cbi-rowstyle-2 .cbi-button-up,
.cbi-rowstyle-2 .cbi-button-down {
background-color: #FFF !important;
background-color: var(--lighter);
}
.cbi-button-up,
.cbi-button-down,
@ -2469,7 +2481,8 @@ select[multiple="multiple"] {
.cbi-section-node .cbi-value {
padding: 0.5rem 1rem 0.5rem 1rem !important;
}
.cbi-tabcontainer > .cbi-value:nth-of-type(2n) {
.cbi-tabcontainer > .cbi-value:nth-of-type(2n),
.cbi-tabcontainer > .cbi-value:nth-of-type(2n)>textarea {
background-color: #f9f9f9;
}
.cbi-value-field,
@ -2567,23 +2580,11 @@ td > .ifacebadge {
float: right;
margin: 0 0.3rem;
}
/*textarea*/
.cbi-input-textarea {
width: 100%;
border: 0;
outline: none;
min-height: 14rem;
padding: 0.8rem;
font-size: 0.8rem;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: black;
}
#syslog {
width: 100%;
min-height: 15rem;
padding: 1rem;
line-height: 1.4em;
font-size: small;
color: #1e1e1e;
border-radius: 0;
background-color: #fff;
@ -2859,7 +2860,8 @@ input[name="nslookup"] {
padding: 0.75rem 1.5rem;
font-size: 0.7rem;
font-weight: 600;
color: #525f7f;
color: var(--primary);
text-shadow: 1px 1px 2px #ccc;
text-align: center;
}
.cbi-section h4 {
@ -2960,9 +2962,6 @@ input[name="nslookup"] {
fieldset {
padding: 0;
}
.cbi-input-textarea {
font-size: small;
}
.node-status-iptables > .main fieldset li > a {
padding: 0.3rem 0.6rem;
}

View File

@ -15,6 +15,10 @@ body {
color: #adb5bd;
}
.login-page .login-container .login-form .form-login .input-group .border {
border-bottom: 1px var(--dark-primary) solid;
}
.login-page .login-container .login-form .form-login .input-group input {
background-color: transparent !important;
color: #adb5bd;
@ -42,7 +46,8 @@ body {
opacity: .9;
}
.login-page .login-container footer {
.login-page .login-container footer,
.login-page .login-container footer a {
color: #adb5bd;
}
@ -60,11 +65,12 @@ header::after {
}
.main .main-left .nav .slide .slide-menu .active a {
color: #cccccc;
color: #fff !important;
}
.main .main-left .nav .slide .slide-menu a::after,
.main .main-left .nav .slide .slide-menu .active a::after {
background-color: #cccccc !important;
background-color: var(--dark-primary) !important;
}
.main .main-left .nav .slide .slide-menu li a {
@ -78,7 +84,7 @@ header::after {
.main .main-left .nav .slide .menu.active {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
color: #fff !important;
}
.main .main-left .nav .slide .menu.active a::after {
@ -92,7 +98,7 @@ header::after {
.main .main-left .nav li a:hover {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
color: #fff !important;
}
.main .main-left::-webkit-scrollbar-thumb {
@ -118,11 +124,9 @@ h3 {
background: #333333;
}
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
color: #483d8b;
color: var(--dark-primary);
a:-webkit-any-link:not(.main-left a):not(li a):not(.brand):not(.login-container footer .ftc a) {
color: var(--dark_webkit-any-link) !important;
text-shadow: 1px 1px 2px #000 !important;
}
input:-webkit-autofill {
@ -140,8 +144,8 @@ input:-webkit-autofill {
}
.cbi-section em {
color: #483d8b;
color: var(--dark-primary);
color: var(--dark_webkit-any-link);
text-shadow: 1px 1px 2px #000;
}
header.bg-primary {
@ -254,8 +258,7 @@ table>thead>tr>th {
}
abbr {
color: #483d8b;
color: var(--dark-primary);
color: #8898aa;
}
div>table>tbody>tr:nth-of-type(2n),
@ -350,26 +353,26 @@ th h6, td h6 {
background-color: #252526;
}
.tabs>li[class~="active"]>a {
color: #ccc;
}
.tabs>li:hover,
.tabs>li[class~="active"],
.tabs>li:hover {
border-bottom: .18751rem solid #483d8b;
.cbi-tabmenu>li:hover,
.cbi-tabmenu>li[class~="cbi-tab"] {
border-bottom: .18751rem solid var(--dark-primary);
color: #ccc;
background-color: #181819;
background-color: #3c3c3c;
}
.cbi-tabmenu>li>a,
.tabs>li>a {
color: #ccc;
.tabs>li>a,
.cbi-tabmenu>li>a {
color: #ccc !important;
}
.cbi-tabmenu>li>a:hover,
.tabs>li>a:hover {
color: #ccc;
.cbi-tabmenu>li:hover>a,
.cbi-tabmenu>.cbi-tab>a,
.tabs>li>a:hover,
.tabs>li:hover>a,
.tabs>li[class~="active"]>a {
color: #fff !important;
}
.cbi-tabmenu>li {
@ -380,20 +383,12 @@ th h6, td h6 {
border-bottom: 0 solid #ddd !important;
}
.cbi-tabmenu li[class~="cbi-tab"] a {
.cbi-tab-descr {
color: #ccc;
}
.cbi-tabmenu>li:hover {
color: #ccc;
background: #2d2d2d;
}
.cbi-tabmenu>li[class~="cbi-tab"] {
background-color: #181819;
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n) {
.cbi-tabcontainer>.cbi-value:nth-of-type(2n),
.cbi-tabcontainer>.cbi-value:nth-of-type(2n)>textarea {
background-color: #252526;
}
@ -444,7 +439,8 @@ select {
color: #ccc;
}
.cbi-input-textarea {
/*textarea for dark mode*/
textarea {
background-color: #1e1e1e;
color: #ccc;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,47 @@
/*
* Improved link font color that follows custom [Dark mode] Primary Color
* Author: SpeedPartner
*/
/*
* Get hex for the [Dark mode] Primary Color ,then reduce it to 70% transparency and convert it to RGB value
*/
const hexColor_primary = getComputedStyle(document.documentElement).getPropertyValue('--dark-primary').replace(/\s/, "");
const hexToRgb_primary = (hex) => {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
const a = 0.7
return [r*a, g*a, b*a].map(x => x.toFixed(2));
};
const rgbColor_primary = hexToRgb_primary(hexColor_primary);
//console.log(rgbColor_primary);
/*
* Constitute overlay color #cccccc, then reduce it to 30% transparency and convert it to RGB value
*/
const hexColor_overlay = "#cccccc";
const hexToRgb_overlay = (hex) => {
const r = parseInt(hex.substring(1, 3), 16);
const g = parseInt(hex.substring(3, 5), 16);
const b = parseInt(hex.substring(5, 7), 16);
const a = 0.3
return [r*a, g*a, b*a].map(x => x.toFixed(2));
};
const rgbColor_overlay = hexToRgb_overlay(hexColor_overlay);
//console.log(rgbColor_overlay);
/*
* Overlay the RGB value of two colors
*/
const New_Color = [
Math.round(Number(rgbColor_primary[0]) + Number(rgbColor_overlay[0])),
Math.round(Number(rgbColor_primary[1]) + Number(rgbColor_overlay[1])),
Math.round(Number(rgbColor_primary[2]) + Number(rgbColor_overlay[2]))
];
//console.log(New_Color);
/*
* Constitute a css color variable named dark_webkit-any-link
*/
document.documentElement.style.setProperty('--dark_webkit-any-link', `rgb(`+New_Color+`)`);

View File

@ -182,11 +182,17 @@ body {
a:link,
a:visited,
a:active {
color: #5e72e4;
color: var(--primary);
color: var(--default);
text-decoration: none;
}
a:-webkit-any-link:not(.main-left a):not(li a):not(.brand):not(.login-container footer .ftc a) {
color: -webkit-link;
cursor: pointer;
color: var(--primary);
text-shadow: 1px 1px 2px #ccc;
}
a:hover {
text-decoration: underline;
}
@ -324,21 +330,13 @@ li {
display: flex;
-webkit-box-align: center;
align-items: center;
margin: 50px auto 100px 50px;
margin: 50px auto 15px auto;
color: #525461;
color: var(--default);
.icon {
width: 50px;
height: auto;
margin-right: 25px;
}
.brand-text {
font-size: 1.25rem;
font-weight: 700;
font-family: "TypoGraphica";
}
&:hover {
@ -346,6 +344,22 @@ li {
}
}
.brand-text {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 85px;
font-family: "TypoGraphica";
width: 420px;
padding: 0 0.5rem 0 0.5rem;
text-align: center;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.form-login {
width: 100%;
padding: 20px 50px;
@ -583,13 +597,9 @@ footer {
text-align: right;
padding: 1rem;
color: #aaa;
color: var(--footer-color);
font-size: 0.8rem;
a {
color: #aaa;
color: var(--footer-color);
text-decoration: none;
}
}
@ -1193,23 +1203,19 @@ select {
text-align: center;
}
/*textarea*/
.cbi-input-textarea {
width: 100%;
min-height: 14rem;
padding: 0.8rem;
font-size: 0.8rem;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
textarea {
border: none !important;
outline: none;
min-height: 14rem !important;
padding: 0.8rem !important;
background-color: #fff;
font-family: var(--font-family-monospace) !important;
font-size: inherit;
color: black;
}
/* change */
.uci-change-list {
font-family: monospace;
}
@ -2111,7 +2117,7 @@ body.lang_pl.node-main-login .cbi-value-title {
.cbi-rowstyle-2 .cbi-button-up,
.cbi-rowstyle-2 .cbi-button-down {
background-color: #FFF !important;
background-color: var(--lighter);
}
@ -2972,7 +2978,8 @@ select[multiple="multiple"] {
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n) {
.cbi-tabcontainer>.cbi-value:nth-of-type(2n),
.cbi-tabcontainer>.cbi-value:nth-of-type(2n)>textarea {
background-color: #f9f9f9;
}
@ -3099,25 +3106,11 @@ td>.ifacebadge {
margin: 0 0.3rem;
}
/*textarea*/
.cbi-input-textarea {
width: 100%;
border: 0;
outline: none;
min-height: 14rem;
padding: 0.8rem;
font-size: 0.8rem;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: black;
}
#syslog {
width: 100%;
min-height: 15rem;
padding: 1rem;
line-height: 1.4em;
font-size: small;
color: #1e1e1e;
border-radius: 0;
background-color: #fff;
@ -3126,14 +3119,6 @@ td>.ifacebadge {
}
.ifacebadge {
display: inline-flex;
border-bottom: 0px solid #CCCCCC;
@ -3477,7 +3462,8 @@ input[name="nslookup"] {
padding: 0.75rem 1.5rem;
font-size: 0.7rem;
font-weight: 600;
color: #525f7f;
color: var(--primary);
text-shadow: 1px 1px 2px #ccc;
text-align: center;
}
@ -3623,10 +3609,6 @@ input[name="nslookup"] {
padding: 0;
}
.cbi-input-textarea {
font-size: small;
}
.node-status-iptables>.main fieldset li>a {
padding: 0.3rem 0.6rem;
}

View File

@ -48,6 +48,10 @@ body {
color: #adb5bd;
}
.border {
border-bottom: 1px var(--dark-primary) solid;
}
input {
background-color: transparent !important;
color: #adb5bd;
@ -81,6 +85,9 @@ body {
footer {
color: #adb5bd;
a {
color: #adb5bd;
}
}
}
@ -103,12 +110,17 @@ header::after {
.nav {
.slide {
.slide-menu {
a::after {
background-color: var(--dark-primary) !important;
}
.active {
a {
color: #cccccc;
color: #fff !important;
&::after {
background-color: #cccccc !important;
background-color: var(--dark-primary) !important;
}
}
}
@ -127,7 +139,7 @@ header::after {
.menu.active {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
color: #fff !important;
a::after {
background-color: #cccccc !important;
@ -143,7 +155,7 @@ header::after {
a:hover {
background-color: #483d8b !important;
background-color: var(--dark-primary) !important;
color: #cccccc !important;
color: #fff !important;
}
@ -176,14 +188,11 @@ h3 {
background: #333333;
}
a:-webkit-any-link {
color: -webkit-link;
cursor: pointer;
color: #483d8b;
color: var(--dark-primary);
a:-webkit-any-link:not(.main-left a):not(li a):not(.brand):not(.login-container footer .ftc a) {
color: var(--dark_webkit-any-link) !important;
text-shadow: 1px 1px 2px #000 !important;
}
input:-webkit-autofill {
background-color: #3c3c3c !important;
}
@ -198,14 +207,11 @@ input:-webkit-autofill {
border-color: var(--dark-primary) !important;
}
.cbi-section em {
color: #483d8b;
color: var(--dark-primary);
color: var(--dark_webkit-any-link);
text-shadow: 1px 1px 2px #000;
}
header.bg-primary {
background-color: #1e1e1e !important;
}
@ -322,9 +328,7 @@ table>thead>tr>th {
}
abbr {
color: #483d8b;
color: var(--dark-primary);
color: #8898aa;
}
div>table>tbody>tr:nth-of-type(2n),
@ -419,25 +423,26 @@ th h6, td h6 {
background-color: #252526;
}
.tabs>li[class~="active"]>a {
color: #ccc;
}
.tabs>li:hover,
.tabs>li[class~="active"],
.tabs>li:hover {
border-bottom: 0.18751rem solid #483d8b;
border-bottom: 0.18751rem solid var(--dark-primary);
color: #ccc;
background-color: #181819;
.cbi-tabmenu>li:hover,
.cbi-tabmenu>li[class~="cbi-tab"] {
border-bottom: .18751rem solid var(--dark-primary);
background-color: #3c3c3c;
}
.cbi-tabmenu>li>a,
.tabs>li>a {
color: #ccc;
.tabs>li>a,
.cbi-tabmenu>li>a {
color: #ccc !important;
}
&:hover {
color: #ccc;
}
.cbi-tabmenu>li>a:hover,
.cbi-tabmenu>li:hover>a,
.cbi-tabmenu>.cbi-tab>a,
.tabs>li>a:hover,
.tabs>li:hover>a,
.tabs>li[class~="active"]>a {
color: #fff !important;
}
.cbi-tabmenu>li {
@ -448,20 +453,12 @@ th h6, td h6 {
border-bottom: 0px solid #ddd !important;
}
.cbi-tabmenu li[class~="cbi-tab"] a {
.cbi-tab-descr {
color: #ccc;
}
.cbi-tabmenu>li:hover {
color: #ccc;
background: #2d2d2d;
}
.cbi-tabmenu>li[class~="cbi-tab"] {
background-color: #181819;
}
.cbi-tabcontainer>.cbi-value:nth-of-type(2n) {
.cbi-tabcontainer>.cbi-value:nth-of-type(2n),
.cbi-tabcontainer>.cbi-value:nth-of-type(2n)>textarea {
background-color: #252526;
}
@ -512,13 +509,12 @@ select {
color: #ccc;
}
.cbi-input-textarea {
/*textarea for dark mode*/
textarea {
background-color: #1e1e1e;
color: #ccc;
}
.cbi-section-remove:nth-of-type(2n),
.cbi-section-node:nth-of-type(2n) {
background-color: #1e1e1e;

View File

@ -267,6 +267,7 @@
<script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script>
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
<script src="<%=media%>/js/jquery.min.js?v=3.5.1"></script>
<script src="<%=media%>/js/dark-primary-font.js<%# ?v=PKG_VERSION %>"></script>
</head>
<body

View File

@ -129,9 +129,8 @@
<div class="login-container">
<div class="login-form">
<!-- Logo Start -->
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon">
<span class="brand-text"><%=striptags( (boardinfo.hostname or "?") ) %></span>
</a>
<a class="brand" href="/"><img src="<%=media%>/img/argon.svg" class="icon"></a>
<span class="brand-text"><%=striptags( (boardinfo.hostname or "?") ) %></span>
<!-- Logo End -->
<!-- Login Form Start -->
<form class="form-login" method="post" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>">