Skip to content

Commit

Permalink
update 2024-11-19 09:38:06
Browse files Browse the repository at this point in the history
  • Loading branch information
kenzok8 committed Nov 19, 2024
1 parent 164311d commit 3562b6d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion luci-app-nekobox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk

PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekobox>
PKG_NAME:=luci-app-nekobox
PKG_VERSION:=1.5.2
PKG_VERSION:=1.5.3
PKG_RELEASE:=cn

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
Expand Down
8 changes: 4 additions & 4 deletions luci-app-nekobox/htdocs/nekobox/assets/img/curent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions luci-app-nekobox/htdocs/nekobox/fetch_logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
$file = $_GET['file'] ?? '';
$max_lines = 100;
$max_chars = 1000000;
$max_line_length = 300;

if (array_key_exists($file, $allowed_files)) {
$file_path = $allowed_files[$file];

if (file_exists($file_path)) {
$lines = file($file_path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$lines = array_filter($lines, function($line) use ($max_line_length) {
return strlen($line) <= $max_line_length;
});

$content = implode(PHP_EOL, $lines);

Expand Down
5 changes: 4 additions & 1 deletion luci-app-nekobox/htdocs/nekobox/ping.php
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,14 @@ function clearOldCache() {

document.getElementById('d-ip').innerHTML = simpleDisplay;
document.getElementById('ipip').innerHTML = locationInfo;
$("#flag").attr("src", _IMG + "flags/" + (data.country_code || 'unknown').toLowerCase() + ".png");
const countryCode = data.country_code || 'unknown';
const flagSrc = (countryCode !== 'unknown') ? _IMG + "flags/" + countryCode.toLowerCase() + ".png" : './assets/neko/flags/mo.png';
$("#flag").attr("src", flagSrc);

} catch (error) {
console.error("Error in updateUI:", error);
document.getElementById('d-ip').innerHTML = "更新 IP 信息失败";
$("#flag").attr("src", "./assets/neko/flags/mo.png");
}
},

Expand Down
2 changes: 1 addition & 1 deletion luci-app-nekobox/root/etc/neko/core/neko
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ url_core="https://github.com/Thaolga/neko/releases/download/core_neko"
url_geo="https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest"

neko_ver(){
neko_version="1.5.2"
neko_version="1.5.3"
}

logs() {
Expand Down

0 comments on commit 3562b6d

Please sign in to comment.