mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-06 20:50:01 +00:00
Fixed #234 & 通用配置用户权限未被正确判断的BUG
This commit is contained in:
@@ -116,7 +116,7 @@ class AdminController extends Controller
|
||||
|
||||
public function config()
|
||||
{
|
||||
return view('admin.config.config', [
|
||||
return view('admin.config.common', [
|
||||
'methods' => SsConfig::type(1)->get(),
|
||||
'protocols' => SsConfig::type(2)->get(),
|
||||
'categories' => GoodsCategory::all(),
|
||||
|
||||
@@ -37,7 +37,7 @@ class NodeRequest extends FormRequest
|
||||
'single' => 'required|boolean',
|
||||
'port' => 'required_unless:single,0|numeric|between:1,65535|different:push_port',
|
||||
'passwd' => 'exclude_unless:type,1,type,4|required_if:single,1|string|nullable',
|
||||
'v2_alter_id' => 'required_if:type,2|numeric|between:0,65535',
|
||||
'v2_alter_id' => 'nullable|numeric|between:0,65535',
|
||||
'v2_method' => 'required_if:type,2',
|
||||
'v2_net' => 'required_if:type,2',
|
||||
'v2_type' => 'required_if:type,2',
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* ┌─────────────────────────────────────────┐
|
||||
* │ BobVPN │
|
||||
* ├─────────────────────────────────────────┤
|
||||
* │ Copyright © 2021 (https://t.me/Bobs9) │
|
||||
* └─────────────────────────────────────────┘
|
||||
*/
|
||||
|
||||
return [
|
||||
// 登录页面配置
|
||||
'login' => [
|
||||
'telegram_url' => '', // 留空的话则不展示telegram群
|
||||
'qq_url' => '', // 留空的话则不展示QQ群
|
||||
'background_img' => 'https://demo.proxypanel.cf/assets/images/logo64.png', // 背景图片地址,图片宽高不超过 860px * 544px 就行 (留空为默认的背景图)
|
||||
'text' => '一键开启<br>极速上网体验',
|
||||
'text_color' => 'rgba(255, 255, 255, 0.8);', // 文字和按钮颜色 默认颜色 rgba(255, 255, 255, 0.8);
|
||||
'button_color' => '#8077f1', // 文字和按钮颜色 默认颜色:#8077f1(v2版本配置)
|
||||
],
|
||||
|
||||
// PC端消息中心图片和跳转链接
|
||||
'message' => [
|
||||
'background_img' => 'https://malus.s3cdn.net/uploads/malus_user-guide.jpg', // 背景图片地址
|
||||
'url' => 'https://www.goole.com', // 跳转链接
|
||||
],
|
||||
|
||||
// Crisp在线客服
|
||||
'crisp_enable' => false, // 是否开启
|
||||
'crisp_id' => '', // Crisp 的网站ID
|
||||
|
||||
// 弹窗公告
|
||||
'notice' => [
|
||||
'is_start' => true, // 是否开启弹窗公告
|
||||
'title' => '最新公告', // 标题
|
||||
'content' => '<strong>这是最新 <i>公告</i> 内容</strong>', // 公告内容,可以为html格式,也可以纯文本
|
||||
],
|
||||
|
||||
// PC端菜单栏显示控制
|
||||
'menu' => [
|
||||
'shop' => true, // 会员
|
||||
'user' => true, // 我的
|
||||
'gift' => true, // 邀请
|
||||
],
|
||||
|
||||
// 检查用户计算机时间
|
||||
'check_time' => [
|
||||
'is_check' => true, // 是否开启检查
|
||||
'differ_time' => 90, // 相差多少秒提示
|
||||
'warning_text' => '请校准系统时间为北京时间,否则会导致无法上网!', // 提示内容
|
||||
],
|
||||
|
||||
// 个人中心头像
|
||||
'user_avatar' => 'https://demo.proxypanel.cf/assets/images/avatar.svg',
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
@@ -461,7 +461,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
@canany(['admin.config.filter.index', 'admin.config', 'admin.system.index'])
|
||||
@canany(['admin.config.filter.index', 'admin.config.index', 'admin.system.index'])
|
||||
<li class="site-menu-item has-sub {{request()->routeIs('admin.config.*', 'admin.system.index') ? 'active open' : ''}}">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="site-menu-icon wb-settings" aria-hidden="true"></i>
|
||||
@@ -475,9 +475,9 @@
|
||||
</a>
|
||||
</li>
|
||||
@endcan
|
||||
@can('admin.config')
|
||||
@can('admin.config.index')
|
||||
<li class="site-menu-item {{request()->routeIs('admin.config.common.*') ? 'active open' : ''}}">
|
||||
<a href="{{route('admin.config')}}">
|
||||
<a href="{{route('admin.config.index')}}">
|
||||
<span class="site-menu-title">通用配置</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
<div class="v2ray-setting">
|
||||
<div class="form-group row">
|
||||
<label for="v2_alter_id" class="col-md-3 col-form-label">额外ID</label>
|
||||
<input type="text" class="form-control col-md-4" name="v2_alter_id" value="16" id="v2_alter_id" required/>
|
||||
<input type="text" class="form-control col-md-4" name="v2_alter_id" value="16" id="v2_alter_id"/>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="v2_port" class="col-md-3 col-form-label">服务端口</label>
|
||||
@@ -337,8 +337,9 @@
|
||||
<div class="form-group row">
|
||||
<label for="v2_method" class="col-md-3 col-form-label">加密方式</label>
|
||||
<select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="col-md-5 form-control" id="v2_method">
|
||||
<option value="auto">auto</option>
|
||||
<option value="none">none</option>
|
||||
<option value="auto">auto</option>
|
||||
<option value="aes-128-cfb">aes-128-cfb</option>
|
||||
<option value="aes-128-gcm">aes-128-gcm</option>
|
||||
<option value="chacha20-poly1305">chacha20-poly1305</option>
|
||||
</select>
|
||||
@@ -348,9 +349,9 @@
|
||||
<label for="v2_net" class="col-md-3 col-form-label">传输方式</label>
|
||||
<select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="col-md-5 form-control" id="v2_net">
|
||||
<option value="tcp">TCP</option>
|
||||
<option value="kcp">mKCP</option>
|
||||
<option value="ws">WebSocket</option>
|
||||
<option value="http">HTTP/2</option>
|
||||
<option value="ws">WebSocket</option>
|
||||
<option value="kcp">mKCP</option>
|
||||
<option value="domainsocket">DomainSocket</option>
|
||||
<option value="quic">QUIC</option>
|
||||
</select>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<span class="pricing-period">/ {{$goods->days.trans_choice('validation.attributes.day', 1)}}</span>
|
||||
@endif
|
||||
</div>
|
||||
@if($goods->info)
|
||||
@if($goods->description)
|
||||
<p class="px-30 pb-25 text-center">{{$goods->description}}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Route::prefix('admin')->name('admin.')->group(function () {
|
||||
Route::get('/', 'AdminController@index')->name('index'); // 后台首页
|
||||
Route::get('config', 'AdminController@config')->name('config'); // 系统设置
|
||||
Route::get('config', 'AdminController@config')->name('config.index'); // 系统通用配置
|
||||
Route::get('invite', 'AdminController@inviteList')->name('invite.index'); // 邀请码列表
|
||||
Route::post('invite', 'AdminController@makeInvite')->name('invite.create'); // 生成邀请码
|
||||
Route::get('Invite/export', 'AdminController@exportInvite')->name('invite.export'); // 导出邀请码
|
||||
|
||||
Reference in New Issue
Block a user