fix: correct know file issues
Some checks are pending
Docker Build and Publish / build (push) Waiting to run

This commit is contained in:
xboard 2025-01-09 10:08:05 +08:00
parent d5c24ed3d1
commit 3efdeaa9c9
14 changed files with 137 additions and 158 deletions

View File

@ -28,7 +28,7 @@ Xboard New是基于Xboard二次开发重写后台管理并优化系统架构
使用以下命令快速部署并体验 Xboard基于 Docker + SQLite
```bash
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard && \
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard && \
cd Xboard && \
docker compose run -it --rm \
-e enable_sqlite=true \

View File

@ -108,6 +108,7 @@ class ConfigController extends Controller
'default_remind_expire' => (bool) admin_setting('default_remind_expire', 1),
'default_remind_traffic' => (bool) admin_setting('default_remind_traffic', 1),
'remind_mail_enable' => (bool) admin_setting('remind_mail_enable', false),
'subscribe_path' => admin_setting('subscribe_path', 's'),
],
'frontend' => [

View File

@ -45,6 +45,7 @@ class ConfigSave extends FormRequest
'show_info_to_server_enable' => '',
'show_protocol_to_server_enable' => '',
'remind_mail_enable' => '',
'subscribe_path' => '',
// server
'server_token' => 'nullable|min:16',
'server_pull_interval' => 'integer',

View File

@ -12,21 +12,21 @@ class StaffRoute
'middleware' => 'staff'
], function ($router) {
// Ticket
$router->get ('/ticket/fetch', 'V1\\Staff\\TicketController@fetch');
$router->post('/ticket/reply', 'V1\\Staff\\TicketController@reply');
$router->post('/ticket/close', 'V1\\Staff\\TicketController@close');
// User
$router->post('/user/update', 'V1\\Staff\\UserController@update');
$router->get ('/user/getUserInfoById', 'V1\\Staff\\UserController@getUserInfoById');
$router->post('/user/sendMail', 'V1\\Staff\\UserController@sendMail');
$router->post('/user/ban', 'V1\\Staff\\UserController@ban');
// Plan
$router->get ('/plan/fetch', 'V1\\Staff\\PlanController@fetch');
// Notice
$router->get ('/notice/fetch', 'V1\\Admin\\NoticeController@fetch');
$router->post('/notice/save', 'V1\\Admin\\NoticeController@save');
$router->post('/notice/update', 'V1\\Admin\\NoticeController@update');
$router->post('/notice/drop', 'V1\\Admin\\NoticeController@drop');
// $router->get ('/ticket/fetch', 'V1\\Staff\\TicketController@fetch');
// $router->post('/ticket/reply', 'V1\\Staff\\TicketController@reply');
// $router->post('/ticket/close', 'V1\\Staff\\TicketController@close');
// // User
// $router->post('/user/update', 'V1\\Staff\\UserController@update');
// $router->get ('/user/getUserInfoById', 'V1\\Staff\\UserController@getUserInfoById');
// $router->post('/user/sendMail', 'V1\\Staff\\UserController@sendMail');
// $router->post('/user/ban', 'V1\\Staff\\UserController@ban');
// // Plan
// $router->get ('/plan/fetch', 'V1\\Staff\\PlanController@fetch');
// // Notice
// $router->get ('/notice/fetch', 'V1\\Admin\\NoticeController@fetch');
// $router->post('/notice/save', 'V1\\Admin\\NoticeController@save');
// $router->post('/notice/update', 'V1\\Admin\\NoticeController@update');
// $router->post('/notice/drop', 'V1\\Admin\\NoticeController@drop');
});
}
}

View File

@ -87,51 +87,6 @@ class AdminRoute
$router->post('/sort', [ManageController::class, 'sort']);
});
$router->group([
'prefix' => 'server/trojan'
], function ($router) {
$router->post('save', [TrojanController::class, 'save']);
$router->post('drop', [TrojanController::class, 'drop']);
$router->post('update', [TrojanController::class, 'update']);
$router->post('copy', [TrojanController::class, 'copy']);
});
$router->group([
'prefix' => 'server/vmess'
], function ($router) {
$router->post('save', [VmessController::class, 'save']);
$router->post('drop', [VmessController::class, 'drop']);
$router->post('update', [VmessController::class, 'update']);
$router->post('copy', [VmessController::class, 'copy']);
});
$router->group([
'prefix' => 'server/shadowsocks'
], function ($router) {
$router->post('save', [ShadowsocksController::class, 'save']);
$router->post('drop', [ShadowsocksController::class, 'drop']);
$router->post('update', [ShadowsocksController::class, 'update']);
$router->post('copy', [ShadowsocksController::class, 'copy']);
});
$router->group([
'prefix' => 'server/hysteria'
], function ($router) {
$router->post('save', [HysteriaController::class, 'save']);
$router->post('drop', [HysteriaController::class, 'drop']);
$router->post('update', [HysteriaController::class, 'update']);
$router->post('copy', [HysteriaController::class, 'copy']);
});
$router->group([
'prefix' => 'server/vless'
], function ($router) {
$router->post('save', [VlessController::class, 'save']);
$router->post('drop', [VlessController::class, 'drop']);
$router->post('update', [VlessController::class, 'update']);
$router->post('copy', [VlessController::class, 'copy']);
});
// Order
$router->group([
'prefix' => 'order'

View File

@ -13,6 +13,7 @@ class ThemeService
private const THEME_DIR = 'theme/';
private const CONFIG_FILE = 'config.json';
private const SETTING_PREFIX = 'theme_';
private const CANNOT_DELETE_THEMES = ['Xboard', 'v2board'];
/**
* 获取所有可用主题列表
@ -24,6 +25,7 @@ class ThemeService
->mapWithKeys(function ($dir) {
$name = basename($dir);
$config = $this->readConfigFile($name);
$config['can_delete'] = !in_array($name, self::CANNOT_DELETE_THEMES) && $name != admin_setting('current_theme');
return $config ? [$name => $config] : [];
})->toArray();
}
@ -129,7 +131,7 @@ class ThemeService
*/
public function delete(string $theme): bool
{
if ($theme === admin_setting('current_theme') || in_array($theme, ['Xboard', 'v2board'])) {
if ($theme === admin_setting('current_theme') || in_array($theme, self::CANNOT_DELETE_THEMES)) {
throw new Exception('Cannot delete active theme');
}

View File

@ -166,7 +166,7 @@ return new class extends Migration {
'rate' => (int) $server->rate,
'tags' => $server->tags ?: "[]",
'host' => $server->host,
'port' => (int) $server->port,
'port' => $server->port,
'server_port' => $server->server_port,
'protocol_settings' => json_encode([
'version' => $server->version,

View File

@ -62,7 +62,7 @@ apt update && apt install -y git
yum update && yum install -y git
# 克隆代码
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard ./
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard ./
# 安装依赖并初始化
docker compose run -it --rm web php artisan xboard:install

View File

@ -17,7 +17,7 @@ systemctl start docker
1. 获取项目文件:
```bash
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard
cd Xboard
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -14,7 +14,6 @@ use Illuminate\Http\Request;
|
*/
Route::get('/s/{token}', [\App\Http\Controllers\V1\Client\ClientController::class, 'subscribe'])->middleware('client')->name('client.subscribe');
Route::get('/', function (Request $request) {
if (admin_setting('app_url') && admin_setting('safe_mode_enable', 0)) {
@ -53,3 +52,7 @@ Route::get('/' . admin_setting('secure_path', admin_setting('frontend_admin_path
'secure_path' => admin_setting('secure_path', admin_setting('frontend_admin_path', hash('crc32b', config('app.key'))))
]);
});
Route::get('/' . (admin_setting('subscribe_path', 's')) . '/{token}', [\App\Http\Controllers\V1\Client\ClientController::class, 'subscribe'])
->middleware('client')
->name('client.subscribe');

View File

@ -1,33 +1,35 @@
{
"name": "Xboard",
"description": "Xboard",
"version": "1.0.0",
"images": "",
"configs": [
{
"label": "主题色",
"placeholder": "请选择主题颜色",
"field_name": "theme_color",
"field_type": "select",
"select_options": {
"default": "默认(绿色)",
"blue": "蓝色",
"black": "黑色",
"darkblue": "暗蓝色"
},
"default_value": "default"
},
{
"label": "背景",
"placeholder": "请输入背景图片URL",
"field_name": "background_url",
"field_type": "input"
},
{
"label": "自定义页脚HTML",
"placeholder": "可以实现客服JS代码的加入等",
"field_name": "custom_html",
"field_type": "textarea"
}
]
"name": "Xboard",
"description": "Xboard",
"version": "1.0.0",
"images": [
"https://raw.githubusercontent.com/cedar2025/Xboard/new/docs/images/dashboard.png"
],
"configs": [
{
"label": "主题色",
"placeholder": "请选择主题颜色",
"field_name": "theme_color",
"field_type": "select",
"select_options": {
"default": "默认(绿色)",
"blue": "蓝色",
"black": "黑色",
"darkblue": "暗蓝色"
},
"default_value": "default"
},
{
"label": "背景",
"placeholder": "请输入背景图片URL",
"field_name": "background_url",
"field_type": "input"
},
{
"label": "自定义页脚HTML",
"placeholder": "可以实现客服JS代码的加入等",
"field_name": "custom_html",
"field_type": "textarea"
}
]
}