diff --git a/README.md b/README.md index 2f447b4c0..834294a5c 100644 --- a/README.md +++ b/README.md @@ -241,10 +241,11 @@ bash <(curl -sS https://raw.githubusercontent.com/你的用户名/r4s_build_scri ### 一、Fork 本仓库到自己 GitHub 存储库 ### 二、构建固件 -- 在存储库名称下,单击(Actions Actions)。 + +- 在存储库名称下,单击(Actions Actions)。 - 在左侧边栏中,单击要运行的工作流的名称:**Build releases**。 - 在工作流运行的列表上方,单击“**Run workflow**”按钮,选择要构建的设备固件并运行工作流。 - ![image](https://github.com/sbwml/r4s_build_script/assets/16485166/136abcd1-ecf3-4e6d-aa1a-5393a75a25cc) + ![image](https://github.com/user-attachments/assets/0c2eb064-a130-47b3-a5a3-1e9a9bb6f50d) diff --git a/openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch b/openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch new file mode 100644 index 000000000..d6e1bba53 --- /dev/null +++ b/openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch @@ -0,0 +1,45 @@ +From 0c1f0e62e72e4c89b0db25aa6f6baa19c7e91e75 Mon Sep 17 00:00:00 2001 +From: sbwml +Date: Fri, 13 Sep 2024 19:36:44 +0800 +Subject: [PATCH 1/5] luci-mod-system: add modal overlay dialog to reboot + +Signed-off-by: sbwml +--- + .../resources/view/system/reboot.js | 21 ++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js +index 92e1dd4..c106f78 100644 +--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js ++++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js +@@ -30,7 +30,26 @@ return view.extend({ + body.appendChild(E('hr')); + body.appendChild(E('button', { + 'class': 'cbi-button cbi-button-action important', +- 'click': ui.createHandlerFn(this, 'handleReboot') ++ 'click': function () { ++ ui.showModal(_('Confirm Reboot'), [ ++ E('p', {}, _('Are you sure you want to reboot the system?')), ++ E('button', { ++ 'class': 'cbi-button cbi-button-action important', ++ 'style': 'margin-left: 0px; background: red!important; border-color: red!important', ++ 'click': function () { ++ ui.hideModal(); ++ this.handleReboot(); ++ }.bind(this) ++ }, _('Confirm')), ++ E('button', { ++ 'class': 'btn cbi-button cbi-button-apply', ++ 'style': 'margin-left: 20px', ++ 'click': function () { ++ ui.hideModal(); ++ } ++ }, _('Cancel')) ++ ]); ++ }.bind(this) + }, _('Perform reboot'))); + + return body; +-- +2.42.0 + diff --git a/openwrt/patch/luci/20_memory.js.patch b/openwrt/patch/luci/0002-luci-mod-status-displays-actual-process-memory-usage.patch similarity index 72% rename from openwrt/patch/luci/20_memory.js.patch rename to openwrt/patch/luci/0002-luci-mod-status-displays-actual-process-memory-usage.patch index ce161da8e..776455541 100644 --- a/openwrt/patch/luci/20_memory.js.patch +++ b/openwrt/patch/luci/0002-luci-mod-status-displays-actual-process-memory-usage.patch @@ -1,3 +1,13 @@ +From fb9d1a301136922a624e1eb2927ad60260ee11f8 Mon Sep 17 00:00:00 2001 +From: sbwml +Date: Fri, 13 Sep 2024 19:43:19 +0800 +Subject: [PATCH 2/5] luci-mod-status: displays actual process memory usage + +Signed-off-by: sbwml +--- + .../luci-static/resources/view/status/include/20_memory.js | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js index 0a885c0..d3302ff 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js @@ -13,3 +23,6 @@ index 0a885c0..d3302ff 100644 ]; if (mem.buffered) +-- +2.42.0 + diff --git a/openwrt/patch/luci/luci-mod-status-storage-index-applicable-only-to-val.patch b/openwrt/patch/luci/0003-luci-mod-status-storage-index-applicable-only-to-val.patch similarity index 73% rename from openwrt/patch/luci/luci-mod-status-storage-index-applicable-only-to-val.patch rename to openwrt/patch/luci/0003-luci-mod-status-storage-index-applicable-only-to-val.patch index 25f29413f..915aa8512 100644 --- a/openwrt/patch/luci/luci-mod-status-storage-index-applicable-only-to-val.patch +++ b/openwrt/patch/luci/0003-luci-mod-status-storage-index-applicable-only-to-val.patch @@ -1,7 +1,7 @@ -From 8a052b2e2ffd2e6a46fe361a946b1acd42998402 Mon Sep 17 00:00:00 2001 +From 2543713322fa4f7b404a673429ce36f4319c4749 Mon Sep 17 00:00:00 2001 From: sbwml Date: Sun, 24 Mar 2024 00:12:45 +0800 -Subject: [PATCH] luci-mod-status: storage index applicable only to valid +Subject: [PATCH 3/5] luci-mod-status: storage index applicable only to valid devices Signed-off-by: sbwml @@ -9,6 +9,8 @@ Signed-off-by: sbwml .../luci-static/resources/view/status/include/25_storage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) +diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js +index 60661f6..aac6711 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js @@ -13,12 +13,14 @@ var callMountPoints = rpc.declare({ @@ -36,4 +38,6 @@ Signed-off-by: sbwml continue; var name = entry.device + ' (' + entry.mount +')', +-- +2.42.0 diff --git a/openwrt/patch/luci/luci-nftables.patch b/openwrt/patch/luci/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch similarity index 81% rename from openwrt/patch/luci/luci-nftables.patch rename to openwrt/patch/luci/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch index 694151a8f..18b40b8ff 100644 --- a/openwrt/patch/luci/luci-nftables.patch +++ b/openwrt/patch/luci/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch @@ -1,5 +1,17 @@ +From 44cb42a004b8334d784814c5f616c8d8ceda6b22 Mon Sep 17 00:00:00 2001 +From: sbwml +Date: Fri, 13 Sep 2024 19:44:52 +0800 +Subject: [PATCH 4/5] luci-mod-status: firewall: disable legacy firewall rule + warning + +Signed-off-by: sbwml +--- + .../resources/view/status/nftables.js | 14 -------------- + .../share/luci/menu.d/luci-mod-status.json | 19 ++++++++++++++++--- + 2 files changed, 16 insertions(+), 17 deletions(-) + diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js -index d891526..04fd5af 100644 +index be62d91..1718494 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js @@ -672,26 +672,12 @@ return view.extend({ @@ -70,3 +82,6 @@ index 190eef0..e9cf485 100644 "action": { "type": "view", "path": "status/iptables" +-- +2.42.0 + diff --git a/openwrt/patch/luci/luci-refresh-interval.patch b/openwrt/patch/luci/0005-luci-mod-system-add-refresh-interval-setting.patch similarity index 68% rename from openwrt/patch/luci/luci-refresh-interval.patch rename to openwrt/patch/luci/0005-luci-mod-system-add-refresh-interval-setting.patch index 32ef96cf8..fec459d9c 100644 --- a/openwrt/patch/luci/luci-refresh-interval.patch +++ b/openwrt/patch/luci/0005-luci-mod-system-add-refresh-interval-setting.patch @@ -1,3 +1,13 @@ +From 8596f6d48c24c063fd75f007b8e24cd011ac93fb Mon Sep 17 00:00:00 2001 +From: sbwml +Date: Fri, 13 Sep 2024 19:47:13 +0800 +Subject: [PATCH 5/5] luci-mod-system: add refresh interval setting + +Signed-off-by: sbwml +--- + .../htdocs/luci-static/resources/view/system/system.js | 8 ++++++++ + 1 file changed, 8 insertions(+) + diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js index 767bc8c..c8969ac 100644 --- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js @@ -17,3 +27,6 @@ index 767bc8c..c8969ac 100644 /* * NTP */ +-- +2.42.0 + diff --git a/openwrt/scripts/00-prepare_base.sh b/openwrt/scripts/00-prepare_base.sh index bf042b1f6..6f21baf62 100644 --- a/openwrt/scripts/00-prepare_base.sh +++ b/openwrt/scripts/00-prepare_base.sh @@ -391,12 +391,13 @@ sed -i 's/cheaper = 1/cheaper = 2/g' feeds/packages/net/uwsgi/files-luci-support sed -i 's/option timeout 30/option timeout 60/g' package/system/rpcd/files/rpcd.config sed -i 's#20) \* 1000#60) \* 1000#g' feeds/luci/modules/luci-base/htdocs/luci-static/resources/rpc.js -# luci - 20_memory & 25_storage & refresh interval +# luci-mod extra pushd feeds/luci - curl -s https://$mirror/openwrt/patch/luci/20_memory.js.patch | patch -p1 - curl -s https://$mirror/openwrt/patch/luci/luci-refresh-interval.patch | patch -p1 - # luci-mod-status: storage index applicable only to valid - curl -s https://$mirror/openwrt/patch/luci/luci-mod-status-storage-index-applicable-only-to-val.patch | patch -p1 + curl -s https://$mirror/openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch | patch -p1 + curl -s https://$mirror/openwrt/patch/luci/0002-luci-mod-status-displays-actual-process-memory-usage.patch | patch -p1 + curl -s https://$mirror/openwrt/patch/luci/0003-luci-mod-status-storage-index-applicable-only-to-val.patch | patch -p1 + curl -s https://$mirror/openwrt/patch/luci/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch | patch -p1 + curl -s https://$mirror/openwrt/patch/luci/0005-luci-mod-system-add-refresh-interval-setting.patch | patch -p1 popd # Luci diagnostics.js