update 2026-10-18 23:15:13

This commit is contained in:
action committed 2026-10-18 23:15:13 +08:00
1 parent 21a5be24ad
commit 98f89b4fef
3 files changed
+25 -9

No files matched your search

@@ -8,10 +8,7 @@ LOCK_FILE=${LOCK_PATH}/${CONFIG}_tasks.lock
CFG_UPDATE_INT=0 CFG_UPDATE_INT=0
exec 99>"$LOCK_FILE" exec 99>"$LOCK_FILE"
flock -n 99 flock -n 99 || exit 0
if [ "$?" != 0 ]; then
exit 0
fi
while true while true
do do
@@ -23,7 +20,7 @@ do
restart_interval_mode=$(expr "$restart_interval_mode" \* 60) restart_interval_mode=$(expr "$restart_interval_mode" \* 60)
if [ -n "$restart_week_mode" ]; then if [ -n "$restart_week_mode" ]; then
[ "$restart_week_mode" = "8" ] && { [ "$restart_week_mode" = "8" ] && {
[ "$(expr "$CFG_UPDATE_INT" % "$restart_interval_mode")" -eq 0 ] && { /etc/init.d/$CONFIG restart cron > /dev/null 2>&1 & } [ "$(expr "$CFG_UPDATE_INT" % "$restart_interval_mode")" -eq 0 ] && { /etc/init.d/$CONFIG restart cron > /dev/null 2>&1 99>&- & }
} }
fi fi
@@ -32,7 +29,7 @@ do
rules_update_interval_mode=$(expr "$rules_update_interval_mode" \* 60) rules_update_interval_mode=$(expr "$rules_update_interval_mode" \* 60)
if [ -n "$rules_update_week_mode" ]; then if [ -n "$rules_update_week_mode" ]; then
[ "$rules_update_week_mode" = "8" ] && { [ "$rules_update_week_mode" = "8" ] && {
[ "$(expr "$CFG_UPDATE_INT" % "$rules_update_interval_mode")" -eq 0 ] && { lua $APP_PATH/rule_update.lua log all cron > /dev/null 2>&1 & } [ "$(expr "$CFG_UPDATE_INT" % "$rules_update_interval_mode")" -eq 0 ] && { lua "$APP_PATH/rule_update.lua" log all cron > /dev/null 2>&1 99>&- & }
} }
fi fi
@@ -53,9 +50,9 @@ do
sub_update_week_mode=${name%_*} sub_update_week_mode=${name%_*}
sub_update_interval_mode=${name#*_} sub_update_interval_mode=${name#*_}
sub_update_interval_mode=$(expr "$sub_update_interval_mode" \* 60) sub_update_interval_mode=$(expr "$sub_update_interval_mode" \* 60)
cfgids=$(echo -n $(cat ${TMP_SUB_PATH}/${name}) | sed 's# #,#g') cfgids=$(tr '\n' ',' < "${TMP_SUB_PATH}/${name}" | sed 's/,$//')
[ "$sub_update_week_mode" = "8" ] && { [ "$sub_update_week_mode" = "8" ] && {
[ "$(expr "$CFG_UPDATE_INT" % "$sub_update_interval_mode")" -eq 0 ] && { lua $APP_PATH/subscribe.lua start $cfgids cron > /dev/null 2>&1 & } [ "$(expr "$CFG_UPDATE_INT" % "$sub_update_interval_mode")" -eq 0 ] && { lua "$APP_PATH/subscribe.lua" start "$cfgids" cron > /dev/null 2>&1 99>&- & }
} }
done done
rm -rf $TMP_SUB_PATH rm -rf $TMP_SUB_PATH
@@ -65,6 +62,6 @@ do
CFG_UPDATE_INT=$(expr "$CFG_UPDATE_INT" + 10) CFG_UPDATE_INT=$(expr "$CFG_UPDATE_INT" + 10)
sleep 600 sleep 600 99>&-
done 2>/dev/null done 2>/dev/null
@@ -312,9 +312,22 @@ function applyDecision(t, d) {
if (d.breakCol !== -1) markBreakColumn(t, t.querySelectorAll('.tr'), d.breakCol); if (d.breakCol !== -1) markBreakColumn(t, t.querySelectorAll('.tr'), d.breakCol);
} }
/* A first cell with no break opportunity (no space, no hyphen: "/dev/mtdblock6") is marked so a carded half-cell can
* widen to it: CSS cannot tell a token from a phrase, and `anywhere` cut it mid-word at 94-106px.
* textContent reads no layout; the class is a function of the text, so a poll's identical copy gets
* the same answer, and an unchanged mark is not rewritten (no mutation for the observers). */
function markTokenCells(t) {
t.querySelectorAll('.tr > .td:first-child').forEach((c) => {
const txt = c.textContent.trim();
const on = !!txt && !(/[\s\u002d\u00ad\u2010-\u2014]/).test(txt);
if (c.classList.contains('fs-td-token') !== on) c.classList.toggle('fs-td-token', on);
});
}
function fitTables() { function fitTables() {
let cw; let cw;
document.querySelectorAll(stackables()).forEach((t) => { document.querySelectorAll(stackables()).forEach((t) => {
markTokenCells(t);
if (fit.scrolling() && t.classList.contains('fs-fitted')) { if (fit.scrolling() && t.classList.contains('fs-fitted')) {
if (t._fsBreakCol >= 0) markBreakColumn(t, t.querySelectorAll('.tr'), t._fsBreakCol); if (t._fsBreakCol >= 0) markBreakColumn(t, t.querySelectorAll('.tr'), t._fsBreakCol);
return; return;
@@ -560,6 +573,8 @@ function wireTypeahead() {
return baseclass.extend({ return baseclass.extend({
/* test-only: the slot-cache key, driven directly */ /* test-only: the slot-cache key, driven directly */
shapeOf, /* fs:probe */ shapeOf, /* fs:probe */
/* test-only: the token-cell predicate */
markTokenCells, /* fs:probe */
__init__() { __init__() {
wireTypeahead(); wireTypeahead();
@@ -374,6 +374,10 @@
.table.fs-stacked .td:not(.cbi-section-actions):not([class*="col-"]):not(:has(.cbi-progressbar)) { .table.fs-stacked .td:not(.cbi-section-actions):not([class*="col-"]):not(:has(.cbi-progressbar)) {
flex: 1 1 50% !important; flex: 1 1 50% !important;
} }
/* a first cell that is one token (fs-select.js): "/dev/mtdblock6" is 110px, the half-split left
* 94-106px at 360-390 and `anywhere` cut it mid-word. fit-content of one token is the token,
* capped at the row, so a 64-char hash still breaks inside the card; a phrase keeps its half. */
.table.fs-stacked .tr > .td.fs-td-token:first-child:not(.cbi-section-actions):not([class*="col-"]) { min-width: fit-content; }
/* a meter takes the whole line — its own title prints over the cell's caption otherwise */ /* a meter takes the whole line — its own title prints over the cell's caption otherwise */
.table.fs-stacked .td:has(.cbi-progressbar) { flex: 1 1 100% !important; } .table.fs-stacked .td:has(.cbi-progressbar) { flex: 1 1 100% !important; }