mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-07 07:56:40 +08:00
🛸 Sync 2024-09-19 20:35:10
This commit is contained in:
parent
b30b45fe2d
commit
f9b41f04b4
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cloudflared
|
||||
PKG_VERSION:=2024.4.1
|
||||
PKG_RELEASE:=15
|
||||
PKG_RELEASE:=16
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)?
|
||||
|
@ -53,4 +53,5 @@ reload_service() {
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
procd_add_interface_trigger "interface.*.up" "wan" /etc/init.d/cloudflared restart
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekoclash>
|
||||
PKG_NAME:=luci-app-nekoclash
|
||||
PKG_VERSION:=1.3.3
|
||||
PKG_RELEASE:=38
|
||||
PKG_VERSION:=1.3.4
|
||||
PKG_RELEASE:=39
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
@ -168,6 +168,7 @@ $lang = $_GET['lang'] ?? 'en';
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.img-con {
|
||||
@ -577,8 +578,9 @@ function stopSingbox() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function logToFile($filePath, $message) {
|
||||
$timestamp = date('Y-m-d H:i:s');
|
||||
$timestamp = date('H:i:s');
|
||||
file_put_contents($filePath, "[$timestamp] $message\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
@ -654,7 +656,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
function readLogFile($filePath) {
|
||||
if (file_exists($filePath)) {
|
||||
return nl2br(htmlspecialchars(readRecentLogLines($filePath, 1000)));
|
||||
return nl2br(htmlspecialchars(readRecentLogLines($filePath, 1000), ENT_NOQUOTES));
|
||||
} else {
|
||||
return '日志文件不存在。';
|
||||
}
|
||||
@ -666,8 +668,8 @@ $singboxLogContent = readLogFile($singBoxLogFile);
|
||||
$singboxStartLogContent = readLogFile($singboxStartLogFile);
|
||||
?>
|
||||
|
||||
<div class="container container-bg border border-3 col-12 mb-4">
|
||||
<h2 class="text-center p-2">NekoClash 控制面板</h2>
|
||||
<div class="container container-bg border border-3 col-12 mb-4 p-1">
|
||||
<h2 class="text-center p-1">NekoClash 控制面板</h2>
|
||||
<table class="table table-borderless mb-2">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -815,23 +817,34 @@ $singboxStartLogContent = readLogFile($singboxStartLogFile);
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
.log-section {
|
||||
border: 2px solid #c0c0c0;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.log-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
.log-header {
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.log-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
pre.form-control {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
@ -843,15 +856,13 @@ $singboxStartLogContent = readLogFile($singboxStartLogFile);
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.log-section {
|
||||
margin-bottom: 20px;
|
||||
border: 2px solid #c0c0c0;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
.log-footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
.nav-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-top: 20px;
|
||||
@ -912,13 +923,18 @@ $singboxStartLogContent = readLogFile($singboxStartLogFile);
|
||||
border-color: #bd2130;
|
||||
}
|
||||
footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.nav-buttons a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
.log-section {
|
||||
margin-bottom: 20px;
|
||||
margin-right: 0;
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
.d-flex {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -926,42 +942,45 @@ $singboxStartLogContent = readLogFile($singboxStartLogFile);
|
||||
<body>
|
||||
<div class="container container-bg border border-3 rounded-4 col-12 mb-4">
|
||||
<h2 class="text-center p-2">日志</h2>
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">插件日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($logContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_plugin_log" class="btn btn-danger btn-clear-log">清空插件日志</button>
|
||||
</form>
|
||||
<div class="d-flex flex-wrap">
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">插件日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($logContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_plugin_log" class="btn btn-danger btn-clear-log">清空插件日志</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">Mihomo 日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($kernelLogContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_kernel_log" class="btn btn-danger btn-clear-log">清空 Mihomo 日志</button>
|
||||
</form>
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">Mihomo 日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($kernelLogContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_kernel_log" class="btn btn-danger btn-clear-log">清空 Mihomo 日志</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">Sing-box 日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($singboxLogContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_singbox_log" class="btn btn-danger btn-clear-log">清空 Sing-box 日志</button>
|
||||
</form>
|
||||
<div class="log-section">
|
||||
<div class="log-container">
|
||||
<h4 class="log-header">Sing-box 日志</h4>
|
||||
<pre class="form-control"><?php echo htmlspecialchars($singboxLogContent, ENT_QUOTES, 'UTF-8'); ?></pre>
|
||||
<form action="index.php" method="post" class="mt-3 log-footer">
|
||||
<button type="submit" name="clear_singbox_log" class="btn btn-danger btn-clear-log">清空 Sing-box 日志</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container container-bg border border-3 rounded-4 col-12 mb-4 d-flex align-items-center justify-content-center" style="height: 100%;">
|
||||
<div class="nav-buttons text-center" style="height: 100%;">
|
||||
<a href="/nekoclash/mon.php" class="config-menu-button d-block mb-2" onclick="speakAndNavigate('打开Mihomo 管理面板', '/nekoclash/mon.php'); return false;">打开Mihomo 管理面板</a>
|
||||
</div>
|
||||
<div class="container container-bg border border-3 rounded-4 col-12 mb-4 d-flex justify-content-center" style="height: 60px;">
|
||||
<div class="nav-buttons d-flex justify-content-center align-items-center" style="height: 100%;">
|
||||
<a href="/nekoclash/mon.php" class="config-menu-button d-flex justify-content-center align-items-center" style="height: 40px; line-height: 40px; margin-top: -28px;" onclick="speakAndNavigate('打开Mihomo 管理面板', '/nekoclash/mon.php'); return false;">
|
||||
打开Mihomo 管理面板
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/www/nekoclash/assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
function speakAndNavigate(message, url) {
|
||||
speakMessage(message);
|
||||
|
@ -18,6 +18,7 @@ if (!is_dir($configDir)) {
|
||||
mkdir($configDir, 0755, true);
|
||||
}
|
||||
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if (isset($_FILES['fileInput'])) {
|
||||
$file = $_FILES['fileInput'];
|
||||
@ -986,7 +987,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if (isset($fileContent)): ?>
|
||||
<?php if (isset($fileContent)): ?>
|
||||
<?php if (isset($_POST['editFile'])): ?>
|
||||
<?php $fileToEdit = ($_POST['fileType'] === 'proxy') ? $uploadDir . basename($_POST['editFile']) : $configDir . basename($_POST['editFile']); ?>
|
||||
<h2 class="mt-5">编辑文件: <?php echo $editingFileName; ?></h2>
|
||||
@ -1019,7 +1020,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<button type="submit" class="btn btn-primary mt-2" onclick="syncEditorContent()"><i class="fas fa-save"></i> 保存内容</button>
|
||||
</form>
|
||||
|
||||
<div id="aceEditorError" style="color: red; font-weight: bold; margin-top: 10px;"></div>
|
||||
<div id="aceEditorError" class="error-popup d-none">
|
||||
<span id="aceEditorErrorMessage"></span>
|
||||
<button id="closeErrorPopup">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@ -1115,15 +1119,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
aceEditor.setTheme("ace/theme/monokai");
|
||||
aceEditor.session.setMode("ace/mode/yaml");
|
||||
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
function setDefaultFontSize() {
|
||||
var defaultFontSize = '20px';
|
||||
document.getElementById('basicEditor').style.fontSize = defaultFontSize;
|
||||
aceEditor.setFontSize(defaultFontSize);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', setDefaultFontSize);
|
||||
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
|
||||
aceEditor.session.on('change', function() {
|
||||
try {
|
||||
jsyaml.load(aceEditor.getValue());
|
||||
document.getElementById('aceEditorError').innerText = '';
|
||||
jsyaml.load(aceEditor.getValue());
|
||||
hideErrorPopup();
|
||||
} catch (e) {
|
||||
var errorLine = e.mark ? e.mark.line + 1 : '未知';
|
||||
document.getElementById('aceEditorError').innerText = 'YAML 语法错误 (行 ' + errorLine + '): ' + e.message;
|
||||
var errorLine = e.mark ? e.mark.line + 1 : '未知';
|
||||
showErrorPopup('YAML 语法错误 (行 ' + errorLine + '): ' + e.message);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1144,11 +1156,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
var editorContainer = document.getElementById('aceEditorContainer');
|
||||
if (!document.fullscreenElement) {
|
||||
editorContainer.requestFullscreen().then(function() {
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
enableFullScreenMode();
|
||||
});
|
||||
} else {
|
||||
document.exitFullscreen().then(function() {
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
disableFullScreenMode();
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -1167,6 +1181,35 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
document.getElementById('basicEditor').style.fontSize = newFontSize;
|
||||
});
|
||||
|
||||
function enableFullScreenMode() {
|
||||
document.getElementById('aceEditorContainer').classList.add('fullscreen');
|
||||
document.getElementById('aceEditorError').classList.add('fullscreen-popup');
|
||||
document.getElementById('fullscreenCancelButton').classList.remove('d-none');
|
||||
}
|
||||
|
||||
function disableFullScreenMode() {
|
||||
document.getElementById('aceEditorContainer').classList.remove('fullscreen');
|
||||
document.getElementById('aceEditorError').classList.remove('fullscreen-popup');
|
||||
document.getElementById('fullscreenCancelButton').classList.add('d-none');
|
||||
}
|
||||
|
||||
function showErrorPopup(message) {
|
||||
var errorPopup = document.getElementById('aceEditorError');
|
||||
var errorMessage = document.getElementById('aceEditorErrorMessage');
|
||||
errorMessage.innerText = message;
|
||||
errorPopup.classList.remove('d-none');
|
||||
}
|
||||
|
||||
function hideErrorPopup() {
|
||||
var errorPopup = document.getElementById('aceEditorError');
|
||||
errorPopup.classList.add('d-none');
|
||||
}
|
||||
|
||||
document.getElementById('closeErrorPopup').addEventListener('click', function() {
|
||||
hideErrorPopup();
|
||||
});
|
||||
|
||||
|
||||
(function() {
|
||||
const resizable = document.querySelector('.resizable');
|
||||
if (!resizable) return;
|
||||
@ -1184,7 +1227,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
function onMouseMove(e) {
|
||||
resizable.style.width = e.clientX - resizable.getBoundingClientRect().left + 'px';
|
||||
resizable.style.height = e.clientY - resizable.getBoundingClientRect().top + 'px';
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
}
|
||||
|
||||
function onMouseUp() {
|
||||
@ -1197,7 +1240,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
<style>
|
||||
.btn--warning {
|
||||
background-color: #ff9800;
|
||||
color: white; !important;
|
||||
color: white !important;
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 5px;
|
||||
@ -1237,6 +1280,37 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.fullscreen-popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
#aceEditorError button {
|
||||
margin-top: 10px;
|
||||
padding: 5px 10px;
|
||||
background-color: #ff6666;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
textarea.editor {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.ace_editor {
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@ -516,34 +516,35 @@ if (isset($_POST['update_index'])) {
|
||||
|
||||
<div class="btn-group mb-3">
|
||||
<button type="button" class="btn btn-primary" id="toggleBasicEditor">普通编辑器</button>
|
||||
<button type="button" class="btn btn--warning" id="toggleAceEditor">高级编辑器</button>
|
||||
<button type="button" class="btn btn-warning" id="toggleAceEditor">高级编辑器</button>
|
||||
<button type="button" class="btn btn-info" id="toggleFullScreenEditor">全屏编辑</button>
|
||||
</div>
|
||||
|
||||
<div class="editor-container">
|
||||
<div class="form-group d-none" id="fontSizeContainer">
|
||||
<label for="fontSize">字体大小</label>
|
||||
<select id="fontSize" class="form-control">
|
||||
<option value="12px">12px</option>
|
||||
<option value="14px">14px</option>
|
||||
<option value="16px">16px</option>
|
||||
<option value="18px">18px</option>
|
||||
<option value="20px" selected>20px</option>
|
||||
<option value="22px">22px</option>
|
||||
<option value="24px">24px</option>
|
||||
<option value="26px">26px</option>
|
||||
</select>
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<textarea name="saveContent" id="basicEditor" class="editor"><?php echo $fileContent; ?></textarea><br>
|
||||
|
||||
<div id="aceEditorContainer" class="d-none resizable" style="height: 400px; width: 100%;"></div>
|
||||
|
||||
<div id="fontSizeContainer" class="d-none mb-3">
|
||||
<label for="fontSizeSelector">字体大小:</label>
|
||||
<select id="fontSizeSelector" class="form-control" style="width: auto; display: inline-block;">
|
||||
<option value="18px">18px</option>
|
||||
<option value="20px">20px</option>
|
||||
<option value="24px">24px</option>
|
||||
<option value="26px">26px</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="fileName" value="<?php echo htmlspecialchars($_POST['editFile']); ?>">
|
||||
<input type="hidden" name="fileType" value="<?php echo htmlspecialchars($_POST['fileType']); ?>">
|
||||
<button type="submit" class="btn btn-primary mt-2" onclick="syncEditorContent()"><i class="fas fa-save"></i> 保存内容</button>
|
||||
</form>
|
||||
<div id="aceEditorError"></div>
|
||||
|
||||
<div id="aceEditorError" class="error-popup d-none">
|
||||
<span id="aceEditorErrorMessage"></span>
|
||||
<button id="closeErrorPopup">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@ -553,7 +554,6 @@ if (isset($_POST['update_index'])) {
|
||||
<a href="/nekoclash/upload_sb.php" class="btn btn-success">返回当前菜单</a>
|
||||
<a href="/nekoclash" class="btn btn-success">返回主菜单</a>
|
||||
</div>
|
||||
|
||||
<h1 style="margin-top: 20px; margin-bottom: 20px;">Sing-box 订阅</h1>
|
||||
<?php if ($message): ?>
|
||||
<p><?php echo nl2br(htmlspecialchars($message)); ?></p>
|
||||
@ -624,69 +624,105 @@ if (isset($_POST['update_index'])) {
|
||||
|
||||
var aceEditor = ace.edit("aceEditorContainer");
|
||||
aceEditor.setTheme("ace/theme/monokai");
|
||||
aceEditor.session.setMode("ace/mode/json");
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
|
||||
aceEditor.session.setMode("ace/mode/json");
|
||||
aceEditor.session.setUseWorker(true);
|
||||
aceEditor.getSession().setUseWrapMode(true);
|
||||
|
||||
aceEditor.session.on('changeAnnotation', function(e) {
|
||||
function setDefaultFontSize() {
|
||||
var defaultFontSize = '20px';
|
||||
document.getElementById('basicEditor').style.fontSize = defaultFontSize;
|
||||
aceEditor.setFontSize(defaultFontSize);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', setDefaultFontSize);
|
||||
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
|
||||
aceEditor.session.on('changeAnnotation', function() {
|
||||
var annotations = aceEditor.getSession().getAnnotations();
|
||||
var errorMessage = annotations.length ? annotations[0].text : '';
|
||||
if (errorMessage) {
|
||||
var errorLine = annotations[0].row + 1;
|
||||
document.getElementById('aceEditorError').innerText = 'JSON 语法错误: 行 ' + errorLine + ': ' + errorMessage;
|
||||
if (annotations.length > 0) {
|
||||
var errorMessage = annotations[0].text;
|
||||
var errorLine = annotations[0].row + 1;
|
||||
showErrorPopup('JSON 语法错误: 行 ' + errorLine + ': ' + errorMessage);
|
||||
} else {
|
||||
document.getElementById('aceEditorError').innerText = '';
|
||||
hideErrorPopup();
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('toggleBasicEditor').addEventListener('click', function() {
|
||||
document.getElementById('basicEditor').classList.remove('d-none');
|
||||
document.getElementById('aceEditorContainer').classList.add('d-none');
|
||||
document.getElementById('fontSizeContainer').classList.remove('d-none');
|
||||
document.getElementById('fontSizeContainer').classList.remove('d-none');
|
||||
});
|
||||
|
||||
document.getElementById('toggleAceEditor').addEventListener('click', function() {
|
||||
document.getElementById('basicEditor').classList.add('d-none');
|
||||
document.getElementById('aceEditorContainer').classList.remove('d-none');
|
||||
document.getElementById('fontSizeContainer').classList.add('d-none');
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
});
|
||||
|
||||
document.getElementById('fontSize').addEventListener('change', function() {
|
||||
var selectedSize = this.value;
|
||||
document.getElementById('basicEditor').style.fontSize = selectedSize;
|
||||
aceEditor.setOptions({
|
||||
fontSize: selectedSize
|
||||
});
|
||||
document.getElementById('fontSizeContainer').classList.remove('d-none');
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
});
|
||||
|
||||
document.getElementById('toggleFullScreenEditor').addEventListener('click', function() {
|
||||
var editorContainer = document.getElementById('aceEditorContainer');
|
||||
if (!document.fullscreenElement) {
|
||||
editorContainer.requestFullscreen().then(function() {
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
enableFullScreenMode();
|
||||
});
|
||||
} else {
|
||||
document.exitFullscreen().then(function() {
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
disableFullScreenMode();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function syncEditorContent() {
|
||||
if (!document.getElementById('basicEditor').classList.contains('d-none')) {
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
aceEditor.setValue(document.getElementById('basicEditor').value);
|
||||
} else {
|
||||
document.getElementById('basicEditor').value = aceEditor.getValue();
|
||||
document.getElementById('basicEditor').value = aceEditor.getValue();
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('fontSizeSelector').addEventListener('change', function() {
|
||||
var newFontSize = this.value;
|
||||
aceEditor.setFontSize(newFontSize);
|
||||
document.getElementById('basicEditor').style.fontSize = newFontSize;
|
||||
});
|
||||
|
||||
function enableFullScreenMode() {
|
||||
document.getElementById('aceEditorContainer').classList.add('fullscreen');
|
||||
document.getElementById('aceEditorError').classList.add('fullscreen-popup');
|
||||
document.getElementById('fullscreenCancelButton').classList.remove('d-none');
|
||||
}
|
||||
|
||||
function disableFullScreenMode() {
|
||||
document.getElementById('aceEditorContainer').classList.remove('fullscreen');
|
||||
document.getElementById('aceEditorError').classList.remove('fullscreen-popup');
|
||||
document.getElementById('fullscreenCancelButton').classList.add('d-none');
|
||||
}
|
||||
|
||||
function showErrorPopup(message) {
|
||||
var errorPopup = document.getElementById('aceEditorError');
|
||||
var errorMessage = document.getElementById('aceEditorErrorMessage');
|
||||
errorMessage.innerText = message;
|
||||
errorPopup.classList.remove('d-none');
|
||||
}
|
||||
|
||||
function hideErrorPopup() {
|
||||
var errorPopup = document.getElementById('aceEditorError');
|
||||
errorPopup.classList.add('d-none');
|
||||
}
|
||||
|
||||
document.getElementById('closeErrorPopup').addEventListener('click', function() {
|
||||
hideErrorPopup();
|
||||
});
|
||||
|
||||
(function() {
|
||||
const resizable = document.querySelector('.resizable');
|
||||
if (!resizable) return;
|
||||
|
||||
|
||||
const handle = document.createElement('div');
|
||||
handle.className = 'resize-handle';
|
||||
resizable.appendChild(handle);
|
||||
@ -700,7 +736,7 @@ if (isset($_POST['update_index'])) {
|
||||
function onMouseMove(e) {
|
||||
resizable.style.width = e.clientX - resizable.getBoundingClientRect().left + 'px';
|
||||
resizable.style.height = e.clientY - resizable.getBoundingClientRect().top + 'px';
|
||||
aceEditor.resize();
|
||||
aceEditor.resize();
|
||||
}
|
||||
|
||||
function onMouseUp() {
|
||||
@ -709,6 +745,7 @@ if (isset($_POST['update_index'])) {
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.btn--warning {
|
||||
background-color: #ff9800;
|
||||
@ -721,10 +758,6 @@ if (isset($_POST['update_index'])) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.btn--warning:hover {
|
||||
background-color: #e68900;
|
||||
}
|
||||
|
||||
.resizable {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@ -756,6 +789,36 @@ if (isset($_POST['update_index'])) {
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.fullscreen-popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
#aceEditorError button {
|
||||
margin-top: 10px;
|
||||
padding: 5px 10px;
|
||||
background-color: #ff6666;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
textarea.editor {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.ace_editor {
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
@ -1 +1 @@
|
||||
1.3.3
|
||||
1.3.4
|
||||
|
@ -28,7 +28,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.3.3"
|
||||
neko_version="1.3.4"
|
||||
}
|
||||
|
||||
logs() {
|
||||
|
@ -8,6 +8,11 @@ LUCI_TITLE:=LuCI for Zerotier
|
||||
LUCI_DEPENDS:=+zerotier +jsonfilter +ucode
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
define Package/luci-app-zerotier/conffiles
|
||||
/etc/config/zero/
|
||||
/etc/config/zerotier
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
20
luci-app-zerotier/root/etc/config/zerotier
Normal file
20
luci-app-zerotier/root/etc/config/zerotier
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
config zerotier sample_config
|
||||
option enabled 0
|
||||
|
||||
# persistent configuration folder (for ZT controller mode)
|
||||
#option config_path '/etc/zerotier'
|
||||
# copy <config_path> to RAM to prevent writing to flash (for ZT controller mode)
|
||||
#option copy_config_path '1'
|
||||
|
||||
#option port '9993'
|
||||
|
||||
# path to the local.conf
|
||||
#option local_conf '/etc/zerotier.conf'
|
||||
|
||||
# Generate secret on first start
|
||||
option secret ''
|
||||
|
||||
# Join a public network called Earth
|
||||
list join '8056c2e21c000001'
|
||||
#list join '<other_network>'
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mihomo
|
||||
PKG_RELEASE:=57
|
||||
PKG_RELEASE:=58
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
|
||||
PKG_SOURCE_DATE:=2024-09-17
|
||||
PKG_SOURCE_VERSION:=fb4d3c41c81c378d7b1c680bf4941cccf9f77ffa
|
||||
PKG_SOURCE_DATE:=2024-09-18
|
||||
PKG_SOURCE_VERSION:=3676d1b79fe8567c9375d3e812f84eb683c8f77d
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
|
||||
PKG_BUILD_VERSION:=alpha-fb4d3c4
|
||||
PKG_BUILD_VERSION:=alpha-3676d1b
|
||||
PKG_BUILD_TIME:=$(shell date -u -Iseconds)
|
||||
|
||||
GO_PKG:=github.com/metacubex/mihomo
|
||||
|
Loading…
Reference in New Issue
Block a user