瀏覽代碼

🗎 Format code & Complete Persian Admin translations with 🤖 Claude2

BrettonYe 2 年之前
父節點
當前提交
7182dd1e89
共有 76 個文件被更改,包括 2828 次插入1669 次删除
  1. 4 3
      app/Http/Controllers/AdminController.php
  2. 3 7
      app/Http/Middleware/TrustProxies.php
  3. 20 20
      app/Models/Node.php
  4. 2 1
      app/Models/User.php
  5. 803 0
      resources/lang/fa/admin.php
  6. 4 2
      resources/views/admin/aff/detail.blade.php
  7. 20 6
      resources/views/admin/aff/index.blade.php
  8. 6 1
      resources/views/admin/aff/invite.blade.php
  9. 20 9
      resources/views/admin/article/index.blade.php
  10. 2 1
      resources/views/admin/article/info.blade.php
  11. 6 1
      resources/views/admin/article/show.blade.php
  12. 162 31
      resources/views/admin/config/common.blade.php
  13. 20 4
      resources/views/admin/config/emailFilter.blade.php
  14. 18 9
      resources/views/admin/config/system.blade.php
  15. 55 96
      resources/views/admin/coupon/create.blade.php
  16. 55 54
      resources/views/admin/coupon/index.blade.php
  17. 8 8
      resources/views/admin/coupon/show.blade.php
  18. 2 1
      resources/views/admin/layouts.blade.php
  19. 3 3
      resources/views/admin/logs/onlineIPMonitor.blade.php
  20. 9 2
      resources/views/admin/logs/order.blade.php
  21. 2 1
      resources/views/admin/logs/traffic.blade.php
  22. 1 1
      resources/views/admin/logs/userTraffic.blade.php
  23. 2 1
      resources/views/admin/marketing/emailList.blade.php
  24. 2 2
      resources/views/admin/marketing/pushList.blade.php
  25. 36 12
      resources/views/admin/node/auth.blade.php
  26. 8 2
      resources/views/admin/node/cert/index.blade.php
  27. 17 6
      resources/views/admin/node/index.blade.php
  28. 11 4
      resources/views/admin/node/info.blade.php
  29. 8 2
      resources/views/admin/permission/index.blade.php
  30. 4 1
      resources/views/admin/report/accounting.blade.php
  31. 44 44
      resources/views/admin/report/userDataAnalysis.blade.php
  32. 8 2
      resources/views/admin/role/index.blade.php
  33. 8 2
      resources/views/admin/rule/group/index.blade.php
  34. 32 6
      resources/views/admin/rule/index.blade.php
  35. 9 2
      resources/views/admin/rule/log.blade.php
  36. 16 5
      resources/views/admin/shop/index.blade.php
  37. 3 3
      resources/views/admin/shop/info.blade.php
  38. 15 13
      resources/views/admin/subscribe/log.blade.php
  39. 20 4
      resources/views/admin/ticket/index.blade.php
  40. 76 76
      resources/views/admin/ticket/reply.blade.php
  41. 6 1
      resources/views/admin/tools/convert.blade.php
  42. 6 1
      resources/views/admin/tools/decompile.blade.php
  43. 52 51
      resources/views/admin/user/export.blade.php
  44. 8 2
      resources/views/admin/user/group/index.blade.php
  45. 191 215
      resources/views/admin/user/index.blade.php
  46. 191 191
      resources/views/admin/user/info.blade.php
  47. 28 24
      resources/views/auth/captcha.blade.php
  48. 3 1
      resources/views/auth/free.blade.php
  49. 10 15
      resources/views/auth/layouts.blade.php
  50. 19 19
      resources/views/auth/login.blade.php
  51. 18 16
      resources/views/auth/maintenance.blade.php
  52. 14 4
      resources/views/auth/register.blade.php
  53. 11 11
      resources/views/auth/safe.blade.php
  54. 3 1
      resources/views/components/system/input-test.blade.php
  55. 1 1
      resources/views/mail/custom.blade.php
  56. 5 5
      resources/views/mail/simpleMarkdown.blade.php
  57. 21 23
      resources/views/user/buy.blade.php
  58. 8 8
      resources/views/user/components/notification.blade.php
  59. 30 30
      resources/views/user/components/payment/default.blade.php
  60. 88 84
      resources/views/user/components/payment/manual.blade.php
  61. 3 3
      resources/views/user/components/payment/stripe.blade.php
  62. 30 18
      resources/views/user/index.blade.php
  63. 6 4
      resources/views/user/invoiceDetail.blade.php
  64. 57 47
      resources/views/user/invoices.blade.php
  65. 6 1
      resources/views/user/knowledge.blade.php
  66. 5 3
      resources/views/user/layouts.blade.php
  67. 112 120
      resources/views/user/nodeList.blade.php
  68. 12 6
      resources/views/user/profile.blade.php
  69. 59 59
      resources/views/user/referral.blade.php
  70. 75 71
      resources/views/user/replyTicket.blade.php
  71. 13 2
      resources/views/user/services.blade.php
  72. 46 34
      resources/views/user/ticketList.blade.php
  73. 11 11
      resources/views/vendor/log-viewer/remark/dashboard.blade.php
  74. 8 14
      resources/views/vendor/log-viewer/remark/layouts.blade.php
  75. 81 81
      resources/views/vendor/log-viewer/remark/logs.blade.php
  76. 47 44
      resources/views/vendor/log-viewer/remark/show.blade.php

+ 4 - 3
app/Http/Controllers/AdminController.php

@@ -16,6 +16,7 @@ use App\Models\ReferralLog;
 use App\Models\SsConfig;
 use App\Models\User;
 use App\Models\UserHourlyDataFlow;
+use DB;
 use Illuminate\Http\JsonResponse;
 use Log;
 use PhpOffice\PhpSpreadsheet\Exception;
@@ -29,7 +30,7 @@ class AdminController extends Controller
     public function index()
     {
         $past = strtotime('-'.sysConfig('expire_days').' days');
-        $dailyTrafficUsage = NodeHourlyDataFlow::whereDate('created_at', date('Y-m-d'))->sum(\DB::raw('u + d'));
+        $dailyTrafficUsage = NodeHourlyDataFlow::whereDate('created_at', date('Y-m-d'))->sum(DB::raw('u + d'));
 
         return view('admin.index', [
             'totalUserCount' => User::count(), // 总用户数
@@ -44,9 +45,9 @@ class AdminController extends Controller
             'flowAbnormalUserCount' => count((new UserHourlyDataFlow)->trafficAbnormal()), // 1小时内流量异常用户
             'nodeCount' => Node::count(),
             'abnormalNodeCount' => Node::whereStatus(0)->count(),
-            'monthlyTrafficUsage' => formatBytes(NodeDailyDataFlow::whereMonth('created_at', date('n'))->sum(\DB::raw('u + d'))),
+            'monthlyTrafficUsage' => formatBytes(NodeDailyDataFlow::whereMonth('created_at', date('n'))->sum(DB::raw('u + d'))),
             'dailyTrafficUsage' => $dailyTrafficUsage ? formatBytes($dailyTrafficUsage) : 0,
-            'totalTrafficUsage' => formatBytes(NodeDailyDataFlow::sum(\DB::raw('u + d'))),
+            'totalTrafficUsage' => formatBytes(NodeDailyDataFlow::sum(DB::raw('u + d'))),
             'totalCredit' => User::where('credit', '<>', 0)->sum('credit') / 100,
             'totalWaitRefAmount' => ReferralLog::whereIn('status', [0, 1])->sum('commission') / 100,
             'todayWaitRefAmount' => ReferralLog::whereIn('status', [0, 1])->whereDate('created_at', date('Y-m-d'))->sum('commission') / 100,

+ 3 - 7
app/Http/Middleware/TrustProxies.php

@@ -13,7 +13,8 @@ class TrustProxies extends Middleware
      * @var array<int, string>|string|null
      */
     protected $proxies = [
-        '173.245.48.0/20', '103.21.244.0/22', '103.22.200.0/22', '103.31.4.0/22', '141.101.64.0/18', '108.162.192.0/18', '190.93.240.0/20', '188.114.96.0/20', '197.234.240.0/22', '198.41.128.0/17', '162.158.0.0/15', '104.16.0.0/13', '104.24.0.0/14', '172.64.0.0/13', '131.0.72.0/22', '2400:cb00::/32', '2606:4700::/32', '2803:f800::/32', '2405:b500::/32', '2405:8100::/32', '2a06:98c0::/29', '2c0f:f248::/32',
+        '173.245.48.0/20', '103.21.244.0/22', '103.22.200.0/22', '103.31.4.0/22', '141.101.64.0/18', '108.162.192.0/18', '190.93.240.0/20', '188.114.96.0/20', '197.234.240.0/22', '198.41.128.0/17', '162.158.0.0/15', '104.16.0.0/13', '104.24.0.0/14',
+        '172.64.0.0/13', '131.0.72.0/22', '2400:cb00::/32', '2606:4700::/32', '2803:f800::/32', '2405:b500::/32', '2405:8100::/32', '2a06:98c0::/29', '2c0f:f248::/32',
     ]; // 以上为 https://www.cloudflare.com/ips-v4 https://www.cloudflare.com/ips-v6 获取的IP 用于在CloudFlare 开启后正确获取用户真实IP
 
     /**
@@ -21,10 +22,5 @@ class TrustProxies extends Middleware
      *
      * @var int
      */
-    protected $headers =
-        Request::HEADER_X_FORWARDED_FOR |
-        Request::HEADER_X_FORWARDED_HOST |
-        Request::HEADER_X_FORWARDED_PORT |
-        Request::HEADER_X_FORWARDED_PROTO |
-        Request::HEADER_X_FORWARDED_AWS_ELB;
+    protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
 }

+ 20 - 20
app/Models/Node.php

@@ -143,6 +143,26 @@ class Node extends Model
         return array_map('trim', explode(',', $ip));
     }
 
+    public function getSSRConfig(): array
+    {
+        return [
+            'id' => $this->id,
+            'method' => $this->profile['method'] ?? '',
+            'protocol' => $this->profile['protocol'] ?? '',
+            'obfs' => $this->profile['obfs'] ?? '',
+            'obfs_param' => $this->profile['obfs_param'] ?? '',
+            'is_udp' => (int) $this->is_udp,
+            'speed_limit' => $this->getRawOriginal('speed_limit'),
+            'client_limit' => $this->client_limit,
+            'single' => isset($this->profile['passwd']) ? 1 : 0,
+            'port' => (string) $this->port,
+            'passwd' => $this->profile['passwd'] ?? '',
+            'push_port' => $this->push_port,
+            'secret' => $this->auth->secret,
+            'redirect_url' => sysConfig('redirect_url'),
+        ];
+    }
+
     protected function typeLabel(): Attribute
     {
         return Attribute::make(
@@ -163,24 +183,4 @@ class Node extends Model
             get: fn () => $this->server ?? $this->ip ?? $this->ipv6,
         );
     }
-
-    public function getSSRConfig(): array
-    {
-        return [
-            'id' => $this->id,
-            'method' => $this->profile['method'] ?? '',
-            'protocol' => $this->profile['protocol'] ?? '',
-            'obfs' => $this->profile['obfs'] ?? '',
-            'obfs_param' => $this->profile['obfs_param'] ?? '',
-            'is_udp' => (int) $this->is_udp,
-            'speed_limit' => $this->getRawOriginal('speed_limit'),
-            'client_limit' => $this->client_limit,
-            'single' => isset($this->profile['passwd']) ? 1 : 0,
-            'port' => (string) $this->port,
-            'passwd' => $this->profile['passwd'] ?? '',
-            'push_port' => $this->push_port,
-            'secret' => $this->auth->secret,
-            'redirect_url' => sysConfig('redirect_url'),
-        ];
-    }
 }

+ 2 - 1
app/Models/User.php

@@ -6,6 +6,7 @@ use App\Casts\data_rate;
 use App\Casts\money;
 use App\Utils\Helpers;
 use App\Utils\QQInfo;
+use DB;
 use Hash;
 use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Database\Eloquent\Factories\HasFactory;
@@ -296,7 +297,7 @@ class User extends Authenticatable
 
     public function recentTrafficUsed()
     {
-        return UserHourlyDataFlow::userRecentUsed($this->id)->sum(\DB::raw('u + d'));
+        return UserHourlyDataFlow::userRecentUsed($this->id)->sum(DB::raw('u + d'));
     }
 
     public function orders(): HasMany

+ 803 - 0
resources/lang/fa/admin.php

@@ -0,0 +1,803 @@
+<?php
+
+declare(strict_types=1);
+
+return [
+    'dashboard' => [
+        'users' => 'تعداد کل کاربران',
+        'available_users' => 'تعداد کاربران فعال',
+        'paid_users' => 'تعداد کاربران پرداخت‌کننده',
+        'active_days_users' => 'کاربران فعال در :days روز گذشته',
+        'inactive_days_users' => 'کاربران غیرفعال بیش از :days روز',
+        'online_users' => 'کاربران آنلاین فعلی',
+        'expiring_users' => 'کاربرانی که به‌زودی منقضی می‌شوند',
+        'overuse_users' => 'کاربران مصرف بالای داده (بیش از 90٪)',
+        'abnormal_users' => 'کاربران با ترافیک غیرعادی در 1 ساعت گذشته',
+        'nodes' => 'تعداد نودها',
+        'maintaining_nodes' => 'نودهای در حال نگهداری',
+        'current_month_traffic_consumed' => 'مصرف ترافیک این ماه',
+        'days_traffic_consumed' => 'مصرف ترافیک در :days روز گذشته',
+        'orders' => 'تعداد کل سفارشات',
+        'online_orders' => 'تعداد سفارشات پرداخت آنلاین',
+        'succeed_orders' => 'تعداد سفارشات پرداخت‌شده',
+        'credit' => 'موجودی کل',
+        'withdrawing_commissions' => 'کمیسیون‌های درحال برداشت',
+        'withdrawn_commissions' => 'کمیسیون‌های برداشت‌شده',
+    ],
+    'action' => [
+        'edit_item' => 'ویرایش :attribute',
+        'add_item' => 'افزودن :attribute',
+    ],
+    'confirm' => [
+        'delete' => [0 => 'حذف :attribute [', 1 => '] را تأیید می‌کنید؟'],
+        'continues' => 'ادامه عملیات را تأیید می‌کنید؟',
+        'export' => 'صدور همه را تأیید می‌کنید؟',
+    ],
+    'user_dashboard' => 'داشبورد کاربر',
+    'menu' => [
+        'dashboard' => 'داشبورد',
+        'user' => [
+            'attribute' => 'کاربران',
+            'list' => 'مدیریت کاربران',
+            'oauth' => 'احراز هویت کاربران',
+            'group' => 'گروه‌های کاربری',
+            'credit_log' => 'تغییرات موجودی',
+            'subscribe' => 'مدیریت اشتراک',
+        ],
+        'rbac' => [
+            'attribute' => 'کنترل دسترسی',
+            'permission' => 'مجوزها',
+            'role' => 'نقش‌ها',
+        ],
+        'customer_service' => [
+            'attribute' => 'پشتیبانی',
+            'ticket' => 'تیکت‌ها',
+            'article' => 'مقالات',
+            'push' => 'اعلان‌ها',
+            'mail' => 'ایمیل',
+        ],
+        'node' => [
+            'attribute' => 'نودها',
+            'list' => 'مدیریت نودها',
+            'auth' => 'مجوزهای API',
+            'cert' => 'گواهی‌نامه‌ها',
+        ],
+        'rule' => [
+            'attribute' => 'قوانین',
+            'list' => 'لیست قوانین',
+            'group' => 'گروه قوانین',
+            'trigger' => 'رکوردهای فعال‌سازی',
+        ],
+        'shop' => [
+            'attribute' => 'فروشگاه',
+            'goods' => 'محصولات',
+            'coupon' => 'کوپن‌ها',
+            'order' => 'سفارشات',
+        ],
+        'promotion' => [
+            'attribute' => 'تبلیغات',
+            'invite' => 'دعوت‌نامه‌ها',
+            'withdraw' => 'برداشت‌ها',
+            'rebate_flow' => 'سوابق بازگشت درآمد',
+        ],
+        'analysis' => [
+            'attribute' => 'تحلیل‌ها',
+            'accounting' => 'حسابداری',
+            'user_flow' => 'جریان کاربر',
+        ],
+        'log' => [
+            'attribute' => 'لاگ‌ها',
+            'traffic' => 'مصرف داده',
+            'traffic_flow' => 'جریان داده',
+            'service_ban' => 'سوابق مسدودسازی',
+            'online_logs' => 'لاگ‌های آنلاین',
+            'online_monitor' => 'نظارت آنلاین',
+            'notify' => 'اعلان‌ها',
+            'payment_callback' => 'بازخوانی پرداخت',
+            'system' => 'لاگ‌های سیستم',
+        ],
+        'tools' => [
+            'attribute' => 'ابزارها',
+            'decompile' => 'دکومپایل',
+            'convert' => 'تبدیل فرمت',
+            'import' => 'وارد کردن',
+            'analysis' => 'تجزیه و تحلیل لاگ',
+        ],
+        'setting' => [
+            'attribute' => 'تنظیمات',
+            'email_suffix' => 'پسوند ایمیل',
+            'universal' => 'عمومی',
+            'system' => 'سیستم',
+        ],
+    ],
+    'user' => [
+        'massive' => [
+            'text' => 'تعداد کاربران برای تولید',
+            'failed' => 'تولید دسته‌ای حساب کاربری ناموفق بود',
+            'succeed' => 'تولید دسته‌ای حساب کاربری موفق بود',
+            'note' => 'تولید دسته‌ای کاربر در پشتیبان',
+        ],
+        'proxy_info' => 'اطلاعات پیکربندی',
+        'traffic_monitor' => 'آمار ترافیک',
+        'online_monitor' => 'نظارت آنلاین',
+        'reset_traffic' => 'تنظیم مجدد داده',
+        'user_view' => 'نمای کاربر',
+        'connection_test' => 'آزمایش اتصال',
+        'counts' => 'تعداد کل حساب‌ها <code>:num</code>',
+        'reset_confirm' => [0 => 'تنظیم مجدد داده‌های [', 1 => '] را تأیید می‌کنید؟'],
+        'info' => [
+            'account' => 'اطلاعات حساب',
+            'proxy' => 'اطلاعات پروکسی',
+            'switch' => 'تعویض هویت',
+            'reset_date_hint' => 'تاریخ تنظیم مجدد بعدی داده',
+            'expired_date_hint' => 'خالی بگذارید برای یک سال پیش‌فرض',
+            'uuid_hint' => 'شناسه کاربری برای V2Ray',
+            'recharge_placeholder' => 'منفی برای کسر از موجودی',
+        ],
+        'update_help' => 'به‌روزرسانی موفق، برگشت؟',
+        'proxies_config' => 'اطلاعات پیکربندی اتصال [:username]',
+        'group' => [
+            'title' => 'گروه‌های کاربری <small>(یک نود می‌تواند در چند گروه باشد، اما هر کاربر فقط می‌تواند در یک گروه باشد)</small>',
+            'name' => 'نام گروه',
+            'counts' => 'تعداد کل گروه‌ها <code>:num</code>',
+        ],
+    ],
+    'zero_unlimited_hint' => 'صفر یا خالی برای نامحدود',
+    'node' => [
+        'traffic_monitor' => 'آمار ترافیک',
+        'refresh_geo' => 'به‌روزرسانی داده‌های مکانی',
+        'ping' => 'آزمایش تأخیر',
+        'connection_test' => 'آزمایش اتصال',
+        'counts' => 'تعداد کل نودها <code>:num</code>',
+        'reload_all' => 'بارگذاری مجدد همه پشته‌ها',
+        'refresh_geo_all' => 'به‌روزرسانی داده‌های مکانی همه نودها',
+        'reload_confirm' => 'بارگذاری مجدد نود را تأیید می‌کنید؟',
+        'info' => [
+            'hint' => '<strong>توجه:</strong> <code>ID</code> تولیدشده به‌طور خودکار، همان <code>node_id</code> برای پشته ShadowsocksR و <code>nodeId</code> برای پشته V2Ray است',
+            'basic' => 'اطلاعات پایه',
+            'ddns_hint' => 'نودهای IP داینامیک نیاز به <a href="https://github.com/NewFuture/DDNS" target="_blank">DDNS</a> دارند. آزمایش اتصال از نام دامنه استفاده می‌کند',
+            'domain_placeholder' => 'دامنه سرور، اولی استفاده می‌شود اگر پر شده باشد',
+            'domain_hint' => 'با فعال‌سازی DDNS، دامنه به‌طور خودکار به IP متصل می‌شود! دیگر نیاز نیست دستی رکورد DNS را ویرایش کنید.',
+            'extend' => 'اطلاعات تکمیلی',
+            'display' => [
+                'invisible' => 'نامرئی',
+                'node' => 'فقط در صفحه نود قابل مشاهده',
+                'sub' => 'فقط در اشتراک‌ها قابل مشاهده',
+                'all' => 'کاملاً قابل مشاهده',
+                'hint' => 'آیا در لیست اشتراک/نود قابل مشاهده است',
+            ],
+            'ipv4_hint' => 'چندین IP با "," جدا شوند؛ مثال: 1.1.1.1, 8.8.8.8',
+            'ipv6_hint' => 'چندین IP با "," جدا شوند؛ مثال: 1.1.1.1, 8.8.8.8',
+            'ipv4_placeholder' => 'آدرس IPv4 سرور',
+            'ipv6_placeholder' => 'آدرس IPv6 سرور، اگر پر شود کاربر می‌بیند',
+            'push_port_hint' => 'لازم است و در دیواره آتش باز باشد، در غیر این صورت ارسال پیام ناموفق خواهد بود',
+            'data_rate_hint' => 'مثال: 0.1 به این معنی است که 100M به عنوان 10M محاسبه می‌شود؛ 5 به این معنی است که 100M به عنوان 500M محاسبه می‌شود',
+            'level_hint' => 'سطح: 0 = بدون امتیاز، همه نودها قابل مشاهده هستند',
+            'detection' => [
+                'tcp' => 'فقط TCP',
+                'icmp' => 'فقط ICMP',
+                'all' => 'تشخیص همه',
+                'hint' => 'بررسی تصادفی هر 30-60 دقیقه',
+            ],
+            'obfs_param_hint' => 'اگر obfs غیر از [plain] است، پارامترها را برای اختفای ترافیک پر کنید؛
+اگر obfs [http_simple] است، پیشنهاد می‌شود پورت 80 باشد؛
+اگر obfs [tls] است، پیشنهاد می‌شود پورت 443 باشد;',
+            'additional_ports_hint' => 'اگر فعال شده است، لطفا <span class="red-700"><a href="javascript:showTnc();">additional_ports</a></span> را در سرور پیکربندی کنید',
+            'v2_method_hint' => 'با پروتکل انتقال WebSocket از none استفاده نکنید',
+            'v2_net_hint' => 'با پروتکل انتقال WebSocket، TLS را فعال کنید',
+            'v2_cover' => [
+                'none' => 'بدون اختفا',
+                'http' => 'جریان داده HTTP',
+                'srtp' => 'داده تماس ویدیویی (SRTP)',
+                'utp' => 'داده دانلود BT (uTP)',
+                'wechat' => 'تماس ویدیویی WeChat',
+                'dtls' => 'بسته‌های داده DTLS 1.2',
+                'wireguard' => 'بسته‌های داده WireGuard',
+            ],
+            'v2_host_hint' => 'برای HTTP، چندین دامنه با "," جدا شوند. تنها یکی برای WebSocket مجاز است.',
+            'v2_tls_provider_hint' => 'پیکربندی متفاوت برای پشته‌های مختلف:',
+            'single_hint' => 'پورت 80/443 توصیه می‌شود. پشته نیاز به <br> پیکربندی حالت سختگیرانه دارد: فقط اتصال از طریق پورت‌های مشخص‌شده. (<a href="javascript:showPortsOnlyConfig();">چگونگی پیکربندی</a>)',
+        ],
+        'proxy_info' => '*سازگاری با SS',
+        'proxy_info_hint' => 'برای سازگاری، لطفا <span class="red-700">_compatible</span> را به پروتکل و رمزگذاری در پیکربندی سرور اضافه کنید',
+        'reload' => 'بارگذاری مجدد پشته',
+        'auth' => [
+            'title' => 'فهرست مجوزهای API <small>وب‌ای‌پی‌آی</small>',
+            'deploy' => [
+                'title' => 'استقرار پشته :type_label',
+                'attribute' => 'استقرار پشته',
+                'command' => 'دستورالعمل‌ها',
+                'update' => 'به‌روزرسانی',
+                'uninstall' => 'حذف نصب',
+                'start' => 'راه‌اندازی',
+                'stop' => 'توقف',
+                'status' => 'وضعیت',
+                'recent_logs' => 'لاگ‌های اخیر',
+                'real_time_logs' => 'لاگ‌های بلادرنگ',
+                'restart' => 'راه‌اندازی مجدد',
+                'same' => 'همان بالا',
+                'trojan_hint' => 'لطفا ابتدا <a href=":url" target="_blank">دامنه نود</a> را پر کنید و دامنه را به IP نود تعلق دهید',
+            ],
+            'reset_auth' => 'تنظیم مجدد کلید',
+            'counts' => 'تعداد کل مجوزها <code>:num</code>',
+            'generating_all' => 'مجوز برای همه نودها تولید شود؟',
+        ],
+        'cert' => [
+            'title' => 'گواهی‌نامه‌های دامنه <small>(برای جعل هویت نود V2Ray)</small>',
+            'counts' => 'تعداد کل گواهی‌نامه‌ها <code>:num</code>',
+            'key_placeholder' => 'KEY گواهی‌نامه دامنه. خالی مجاز است، VNET-V2Ray از گواهی‌نامه خودکار پشتیبانی می‌کند',
+            'pem_placeholder' => 'PEM گواهی‌نامه دامنه. خالی مجاز است، VNET-V2Ray از گواهی‌نامه خودکار پشتیبانی می‌کند',
+        ],
+    ],
+    'hint' => 'نکته',
+    'oauth' => [
+        'title' => 'مجوزهای OAuth کاربر',
+        'counts' => 'تعداد کل مجوزها <code>:num</code>',
+    ],
+    'select_all' => 'انتخاب همه',
+    'clear' => 'پاک کردن',
+    'unselected_hint' => 'برای اختصاص، اینجا جستجو کنید',
+    'selected_hint' => 'اختصاص یافته، اینجا جستجو کنید',
+    'clone' => 'کلون',
+    'monitor' => [
+        'daily_chart' => 'ترافیک روزانه',
+        'monthly_chart' => 'ترافیک ماهانه',
+        'node' => 'ترافیک نود',
+        'user' => 'ترافیک کاربر',
+        'hint' => '<strong>نکته:</strong> اگر داده‌ای وجود ندارد، لطفا وظایف زمانبندی‌شده را بررسی کنید',
+    ],
+    'tools' => [
+        'analysis' => [
+            'title' => 'تجزیه و تحلیل لاگ SSR <small>فقط برای یک نود</small>',
+            'req_url' => 'آدرس‌های درخواستی اخیر',
+            'not_enough' => 'کمتر از 15000 رکورد، قادر به تجزیه و تحلیل نیست',
+        ],
+        'convert' => [
+            'title' => 'تبدیل قالب <small>از SS به SSR</small>',
+            'content_placeholder' => 'لطفا پیکربندی برای تبدیل را وارد کنید',
+        ],
+        'decompile' => [
+            'title' => 'دکومپایل <small>اطلاعات پیکربندی</small>',
+            'attribute' => 'دکومپایل',
+            'content_placeholder' => 'لطفا لینک‌های SSR را برای دکومپایل، هر کدام در یک سطر، وارد کنید',
+        ],
+    ],
+    'ticket' => [
+        'title' => 'تیکت‌ها',
+        'counts' => 'تعداد کل تیکت‌ها <code>:num</code>',
+        'send_to' => 'لطفا جزئیات کاربر هدف را وارد کنید',
+        'user_info' => 'اطلاعات کاربر',
+        'inviter_info' => 'اطلاعات دعوت‌کننده',
+        'close_confirm' => 'تأیید می‌کنید که تیکت بسته شود؟',
+        'error' => 'خطای ناشناخته! لطفا لاگ‌ها را بررسی کنید',
+    ],
+    'logs' => [
+        'subscribe' => 'لیست اشتراک',
+        'counts' => 'تعداد کل رکوردها <code>:num</code>',
+        'rule' => [
+            'clear_all' => 'پاک‌کردن همه رکوردها',
+            'title' => 'رکوردهای فعال‌سازی',
+            'name' => 'قانون فعال‌ساز',
+            'reason' => 'دلیل فعال‌سازی',
+            'created_at' => 'زمان فعال‌سازی',
+            'tag' => '✅ دسترسی غیرمجاز',
+            'clear_confirm' => 'تأیید می‌کنید که همه رکوردها پاک شوند؟',
+        ],
+        'order' => [
+            'title' => 'لیست سفارشات',
+            'is_expired' => 'منقضی‌شده',
+            'is_coupon' => 'استفاده از کوپن',
+        ],
+        'user_traffic' => [
+            'title' => 'رکوردهای مصرف داده',
+            'choose_node' => 'انتخاب نود',
+        ],
+        'user_data_modify_title' => 'رکوردهای تغییر داده',
+        'callback' => 'لاگ‌های بازخوانی <small>(پرداخت)</small>',
+        'notification' => 'لاگ‌های ایمیل',
+        'ip_monitor' => 'آی‌پی‌های آنلاین <small>بلادرنگ 2 دقیقه</small>',
+        'user_ip' => [
+            'title' => 'لیست آی‌پی‌های آنلاین کاربران <small>10 دقیقه گذشته</small>',
+            'connect' => 'آی‌پی متصل‌شده',
+        ],
+        'ban' => [
+            'title' => 'رکوردهای مسدودسازی کاربر',
+            'time' => 'مدت‌زمان',
+            'reason' => 'دلیل',
+            'ban_time' => 'زمان مسدودسازی',
+            'last_connect_at' => 'آخرین زمان ورود',
+        ],
+        'credit_title' => 'رکوردهای تغییر موجودی',
+    ],
+    'start_time' => 'ابتدا',
+    'end_time' => 'انتها',
+    'goods' => [
+        'title' => 'فهرست محصولات',
+        'type' => [
+            'top_up' => 'شارژ',
+            'package' => 'بسته داده',
+            'plan' => 'طرح اشتراک',
+        ],
+        'info' => [
+            'type_hint' => 'طرح اشتراک با تاریخ انقضای حساب ارتباط دارد، بسته داده فقط از داده کسر می‌کند و بر تاریخ انقضا تأثیر ندارد',
+            'period_hint' => 'داده بسته هر N روز تنظیم مجدد می‌شود',
+            'limit_num_hint' => 'حداکثر تعداد خرید برای هر کاربر، 0 برای نامحدود',
+            'available_date_hint' => 'پس از انقضا از داده کل کسر می‌شود',
+            'desc_placeholder' => 'توضیح مختصر',
+            'list_placeholder' => 'اضافه کردن محتوای سفارشی',
+            'list_hint' => 'هر خط را با <code><li></code> شروع کنید و با <code></li></code> تمام کنید',
+        ],
+        'status' => [
+            'yes' => 'در فروش',
+            'no' => 'از فروش خارج',
+        ],
+        'sell_and_used' => 'استفاده‌شده / فروش‌رفته',
+        'counts' => 'تعداد کل محصولات <code>:num</code>',
+    ],
+    'sort_asc' => 'اولویت بالاتر با مقدار بزرگتر',
+    'yes' => 'بله',
+    'no' => 'خیر',
+    'rule' => [
+        'type' => [
+            'reg' => 'عبارت منظم',
+            'domain' => 'دامنه',
+            'ip' => 'آی‌پی',
+            'protocol' => 'پروتکل',
+        ],
+        'counts' => 'تعداد کل قوانین <code>:num</code>',
+        'title' => 'فهرست قوانین',
+        'group' => [
+            'type' => [
+                'off' => 'مسدودسازی',
+                'on' => 'رهاسازی',
+            ],
+            'title' => 'گروه‌های قانون',
+            'counts' => 'تعداد کل گروه‌ها <code>:num</code>',
+        ],
+    ],
+    'role' => [
+        'name_hint' => 'شناسه منحصربفرد، مثلا: admin',
+        'description_hint' => 'نام نمایشی، مثلا: مدیر',
+        'title' => 'فهرست نقش‌ها',
+        'permissions_all' => 'همه مجوزها',
+        'counts' => 'تعداد کل نقش‌ها <code>:num</code>',
+    ],
+    'report' => [
+        'monthly_accounting' => 'حسابداری ماهانه',
+        'annually_accounting' => 'حسابداری سالانه',
+        'historic_accounting' => 'حسابداری تاریخی',
+        'current_month' => 'این ماه',
+        'last_month' => 'ماه گذشته',
+        'current_year' => 'امسال',
+        'last_year' => 'سال گذشته',
+        'hourly_traffic' => 'ترافیک ساعتی',
+        'daily_traffic' => 'ترافیک روزانه',
+        'today' => 'امروز',
+    ],
+    'permission' => [
+        'title' => 'فهرست مجوزها',
+        'description_hint' => 'توضیح، مثلا: [سیستم X] ویرایش A',
+        'name_hint' => 'نام مسیر، مثلا: admin.permission.create',
+        'counts' => 'تعداد کل مجوزها <code>:num</code>',
+    ],
+    'marketing' => [
+        'email' => [
+            'title' => 'لیست ایمیل‌های ارسالی',
+            'group_send' => 'ارسال دسته‌جمعی ایمیل',
+            'counts' => 'تعداد کل پیام‌ها <code>:num</code>',
+        ],
+        'send_status' => 'وضعیت ارسال',
+        'send_time' => 'زمان ارسال',
+        'error_message' => 'پیام خطا',
+        'push' => [
+            'title' => 'فهرست اعلان‌های ارسالی',
+            'send' => 'ارسال اعلان',
+            'counts' => 'تعداد کل پیام‌های ارسالی <code>:num</code>',
+        ],
+    ],
+    'creating' => 'در حال اضافه‌کردن...',
+    'article' => [
+        'type' => [
+            'knowledge' => 'مقاله',
+            'announcement' => 'اعلان',
+        ],
+        'category_hint' => 'دسته‌بندی یکسان در یک پوشه گروه‌بندی می‌شوند',
+        'logo_hint' => 'اندازه توصیه‌شده: 100x75',
+        'title' => 'فهرست مقالات',
+        'counts' => 'تعداد کل مقالات <code>:num</code>',
+    ],
+    'coupon' => [
+        'title' => 'فهرست کوپن‌ها',
+        'name_hint' => 'برای نمایش',
+        'sn_hint' => 'برای ارائه به کاربران، خالی بگذارید برای کد 8 رقمی تصادفی',
+        'type' => [
+            'voucher' => 'کوپن',
+            'discount' => 'تخفیف',
+            'charge' => 'شارژ',
+        ],
+        'type_hint' => 'کسر: کسر مبلغ؛ تخفیف: درصد تخفیف؛ شارژ: اضافه‌کردن مبلغ به موجودی',
+        'value' => '{1} ➖ :num|{2} :num٪ تخفیف|{3} ➕ :num',
+        'value_hint' => 'محدوده 1٪ ~ 99٪',
+        'priority_hint' => 'بالاترین اولویت واجد شرایط استفاده می‌شود. حداکثر 255',
+        'minimum_hint' => 'فقط هنگامی‌که پرداخت بیش از <strong>:num</strong> باشد قابل استفاده است',
+        'used_hint' => 'هر کاربر می‌تواند حداکثر <strong>:num</strong> بار از این کوپن استفاده کند',
+        'levels_hint' => 'فقط برای سطوح کاربری انتخاب‌شده قابل استفاده است',
+        'groups_hint' => 'فقط برای گروه‌های کاربری انتخاب‌شده قابل استفاده است',
+        'users_placeholder' => 'وارد کردن شناسه کاربر، سپس Enter',
+        'user_whitelist_hint' => 'کاربران مرتبط می‌توانند از این کوپن استفاده کنند، خالی بگذارید اگر استفاده نمی‌شود',
+        'users_blacklist_hint' => 'کاربران مرتبط نمی‌توانند از این کوپن استفاده کنند، خالی بگذارید اگر استفاده نمی‌شود',
+        'services_placeholder' => 'وارد کردن شناسه محصول، سپس Enter',
+        'services_whitelist_hint' => 'فقط برای محصولات سفیدلیست‌شده قابل استفاده است، خالی بگذارید اگر استفاده نمی‌شود',
+        'services_blacklist_hint' => 'برای محصولات بلک‌لیست‌شده غیرقابل استفاده است، خالی بگذارید اگر استفاده نمی‌شود',
+        'newbie' => [
+            'first_discount' => 'اولین تخفیف',
+            'first_order' => 'اولین سفارش',
+            'created_days' => 'سن حساب',
+        ],
+        'created_days_hint' => '<code>:days</code> روز پس از ثبت‌نام',
+        'limit_hint' => 'قوانین رابطه <strong>و</strong> دارند، درست استفاده کنید',
+        'info_title' => 'اطلاعات کوپن',
+        'counts' => 'تعداد کل کوپن‌ها <code>:num</code>',
+        'discount' => 'تخفیف',
+        'export_title' => 'صدور کوپن‌ها',
+        'single_use' => 'یک‌بار مصرف',
+    ],
+    'times' => 'بار',
+    'massive_export' => 'صدور دسته‌جمعی',
+    'system_generate' => 'تولیدشده توسط سیستم',
+    'aff' => [
+        'rebate_title' => 'سوابق بازگشت درآمد',
+        'counts' => 'تعداد کل درخواست‌ها <code>:num</code>',
+        'title' => 'فهرست درخواست‌های برداشت',
+        'apply_counts' => 'تعداد کل درخواست‌ها <code>:num</code>',
+        'referral' => 'بازگشت درآمد معرفی‌شده',
+        'commission_title' => 'جزئیات درخواست',
+        'commission_counts' => 'شامل <code>:num</code> سفارش',
+    ],
+    'setting' => [
+        'common' => [
+            'title' => 'تنظیمات عمومی',
+            'set_default' => 'تنظیم به‌عنوان پیش‌فرض',
+            'connect_nodes' => 'تعداد نودهای مرتبط',
+        ],
+        'email' => [
+            'title' => 'فیلتر ایمیل <small>(برای ثبت‌نام)</small>',
+            'tail' => 'پسوند ایمیل',
+            'rule' => 'نوع محدودیت',
+            'black' => 'لیست سیاه',
+            'white' => 'لیست سفید',
+            'tail_placeholder' => 'وارد کردن پسوند ایمیل',
+        ],
+        'system' => [
+            'title' => 'تنظیمات سیستم',
+            'web' => 'عمومی',
+            'account' => 'حساب',
+            'node' => 'نود',
+            'extend' => 'پیشرفته',
+            'check_in' => 'حضور و غیاب',
+            'promotion' => 'تبلیغات',
+            'notify' => 'اعلان‌رسانی',
+            'auto_job' => 'خودکارسازی',
+            'other' => 'لوگو|پشتیبانی|تحلیل',
+            'payment' => 'پرداخت',
+            'menu' => 'منو',
+        ],
+        'no_permission' => 'مجوز تغییر تنظیمات را ندارید!',
+    ],
+    'system' => [
+        'account_expire_notification' => 'اعلان انقضای حساب',
+        'active_times' => 'حداکثر فعال‌سازی حساب',
+        'admin_invite_days' => '[مدیر] مهلت دعوت‌نامه',
+        'aff_salt' => '[لینک معرفی] رمزگذاری شناسه کاربر',
+        'alipay_qrcode' => 'کد QR علی‌پی',
+        'AppStore_id' => '[Apple] حساب',
+        'AppStore_password' => '[Apple] رمزعبور',
+        'auto_release_port' => 'بازیابی پورت',
+        'bark_key' => '[Bark] کلید دستگاه',
+        'captcha_key' => 'کلید کپچا',
+        'captcha_secret' => 'رمزعبور/شناسه کپچا',
+        'codepay_id' => '[کدپرداخت] شناسه',
+        'codepay_key' => '[کدپرداخت] کلید',
+        'codepay_url' => '[کدپرداخت] آدرس',
+        'data_anomaly_notification' => 'اعلان ناهنجاری داده',
+        'data_exhaust_notification' => 'اعلان تمام‌شدن داده',
+        'ddns_key' => '[DNS] کلید',
+        'ddns_mode' => 'حالت همگام‌سازی DNS',
+        'ddns_secret' => '[DNS] رمز',
+        'default_days' => 'مدت پیش‌فرض حساب',
+        'default_traffic' => 'داده اولیه پیش‌فرض',
+        'detection_check_times' => 'اعلان‌های مسدودسازی نود',
+        'dingTalk_access_token' => '[دینگتاک] توکن دسترسی',
+        'dingTalk_secret' => '[دینگتاک] رمز',
+        'epay_key' => '[ای‌پی] کلید',
+        'epay_mch_id' => '[ای‌پی] شناسه بازرگان',
+        'epay_url' => '[ای‌پی] آدرس',
+        'expire_days' => 'آستانه اعلان انقضا',
+        'f2fpay_app_id' => 'شناسه برنامه',
+        'f2fpay_private_key' => 'کلید خصوصی',
+        'f2fpay_public_key' => 'کلید عمومی',
+        'forbid_mode' => 'محدودیت دسترسی',
+        'invite_num' => 'تعداد پیش‌فرض دعوت‌نامه',
+        'is_activate_account' => 'فعال‌سازی حساب',
+        'is_AliPay' => 'پرداخت علی‌پی',
+        'is_ban_status' => 'مسدودسازی خودکار با انقضا',
+        'is_captcha' => 'حالت کپچا',
+        'is_checkin' => 'پاداش حضور و غیاب',
+        'is_clear_log' => 'پاک‌سازی خودکار لاگ‌ها',
+        'is_custom_subscribe' => 'اشتراک پیشرفته',
+        'is_email_filtering' => 'فیلتر ایمیل',
+        'is_forbid_robot' => 'مسدود کردن ربات‌ها',
+        'is_free_code' => 'کد دعوت رایگان',
+        'is_invite_register' => 'ثبت‌نام با دعوت‌نامه',
+        'is_otherPay' => 'پرداخت سفارشی',
+        'is_QQPay' => 'پرداخت کیو‌کیو',
+        'is_rand_port' => 'پورت تصادفی',
+        'is_register' => 'ثبت‌نام',
+        'is_subscribe_ban' => 'مسدودسازی خودکار درخواست اشتراک',
+        'is_traffic_ban' => 'مسدودسازی خودکار به دلیل مصرف بی‌رویه',
+        'is_WeChatPay' => 'پرداخت وی‌چت',
+        'iYuu_token' => 'توکن ای‌یو',
+        'maintenance_content' => 'متن نگهداری',
+        'maintenance_mode' => 'حالت نگهداری',
+        'maintenance_time' => 'زمان پایان نگهداری',
+        'min_port' => 'محدوده پورت',
+        'min_rand_traffic' => 'محدوده داده',
+        'node_blocked_notification' => 'اعلان مسدودشدن نود',
+        'node_daily_notification' => 'گزارش روزانه نود',
+        'node_offline_notification' => 'اعلان آفلاین‌شدن نود',
+        'oauth_path' => 'مسیرهای OAuth',
+        'offline_check_times' => 'تعداد تلاش‌های آفلاین',
+        'password_reset_notification' => 'اعلان تنظیم مجدد رمزعبور',
+        'paybeaver_app_id' => 'شناسه برنامه',
+        'paybeaver_app_secret' => 'رمز برنامه',
+        'payjs_key' => 'کلید ارتباطی',
+        'payjs_mch_id' => 'شماره بازرگان',
+        'payment_confirm_notification' => 'اعلان تأیید پرداخت دستی',
+        'payment_received_notification' => 'اعلان دریافت پرداخت',
+        'paypal_app_id' => 'شناسه برنامه',
+        'paypal_client_id' => 'شناسه مشتری',
+        'paypal_client_secret' => 'کلید مخفی مشتری',
+        'pushDeer_key' => 'کلید پوش‌دیر',
+        'pushplus_token' => 'توکن پوش‌پلاس',
+        'rand_subscribe' => 'اشتراک تصادفی',
+        'redirect_url' => 'آدرس تغییرمسیر',
+        'referral_money' => 'حداقل مبلغ برداشت',
+        'referral_percent' => 'درصد بازگشت درآمد',
+        'referral_status' => 'وضعیت تبلیغات',
+        'referral_traffic' => 'ترافیک ثبت‌نامی',
+        'referral_type' => 'حالت بازگشت درآمد',
+        'register_ip_limit' => 'محدودیت IP ثبت‌نام',
+        'reset_password_times' => 'تعداد تنظیم مجدد رمزعبور',
+        'reset_traffic' => 'تنظیم مجدد خودکار داده',
+        'server_chan_key' => 'کلید سرورچن',
+        'standard_currency' => 'واحد پول پایه',
+        'stripe_public_key' => 'کلید عمومی',
+        'stripe_secret_key' => 'کلید مخفی',
+        'stripe_signing_secret' => 'کلید امضای وب‌هوک',
+        'subject_name' => 'نام سفارشی کالا',
+        'subscribe_ban_times' => 'آستانه درخواست اشتراک',
+        'subscribe_domain' => 'آدرس اشتراک نود',
+        'subscribe_max' => 'حداکثر تعداد نودهای اشتراک',
+        'telegram_token' => 'توکن تلگرام',
+        'tg_chat_token' => 'توکن تی‌جی‌چت',
+        'theadpay_key' => 'کلید بازرگان',
+        'theadpay_mchid' => 'شناسه بازرگان',
+        'theadpay_url' => 'آدرس',
+        'ticket_closed_notification' => 'اعلان بستن تیکت',
+        'ticket_created_notification' => 'اعلان ایجاد تیکت',
+        'ticket_replied_notification' => 'اعلان پاسخ تیکت',
+        'traffic_ban_time' => 'مدت مسدودسازی',
+        'traffic_ban_value' => 'آستانه مصرف بی‌رویه',
+        'traffic_limit_time' => 'فاصله زمانی',
+        'traffic_warning_percent' => 'آستانه اخطار مصرف',
+        'trojan_license' => 'مجوز تروجان',
+        'username_type' => 'نوع نام‌کاربری',
+        'user_invite_days' => '[کاربر] مهلت دعوت‌نامه',
+        'v2ray_license' => 'مجوز وی‌توری',
+        'v2ray_tls_provider' => 'پیکربندی TLS وی‌توری',
+        'webmaster_email' => 'ایمیل مدیر',
+        'website_analytics' => 'کد تحلیل وبسایت',
+        'website_callback_url' => 'آدرس بازخوانی پرداخت',
+        'website_customer_service' => 'کد پشتیبانی وبسایت',
+        'website_home_logo' => 'لوگوی صفحه اصلی',
+        'website_logo' => 'لوگوی داخلی',
+        'website_name' => 'نام وبسایت',
+        'website_security_code' => 'کد امنیتی',
+        'website_url' => 'آدرس وبسایت',
+        'web_api_url' => 'آدرس API',
+        'wechat_aid' => 'شناسه برنامه وی‌چت',
+        'wechat_cid' => 'شناسه سازمانی وی‌چت',
+        'wechat_encodingAESKey' => 'کلید رمزنگاری',
+        'wechat_qrcode' => 'کد QR وی‌چت',
+        'wechat_secret' => 'رمز برنامه وی‌چت',
+        'wechat_token' => 'توکن برنامه وی‌چت',
+        'hint' => [
+            'account_expire_notification' => 'اعلان انقضای حساب',
+            'active_times' => 'ظرف 24 ساعت از طریق ایمیل',
+            'admin_invite_days' => 'مدت اعتبار دعوت‌نامه مدیر',
+            'aff_salt' => 'رمزگذاری لینک معرفی',
+            'AppStore_id' => 'در مقالات استفاده می‌شود',
+            'AppStore_password' => 'در مقالات استفاده می‌شود',
+            'auto_release_port' => 'پورت حساب‌های مسدود شده/منقضی شده پس از <code>'.config('tasks.release_port').'</code> روز به صورت خودکار آزاد می‌شود',
+            'bark_key' => 'برای ارسال به دستگاه iOS',
+            'captcha_key' => '<a href="https://proxypanel.gitbook.io/wiki/captcha" target="_blank">راهنمای تنظیمات</a>',
+            'data_anomaly_notification' => 'اگر ظرف 1 ساعت از حد مجاز بیشتر باشد',
+            'data_exhaust_notification' => 'هنگام تمام‌شدن داده',
+            'ddns_key' => "<a href='https://proxypanel.gitbook.io/wiki/ddns' target='_blank'>راهنمای تنظیمات</a>",
+            'ddns_mode' => 'همگام‌سازی دامنه و IP',
+            'default_days' => 'مدت پیش‌فرض حساب جدید، 0 به معنی امروز منقضی می‌شود',
+            'default_traffic' => 'داده پیش‌فرض حساب جدید',
+            'detection_check_times' => 'پس از N بار 0 تا 12',
+            'dingTalk_access_token' => '<a href="https://open.dingtalk.com/document/group/custom-robot-access#title-jfe-yo9-jl2" target="_blank">دفترچه راهنمای دینگتاک</a>',
+            'dingTalk_secret' => 'لازم است اگر امضا فعال باشد',
+            'expire_days' => 'شروع اعلان انقضای حساب',
+            'f2fpay_app_id' => 'شناسه برنامه',
+            'f2fpay_private_key' => 'کلید خصوصی تولیدشده',
+            'f2fpay_public_key' => 'کلید عمومی برنامه نیست!',
+            'forbid_mode' => 'مناطق مشخص‌شده مسدود می‌شوند',
+            'invite_num' => 'پیش‌فرض هر کاربر',
+            'is_activate_account' => 'نیاز به فعال‌سازی از طریق ایمیل',
+            'is_ban_status' => 'حساب را مسدود می‌کند و داده‌ها را پاک می‌کند',
+            'is_captcha' => 'نیاز به کپچا برای ورود/ثبت‌نام',
+            'is_checkin' => 'پاداش تصادفی هنگام حضور و غیاب',
+            'is_clear_log' => 'پاک‌سازی خودکار لاگ‌های بی‌استفاده',
+            'is_custom_subscribe' => 'نمایش تاریخ انقضا و داده باقیمانده',
+            'is_email_filtering' => 'لیست سیاه و سفید ایمیل مجاز',
+            'is_forbid_robot' => 'خطای 404 برای ربات‌ها',
+            'is_free_code' => 'مخفی‌کردن کدهای رایگان',
+            'is_rand_port' => 'پورت تصادفی هنگام ثبت‌نام',
+            'is_register' => 'غیرفعال‌کردن ثبت‌نام',
+            'is_subscribe_ban' => 'مسدودسازی خودکار در صورت درخواست بیش از حد',
+            'is_traffic_ban' => 'مسدودسازی خدمات در صورت مصرف بی‌رویه',
+            'iYuu_token' => 'پس از دریافت <a href="https://iyuu.cn" target="_blank">توکن ای‌یو</a>',
+            'maintenance_content' => 'متن سفارشی نگهداری',
+            'maintenance_mode' => "تغییر مسیر کاربران | مدیر ورود از <a href='javascript:(0)'>:url</a>",
+            'maintenance_time' => 'برای شمارش معکوس',
+            'min_port' => '1000 - 65535',
+            'node_blocked_notification' => 'اعلان مسدودشدن نود در هر ساعت',
+            'node_daily_notification' => 'گزارش روزانه مصرف نودها',
+            'node_offline_notification' => 'اعلان آفلاین‌شدن نودها',
+            'oauth_path' => 'لطفا ابتدا در .ENV فعال کنید',
+            'offline_check_times' => 'توقف اعلان پس از N بار در 24 ساعت',
+            'password_reset_notification' => 'امکان تنظیم مجدد رمزعبور از طریق ایمیل',
+            'paybeaver_app_id' => '<a href="https://merchant.paybeaver.com/" target="_blank">مرکز بازرگان</a> -> توسعه‌دهنده -> شناسه برنامه',
+            'paybeaver_app_secret' => '<a href="https://merchant.paybeaver.com/" target="_blank">مرکز بازرگان</a> -> توسعه‌دهنده -> رمز برنامه',
+            'payjs_mch_id' => '<a href="https://payjs.cn/dashboard/member" target="_blank">از اینجا</a>',
+            'payment_confirm_notification' => 'اعلان به مدیر برای پردازش سفارشات دستی',
+            'payment_received_notification' => 'اعلان دریافت پرداخت به کاربر',
+            'pushDeer_key' => 'پس از دریافت <a href="https://www.pushdeer.com/official.html" target="_blank">کلید پوش‌دیر</a>',
+            'pushplus_token' => 'پس از دریافت <a href="https://www.pushplus.plus/push1.html" target="_blank">توکن پوش‌پلاس</a>',
+            'rand_subscribe' => 'ترتیب تصادفی به جای ترتیب نود',
+            'redirect_url' => 'تغییرمسیر به این آدرس هنگام فعال‌شدن قوانین',
+            'referral_money' => 'حداقل مبلغ قابل برداشت',
+            'referral_percent' => 'درصد سفارش برای معرف',
+            'referral_status' => 'غیرفعال‌کردن سیستم معرفی',
+            'referral_traffic' => 'ترافیک رایگان با ثبت‌نام از طریق معرفی',
+            'referral_type' => 'بازگشت درآمد جدید بر اساس حالت جدید',
+            'register_ip_limit' => 'تعداد ثبت‌نام مجاز در 24 ساعت، 0 برای نامحدود',
+            'reset_password_times' => 'تعداد مجاز تنظیم مجدد رمزعبور در 24 ساعت',
+            'reset_traffic' => 'تنظیم مجدد خودکار بر اساس دوره طرح کاربر',
+            'server_chan_key' => 'پس از دریافت <a href="https://sc.ftqq.com" target="_blank">کلید سرورچن</a>',
+            'standard_currency' => 'واحد پول پیش‌فرض سایت',
+            'subject_name' => 'نام سفارشی محصول در درگاه‌ها',
+            'subscribe_ban_times' => 'حداکثر تعداد درخواست اشتراک در 24 ساعت',
+            'subscribe_domain' => 'شروع با http:// یا https:// برای جلوگیری از شکست DNS',
+            'subscribe_max' => 'حداکثر تعداد نودهای بازگشتی، 0 برای همه',
+            'telegram_token' => 'دریافت <a href="https://t.me/BotFather" target="_blank">توکن ربات</a> از @BotFather',
+            'tg_chat_token' => 'پس از دریافت <a href="https://t.me/realtgchat_bot" target="_blank">توکن تی‌جی‌چت</a>',
+            'ticket_closed_notification' => 'اعلان بسته‌شدن به کاربر',
+            'ticket_created_notification' => 'بسته به ایجادکننده، اعلان به مدیر/کاربر',
+            'ticket_replied_notification' => 'اعلان پاسخ به طرف مقابل',
+            'traffic_ban_time' => 'مدت زمان مسدودسازی خودکار',
+            'traffic_ban_value' => 'آستانه مصرف غیرمجاز در 1 ساعت',
+            'traffic_limit_time' => 'فاصله زمانی بین حضور و غیاب‌ها',
+            'traffic_warning_percent' => 'اعلان تمام‌شدن داده هنگام رسیدن به این درصد',
+            'username_type' => 'نوع پیش‌فرض نام‌کاربری',
+            'user_invite_days' => 'مدت اعتبار دعوت‌نامه کاربر',
+            'v2ray_tls_provider' => 'تنظیمات نود ارجح است',
+            'webmaster_email' => 'نمایش در خطاها',
+            'website_analytics' => 'کد JavaScript تحلیلگر',
+            'website_callback_url' => 'جلوگیری از شکست بازخوانی به دلیل DNS',
+            'website_customer_service' => 'کد JavaScript پشتیبانی',
+            'website_name' => 'نام نمایشی در ایمیل',
+            'website_security_code' => 'در صورت تنظیم، ورود فقط از <a href=":url" target="_blank">ورود امن</a>',
+            'website_url' => 'آدرس اصلی برای لینک‌ها',
+            'web_api_url' => 'مثلا '.config('app.url'),
+            'wechat_aid' => 'در <a href="https://work.weixin.qq.com/wework_admin/frame#apps" target="_blank">مدیریت برنامه</a>',
+            'wechat_cid' => '<a href="https://work.weixin.qq.com/wework_admin/frame#profile" target="_blank">اطلاعات سازمان</a>',
+            'wechat_encodingAESKey' => 'تنظیمات API دریافتی',
+            'wechat_secret' => 'ممکن است نیاز به برنامه سازمانی باشد',
+            'wechat_token' => 'تنظیمات API، آدرس بازخوانی: :url',
+        ],
+        'placeholder' => [
+            'default_url' => ':url پیش‌فرض',
+            'server_chan_key' => 'پرکردن کلید سرورچن و کلیک بروزرسانی',
+            'pushDeer_key' => 'پرکردن کلید پوش‌دیر و کلیک بروزرسانی',
+            'iYuu_token' => 'پرکردن توکن ای‌یو و کلیک بروزرسانی',
+            'bark_key' => 'پرکردن کلید دستگاه بارک و کلیک بروزرسانی',
+            'telegram_token' => 'پرکردن توکن تلگرام و کلیک بروزرسانی',
+            'pushplus_token' => 'لطفا از سرورچن درخواست کنید',
+            'dingTalk_access_token' => 'توکن دسترسی ربات سفارشی',
+            'dingTalk_secret' => 'رمز پس از فعال‌سازی امضای ربات',
+            'wechat_aid' => 'شناسه برنامه سازمانی وی‌چت',
+            'wechat_cid' => 'پر کردن شناسه وی‌چت و کلیک بروزرسانی',
+            'wechat_secret' => 'رمز برنامه سازمانی وی‌چت',
+            'tg_chat_token' => 'لطفا از تلگرام درخواست کنید',
+            'codepay_url' => 'https://codepay.fateqq.com/create_order/?',
+        ],
+        'payment' => [
+            'attribute' => 'تنظیمات پرداخت',
+            'channel' => [
+                'alipay' => 'پرداخت آنلاین علی‌پی',
+                'codepay' => 'کدپرداخت',
+                'epay' => 'ای‌پی',
+                'payjs' => 'پی‌جی‌اس',
+                'paypal' => 'پی‌پال',
+                'stripe' => 'استرایپ',
+                'paybeaver' => 'پی‌بیور',
+                'theadpay' => 'تی‌هدپی',
+                'manual' => 'پرداخت دستی',
+            ],
+            'hint' => [
+                'alipay' => 'نیاز به مجوز از <a href="https://open.alipay.com/platform/appManage.htm?#/create/" target="_blank">درگاه آنت فایننشل</a>',
+                'codepay' => 'ثبت‌نام در <a href="https://codepay.fateqq.com/i/377289" target="_blank">کدپرداخت</a> و دانلود نرم‌افزار',
+                'payjs' => 'ثبت‌نام در <a href="https://payjs.cn/ref/zgxjnb" target="_blank">پی‌جی‌اس</a>',
+                'paypal' => 'ورود به <a href="https://www.paypal.com/businessprofile/mytools/apiaccess/firstparty" target="_blank">صفحه اعتبارنامه API</a> و دریافت اطلاعات',
+                'paybeaver' => 'ثبت‌نام در <a href="https://merchant.paybeaver.com/?aff_code=iK4GNuX8" target="_blank">پی‌بیور</a>',
+                'theadpay' => 'درخواست حساب از <a href="https://theadpay.com/" target="_blank">تی‌هدپی</a>',
+                'manual' => 'پس از تنظیم درگاه، در سمت کاربر نمایش داده می‌شود',
+            ],
+        ],
+        'notification' => [
+            'channel' => [
+                'telegram' => 'تلگرام',
+                'wechat' => 'وی‌چت سازمانی',
+                'dingtalk' => 'دینگتاک',
+                'email' => 'ایمیل',
+                'bark' => 'بارک',
+                'serverchan' => 'سرورچن',
+                'pushdeer' => 'پوش‌دیر',
+                'pushplus' => 'پوش‌پلاس',
+                'iyuu' => 'ای‌یو',
+                'tg_chat' => 'تی‌جی‌چت',
+                'site' => 'اعلان سایت',
+            ],
+            'send_test' => 'ارسال پیام آزمایشی',
+        ],
+        'forbid' => [
+            'mainland' => 'مسدودسازی ایران',
+            'china' => 'مسدودسازی چین',
+            'oversea' => 'مسدودسازی خارج از کشور',
+        ],
+        'username' => [
+            'email' => 'ایمیل',
+            'mobile' => 'شماره موبایل',
+            'any' => 'هر نام‌کاربری',
+        ],
+        'active_account' => [
+            'before' => 'فعال‌سازی قبل از ثبت‌نام',
+            'after' => 'فعال‌سازی بعد از ثبت‌نام',
+        ],
+        'ddns' => [
+            'namesilo' => 'نیم‌سیلو',
+            'aliyun' => 'علی‌کلود',
+            'dnspod' => 'دی‌ان‌اس‌پاد',
+            'cloudflare' => 'کلودفلر',
+        ],
+        'captcha' => [
+            'standard' => 'کپچای استاندارد',
+            'geetest' => 'جی‌تست',
+            'recaptcha' => 'ری‌کپچای گوگل',
+            'hcaptcha' => 'اچ‌کپچا',
+        ],
+        'referral' => [
+            'once' => 'بازگشت درآمد اولین خرید',
+            'loop' => 'بازگشت درآمد همیشگی',
+        ],
+    ],
+    'set_to' => ':attribute را به :attribute تنظیم کن',
+    'minute' => 'دقیقه',
+    'query' => 'جستجو',
+    'optional' => 'اختیاری',
+    'require' => 'ضروری',
+];

+ 4 - 2
resources/views/admin/aff/detail.blade.php

@@ -22,8 +22,10 @@
                         <thead class="thead-default">
                         <tr>
                             <th colspan="6">
-                                {{ trans('model.referral.id') }}: {{$referral->id}} | {{ trans('model.referral.user') }}: {{$referral->user->username}} |
-                                {{ trans('model.referral.amount') }}: {{$referral->amount_tag}} | {{ trans('model.referral.created_at') }}: {{$referral->created_at}}
+                                {{ trans('model.referral.id') }}: {{$referral->id}}
+                                |{{ trans('model.referral.user') }}: {{$referral->user->username}}
+                                |{{ trans('model.referral.amount') }}: {{$referral->amount_tag}}
+                                | {{ trans('model.referral.created_at') }}: {{$referral->created_at}}
                             </th>
                         </tr>
                         <tr>

+ 20 - 6
resources/views/admin/aff/index.blade.php

@@ -76,19 +76,23 @@
                                         @can('admin.aff.setStatus')
                                             @if($apply->status === 0)
                                                 <a href="javascript:setStatus('{{$apply->id}}','1')" class="btn btn-sm btn-success">
-                                                    <i class="icon wb-check" aria-hidden="true"></i>{{ trans('common.status.pass') }}</a>
+                                                    <i class="icon wb-check" aria-hidden="true"></i>{{ trans('common.status.pass') }}
+                                                </a>
                                                 <a href="javascript:setStatus('{{$apply->id}}','-1')" class="btn btn-sm btn-danger">
-                                                    <i class="icon wb-close" aria-hidden="true"></i>{{ trans('common.status.reject') }}</a>
+                                                    <i class="icon wb-close" aria-hidden="true"></i>{{ trans('common.status.reject') }}
+                                                </a>
                                             @elseif($apply->status === 1)
                                                 @can('admin.user.updateCredit')
                                                     <a href="javascript:handleUserCredit('{{$apply->user->id}}','{{$apply->amount}}', '{{$apply->id}}','2')" class="btn
                                                     btn-sm
                                                     btn-success">
                                                         <i id="makePayment_{{$apply->id}}" class="icon wb-payment"
-                                                           aria-hidden="true"></i> {{ trans('common.status.send_to_credit') }} </a>
+                                                           aria-hidden="true"></i> {{ trans('common.status.send_to_credit') }}
+                                                    </a>
                                                 @endcan
                                                 <a href="javascript:setStatus('{{$apply->id}}', '2')" class="btn btn-sm btn-primary">
-                                                    <i class="icon wb-check-circle" aria-hidden="true"></i> {{ trans('common.status.paid') }} </a>
+                                                    <i class="icon wb-check-circle" aria-hidden="true"></i> {{ trans('common.status.paid') }}
+                                                </a>
                                             @endif
                                         @endcan
                                         @can('admin.aff.detail')
@@ -140,7 +144,12 @@
           dataType: 'json',
           success: function(ret) {
             if (ret.status === 'success') {
-              swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+              swal.fire({
+                title: ret.message,
+                icon: 'success',
+                timer: 1000,
+                showConfirmButton: false,
+              }).then(() => window.location.reload());
             } else {
               swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
             }
@@ -152,7 +161,12 @@
               $.each(errors.errors, function(index, value) {
                 str += '<li>' + value + '</li>';
               });
-              swal.fire({title: '{{ trans('admin.hint') }}', html: str, icon: 'error', confirmButtonText: '{{ trans('common.confirm') }}'});
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                html: str,
+                icon: 'error',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              });
             }
           },
         });

+ 6 - 1
resources/views/admin/aff/invite.blade.php

@@ -100,7 +100,12 @@
             data: {_token: '{{csrf_token()}}'},
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }

+ 20 - 9
resources/views/admin/article/index.blade.php

@@ -9,7 +9,9 @@
                 <h3 class="panel-title">{{ trans('admin.article.title') }}</h3>
                 @can('admin.article.create')
                     <div class="panel-actions">
-                        <a href="{{route('admin.article.create')}}" class="btn btn-primary"><i class="icon wb-plus"></i> {{ trans('common.add') }}</a>
+                        <a href="{{route('admin.article.create')}}" class="btn btn-primary">
+                            <i class="icon wb-plus" aria-hidden="true"></i> {{ trans('common.add') }}
+                        </a>
                     </div>
                 @endcan
             </div>
@@ -38,7 +40,8 @@
                             <option value="" hidden>{{ trans('model.article.language') }}</option>
                             @foreach (config('common.language') as $key => $value)
                                 <option value="{{$key}}">
-                                    <i class="fi fi-{{$value[1]}}"></i> <span style="padding: inherit;">{{$value[0]}}</span>
+                                    <i class="fi fi-{{$value[1]}}" aria-hidden="true"></i>
+                                    <span style="padding: inherit;">{{$value[0]}}</span>
                                 </option>
                             @endforeach
                         </select>
@@ -79,7 +82,7 @@
                                 {{ Str::limit($article->title, 50) }}
                             </td>
                             <td>
-                            {!! isset(config('common.language')[$article->language]) ? '<i class="fi fi-'.config('common.language')[$article->language][1].'"></i>
+                            {!! isset(config('common.language')[$article->language]) ? '<i class="fi fi-'.config('common.language')[$article->language][1].' aria-hidden="true"></i>
                              <span style="padding: inherit;">'.config('common.language')[$article->language][0].'</span>': __('common.status.unknown') !!}
                             <td> {{$article->sort}} </td>
                             <td> {{$article->created_at}} </td>
@@ -88,15 +91,15 @@
                                     <div class="btn-group">
                                         @can('admin.article.show')
                                             <a href="{{route('admin.article.show',$article)}}" class="btn btn-outline-success">
-                                                <i class="icon wb-eye"></i></a>
+                                                <i class="icon wb-eye" aria-hidden="true"></i></a>
                                         @endcan
                                         @can('admin.article.edit')
                                             <a href="{{route('admin.article.edit',['article'=>$article->id, 'page'=>Request::query('page')])}}" class="btn btn-outline-primary">
-                                                <i class="icon wb-edit"></i></a>
+                                                <i class="icon wb-edit" aria-hidden="true"></i></a>
                                         @endcan
                                         @can('admin.article.destroy')
                                             <a class="btn btn-outline-danger" href="javascript:delArticle('{{route('admin.article.destroy',$article->id)}}', '{{$article->id}}')">
-                                                <i class="icon wb-close"></i></a>
+                                                <i class="icon wb-close" aria-hidden="true"></i></a>
                                         @endcan
                                     </div>
                                 @endcanany
@@ -131,13 +134,16 @@
             $('#type').val('{{Request::query('type')}}');
             $('#category').val('{{Request::query('category')}}');
             $('#language').val('{{Request::query('language')}}');
-            $('select').on('change', function() { this.form.submit(); });
+            $('select').on('change', function() {
+              this.form.submit();
+            });
           });
 
           // 删除文章
           function delArticle(url, id) {
             swal.fire({
-              title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.article.attribute')]) }}' + id + '{{ trans('admin.confirm.delete.1') }}',
+              title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.article.attribute')]) }}' + id +
+                  '{{ trans('admin.confirm.delete.1') }}',
               icon: 'question',
               showCancelButton: true,
               cancelButtonText: '{{ trans('common.close') }}',
@@ -151,7 +157,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 2 - 1
resources/views/admin/article/info.blade.php

@@ -64,7 +64,8 @@
                             <select class="form-control" data-plugin="selectpicker" id="language" name="language" data-style="btn-outline btn-primary">
                                 @foreach (config('common.language') as $key => $value)
                                     <option value="{{$key}}">
-                                        <i class="fi fi-{{$value[1]}}"></i> <span style="padding: inherit;">{{$value[0]}}</span>
+                                        <i class="fi fi-{{$value[1]}}" aria-hidden="true"></i>
+                                        <span style="padding: inherit;">{{$value[0]}}</span>
                                     </option>
                                 @endforeach
                             </select>

+ 6 - 1
resources/views/admin/article/show.blade.php

@@ -66,7 +66,12 @@
           if (result.value) {
             $.post('{{route('changeSub')}}', {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }

+ 162 - 31
resources/views/admin/config/common.blade.php

@@ -6,7 +6,8 @@
     <div class="page-content container">
         <div class="panel">
             <div class="panel-heading">
-                <h1 class="panel-title"><i class="icon wb-settings" aria-hidden="true"></i>{{ trans('admin.setting.common.title') }}</h1>
+                <h1 class="panel-title">
+                    <i class="icon wb-settings" aria-hidden="true"></i>{{ trans('admin.setting.common.title') }}</h1>
             </div>
             <div class="panel-body container-fluid">
                 <div class="nav-tabs-vertical" data-plugin="tabs">
@@ -474,7 +475,12 @@
         });
           @endcan
           @cannot('admin.config.level.store')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -491,7 +497,12 @@
             dataType: 'json',
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }
@@ -499,14 +510,20 @@
           });
           @endcan
           @cannot('admin.config.level.update')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
       function delLevel(id, name) { // 删除等级
           @can('admin.config.level.destroy')
           swal.fire({
-            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.common.level')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.common.level')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'question',
             allowEnterKey: false,
             showCancelButton: true,
@@ -521,7 +538,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }
@@ -531,7 +553,12 @@
           });
           @endcan
           @cannot('admin.config.level.destroy')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -576,7 +603,12 @@
         });
           @endcan
           @cannot('admin.config.category.store')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -593,7 +625,12 @@
             dataType: 'json',
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }
@@ -601,14 +638,20 @@
           });
           @endcan
           @cannot('admin.config.category.update')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
       function delCategory(id, name) { // 删除分类
           @can('admin.config.category.destroy')
           swal.fire({
-            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.goods.category')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.goods.category')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'question',
             allowEnterKey: false,
             showCancelButton: true,
@@ -623,7 +666,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }
@@ -633,7 +681,12 @@
           });
           @endcan
           @cannot('admin.config.category.destroy')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -682,7 +735,12 @@
         });
           @endcan
           @cannot('admin.config.country.store')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -695,7 +753,12 @@
             dataType: 'json',
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'});
               }
@@ -703,14 +766,20 @@
           });
           @endcan
           @cannot('admin.config.country.update')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
       function delCountry(code, name) { // 删除国家/地区
           @can('admin.config.country.destroy')
           swal.fire({
-            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.country')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.country')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'question',
             allowEnterKey: false,
             showCancelButton: true,
@@ -725,7 +794,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }
@@ -735,7 +809,12 @@
           });
           @endcan
           @cannot('admin.config.country.destroy')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -775,7 +854,12 @@
         });
           @endcan
           @cannot('admin.config.ss.store')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -788,7 +872,12 @@
             dataType: 'json',
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }
@@ -796,14 +885,20 @@
           });
           @endcan
           @cannot('admin.config.ss.update')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
       function delConfig(id, name) { // 删除配置
           @can('admin.config.ss.destroy')
           swal.fire({
-            title: '{{ trans('admin.confirm.delete.0', ['attribute' => '']) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            title: '{{ trans('admin.confirm.delete.0', ['attribute' => '']) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'question',
             allowEnterKey: false,
             showCancelButton: true,
@@ -818,7 +913,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }
@@ -828,7 +928,12 @@
           });
           @endcan
           @cannot('admin.config.ss.destroy')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -875,7 +980,12 @@
         });
           @endcan
           @cannot('admin.config.label.store')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -892,7 +1002,12 @@
             dataType: 'json',
             success: function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }
@@ -900,7 +1015,12 @@
           });
           @endcan
           @cannot('admin.config.label.update')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
 
@@ -908,7 +1028,8 @@
           @can('admin.config.label.destroy')
           swal.fire({
             title: '{{ trans('common.warning') }}',
-            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.label')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.label')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'warning',
             showCancelButton: true,
             cancelButtonText: '{{trans('common.close')}}',
@@ -921,7 +1042,12 @@
               dataType: 'json',
               success: function(ret) {
                 if (ret.status === 'success') {
-                  swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
                   swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }
@@ -930,7 +1056,12 @@
           });
           @endcan
           @cannot('admin.config.label.destroy')
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcannot
       }
     </script>

+ 20 - 4
resources/views/admin/config/emailFilter.blade.php

@@ -108,7 +108,12 @@
         function addEmailSuffix() {
           const words = $('#words').val();
           if (words.trim() === '') {
-            swal.fire({title: '{{ trans('validation.required', ['attribute' => trans('admin.setting.email.tail')]) }}', icon: 'warning', timer: 1000, showConfirmButton: false});
+            swal.fire({
+              title: '{{ trans('validation.required', ['attribute' => trans('admin.setting.email.tail')]) }}',
+              icon: 'warning',
+              timer: 1000,
+              showConfirmButton: false,
+            });
             $('#words').focus();
             return false;
           }
@@ -119,7 +124,12 @@
             words: words,
           }, function(ret) {
             if (ret.status === 'success') {
-              swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+              swal.fire({
+                title: ret.message,
+                icon: 'success',
+                timer: 1000,
+                showConfirmButton: false,
+              }).then(() => window.location.reload());
             } else {
               swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
             }
@@ -132,7 +142,8 @@
         function delSuffix(id, name) {
           swal.fire({
             title: '{{ trans('common.warning') }}',
-            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('admin.setting.email.tail')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('admin.setting.email.tail')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'warning',
             showCancelButton: true,
             cancelButtonText: '{{ trans('common.cancel') }}',
@@ -146,7 +157,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }

+ 18 - 9
resources/views/admin/config/system.blade.php

@@ -8,7 +8,7 @@
     <div class="page-content container-fluid">
         <div class="panel">
             <div class="panel-heading">
-                <h1 class="panel-title"><i class="icon wb-settings"></i>{{ trans('admin.setting.system.title') }}</h1>
+                <h1 class="panel-title"><i class="icon wb-settings" aria-hidden="true"></i>{{ trans('admin.setting.system.title') }}</h1>
             </div>
             <div class="panel-body">
                 <div class="nav-tabs-horizontal" data-plugin="tabs">
@@ -473,9 +473,8 @@
 
       function disablePayment(op) {
         for (let i = 1; i < op.length; i++) {
-            @json($payments).includes(op[i].value)
-              ? op[i].disabled = false
-              : op[i].disabled = true;
+            @json($payments).
+          includes(op[i].value) ? op[i].disabled = false : op[i].disabled = true;
         }
       }
 
@@ -488,7 +487,11 @@
       // 系统设置更新
       function systemUpdate(systemItem, value) {
           @can('admin.system.update')
-          $.post('{{route('admin.system.update')}}', {_token: '{{csrf_token()}}', name: systemItem, value: value}, function(ret) {
+          $.post('{{route('admin.system.update')}}', {
+            _token: '{{csrf_token()}}',
+            name: systemItem,
+            value: value,
+          }, function(ret) {
             if (ret.status === 'success') {
               swal.fire({title: ret.message, icon: 'success', timer: 1500, showConfirmButton: false});
             } else {
@@ -496,7 +499,12 @@
             }
           });
           @else
-          swal.fire({title: '{{ trans('admin.setting.no_permission') }}', icon: 'error', timer: 1500, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.setting.no_permission') }}',
+            icon: 'error',
+            timer: 1500,
+            showConfirmButton: false,
+          });
           @endcan
       }
 
@@ -565,9 +573,10 @@
           if (ret.status === 'success') {
             swal.fire({
               title: '易支付信息(仅供参考)',
-              html: '商户状态: ' + ret.data['active'] + ' | 账号余额: ' + ret.data['money'] + ' | 结算账号:' + ret.data['account'] +
-                  '<br\><br\>渠道手续费:【支付宝 - ' + (100 - ret.data['alirate']) + '% | 微信 - ' + (100 - ret.data['wxrate']) +
-                  '% | QQ钱包 - ' + (100 - ret.data['qqrate']) + '%】<br\><br\> 请按照支付平台的介绍为准,本信息纯粹为Api获取信息',
+              html: '商户状态: ' + ret.data['active'] + ' | 账号余额: ' + ret.data['money'] + ' | 结算账号:' +
+                  ret.data['account'] + '<br\><br\>渠道手续费:【支付宝 - ' + (100 - ret.data['alirate']) +
+                  '% | 微信 - ' + (100 - ret.data['wxrate']) + '% | QQ钱包 - ' + (100 - ret.data['qqrate']) +
+                  '%】<br\><br\> 请按照支付平台的介绍为准,本信息纯粹为Api获取信息',
               icon: 'info',
             });
           } else {

+ 55 - 96
resources/views/admin/coupon/create.blade.php

@@ -26,8 +26,7 @@
                     <div class="form-group row">
                         <label class="col-md-2 col-form-label" for="name">{{ trans('model.coupon.name') }}</label>
                         <div class="col-md-10">
-                            <input type="text" class="form-control col-md-4" name="name" id="name"
-                                   value="{{old('name')}}" required/>
+                            <input type="text" class="form-control col-md-4" name="name" id="name" value="{{old('name')}}" required/>
                             <span class="text-help"> {{ trans('admin.coupon.name_hint') }} </span>
                         </div>
                     </div>
@@ -41,8 +40,7 @@
                     <div class="form-group row">
                         <label class="col-md-2 col-form-label" for="logo">{{ trans('model.coupon.logo') }}</label>
                         <div class="col-md-6">
-                            <input type="file" id="logo" name="logo" data-plugin="dropify"
-                                   data-default-file="{{asset('/assets/images/default.png')}}"/>
+                            <input type="file" id="logo" name="logo" data-plugin="dropify" data-default-file="{{asset('/assets/images/default.png')}}"/>
                         </div>
                     </div>
                     <div class="form-group row">
@@ -70,46 +68,38 @@
                                 <div class="input-group-prepend" id="amount">
                                     <span class="input-group-text">{{array_column(config('common.currency'), 'symbol', 'code')[sysConfig('standard_currency')]}}</span>
                                 </div>
-                                <input type="number" class="form-control col-md-3" min="1" name="value" id="value"
-                                       value="{{old('value')}}" required/>
+                                <input type="number" class="form-control col-md-3" min="1" name="value" id="value" value="{{old('value')}}" required/>
                                 <span class="input-group-text discount" style="display: none;">%</span>
                             </div>
-                            <span class="text-help discount"
-                                  style="display: none;"> {{ trans('admin.coupon.value_hint') }}</span>
+                            <span class="text-help discount" style="display: none;"> {{ trans('admin.coupon.value_hint') }}</span>
                         </div>
                     </div>
                     <div class="usage">
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="priority"> {{ trans('model.coupon.priority') }} </label>
+                            <label class="col-md-2 col-form-label" for="priority"> {{ trans('model.coupon.priority') }} </label>
                             <div class="col-md-10">
                                 <div class="input-group">
-                                    <input type="number" class="form-control col-md-2" min="1" max="255" name="priority"
-                                           id="priority" value="{{old('priority')}}"/>
+                                    <input type="number" class="form-control col-md-2" min="1" max="255" name="priority" id="priority" value="{{old('priority')}}"/>
                                 </div>
                                 <span class="text-help"> {{ trans('admin.coupon.priority_hint') }} </span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="usable_times">{{ trans('model.coupon.usable_times') }}</label>
+                            <label class="col-md-2 col-form-label" for="usable_times">{{ trans('model.coupon.usable_times') }}</label>
                             <div class="col-md-4 input-group">
-                                <input type="number" class="form-control" min="1" name="usable_times" id="usable_times"
-                                       value="{{old('usable_times', 1)}}"/>
+                                <input type="number" class="form-control" min="1" name="usable_times" id="usable_times" value="{{old('usable_times', 1)}}"/>
                                 <span class="input-group-text">{{ trans('admin.times') }}</span>
                             </div>
                         </div>
                         <hr>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="minimum">{{ trans('model.coupon.minimum') }}</label>
+                            <label class="col-md-2 col-form-label" for="minimum">{{ trans('model.coupon.minimum') }}</label>
                             <div class="col-md-10">
                                 <div class="input-group">
                                     <div class="input-group-prepend">
                                         <span class="input-group-text">{{array_column(config('common.currency'), 'symbol', 'code')[sysConfig('standard_currency')]}}</span>
                                     </div>
-                                    <input type="number" class="form-control col-md-3" name="minimum" id="minimum"
-                                           value="{{old('minimum')}}" step="0.01"/>
+                                    <input type="number" class="form-control col-md-3" name="minimum" id="minimum" value="{{old('minimum')}}" step="0.01"/>
                                 </div>
                                 <span class="text-help"> {!! trans('admin.coupon.minimum_hint', ['num' => 'N']).' '.trans('admin.zero_unlimited_hint') !!} </span>
                             </div>
@@ -118,20 +108,16 @@
                             <label class="col-md-2 col-form-label" for="used">{{ trans('model.coupon.used') }}</label>
                             <div class="col-md-10">
                                 <div class="input-group">
-                                    <input type="number" class="form-control col-md-3" name="used" id="used"
-                                           value="{{old('used')}}" step="1"/>
+                                    <input type="number" class="form-control col-md-3" name="used" id="used" value="{{old('used')}}" step="1"/>
                                     <span class="input-group-text">{{ trans('admin.times') }}</span>
                                 </div>
                                 <span class="text-help"> {!! trans('admin.coupon.used_hint', ['num' => 'N']).' '.trans('admin.zero_unlimited_hint') !!}</span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label for="levels"
-                                   class="col-md-2 col-form-label">{{ trans('model.coupon.levels') }}</label>
+                            <label for="levels" class="col-md-2 col-form-label">{{ trans('model.coupon.levels') }}</label>
                             <div class="col-md-10">
-                                <select data-plugin="selectpicker" data-style="btn-outline btn-primary"
-                                        class="col-md-5 form-control show-tick" id="levels" name="levels[]"
-                                        multiple>
+                                <select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="col-md-5 form-control show-tick" id="levels" name="levels[]" multiple>
                                     @foreach($levels as $key => $level)
                                         <option value="{{$key}}">{{$level}}</option>
                                     @endforeach
@@ -140,12 +126,9 @@
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label for="groups"
-                                   class="col-md-2 col-form-label">{{ trans('model.coupon.groups') }}</label>
+                            <label for="groups" class="col-md-2 col-form-label">{{ trans('model.coupon.groups') }}</label>
                             <div class="col-md-10">
-                                <select data-plugin="selectpicker" data-style="btn-outline btn-primary"
-                                        class="col-md-5 form-control show-tick" id="groups" name="groups[]"
-                                        multiple>
+                                <select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="col-md-5 form-control show-tick" id="groups" name="groups[]" multiple>
                                     @foreach($userGroups as $key => $group)
                                         <option value="{{$key}}">{{$group}}</option>
                                     @endforeach
@@ -154,76 +137,55 @@
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="users_whitelist">{{ trans('model.coupon.users_whitelist') }}</label>
+                            <label class="col-md-2 col-form-label" for="users_whitelist">{{ trans('model.coupon.users_whitelist') }}</label>
                             <div class="col-md-10">
-                                <input type="text" class="form-control col-md-6" data-plugin="tokenfield"
-                                       id="users_whitelist" name="users_whitelist"
-                                       value="{{old('users_whitelist')}}"
-                                       placeholder="{{ trans('admin.coupon.users_placeholder') }}"/>
+                                <input type="text" class="form-control col-md-6" data-plugin="tokenfield" id="users_whitelist" name="users_whitelist" value="{{old('users_whitelist')}}" placeholder="{{ trans('admin.coupon.users_placeholder') }}"/>
                                 <span class="text-help"> {{ trans('admin.coupon.user_whitelist_hint') }}</span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="users_blacklist">{{ trans('model.coupon.users_blacklist') }}</label>
+                            <label class="col-md-2 col-form-label" for="users_blacklist">{{ trans('model.coupon.users_blacklist') }}</label>
                             <div class="col-md-10">
-                                <input type="text" class="form-control col-md-6" data-plugin="tokenfield"
-                                       id="users_blacklist" name="users_blacklist"
-                                       value="{{old('users_blacklist')}}"
-                                       placeholder="{{ trans('admin.coupon.users_placeholder') }}"/>
+                                <input type="text" class="form-control col-md-6" data-plugin="tokenfield" id="users_blacklist" name="users_blacklist" value="{{old('users_blacklist')}}" placeholder="{{ trans('admin.coupon.users_placeholder') }}"/>
                                 <span class="text-help"> {{ trans('admin.coupon.users_blacklist_hint') }}</span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="services_whitelist">{{ trans('model.coupon.services_whitelist') }}</label>
+                            <label class="col-md-2 col-form-label" for="services_whitelist">{{ trans('model.coupon.services_whitelist') }}</label>
                             <div class="col-md-10">
-                                <input type="text" class="form-control col-md-4" data-plugin="tokenfield"
-                                       id="services_whitelist" name="services_whitelist"
-                                       value="{{old('services_whitelist')}}"
-                                       placeholder="{{ trans('admin.coupon.services_placeholder') }}"/>
+                                <input type="text" class="form-control col-md-4" data-plugin="tokenfield" id="services_whitelist" name="services_whitelist" value="{{old('services_whitelist')}}" placeholder="{{ trans('admin.coupon.services_placeholder') }}"/>
                                 <span class="text-help"> {{ trans('admin.coupon.services_whitelist_hint') }}</span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label class="col-md-2 col-form-label"
-                                   for="services_blacklist">{{ trans('model.coupon.services_blacklist') }}</label>
+                            <label class="col-md-2 col-form-label" for="services_blacklist">{{ trans('model.coupon.services_blacklist') }}</label>
                             <div class="col-md-10">
-                                <input type="text" class="form-control col-md-4" data-plugin="tokenfield"
-                                       id="services_blacklist" name="services_blacklist"
-                                       value="{{old('services_blacklist')}}"
-                                       placeholder="{{ trans('admin.coupon.services_placeholder') }}"/>
+                                <input type="text" class="form-control col-md-4" data-plugin="tokenfield" id="services_blacklist" name="services_blacklist" value="{{old('services_blacklist')}}" placeholder="{{ trans('admin.coupon.services_placeholder') }}"/>
                                 <span class="text-help"> {{ trans('admin.coupon.services_blacklist_hint') }}</span>
                             </div>
                         </div>
                         <div class="form-group row">
-                            <label for="newbie"
-                                   class="col-md-2 col-form-label">{{ trans('model.coupon.newbie') }}</label>
+                            <label for="newbie" class="col-md-2 col-form-label">{{ trans('model.coupon.newbie') }}</label>
                             <div class="col-md-10">
                                 <ul class="list-unstyled">
                                     <li class="list-group-item p-0">
                                         <div class="checkbox-custom checkbox-primary">
-                                            <input type="checkbox" id="coupon"
-                                                   name="coupon" {{ old('coupon') ? 'checked' : '' }}/>
+                                            <input type="checkbox" id="coupon" name="coupon" {{ old('coupon') ? 'checked' : '' }}/>
                                             <label for="coupon">{{ trans('admin.coupon.newbie.first_discount') }}</label>
                                         </div>
                                     </li>
                                     <li class="list-group-item p-0">
                                         <div class="checkbox-custom checkbox-primary">
-                                            <input type="checkbox" id="order"
-                                                   name="order" {{ old('order') ? 'checked' : '' }}/>
+                                            <input type="checkbox" id="order" name="order" {{ old('order') ? 'checked' : '' }}/>
                                             <label for="order">{{ trans('admin.coupon.newbie.first_order') }}</label>
                                         </div>
                                     </li>
                                     <li class="list-group-item pb-0 pl-0">
                                         <div class="input-group">
                                             <div class="input-group-prepend">
-                                                <label class="input-group-text"
-                                                       for="days">{{ trans('admin.coupon.newbie.created_days') }}</label>
+                                                <label class="input-group-text" for="days">{{ trans('admin.coupon.newbie.created_days') }}</label>
                                             </div>
-                                            <input type="number" class="form-control col-md-3" name="days" id="days"
-                                                   value="{{old('days')}}"/>
+                                            <input type="number" class="form-control col-md-3" name="days" id="days" value="{{old('days')}}"/>
                                             <div class="input-group-append">
                                                 <span class="input-group-text">{{ trans_choice('common.days.attribute', 0) }}</span>
                                             </div>
@@ -238,26 +200,23 @@
                     <div class="form-group row">
                         <label class="col-md-2 col-form-label" for="num">{{ trans('model.coupon.num') }}</label>
                         <div class="col-md-4">
-                            <input type="number" class="form-control" name="num" id="num" value="{{old('num')}}"
-                                   required/>
+                            <input type="number" class="form-control" name="num" id="num" value="{{old('num')}}" required/>
                         </div>
                     </div>
                     <div class="form-group row">
                         <label class="col-md-2 col-form-label">{{ trans('common.available_date') }}</label>
                         <div class="col-md-7 input-group input-daterange" data-plugin="datepicker">
                             <div class="input-group-prepend">
-                                <span class="input-group-text"><i class="icon wb-calendar"
-                                                                  aria-hidden="true"></i></span>
+                                <span class="input-group-text">
+                                    <i class="icon wb-calendar" aria-hidden="true"></i></span>
                             </div>
                             <label for="start_time"></label>
-                            <input type="text" class="form-control" name="start_time" id="start_time"
-                                   value="{{old('start_time') ?? date("Y-m-d")}}" required/>
+                            <input type="text" class="form-control" name="start_time" id="start_time" value="{{old('start_time') ?? date("Y-m-d")}}" required/>
                             <div class="input-group-prepend">
                                 <span class="input-group-text">{{ trans('common.to') }}</span>
                             </div>
                             <label for="end_time"></label>
-                            <input type="text" class="form-control" name="end_time" id="end_time"
-                                   value="{{old('end_time') ?? date("Y-m-d",strtotime("+1 month"))}}" required/>
+                            <input type="text" class="form-control" name="end_time" id="end_time" value="{{old('end_time') ?? date("Y-m-d",strtotime("+1 month"))}}" required/>
                         </div>
                     </div>
                     <div class="form-actions col-12 text-right">
@@ -279,34 +238,34 @@
     <script src="/assets/global/js/Plugin/bootstrap-tokenfield.js"></script>
     <script>
         @if(old())
-        $(document).ready(function () {
-            $("input[name='type'][value='{{old('type')}}']").click();
-            $('#levels').selectpicker('val', @json(old('levels')));
-            $('#groups').selectpicker('val', @json(old('groups')));
+        $(document).ready(function() {
+          $("input[name='type'][value='{{old('type')}}']").click();
+          $('#levels').selectpicker('val', @json(old('levels')));
+          $('#groups').selectpicker('val', @json(old('groups')));
         });
         @endif
 
         $('.input-daterange>input').datepicker({
-            format: 'yyyy-mm-dd',
+          format: 'yyyy-mm-dd',
         });
 
-        $('input[name=\'type\']').change(function () {
-            if ($(this).val() === '2') {
-                $('.discount').show();
-                $('.usage').show();
-                $('#amount').hide();
-                $('#value').attr('max', 99);
-            } else if ($(this).val() === '3') {
-                $('.discount').hide();
-                $('.usage').hide();
-                $('#amount').show();
-                $('#value').removeAttr('max');
-            } else {
-                $('.discount').hide();
-                $('.usage').show();
-                $('#amount').show();
-                $('#value').removeAttr('max');
-            }
+        $('input[name=\'type\']').change(function() {
+          if ($(this).val() === '2') {
+            $('.discount').show();
+            $('.usage').show();
+            $('#amount').hide();
+            $('#value').attr('max', 99);
+          } else if ($(this).val() === '3') {
+            $('.discount').hide();
+            $('.usage').hide();
+            $('#amount').show();
+            $('#value').removeAttr('max');
+          } else {
+            $('.discount').hide();
+            $('.usage').show();
+            $('#amount').show();
+            $('#value').removeAttr('max');
+          }
         });
     </script>
 @endsection

+ 55 - 54
resources/views/admin/coupon/index.blade.php

@@ -129,66 +129,67 @@
     <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
     <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
     <script>
-        $(document).ready(function () {
-            $('#type').val({{Request::query('type')}});
-            $('#status').val({{Request::query('status')}});
+      $(document).ready(function() {
+        $('#type').val({{Request::query('type')}});
+        $('#status').val({{Request::query('status')}});
 
-            $('select').on('change', function () {
-                this.form.submit();
-            });
+        $('select').on('change', function() {
+          this.form.submit();
         });
+      });
 
-        @can('admin.coupon.export')
-        // 批量导出卡券
-        function exportCoupon() {
-            swal.fire({
-                title: '{{ trans('admin.coupon.export_title') }}',
-                text: '{{ trans('admin.confirm.export') }}?',
-                icon: 'question',
-                showCancelButton: true,
-                cancelButtonText: '{{ trans('common.close') }}',
-                confirmButtonText: '{{ trans('common.confirm') }}',
-            }).then((result) => {
-                if (result.value) {
-                    window.location.href = '{{route('admin.coupon.export')}}';
-                }
-            });
-        }
-        @endcan
+      @can('admin.coupon.export')
+      // 批量导出卡券
+      function exportCoupon() {
+        swal.fire({
+          title: '{{ trans('admin.coupon.export_title') }}',
+          text: '{{ trans('admin.confirm.export') }}?',
+          icon: 'question',
+          showCancelButton: true,
+          cancelButtonText: '{{ trans('common.close') }}',
+          confirmButtonText: '{{ trans('common.confirm') }}',
+        }).then((result) => {
+          if (result.value) {
+            window.location.href = '{{route('admin.coupon.export')}}';
+          }
+        });
+      }
+      @endcan
 
-        @can('admin.coupon.destroy')
-        // 删除卡券
-        function delCoupon(id, name) {
-            swal.fire({
-                title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.coupon.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
-                icon: 'question',
-                allowEnterKey: false,
-                showCancelButton: true,
-                cancelButtonText: '{{ trans('common.close') }}',
-                confirmButtonText: '{{ trans('common.confirm') }}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'DELETE',
-                        url: '{{route('admin.coupon.destroy', '')}}/' + id,
-                        data: {_token: '{{csrf_token()}}'},
-                        dataType: 'json',
-                        success: function (ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({
-                                    title: ret.message,
-                                    icon: 'success',
-                                    timer: 1000,
-                                    showConfirmButton: false
-                                }).then(() => window.location.reload());
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                            }
-                        },
-                    });
+      @can('admin.coupon.destroy')
+      // 删除卡券
+      function delCoupon(id, name) {
+        swal.fire({
+          title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.coupon.attribute')]) }}' + name +
+              '{{ trans('admin.confirm.delete.1') }}',
+          icon: 'question',
+          allowEnterKey: false,
+          showCancelButton: true,
+          cancelButtonText: '{{ trans('common.close') }}',
+          confirmButtonText: '{{ trans('common.confirm') }}',
+        }).then((result) => {
+          if (result.value) {
+            $.ajax({
+              method: 'DELETE',
+              url: '{{route('admin.coupon.destroy', '')}}/' + id,
+              data: {_token: '{{csrf_token()}}'},
+              dataType: 'json',
+              success: function(ret) {
+                if (ret.status === 'success') {
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
+                } else {
+                  swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }
+              },
             });
-        }
+          }
+        });
+      }
         @endcan
     </script>
 @endsection

+ 8 - 8
resources/views/admin/coupon/show.blade.php

@@ -222,14 +222,14 @@
     <script src="/assets/global/js/Plugin/bootstrap-select.js"></script>
     <script src="/assets/global/js/Plugin/bootstrap-tokenfield.js"></script>
     <script>
-        $(document).ready(function () {
-            @isset($coupon->limit['users']['levels'])
-            $('#levels').selectpicker('val', @json($coupon->limit['users']['levels']));
-            @endisset
+      $(document).ready(function() {
+          @isset($coupon->limit['users']['levels'])
+          $('#levels').selectpicker('val', @json($coupon->limit['users']['levels']));
+          @endisset
 
-            @isset($coupon->limit['users']['groups'])
-            $('#groups').selectpicker('val', @json($coupon->limit['users']['groups']));
-            @endisset
-        });
+          @isset($coupon->limit['users']['groups'])
+          $('#groups').selectpicker('val', @json($coupon->limit['users']['groups']));
+          @endisset
+      });
     </script>
 @endsection

+ 2 - 1
resources/views/admin/layouts.blade.php

@@ -44,7 +44,8 @@
                         <div class="dropdown-menu" role="menu">
                             @foreach (config('common.language') as $key => $value)
                                 <a class="dropdown-item" href="{{route('lang', ['locale' => $key])}}" role="menuitem">
-                                    <i class="fi fi-{{$value[1]}}"></i> <span style="padding: inherit;">{{$value[0]}}</span>
+                                    <i class="fi fi-{{$value[1]}}" aria-hidden="true"></i>
+                                    <span style="padding: inherit;">{{$value[0]}}</span>
                                 </a>
                             @endforeach
                         </div>

+ 3 - 3
resources/views/admin/logs/onlineIPMonitor.blade.php

@@ -95,8 +95,8 @@
     <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
     <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
     <script>
-        $(document).ready(function () {
-            $('#node_id').val({{Request::query('node_id')}});
-        });
+      $(document).ready(function() {
+        $('#node_id').val({{Request::query('node_id')}});
+      });
     </script>
 @endsection

+ 9 - 2
resources/views/admin/logs/order.blade.php

@@ -179,7 +179,9 @@
         $('#is_expire').selectpicker('val', @json(Request::query('is_expire')));
         $('#pay_way').selectpicker('val', @json(Request::query('pay_way')));
         $('#status').selectpicker('val', @json(Request::query('status')));
-        $('select').on('change', function() { this.form.submit(); });
+        $('select').on('change', function() {
+          this.form.submit();
+        });
       });
 
       // 有效期
@@ -190,7 +192,12 @@
       function changeStatus(id, status) {
         $.post('{{route('admin.order.edit')}}', {_token: '{{csrf_token()}}', oid: id, status: status}, function(ret) {
           if (ret.status === 'success') {
-            swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+            swal.fire({
+              title: ret.message,
+              icon: 'success',
+              timer: 1000,
+              showConfirmButton: false,
+            }).then(() => window.location.reload());
           } else {
             swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
           }

+ 2 - 1
resources/views/admin/logs/traffic.blade.php

@@ -89,7 +89,8 @@
             <div class="panel-footer">
                 <div class="row">
                     <div class="col-sm-6">
-                        {!! trans('admin.logs.counts', ['num' => $dataFlowLogs->total()]) !!} | <code>{{$totalTraffic}}</code>
+                        {!! trans('admin.logs.counts', ['num' => $dataFlowLogs->total()]) !!} |
+                        <code>{{$totalTraffic}}</code>
                     </div>
                     <div class="col-sm-6">
                         <nav class="Page navigation float-right">

+ 1 - 1
resources/views/admin/logs/userTraffic.blade.php

@@ -50,7 +50,7 @@
                                             {{$log->order->goods->name}}
                                         @endcan
                                     @else
-                                        【{{trans('common.deleted_item', ['attribute' => trans('model.order.attribute')])}}】
+                                        【{{ trans('common.deleted_item', ['attribute' => trans('model.order.attribute')]) }}】
                                     @endif
                                 @endif
                             </td>

+ 2 - 1
resources/views/admin/marketing/emailList.blade.php

@@ -8,7 +8,8 @@
             <div class="panel-heading">
                 <h3 class="panel-title">{{ trans('admin.marketing.email.title') }}</h3>
                 <div class="panel-actions">
-                    <button class="btn btn-primary" onclick="send()"><i class="icon wb-envelope"></i>{{ trans('admin.marketing.email.group_send') }}</button>
+                    <button class="btn btn-primary" onclick="send()">
+                        <i class="icon wb-envelope"></i>{{ trans('admin.marketing.email.group_send') }}</button>
                 </div>
             </div>
             <div class="panel-body">

+ 2 - 2
resources/views/admin/marketing/pushList.blade.php

@@ -10,8 +10,8 @@
                 <h3 class="panel-title">{{ trans('admin.marketing.push.title') }}</h3>
                 @can('admin.marketing.add')
                     <div class="panel-actions">
-                        <button type="button" class="btn btn-primary disabled" data-toggle="modal" data-target="#send_modal"><i
-                                    class="icon wb-plus"></i>{{ trans('admin.marketing.push.send') }}</button>
+                        <button type="button" class="btn btn-primary disabled" data-toggle="modal" data-target="#send_modal">
+                            <i class="icon wb-plus"></i>{{ trans('admin.marketing.push.send') }}</button>
                     </div>
                 @endcan
             </div>

+ 36 - 12
resources/views/admin/node/auth.blade.php

@@ -103,7 +103,8 @@
                                 <div class="text-center red-700 mb-5">{{ trans('admin.node.auth.deploy.command') }}</div>
                                 {{ trans('admin.node.auth.deploy.update') }}: {{ trans('admin.node.auth.deploy.same') }}
                                 <br>
-                                {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://bit.ly/3oO3HZy | bash -s -- --remove
+                                {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://bit.ly/3oO3HZy |
+                                bash -s -- --remove
                                 <br>
                                 {{ trans('admin.node.auth.deploy.start') }}: systemctl start vnet-v2ray
                                 <br>
@@ -111,7 +112,8 @@
                                 <br>
                                 {{ trans('admin.node.auth.deploy.status') }}: systemctl status vnet-v2ray
                                 <br>
-                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u vnet-v2ray
+                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u
+                                vnet-v2ray
                                 <br>
                                 {{ trans('admin.node.auth.deploy.real_time_logs') }}: journalctl -u vnet-v2ray -f
                             </div>
@@ -136,7 +138,8 @@
                                 <br>
                                 {{ trans('admin.node.auth.deploy.status') }}: systemctl status v2ray
                                 <br>
-                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u v2ray
+                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u
+                                v2ray
                                 <br>
                                 {{ trans('admin.node.auth.deploy.real_time_logs') }}: journalctl -u v2ray -f
                             </div>
@@ -158,9 +161,11 @@
                                     <br>
                                     <br>
                                     <div class="text-center red-700 mb-5">{{ trans('admin.node.auth.deploy.command') }}</div>
-                                    {{ trans('admin.node.auth.deploy.update') }}: curl -L -s https://mrw.so/6cMfGy | bash
+                                    {{ trans('admin.node.auth.deploy.update') }}: curl -L -s https://mrw.so/6cMfGy |
+                                    bash
                                     <br>
-                                    {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://mrw.so/5ulpvu | bash
+                                    {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://mrw.so/5ulpvu |
+                                    bash
                                     <br>
                                     {{ trans('admin.node.auth.deploy.start') }}: systemctl start trojanp
                                     <br>
@@ -168,7 +173,8 @@
                                     <br>
                                     {{ trans('admin.node.auth.deploy.status') }}: systemctl status trojanp
                                     <br>
-                                    {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u trojanp
+                                    {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager
+                                    -u trojanp
                                     <br>
                                     {{ trans('admin.node.auth.deploy.real_time_logs') }}: journalctl -u trojanp -f
                                 </div>
@@ -187,7 +193,8 @@
                                 <div class="text-center red-700 mb-5">{{ trans('admin.node.auth.deploy.command') }}</div>
                                 {{ trans('admin.node.auth.deploy.update') }}: {{ trans('admin.node.auth.deploy.same') }}
                                 <br>
-                                {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://bit.ly/3828OP1 | bash -s -- --remove
+                                {{ trans('admin.node.auth.deploy.uninstall') }}: curl -L -s https://bit.ly/3828OP1 |
+                                bash -s -- --remove
                                 <br>
                                 {{ trans('admin.node.auth.deploy.start') }}: systemctl start vnet
                                 <br>
@@ -197,7 +204,8 @@
                                 <br>
                                 {{ trans('admin.node.auth.deploy.status') }}: systemctl status vnet
                                 <br>
-                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u vnet
+                                {{ trans('admin.node.auth.deploy.recent_logs') }}: journalctl -x -n 300 --no-pager -u
+                                vnet
                                 <br>
                                 {{ trans('admin.node.auth.deploy.real_time_logs') }}: journalctl -u vnet -f
                             </div>
@@ -227,7 +235,12 @@
           if (result.value) {
             $.post('{{route('admin.node.auth.store')}}', {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }
@@ -242,7 +255,8 @@
       function deleteAuth(id) {
         swal.fire({
           title: '{{ trans('admin.hint') }}',
-          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node_auth.attribute')]) }}' + id + '{{ trans('admin.confirm.delete.1') }}',
+          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node_auth.attribute')]) }}' + id +
+              '{{ trans('admin.confirm.delete.1') }}',
           icon: 'info',
           showCancelButton: true,
           cancelButtonText: '{{trans('common.close')}}',
@@ -256,7 +270,12 @@
               dataType: 'json',
               success: function(ret) {
                 if (ret.status === 'success') {
-                  swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
                   swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }
@@ -286,7 +305,12 @@
               dataType: 'json',
               success: function(ret) {
                 if (ret.status === 'success') {
-                  swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
                   swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }

+ 8 - 2
resources/views/admin/node/cert/index.blade.php

@@ -84,7 +84,8 @@
           function delCertificate(id) {
             swal.fire({
               title: '{{ trans('admin.hint') }}',
-              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node_cert.attribute')]) }}' + id + '{{ trans('admin.confirm.delete.1') }}',
+              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node_cert.attribute')]) }}' + id +
+                  '{{ trans('admin.confirm.delete.1') }}',
               icon: 'info',
               showCancelButton: true,
               cancelButtonText: '{{ trans('common.close') }}',
@@ -98,7 +99,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 17 - 6
resources/views/admin/node/index.blade.php

@@ -31,7 +31,9 @@
                             </button>
                         @endcan
                         @can('admin.node.create')
-                            <a href="{{route('admin.node.create')}}" class="btn btn-primary"><i class="icon wb-plus"></i> {{ trans('common.add') }}</a>
+                            <a href="{{route('admin.node.create')}}" class="btn btn-primary">
+                                <i class="icon wb-plus"></i> {{ trans('common.add') }}
+                            </a>
                         @endcan
                     </div>
                 @endcan
@@ -156,7 +158,8 @@
                             @foreach($node->childNodes as $childNode)
                                 <tr class="bg-blue-grey-200 grey-700 table-borderless frontlin">
                                     <td></td>
-                                    <td><i class="float-left fa-solid fa-right-left" aria-hidden="true"></i> <strong>{{ trans('model.node.transfer') }}</strong></td>
+                                    <td><i class="float-left fa-solid fa-right-left" aria-hidden="true"></i>
+                                        <strong>{{ trans('model.node.transfer') }}</strong></td>
                                     <td> {{ $childNode->name }} </td>
                                     <td> {{ $childNode->server }} </td>
                                     <td> {{ $childNode->is_ddns ? trans('model.node.ddns') : $childNode->ip }} </td>
@@ -263,12 +266,14 @@
               if (ret.status === 'success') {
                 let str = '';
                 for (let i in ret.message) {
-                  str += '<tr><td>' + i + '</td><td>' + ret.message[i][0] + '</td><td>' + ret.message[i][1] + '</td></tr>';
+                  str += '<tr><td>' + i + '</td><td>' + ret.message[i][0] + '</td><td>' + ret.message[i][1] +
+                      '</td></tr>';
                 }
                 swal.fire({
                   title: ret.title,
                   icon: 'info',
-                  html: '<table class="my-20"><thead class="thead-default"><tr><th> IP </th><th> ICMP </th> <th> TCP </th></thead><tbody>' + str + '</tbody></table>',
+                  html: '<table class="my-20"><thead class="thead-default"><tr><th> IP </th><th> ICMP </th> <th> TCP </th></thead><tbody>' +
+                      str + '</tbody></table>',
                   showConfirmButton: false,
                 });
               } else {
@@ -373,7 +378,8 @@
         function delNode(id, name) {
           swal.fire({
             title: '{{trans('common.warning')}}',
-            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.attribute')]) }}' + name +
+                '{{ trans('admin.confirm.delete.1') }}',
             icon: 'warning',
             showCancelButton: true,
             cancelButtonText: '{{trans('common.close')}}',
@@ -387,7 +393,12 @@
                 dataType: 'json',
                 success: function(ret) {
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }

+ 11 - 4
resources/views/admin/node/info.blade.php

@@ -112,7 +112,7 @@
                                         <select data-plugin="selectpicker" data-style="btn-outline btn-primary"
                                                 class="col-md-5 form-control" name="country_code" id="country_code">
                                             @foreach($countries as $country)
-                                                <option value="{{$country->code}}">{{$country->code}} - {{$country->name}}</option>
+                                                <option value="{{$country->code}}">{{ $country->code.' - '.$country->name }}</option>
                                             @endforeach
                                         </select>
                                     </div>
@@ -590,7 +590,12 @@
               $.each(errors.errors, function(index, value) {
                 str += '<li>' + value + '</li>';
               });
-              swal.fire({title: '{{ trans('admin.hint') }}', html: str, icon: 'error', confirmButtonText: '{{ trans('common.confirm') }}'});
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                html: str,
+                icon: 'error',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              });
             }
           },
         });
@@ -744,7 +749,8 @@
 
         swal.fire({
           title: '[节点 user-config.json 配置示例]',
-          html: '<div class="p-10 bg-grey-900 text-white font-weight-300 text-left" style="line-height: 22px;">' + content + '</div>',
+          html: '<div class="p-10 bg-grey-900 text-white font-weight-300 text-left" style="line-height: 22px;">' +
+              content + '</div>',
           icon: 'info',
         });
       }
@@ -757,7 +763,8 @@
 
         swal.fire({
           title: '[节点 user-config.json 配置示例]',
-          html: '<div class="p-10 bg-grey-900 text-white font-weight-300 text-left" style="line-height: 22px;">' + content + '</div>',
+          html: '<div class="p-10 bg-grey-900 text-white font-weight-300 text-left" style="line-height: 22px;">' +
+              content + '</div>',
           icon: 'info',
         });
       }

+ 8 - 2
resources/views/admin/permission/index.blade.php

@@ -87,7 +87,8 @@
           function delPermission(url, name) {
             swal.fire({
               title: '{{trans('common.warning')}}',
-              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.permission.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.permission.attribute')]) }}' +
+                  name + '{{ trans('admin.confirm.delete.1') }}',
               icon: 'warning',
               showCancelButton: true,
               cancelButtonText: '{{ trans('common.close') }}',
@@ -101,7 +102,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 4 - 1
resources/views/admin/report/accounting.blade.php

@@ -51,7 +51,10 @@
                 label += ': ';
               }
               if (context.parsed.y !== null) {
-                label += new Intl.NumberFormat('ch-CN', {style: 'currency', currency: '{{sysConfig('standard_currency')}}'}).format(context.parsed.y);
+                label += new Intl.NumberFormat('ch-CN', {
+                  style: 'currency',
+                  currency: '{{sysConfig('standard_currency')}}',
+                }).format(context.parsed.y);
               }
               return label;
             },

+ 44 - 44
resources/views/admin/report/userDataAnalysis.blade.php

@@ -91,31 +91,31 @@
               datasets: [area_a('{{ trans('admin.report.today') }}',@json($data['hourlyFlow']))],
             },
             options: {
-                // stack: 'node_id',
-                parsing: {
-                    xAxisKey: 'date',
-                    yAxisKey: 'total',
+              // stack: 'node_id',
+              parsing: {
+                xAxisKey: 'date',
+                yAxisKey: 'total',
+              },
+              scales: {
+                x: {
+                  stacked: true,
                 },
-                scales: {
-                    x: {
-                        stacked: true
-                    },
-                    y: {
-                        stacked: true
-                    }
+                y: {
+                  stacked: true,
                 },
-                responsive: true,
-                plugins: {
-                    legend: {
-                        labels: {
-                            padding: 20,
-                            usePointStyle: true,
-                            pointStyle: 'circle',
-                            font: {size: 14},
-                        },
-                    },
-                    tooltip: label_callbacks(@json(trans_choice('common.hour', 2))),
+              },
+              responsive: true,
+              plugins: {
+                legend: {
+                  labels: {
+                    padding: 20,
+                    usePointStyle: true,
+                    pointStyle: 'circle',
+                    font: {size: 14},
+                  },
                 },
+                tooltip: label_callbacks(@json(trans_choice('common.hour', 2))),
+              },
             },
           });
 
@@ -126,31 +126,31 @@
               datasets: [area_a('{{ trans('admin.report.current_month') }}',@json($data['dailyFlow']))],
             },
             options: {
-                // stack: 'node_id',
-                parsing: {
-                    xAxisKey: 'date',
-                    yAxisKey: 'total',
+              // stack: 'node_id',
+              parsing: {
+                xAxisKey: 'date',
+                yAxisKey: 'total',
+              },
+              scales: {
+                x: {
+                  stacked: true,
                 },
-                scales: {
-                    x: {
-                        stacked: true
-                    },
-                    y: {
-                        stacked: true
-                    }
+                y: {
+                  stacked: true,
                 },
-                responsive: true,
-                plugins: {
-                    legend: {
-                        labels: {
-                            padding: 20,
-                            usePointStyle: true,
-                            pointStyle: 'circle',
-                            font: {size: 14},
-                        },
-                    },
-                    tooltip: label_callbacks(@json(trans_choice('common.days.attribute', 2))),
+              },
+              responsive: true,
+              plugins: {
+                legend: {
+                  labels: {
+                    padding: 20,
+                    usePointStyle: true,
+                    pointStyle: 'circle',
+                    font: {size: 14},
+                  },
                 },
+                tooltip: label_callbacks(@json(trans_choice('common.days.attribute', 2))),
+              },
             },
           });
         </script>

+ 8 - 2
resources/views/admin/role/index.blade.php

@@ -81,7 +81,8 @@
           function delRole(url, name) {
             swal.fire({
               title: '{{ trans('common.warning') }}',
-              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.role.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.role.attribute')]) }}' + name +
+                  '{{ trans('admin.confirm.delete.1') }}',
               icon: 'warning',
               showCancelButton: true,
               cancelButtonText: '{{ trans('common.close') }}',
@@ -95,7 +96,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 8 - 2
resources/views/admin/rule/group/index.blade.php

@@ -77,7 +77,8 @@
           function delRuleGroup(url, name) {
             swal.fire({
               title: '{{trans('common.warning')}}',
-              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.rule_group.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.rule_group.attribute')]) }}' +
+                  name + '{{ trans('admin.confirm.delete.1') }}',
               icon: 'warning',
               showCancelButton: true,
               cancelButtonText: '{{trans('common.close')}}',
@@ -91,7 +92,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 32 - 6
resources/views/admin/rule/index.blade.php

@@ -163,7 +163,12 @@
           success: function(ret) {
             $('#add').modal('hide');
             if (ret.status === 'success') {
-              swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+              swal.fire({
+                title: ret.message,
+                icon: 'success',
+                timer: 1000,
+                showConfirmButton: false,
+              }).then(() => window.location.reload());
             } else {
               swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
             }
@@ -176,7 +181,12 @@
               $.each(errors.errors, function(index, value) {
                 str += '<li>' + value + '</li>';
               });
-              swal.fire({title: '{{ trans('admin.hint') }}', html: str, icon: 'error', confirmButtonText: '{{ trans('common.confirm') }}'});
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                html: str,
+                icon: 'error',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              });
             }
           },
         });
@@ -197,7 +207,12 @@
           dataType: 'json',
           success: function(ret) {
             if (ret.status === 'success') {
-              swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+              swal.fire({
+                title: ret.message,
+                icon: 'success',
+                timer: 1000,
+                showConfirmButton: false,
+              }).then(() => window.location.reload());
             } else {
               swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
             }
@@ -209,7 +224,12 @@
               $.each(errors.errors, function(index, value) {
                 str += '<li>' + value + '</li>';
               });
-              swal.fire({title: '{{ trans('admin.hint') }}', html: str, icon: 'error', confirmButtonText: '{{ trans('common.confirm') }}'});
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                html: str,
+                icon: 'error',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              });
             }
           },
         });
@@ -221,7 +241,8 @@
       function delRule(url, name) {
         swal.fire({
           title: '{{trans('common.warning')}}',
-          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.rule.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.rule.attribute')]) }}' + name +
+              '{{ trans('admin.confirm.delete.1') }}',
           icon: 'warning',
           showCancelButton: true,
           cancelButtonText: '{{trans('common.close')}}',
@@ -235,7 +256,12 @@
               dataType: 'json',
               success: function(ret) {
                 if (ret.status === 'success') {
-                  swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
                   swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }

+ 9 - 2
resources/views/admin/rule/log.blade.php

@@ -94,7 +94,9 @@
         $('#node_id').val({{Request::query('node_id')}});
         $('#rule_id').val({{Request::query('rule_id')}});
 
-        $('select').on('change', function() { this.form.submit(); });
+        $('select').on('change', function() {
+          this.form.submit();
+        });
       });
 
       @can('admin.rule.clear')
@@ -111,7 +113,12 @@
           if (result.value) {
             $.post("{{route('admin.rule.clear')}}", {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'});
               }

+ 16 - 5
resources/views/admin/shop/index.blade.php

@@ -6,10 +6,13 @@
     <div class="page-content container-fluid">
         <div class="panel panel-bordered">
             <div class="panel-heading">
-                <h1 class="panel-title"><i class="icon wb-shopping-cart" aria-hidden="true"></i>{{ trans('admin.goods.title') }}</h1>
+                <h1 class="panel-title">
+                    <i class="icon wb-shopping-cart" aria-hidden="true"></i>{{ trans('admin.goods.title') }}</h1>
                 @can('admin.goods.create')
                     <div class="panel-actions">
-                        <a href="{{route('admin.goods.create')}}" class="btn btn-primary"><i class="icon wb-plus"></i> {{ trans('common.add') }}</a>
+                        <a href="{{route('admin.goods.create')}}" class="btn btn-primary">
+                            <i class="icon wb-plus"></i> {{ trans('common.add') }}
+                        </a>
                     </div>
                 @endcan
             </div>
@@ -137,7 +140,9 @@
         $('#type').val({{Request::query('type')}});
         $('#status').val({{Request::query('status')}});
 
-        $('select').on('change', function() { this.form.submit(); });
+        $('select').on('change', function() {
+          this.form.submit();
+        });
       });
 
       @can('admin.goods.destroy')
@@ -145,7 +150,8 @@
       function delGoods(url, name) {
         swal.fire({
           title: '{{ trans('common.warning') }}',
-          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.goods.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.goods.attribute')]) }}' + name +
+              '{{ trans('admin.confirm.delete.1') }}',
           icon: 'warning',
           showCancelButton: true,
           cancelButtonText: '{{ trans('common.cancel') }}',
@@ -159,7 +165,12 @@
               dataType: 'json',
               success: function(ret) {
                 if (ret.status === 'success') {
-                  swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
                   swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }

+ 3 - 3
resources/views/admin/shop/info.blade.php

@@ -11,8 +11,7 @@
             <div class="panel-heading">
                 <h1 class="panel-title">
                     <i class="icon wb-shopping-cart" aria-hidden="true"></i>
-                    {{ isset($good) ? trans('admin.action.edit_item', ['attribute' => trans('model.goods.attribute')]) : trans('admin.action.add_item', ['attribute' => trans
-                    ('model.goods.attribute')]) }}
+                    {{ isset($good) ? trans('admin.action.edit_item', ['attribute' => trans('model.goods.attribute')]) : trans('admin.action.add_item', ['attribute' => trans('model.goods.attribute')]) }}
                 </h1>
                 <div class="panel-actions">
                     <a href="{{route('admin.goods.index')}}" class="btn btn-danger">{{ trans('common.back') }}</a>
@@ -190,7 +189,8 @@
                                 </div>
                             </div>
                             <div class="form-actions col-12 text-right">
-                                <button type="submit" class="btn btn-success"><i class="icon wb-check"></i>{{ trans('common.submit') }}</button>
+                                <button type="submit" class="btn btn-success">
+                                    <i class="icon wb-check"></i>{{ trans('common.submit') }}</button>
                             </div>
                         </div>
                     </div>

+ 15 - 13
resources/views/admin/subscribe/log.blade.php

@@ -39,35 +39,37 @@
                 <div class="col-sm-12 col-xl-2">
                     <ul class="list-group list-group-gap">
                         <li class="list-group-item bg-blue-grey-100">
-                            <i class="icon wb-user-circle" aria-hidden="true"></i> {{ trans('model.user.nickname') }}: <span class="float-right">{{ $subscribe->user->nickname ??
-                             trans('common.deleted_item', ['attribute' => trans('common.account')])}}</span>
+                            <i class="icon wb-user-circle" aria-hidden="true"></i> {{ trans('model.user.nickname') }}:
+                            <span class="float-right">{{ $subscribe->user->nickname ?? trans('common.deleted_item', ['attribute' => trans('common.account')])}}</span>
                         </li>
                         <li class="list-group-item bg-blue-grey-100">
-                            <i class="icon wb-envelope" aria-hidden="true"></i> {{ trans('model.user.username') }}: <span class="float-right">{{ $subscribe->user->username ??
-                            trans('common.deleted_item', ['attribute' => trans('model.user.attribute')])}}</span>
+                            <i class="icon wb-envelope" aria-hidden="true"></i> {{ trans('model.user.username') }}:
+                            <span class="float-right">{{ $subscribe->user->username ?? trans('common.deleted_item', ['attribute' => trans('model.user.attribute')])}}</span>
                         </li>
                         <li class="list-group-item bg-blue-grey-100">
-                            <i class="icon wb-heart" aria-hidden="true"></i> {{ trans('common.status.attribute') }}: <span class="float-right">{!! $subscribe->status ? '<i class="green-600
-                             icon wb-check" aria-hidden="true"></i>' : '<i class="red-600 icon wb-close" aria-hidden="true"></i>' !!}</span>
+                            <i class="icon wb-heart" aria-hidden="true"></i> {{ trans('common.status.attribute') }}:
+                            <span class="float-right">{!! $subscribe->status ? '<i class="green-600 icon wb-check" aria-hidden="true"></i>' : '<i class="red-600 icon wb-close" aria-hidden="true"></i>' !!}</span>
                         </li>
                         <li class="list-group-item bg-blue-grey-100">
-                            <i class="icon wb-bell" aria-hidden="true"></i> {{ trans('model.subscribe.req_times') }}: <code class="float-right">{{ $subscribe->times }}</code>
+                            <i class="icon wb-bell" aria-hidden="true"></i> {{ trans('model.subscribe.req_times') }}:
+                            <code class="float-right">{{ $subscribe->times }}</code>
                         </li>
                         <li class="list-group-item bg-blue-grey-100">
-                            <i class="icon wb-time" aria-hidden="true"></i> {{ trans('model.subscribe.updated_at') }}: <span class="float-right">{{ $subscribe->updated_at }}</span>
+                            <i class="icon wb-time" aria-hidden="true"></i> {{ trans('model.subscribe.updated_at') }}:
+                            <span class="float-right">{{ $subscribe->updated_at }}</span>
                         </li>
                         @if($subscribe->ban_time)
                             <li class="list-group-item bg-blue-grey-100">
-                                <i class="icon wb-power" aria-hidden="true"></i> {{ trans('model.subscribe.ban_time') }}: <span class="float-right">{{ date('Y-m-d H:i',
-                                $subscribe->ban_time ) }}</span>
+                                <i class="icon wb-power" aria-hidden="true"></i> {{ trans('model.subscribe.ban_time') }}
+                                : <span class="float-right">{{ date('Y-m-d H:i', $subscribe->ban_time ) }}</span>
                             </li>
                             <li class="list-group-item bg-blue-grey-100">
-                                <i class="icon wb-lock" aria-hidden="true"></i> {{ trans('model.subscribe.ban_desc') }}: <span class="float-right">{{ __($subscribe->ban_desc) }}</span>
+                                <i class="icon wb-lock" aria-hidden="true"></i> {{ trans('model.subscribe.ban_desc') }}:
+                                <span class="float-right">{{ __($subscribe->ban_desc) }}</span>
                             </li>
                         @endif
                         @can('admin.subscribe.set')
-                            <button class="list-group-item btn btn-block @if($subscribe->status) btn-danger @else btn-success @endif"
-                                    onclick="setSubscribeStatus('{{route('admin.subscribe.set', $subscribe)}}')">
+                            <button class="list-group-item btn btn-block @if($subscribe->status) btn-danger @else btn-success @endif" onclick="setSubscribeStatus('{{route('admin.subscribe.set', $subscribe)}}')">
                                 @if($subscribe->status === 0)
                                     <i class="icon wb-unlock" aria-hidden="true"></i> {{ trans('common.status.enabled') }}
                                 @else

+ 20 - 4
resources/views/admin/ticket/index.blade.php

@@ -148,12 +148,18 @@
           }
 
           if (title.trim() === '') {
-            swal.fire({title: '{{ trans('validation.required', ['attribute' => trans('validation.attributes.title')]) }}', icon: 'warning'});
+            swal.fire({
+              title: '{{ trans('validation.required', ['attribute' => trans('validation.attributes.title')]) }}',
+              icon: 'warning',
+            });
             return false;
           }
 
           if (content.trim() === '') {
-            swal.fire({title: '{{ trans('validation.required', ['attribute' => trans('validation.attributes.content')]) }}', icon: 'warning'});
+            swal.fire({
+              title: '{{ trans('validation.required', ['attribute' => trans('validation.attributes.content')]) }}',
+              icon: 'warning',
+            });
             return false;
           }
 
@@ -179,7 +185,12 @@
                 success: function(ret) {
                   $('#add_ticket_modal').modal('hide');
                   if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
                   } else {
                     swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                   }
@@ -192,7 +203,12 @@
                     $.each(errors.errors, function(index, value) {
                       str += '<li>' + value + '</li>';
                     });
-                    swal.fire({title: '{{ trans('admin.hint') }}', html: str, icon: 'error', confirmButtonText: '{{ trans('common.confirm') }}'});
+                    swal.fire({
+                      title: '{{ trans('admin.hint') }}',
+                      html: str,
+                      icon: 'error',
+                      confirmButtonText: '{{ trans('common.confirm') }}',
+                    });
                   }
                 },
               });

+ 76 - 76
resources/views/admin/ticket/reply.blade.php

@@ -148,94 +148,94 @@
         @can('admin.ticket.destroy')
         // 关闭工单
         function closeTicket() {
-            swal.fire({
-                title: '{{ trans('admin.ticket.close_confirm') }}',
-                icon: 'question',
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'DELETE',
-                        url: '{{route('admin.ticket.destroy', $ticket->id)}}',
-                        async: true,
-                        data: {_token: '{{csrf_token()}}'},
-                        dataType: 'json',
-                        success: function (ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({
-                                    title: ret.message,
-                                    icon: 'success',
-                                    timer: 1000,
-                                    showConfirmButton: false,
-                                }).then(() => window.location.href = '{{route('admin.ticket.index')}}');
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                            }
-                        },
-                        error: function () {
-                            swal.fire({title: '{{  trans('user.ticket.error') }}', icon: 'error'});
-                        },
-                    });
-                }
-            });
+          swal.fire({
+            title: '{{ trans('admin.ticket.close_confirm') }}',
+            icon: 'question',
+            showCancelButton: true,
+            cancelButtonText: '{{trans('common.close')}}',
+            confirmButtonText: '{{trans('common.confirm')}}',
+          }).then((result) => {
+            if (result.value) {
+              $.ajax({
+                method: 'DELETE',
+                url: '{{route('admin.ticket.destroy', $ticket->id)}}',
+                async: true,
+                data: {_token: '{{csrf_token()}}'},
+                dataType: 'json',
+                success: function(ret) {
+                  if (ret.status === 'success') {
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.href = '{{route('admin.ticket.index')}}');
+                  } else {
+                    swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+                  }
+                },
+                error: function() {
+                  swal.fire({title: '{{  trans('user.ticket.error') }}', icon: 'error'});
+                },
+              });
+            }
+          });
         }
         @endcan
 
         @can('admin.ticket.update')
         //回车检测
-        $(document).on('keypress', 'input', function (e) {
-            if (e.which === 13) {
-                replyTicket();
-                return false;
-            }
+        $(document).on('keypress', 'input', function(e) {
+          if (e.which === 13) {
+            replyTicket();
+            return false;
+          }
         });
 
         // 回复工单
         function replyTicket() {
-            const content = document.getElementById('editor').value;
+          const content = document.getElementById('editor').value;
 
-            if (content.trim() === '') {
-                swal.fire({
-                    title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!',
-                    icon: 'warning',
-                    timer: 1500
-                });
-                return false;
-            }
+          if (content.trim() === '') {
             swal.fire({
-                title: '{{trans('user.ticket.reply_confirm')}}',
-                icon: 'question',
-                allowEnterKey: false,
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'PUT',
-                        url: '{{route('admin.ticket.update', $ticket)}}',
-                        data: {_token: '{{csrf_token()}}', content: content},
-                        dataType: 'json',
-                        success: function (ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({
-                                    title: ret.message,
-                                    icon: 'success',
-                                    timer: 1000,
-                                    showConfirmButton: false
-                                }).then(() => window.location.reload());
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                            }
-                        },
-                        error: function () {
-                            swal.fire({title: '{{ trans('admin.ticket.error') }}', icon: 'error'});
-                        },
-                    });
-                }
+              title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!',
+              icon: 'warning',
+              timer: 1500,
             });
+            return false;
+          }
+          swal.fire({
+            title: '{{trans('user.ticket.reply_confirm')}}',
+            icon: 'question',
+            allowEnterKey: false,
+            showCancelButton: true,
+            cancelButtonText: '{{trans('common.close')}}',
+            confirmButtonText: '{{trans('common.confirm')}}',
+          }).then((result) => {
+            if (result.value) {
+              $.ajax({
+                method: 'PUT',
+                url: '{{route('admin.ticket.update', $ticket)}}',
+                data: {_token: '{{csrf_token()}}', content: content},
+                dataType: 'json',
+                success: function(ret) {
+                  if (ret.status === 'success') {
+                    swal.fire({
+                      title: ret.message,
+                      icon: 'success',
+                      timer: 1000,
+                      showConfirmButton: false,
+                    }).then(() => window.location.reload());
+                  } else {
+                    swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+                  }
+                },
+                error: function() {
+                  swal.fire({title: '{{ trans('admin.ticket.error') }}', icon: 'error'});
+                },
+              });
+            }
+          });
         }
         @endcan
     </script>

+ 6 - 1
resources/views/admin/tools/convert.blade.php

@@ -80,7 +80,12 @@
         const content = $('#content').val();
 
         if (content.trim() === '') {
-          swal.fire({title: '{{ trans('admin.tools.convert.content_placeholder') }}', icon: 'warning', timer: 1000, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.tools.convert.content_placeholder') }}',
+            icon: 'warning',
+            timer: 1000,
+            showConfirmButton: false,
+          });
           return;
         }
         swal.fire({

+ 6 - 1
resources/views/admin/tools/decompile.blade.php

@@ -32,7 +32,12 @@
         const content = $('#content').val();
 
         if (content.trim() === '') {
-          swal.fire({title: '{{ trans('admin.tools.decompile.content_placeholder') }}', icon: 'warning', timer: 1000, showConfirmButton: false});
+          swal.fire({
+            title: '{{ trans('admin.tools.decompile.content_placeholder') }}',
+            icon: 'warning',
+            timer: 1000,
+            showConfirmButton: false,
+          });
           return;
         }
         swal.fire({

+ 52 - 51
resources/views/admin/user/export.blade.php

@@ -98,59 +98,60 @@
     <script src="/assets/custom/easy.qrcode.min.js" type="text/javascript"></script>
     @can('admin.user.exportProxy')
         <script>
-            function getInfo(id, type) {
-                $.post("{{route('admin.user.exportProxy', $user)}}", {_token: '{{csrf_token()}}', id: id, type: type},
-                    function (ret) {
-                        if (ret.status === 'success') {
-                            switch (type) {
-                                case 'code':
-                                    swal.fire({
-                                        html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data +
-                                            '</textarea>' +
-                                            '<a href="' + ret.data + '" class="btn btn-block btn-danger mt-4">{{ trans('common.open') }} ' +
-                                            ret.title + '</a>',
-                                        showConfirmButton: false,
-                                    });
-                                    break;
-                                case 'qrcode':
-                                    swal.fire({
-                                        title: '{{trans('user.scan_qrcode')}}',
-                                        html: '<div id="qrcode"></div><button class="btn btn-block btn-outline-primary mt-4" onclick="Download()"> <i class="icon wb-download"></i> {{trans('common.download')}}</button>',
-                                        onBeforeOpen: () => {
-                                            new QRCode(document.getElementById("qrcode"), {text: ret.data});
-                                        },
-                                        showConfirmButton: false,
-                                    });
-                                    break;
-                                case 'text':
-                                    swal.fire({
-                                        title: '{{trans('user.node.info')}}',
-                                        html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data +
-                                            '</textarea>',
-                                        showConfirmButton: false,
-                                    });
-                                    break;
-                                default:
-                                    swal.fire({title: ret.title, text: ret.data});
-                            }
-                        }
-                    });
-            }
+          function getInfo(id, type) {
+            $.post("{{route('admin.user.exportProxy', $user)}}", {_token: '{{csrf_token()}}', id: id, type: type},
+                function(ret) {
+                  if (ret.status === 'success') {
+                    switch (type) {
+                      case 'code':
+                        swal.fire({
+                          html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data +
+                              '</textarea>' +
+                              '<a href="' + ret.data +
+                              '" class="btn btn-block btn-danger mt-4">{{ trans('common.open') }} ' +
+                              ret.title + '</a>',
+                          showConfirmButton: false,
+                        });
+                        break;
+                      case 'qrcode':
+                        swal.fire({
+                          title: '{{trans('user.scan_qrcode')}}',
+                          html: '<div id="qrcode"></div><button class="btn btn-block btn-outline-primary mt-4" onclick="Download()"> <i class="icon wb-download"></i> {{trans('common.download')}}</button>',
+                          onBeforeOpen: () => {
+                            new QRCode(document.getElementById('qrcode'), {text: ret.data});
+                          },
+                          showConfirmButton: false,
+                        });
+                        break;
+                      case 'text':
+                        swal.fire({
+                          title: '{{trans('user.node.info')}}',
+                          html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data +
+                              '</textarea>',
+                          showConfirmButton: false,
+                        });
+                        break;
+                      default:
+                        swal.fire({title: ret.title, text: ret.data});
+                    }
+                  }
+                });
+          }
 
-            function Download() {
-                const canvas = document.getElementsByTagName("canvas")[0];
-                canvas.toBlob((blob) => {
-                    let link = document.createElement('a');
-                    link.download = 'qr.png';
+          function Download() {
+            const canvas = document.getElementsByTagName('canvas')[0];
+            canvas.toBlob((blob) => {
+              let link = document.createElement('a');
+              link.download = 'qr.png';
 
-                    let reader = new FileReader();
-                    reader.readAsDataURL(blob);
-                    reader.onload = () => {
-                        link.href = reader.result;
-                        link.click();
-                    };
-                }, "image/png");
-            }
+              let reader = new FileReader();
+              reader.readAsDataURL(blob);
+              reader.onload = () => {
+                link.href = reader.result;
+                link.click();
+              };
+            }, 'image/png');
+          }
         </script>
     @endcan
 @endsection

+ 8 - 2
resources/views/admin/user/group/index.blade.php

@@ -75,7 +75,8 @@
           function deleteUserGroup(url, name) {
             swal.fire({
               title: '{{ trans('admin.hint') }}',
-              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.user_group.attribute')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+              text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.user_group.attribute')]) }}' +
+                  name + '{{ trans('admin.confirm.delete.1') }}',
               icon: 'info',
               showCancelButton: true,
               cancelButtonText: '{{ trans('common.close') }}',
@@ -89,7 +90,12 @@
                   dataType: 'json',
                   success: function(ret) {
                     if (ret.status === 'success') {
-                      swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                      swal.fire({
+                        title: ret.message,
+                        icon: 'success',
+                        timer: 1000,
+                        showConfirmButton: false,
+                      }).then(() => window.location.reload());
                     } else {
                       swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                     }

+ 191 - 215
resources/views/admin/user/index.blade.php

@@ -36,24 +36,19 @@
             <div class="panel-body">
                 <form class="form-row">
                     <div class="form-group col-xxl-1 col-lg-1 col-md-1 col-sm-4">
-                        <input type="number" class="form-control" name="id" value="{{Request::query('id')}}"
-                               placeholder="{{ trans('model.user.id') }}"/>
+                        <input type="number" class="form-control" name="id" value="{{Request::query('id')}}" placeholder="{{ trans('model.user.id') }}"/>
                     </div>
                     <div class="form-group col-xxl-2 col-lg-3 col-md-3 col-sm-4">
-                        <input type="text" class="form-control" name="username" value="{{Request::query('username')}}"
-                               placeholder="{{ trans('model.user.username') }}"/>
+                        <input type="text" class="form-control" name="username" value="{{Request::query('username')}}" placeholder="{{ trans('model.user.username') }}"/>
                     </div>
                     <div class="form-group col-xxl-2 col-lg-3 col-md-3 col-sm-4">
-                        <input type="text" class="form-control" name="wechat" value="{{Request::query('wechat')}}"
-                               placeholder="{{ trans('model.user.wechat') }}"/>
+                        <input type="text" class="form-control" name="wechat" value="{{Request::query('wechat')}}" placeholder="{{ trans('model.user.wechat') }}"/>
                     </div>
                     <div class="form-group col-xxl-2 col-lg-3 col-md-3 col-sm-4">
-                        <input type="number" class="form-control" name="qq" value="{{Request::query('qq')}}"
-                               placeholder="{{ trans('model.user.qq') }}"/>
+                        <input type="number" class="form-control" name="qq" value="{{Request::query('qq')}}" placeholder="{{ trans('model.user.qq') }}"/>
                     </div>
                     <div class="form-group col-xxl-1 col-lg-2 col-md-2 col-sm-4">
-                        <input type="number" class="form-control" name="port" value="{{Request::query('port')}}"
-                               placeholder="{{ trans('model.user.port') }}"/>
+                        <input type="number" class="form-control" name="port" value="{{Request::query('port')}}" placeholder="{{ trans('model.user.port') }}"/>
                     </div>
                     <div class="form-group col-xxl-1 col-lg-3 col-md-3 col-4">
                         <select class="form-control" id="user_group_id" name="user_group_id">
@@ -114,17 +109,16 @@
                             <td> {{$user->username}} </td>
                             <td> {{$user->credit}} </td>
                             <td>
-                                {!! $user->port? : '<span class="badge badge-lg badge-danger"> '.trans('common.none').' </span>' !!}
+                                {!! $user->port?: '<span class="badge badge-lg badge-danger"> '.trans('common.none').' </span>' !!}
                             </td>
                             <td>
-                                <a href="javascript:" class="copySubscribeLink" data-clipboard-action="copy"
-                                   data-clipboard-text="{{$user->subUrl()}}">{{$user->subscribe->code}}</a>
+                                <a href="javascript:" class="copySubscribeLink" data-clipboard-action="copy" data-clipboard-text="{{$user->subUrl()}}">{{$user->subscribe->code}}</a>
                             </td>
                             <td> {{formatBytes($user->used_traffic)}} / {{$user->transfer_enable_formatted}} </td>
                             <td> {{$user->t? date('Y-m-d H:i', $user->t): trans('common.status.unused')}} </td>
                             <td>
                                 @if($user->expiration_status() !== 3)
-                                    <span class="badge badge-lg badge-{{['danger','warning','default'][$user->expiration_status()]}}"> {{ $user->expiration_date }} </span>
+                                    <span class="badge badge-lg badge-{{ ['danger', 'warning', 'default'][$user->expiration_status()] }}"> {{ $user->expiration_date }} </span>
                                 @else
                                     {{ $user->expiration_date }}
                                 @endif
@@ -145,74 +139,54 @@
                                 @endif
                             </td>
                             <td>
-                                <span class="badge badge-lg badge-{{$user->enable?'info':'danger'}}">
-                                    <i class="wb-{{$user->enable?'check':'close'}}" aria-hidden="true"></i>
+                                <span class="badge badge-lg badge-{{ $user->enable ? 'info' : 'danger' }}">
+                                    <i class="wb-{{ $user->enable ? 'check' : 'close' }}" aria-hidden="true"></i>
                                 </span>
                             </td>
                             <td>
                                 @canany(['admin.user.edit', 'admin.user.destroy', 'admin.user.export', 'admin.user.monitor', 'admin.user.online', 'admin.user.reset', 'admin.user.switch'])
-                                    <button type="button" class="btn btn-primary dropdown-toggle"
-                                            data-boundary="viewport" data-toggle="dropdown" aria-expanded="false">
+                                    <button type="button" class="btn btn-primary dropdown-toggle" data-boundary="viewport" data-toggle="dropdown" aria-expanded="false">
                                         <i class="icon wb-wrench" aria-hidden="true"></i>
                                     </button>
                                     <div class="dropdown-menu" role="menu">
                                         @can('admin.user.edit')
-                                            <a class="dropdown-item"
-                                               href="{{route('admin.user.edit', ['user'=>$user->id, Request::getQueryString()])}}"
-                                               role="menuitem">
-                                                <i class="icon wb-edit"
-                                                   aria-hidden="true"></i> {{ trans('common.edit') }}
+                                            <a class="dropdown-item" href="{{route('admin.user.edit', ['user'=>$user->id, Request::getQueryString()])}}" role="menuitem">
+                                                <i class="icon wb-edit" aria-hidden="true"></i> {{ trans('common.edit') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.destroy')
-                                            <a class="dropdown-item"
-                                               href="javascript:delUser('{{route('admin.user.destroy', $user->id)}}','{{$user->username}}')"
-                                               role="menuitem">
-                                                <i class="icon wb-trash"
-                                                   aria-hidden="true"></i> {{ trans('common.delete') }}
+                                            <a class="dropdown-item" href="javascript:delUser('{{route('admin.user.destroy', $user->id)}}','{{$user->username}}')" role="menuitem">
+                                                <i class="icon wb-trash" aria-hidden="true"></i> {{ trans('common.delete') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.export')
-                                            <a class="dropdown-item" href="{{route('admin.user.export', $user)}}"
-                                               role="menuitem">
-                                                <i class="icon wb-code"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.proxy_info') }}
+                                            <a class="dropdown-item" href="{{route('admin.user.export', $user)}}" role="menuitem">
+                                                <i class="icon wb-code" aria-hidden="true"></i> {{ trans('admin.user.proxy_info') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.monitor')
-                                            <a class="dropdown-item" href="{{route('admin.user.monitor', $user)}}"
-                                               role="menuitem">
-                                                <i class="icon wb-stats-bars"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.traffic_monitor') }}
+                                            <a class="dropdown-item" href="{{route('admin.user.monitor', $user)}}" role="menuitem">
+                                                <i class="icon wb-stats-bars" aria-hidden="true"></i> {{ trans('admin.user.traffic_monitor') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.online')
-                                            <a class="dropdown-item" href="{{route('admin.user.online', $user)}}"
-                                               role="menuitem">
-                                                <i class="icon wb-cloud"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.online_monitor') }}
+                                            <a class="dropdown-item" href="{{route('admin.user.online', $user)}}" role="menuitem">
+                                                <i class="icon wb-cloud" aria-hidden="true"></i> {{ trans('admin.user.online_monitor') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.reset')
-                                            <a class="dropdown-item"
-                                               href="javascript:resetTraffic('{{$user->id}}','{{$user->username}}')"
-                                               role="menuitem">
-                                                <i class="icon wb-reload"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.reset_traffic') }}
+                                            <a class="dropdown-item" href="javascript:resetTraffic('{{$user->id}}','{{$user->username}}')" role="menuitem">
+                                                <i class="icon wb-reload" aria-hidden="true"></i> {{ trans('admin.user.reset_traffic') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.switch')
-                                            <a class="dropdown-item" href="javascript:switchToUser('{{$user->id}}')"
-                                               role="menuitem">
-                                                <i class="icon wb-user"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.user_view') }}
+                                            <a class="dropdown-item" href="javascript:switchToUser('{{$user->id}}')" role="menuitem">
+                                                <i class="icon wb-user" aria-hidden="true"></i> {{ trans('admin.user.user_view') }}
                                             </a>
                                         @endcan
                                         @can('admin.user.VNetInfo')
-                                            <a class="dropdown-item" href="javascript:VNetInfo('{{$user->id}}')"
-                                               role="menuitem">
-                                                <i id="vent_{{$user->id}}" class="icon wb-link-broken"
-                                                   aria-hidden="true"></i> {{ trans('admin.user.connection_test') }}
+                                            <a class="dropdown-item" href="javascript:VNetInfo('{{$user->id}}')" role="menuitem">
+                                                <i id="vent_{{$user->id}}" class="icon wb-link-broken" aria-hidden="true"></i> {{ trans('admin.user.connection_test') }}
                                             </a>
                                         @endcan
                                     </div>
@@ -243,182 +217,184 @@
     <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
     <script src="/assets/custom/clipboardjs/clipboard.min.js"></script>
     <script>
-        $(document).ready(function () {
-            $('#user_group_id').val({{Request::query('user_group_id')}});
-            $('#level').val({{Request::query('level')}});
-            $('#status').val({{Request::query('status')}});
-            $('#enable').val({{Request::query('enable')}});
-            $('select').on('change', function () {
-                this.form.submit();
-            });
+      $(document).ready(function() {
+        $('#user_group_id').val({{Request::query('user_group_id')}});
+        $('#level').val({{Request::query('level')}});
+        $('#status').val({{Request::query('status')}});
+        $('#enable').val({{Request::query('enable')}});
+        $('select').on('change', function() {
+          this.form.submit();
         });
+      });
 
-        @can('admin.user.batch')
-        // 批量生成账号
-        function batchAddUsers() {
-            swal.fire({
-                title: '{{ trans('admin.user.massive.text') }}',
-                input: 'range',
-                inputAttributes: {min: 1, max: 10},
-                inputValue: 1,
-                icon: 'question',
-                showCancelButton: true,
-                cancelButtonText: '{{ trans('common.close') }}',
-                confirmButtonText: '{{ trans('common.confirm') }}',
-            }).then((result) => {
-                if (result.value) {
-                    $.post('{{route('admin.user.batch')}}', {
-                        _token: '{{csrf_token()}}',
-                        amount: result.value
-                    }, function (ret) {
-                        if (ret.status === 'success') {
-                            swal.fire({
-                                title: ret.message,
-                                icon: 'success',
-                                timer: 1000,
-                                showConfirmButton: false
-                            }).then(() => window.location.reload());
-                        } else {
-                            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                        }
-                    });
-                }
-            });
-        }
-        @endcan
-
-        @can('admin.user.destroy')
-        // 删除账号
-        function delUser(url, username) {
-            swal.fire({
-                title: '{{trans('common.warning')}}',
-                text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.user.attribute')]) }}' + username + '{{ trans('admin.confirm.delete.1') }}',
-                icon: 'warning',
-                showCancelButton: true,
-                cancelButtonText: '{{ trans('common.close') }}',
-                confirmButtonText: '{{ trans('common.confirm') }}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'DELETE',
-                        url: url,
-                        data: {_token: '{{csrf_token()}}'},
-                        dataType: 'json',
-                        success: function (ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({
-                                    title: ret.message,
-                                    icon: 'success',
-                                    timer: 1000,
-                                    showConfirmButton: false
-                                }).then(() => window.location.reload());
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                            }
-                        },
-                    });
-                }
-            });
-        }
-        @endcan
-
-        @can('admin.user.reset')
-        // 重置流量
-        function resetTraffic(id, username) {
-            swal.fire({
-                title: '{{trans('common.warning')}}',
-                text: '{{ trans('admin.user.reset_confirm.0') }}' + username + '{{ trans('admin.user.reset_confirm.1') }}',
-                icon: 'warning',
-                showCancelButton: true,
-                cancelButtonText: '{{ trans('common.close') }}',
-                confirmButtonText: '{{ trans('common.confirm') }}',
-            }).then((result) => {
-                if (result.value) {
-                    $.post('{{route('admin.user.reset', '')}}/' + id, {_token: '{{ csrf_token() }}'}, function (ret) {
-                        if (ret.status === 'success') {
-                            swal.fire({
-                                title: ret.message,
-                                icon: 'success',
-                                timer: 1000,
-                                showConfirmButton: false
-                            }).then(() => window.location.reload());
-                        } else {
-                            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                        }
-                    });
-                }
+      @can('admin.user.batch')
+      // 批量生成账号
+      function batchAddUsers() {
+        swal.fire({
+          title: '{{ trans('admin.user.massive.text') }}',
+          input: 'range',
+          inputAttributes: {min: 1, max: 10},
+          inputValue: 1,
+          icon: 'question',
+          showCancelButton: true,
+          cancelButtonText: '{{ trans('common.close') }}',
+          confirmButtonText: '{{ trans('common.confirm') }}',
+        }).then((result) => {
+          if (result.value) {
+            $.post('{{route('admin.user.batch')}}', {
+              _token: '{{csrf_token()}}',
+              amount: result.value,
+            }, function(ret) {
+              if (ret.status === 'success') {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
+              } else {
+                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+              }
             });
-        }
-        @endcan
+          }
+        });
+      }
+      @endcan
 
-        @can('admin.user.switch')
-        // 切换用户身份
-        function switchToUser(id) {
-            $.post('{{route('admin.user.switch', '')}}/' + id, {_token: '{{ csrf_token() }}'}, function (ret) {
+      @can('admin.user.destroy')
+      // 删除账号
+      function delUser(url, username) {
+        swal.fire({
+          title: '{{trans('common.warning')}}',
+          text: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.user.attribute')]) }}' + username +
+              '{{ trans('admin.confirm.delete.1') }}',
+          icon: 'warning',
+          showCancelButton: true,
+          cancelButtonText: '{{ trans('common.close') }}',
+          confirmButtonText: '{{ trans('common.confirm') }}',
+        }).then((result) => {
+          if (result.value) {
+            $.ajax({
+              method: 'DELETE',
+              url: url,
+              data: {_token: '{{csrf_token()}}'},
+              dataType: 'json',
+              success: function(ret) {
                 if (ret.status === 'success') {
-                    swal.fire({
-                        title: ret.message,
-                        icon: 'success',
-                        timer: 1000,
-                        showConfirmButton: false
-                    }).then(() => window.location.href = '/');
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
                 } else {
-                    swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+                  swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
                 }
+              },
             });
-        }
-        @endcan
+          }
+        });
+      }
+      @endcan
 
-        @can('admin.user.VNetInfo')
-        // 节点连通性测试
-        function VNetInfo(id) {
-            $.ajax({
-                method: 'POST',
-                url: '{{route('admin.user.VNetInfo', '')}}/' + id,
-                data: {_token: '{{csrf_token()}}'},
-                beforeSend: function () {
-                    $('#vent_' + id).removeClass('wb-link-broken').addClass('wb-loop icon-spin');
-                },
-                success: function (ret) {
-                    if (ret.status === 'success') {
-                        let str = '';
-                        for (let i in ret.data) {
-                            str += '<tr><td>' + ret.data[i]['id'] + '</td><td>' + ret.data[i]['name'] + '</td><td>' + ret.data[i]['avaliable'] + '</td></tr>';
-                        }
-                        swal.fire({
-                            title: ret.title,
-                            icon: 'info',
-                            html: '<table class="my-20"><thead class="thead-default"><tr><th> ID </th><th> {{ trans('model.node.attribute') }} </th> <th> {{ trans('common.status.attribute')
-                 }} </th></thead><tbody>' + str + '</tbody></table>',
-                            showConfirmButton: false,
-                        });
-                    } else {
-                        swal.fire({title: ret.title, text: ret.data, icon: 'error'});
-                    }
-                },
-                complete: function () {
-                    $('#vent_' + id).removeClass('wb-loop icon-spin').addClass('wb-link-broken');
-                },
+      @can('admin.user.reset')
+      // 重置流量
+      function resetTraffic(id, username) {
+        swal.fire({
+          title: '{{trans('common.warning')}}',
+          text: '{{ trans('admin.user.reset_confirm.0') }}' + username + '{{ trans('admin.user.reset_confirm.1') }}',
+          icon: 'warning',
+          showCancelButton: true,
+          cancelButtonText: '{{ trans('common.close') }}',
+          confirmButtonText: '{{ trans('common.confirm') }}',
+        }).then((result) => {
+          if (result.value) {
+            $.post('{{route('admin.user.reset', '')}}/' + id, {_token: '{{ csrf_token() }}'}, function(ret) {
+              if (ret.status === 'success') {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
+              } else {
+                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+              }
             });
-        }
-        @endcan
+          }
+        });
+      }
+      @endcan
 
-        const clipboard = new ClipboardJS('.copySubscribeLink');
-        clipboard.on('success', function () {
+      @can('admin.user.switch')
+      // 切换用户身份
+      function switchToUser(id) {
+        $.post('{{route('admin.user.switch', '')}}/' + id, {_token: '{{ csrf_token() }}'}, function(ret) {
+          if (ret.status === 'success') {
             swal.fire({
-                title: '{{ trans('common.copy.success') }}',
-                icon: 'success',
-                timer: 1000,
-                showConfirmButton: false,
-            });
+              title: ret.message,
+              icon: 'success',
+              timer: 1000,
+              showConfirmButton: false,
+            }).then(() => window.location.href = '/');
+          } else {
+            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+          }
         });
-        clipboard.on('error', function () {
-            swal.fire({
-                title: '{{ trans('common.copy.failed') }}',
-                icon: 'error',
-                timer: 1500,
+      }
+      @endcan
+
+      @can('admin.user.VNetInfo')
+      // 节点连通性测试
+      function VNetInfo(id) {
+        $.ajax({
+          method: 'POST',
+          url: '{{route('admin.user.VNetInfo', '')}}/' + id,
+          data: {_token: '{{csrf_token()}}'},
+          beforeSend: function() {
+            $('#vent_' + id).removeClass('wb-link-broken').addClass('wb-loop icon-spin');
+          },
+          success: function(ret) {
+            if (ret.status === 'success') {
+              let str = '';
+              for (let i in ret.data) {
+                str += '<tr><td>' + ret.data[i]['id'] + '</td><td>' + ret.data[i]['name'] + '</td><td>' +
+                    ret.data[i]['avaliable'] + '</td></tr>';
+              }
+              swal.fire({
+                title: ret.title,
+                icon: 'info',
+                html: '<table class="my-20"><thead class="thead-default"><tr><th> ID </th><th> {{ trans('model.node.attribute') }} </th> <th> {{ trans('common.status.attribute')
+                 }} </th></thead><tbody>' + str + '</tbody></table>',
                 showConfirmButton: false,
-            });
+              });
+            } else {
+              swal.fire({title: ret.title, text: ret.data, icon: 'error'});
+            }
+          },
+          complete: function() {
+            $('#vent_' + id).removeClass('wb-loop icon-spin').addClass('wb-link-broken');
+          },
+        });
+      }
+      @endcan
+
+      const clipboard = new ClipboardJS('.copySubscribeLink');
+      clipboard.on('success', function() {
+        swal.fire({
+          title: '{{ trans('common.copy.success') }}',
+          icon: 'success',
+          timer: 1000,
+          showConfirmButton: false,
+        });
+      });
+      clipboard.on('error', function() {
+        swal.fire({
+          title: '{{ trans('common.copy.failed') }}',
+          icon: 'error',
+          timer: 1500,
+          showConfirmButton: false,
         });
+      });
     </script>
 @endsection

+ 191 - 191
resources/views/admin/user/info.blade.php

@@ -385,209 +385,209 @@
     <script src="/assets/global/js/Plugin/bootstrap-select.js"></script>
     <script src="/assets/global/js/Plugin/bootstrap-datepicker.js"></script>
     <script>
-        $(document).ready(function () {
-            @isset($user)
-            $('#nickname').val('{{$user->nickname}}');
-            $('#username').val('{{$user->username}}');
-            $('#level').selectpicker('val', '{{$user->level}}');
-            $('#group').selectpicker('val', '{{$user->user_group_id}}');
-            $('#invite_num').val('{{$user->invite_num}}');
-            $('#reset_time').val('{{$user->reset_date}}');
-            $('#expired_at').val('{{$user->expiration_date}}');
-            $("input[name='status'][value='{{$user->status}}']").click();
-            $('#wechat').val('{{$user->wechat}}');
-            $('#qq').val('{{$user->qq}}');
-            $('#remark').val('{{$user->remark}}');
-            $('#port').val('{{$user->port}}');
-            $('#passwd').val('{{$user->passwd}}');
-            $('#method').selectpicker('val', '{{$user->method}}');
-            $('#transfer_enable').val('{{$user->transfer_enable / GiB}}');
-            $("input[name='enable'][value='{{$user->enable}}']").click();
-            $('#protocol').selectpicker('val', '{{$user->protocol}}');
-            $('#obfs').selectpicker('val', '{{$user->obfs}}');
-            $('#speed_limit').val('{{$user->speed_limit}}');
-            $('#uuid').val('{{$user->vmess_id}}');
-            $('#roles').selectpicker('val', @json($user->roles()->pluck('name')));
-            @else
-            $('#level').selectpicker('val', '0');
-            @endisset
-        });
+      $(document).ready(function() {
+          @isset($user)
+          $('#nickname').val('{{$user->nickname}}');
+        $('#username').val('{{$user->username}}');
+        $('#level').selectpicker('val', '{{$user->level}}');
+        $('#group').selectpicker('val', '{{$user->user_group_id}}');
+        $('#invite_num').val('{{$user->invite_num}}');
+        $('#reset_time').val('{{$user->reset_date}}');
+        $('#expired_at').val('{{$user->expiration_date}}');
+        $("input[name='status'][value='{{$user->status}}']").click();
+        $('#wechat').val('{{$user->wechat}}');
+        $('#qq').val('{{$user->qq}}');
+        $('#remark').val('{{$user->remark}}');
+        $('#port').val('{{$user->port}}');
+        $('#passwd').val('{{$user->passwd}}');
+        $('#method').selectpicker('val', '{{$user->method}}');
+        $('#transfer_enable').val('{{$user->transfer_enable / GiB}}');
+        $("input[name='enable'][value='{{$user->enable}}']").click();
+        $('#protocol').selectpicker('val', '{{$user->protocol}}');
+        $('#obfs').selectpicker('val', '{{$user->obfs}}');
+        $('#speed_limit').val('{{$user->speed_limit}}');
+        $('#uuid').val('{{$user->vmess_id}}');
+        $('#roles').selectpicker('val', @json($user->roles()->pluck('name')));
+          @else
+          $('#level').selectpicker('val', '0');
+          @endisset
+      });
+
+      $('.input-daterange>input').datepicker({
+        format: 'yyyy-mm-dd',
+      });
 
-        $('.input-daterange>input').datepicker({
-            format: 'yyyy-mm-dd',
+      @isset($user)
+      @can('admin.user.switch')
+      // 切换用户身份
+      function switchToUser() {
+        $.ajax({
+          url: '{{route('admin.user.switch', $user)}}',
+          data: {'_token': '{{csrf_token()}}'},
+          dataType: 'json',
+          method: 'POST',
+          success: function(ret) {
+            if (ret.status === 'success') {
+              swal.fire({
+                title: ret.message,
+                icon: 'success',
+                timer: 1000,
+                showConfirmButton: false,
+              }).then(() => window.location.href = '/');
+            } else {
+              swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+            }
+          },
         });
+      }
+      @endcan
 
-        @isset($user)
-        @can('admin.user.switch')
-        // 切换用户身份
-        function switchToUser() {
-            $.ajax({
-                url: '{{route('admin.user.switch', $user)}}',
-                data: {'_token': '{{csrf_token()}}'},
-                dataType: 'json',
-                method: 'POST',
-                success: function (ret) {
-                    if (ret.status === 'success') {
-                        swal.fire({
-                            title: ret.message,
-                            icon: 'success',
-                            timer: 1000,
-                            showConfirmButton: false
-                        }).then(() => window.location.href = '/');
-                    } else {
-                        swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                    }
-                },
-            });
-        }
-        @endcan
+      @can('admin.user.updateCredit')
+      // 余额充值
+      function handleUserCredit() {
+        const amount = $('#amount').val();
+        const reg = /^(-?)\d+(\.\d+)?$/; //只可以是正负数字
 
-        @can('admin.user.updateCredit')
-        // 余额充值
-        function handleUserCredit() {
-            const amount = $('#amount').val();
-            const reg = /^(-?)\d+(\.\d+)?$/; //只可以是正负数字
+        if (amount.trim() === '' || amount === 0 || !reg.test(amount)) {
+          $('#msg').show().html('{{ trans('user.shop.change_amount_help') }}');
+          $('#name').focus();
+          return false;
+        }
 
-            if (amount.trim() === '' || amount === 0 || !reg.test(amount)) {
-                $('#msg').show().html('{{ trans('user.shop.change_amount_help') }}');
-                $('#name').focus();
-                return false;
+        $.ajax({
+          url: '{{route('admin.user.updateCredit', $user)}}',
+          method: 'POST',
+          data: {_token: '{{csrf_token()}}', amount: amount},
+          beforeSend: function() {
+            $('#msg').show().html('{{ trans('user.recharging') }}');
+          },
+          success: function(ret) {
+            if (ret.status === 'fail') {
+              $('#msg').show().html(ret.message);
+              return false;
+            } else {
+              $('#handle_user_credit').modal('hide');
+              if (ret.status === 'success') {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => {
+                  window.location.reload();
+                });
+              } else {
+                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+              }
             }
+          },
+          error: function() {
+            $('#msg').show().html('{{ trans('common.request_failed') }}');
+          },
+          complete: function() {
+          },
+        });
+      }
+      @endcan
+      @endisset
 
-            $.ajax({
-                url: '{{route('admin.user.updateCredit', $user)}}',
-                method: 'POST',
-                data: {_token: '{{csrf_token()}}', amount: amount},
-                beforeSend: function () {
-                    $('#msg').show().html('{{ trans('user.recharging') }}');
-                },
-                success: function (ret) {
-                    if (ret.status === 'fail') {
-                        $('#msg').show().html(ret.message);
-                        return false;
-                    } else {
-                        $('#handle_user_credit').modal('hide');
-                        if (ret.status === 'success') {
-                            swal.fire({
-                                title: ret.message,
-                                icon: 'success',
-                                timer: 1000,
-                                showConfirmButton: false
-                            }).then(() => {
-                                window.location.reload();
-                            });
-                        } else {
-                            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                        }
-                    }
-                },
-                error: function () {
-                    $('#msg').show().html('{{ trans('common.request_failed') }}');
-                },
-                complete: function () {
-                },
-            });
-        }
-        @endcan
-        @endisset
-
-        // ajax同步提交
-        function Submit() {
-            // 用途
-            let usage = '';
-            $.each($('input:checkbox[name=\'usage\']'), function () {
-                if (this.checked) {
-                    usage += $(this).val() + ',';
-                }
-            });
+      // ajax同步提交
+      function Submit() {
+        // 用途
+        let usage = '';
+        $.each($('input:checkbox[name=\'usage\']'), function() {
+          if (this.checked) {
+            usage += $(this).val() + ',';
+          }
+        });
 
-            $.ajax({
-                method: @isset($user)'PUT' @else 'POST' @endisset,
-                url: '{{isset($user)? route('admin.user.update', $user) : route('admin.user.store')}}',
-                dataType: 'json',
-                data: {
-                    _token: '{{csrf_token()}}',
-                    nickname: $('#nickname').val(),
-                    username: $('#username').val(),
-                    password: $('#password').val(),
-                    port: $('#port').val(),
-                    passwd: $('#passwd').val(),
-                    uuid: $('#uuid').val(),
-                    transfer_enable: $('#transfer_enable').val(),
-                    enable: $('input:radio[name=\'enable\']:checked').val(),
-                    method: $('#method option:selected').val(),
-                    protocol: $('#protocol option:selected').val(),
-                    obfs: $('#obfs option:selected').val(),
-                    speed_limit: $('#speed_limit').val(),
-                    wechat: $('#wechat').val(),
-                    qq: $('#qq').val(),
-                    expired_at: $('#expired_at').val(),
-                    remark: $('#remark').val(),
-                    level: $('#level').val(),
-                    user_group_id: $('#group').val(),
-                    roles: $('#roles').val(),
-                    reset_time: $('#reset_time').val(),
-                    invite_num: $('#invite_num').val(),
-                    status: $('input:radio[name=\'status\']:checked').val(),
-                },
-                success: function (ret) {
-                    if (ret.status === 'success') {
-                        swal.fire({
-                            title: '{{ trans('admin.hint') }}',
-                            text: '{{ trans('admin.user.update_help') }}',
-                            icon: 'question',
-                            showCancelButton: true,
-                            cancelButtonText: '{{ trans('common.close') }}',
-                            confirmButtonText: '{{ trans('common.confirm') }}',
-                        }).then((result) => {
-                                if (result.value) {
-                                    window.location.href = '{!! route('admin.user.index').(Request::getQueryString()?('?'.Request::getQueryString()):'') !!}';
-                                }
-                            },
-                        );
-                    } else {
-                        swal.fire({title: ret.message, icon: 'error', timer: 1000, showConfirmButton: false});
-                    }
-                },
-                error: function (data) {
-                    let str = '';
-                    const errors = data.responseJSON;
-                    if ($.isEmptyObject(errors) === false) {
-                        $.each(errors.errors, function (index, value) {
-                            str += '<li>' + value + '</li>';
-                        });
-                        swal.fire({
-                            title: '{{ trans('admin.hint') }}',
-                            html: str,
-                            icon: 'error',
-                            confirmButtonText: '{{ trans('common.confirm') }}'
-                        });
+        $.ajax({
+          method: @isset($user)'PUT' @else 'POST' @endisset,
+          url: '{{isset($user)? route('admin.user.update', $user) : route('admin.user.store')}}',
+          dataType: 'json',
+          data: {
+            _token: '{{csrf_token()}}',
+            nickname: $('#nickname').val(),
+            username: $('#username').val(),
+            password: $('#password').val(),
+            port: $('#port').val(),
+            passwd: $('#passwd').val(),
+            uuid: $('#uuid').val(),
+            transfer_enable: $('#transfer_enable').val(),
+            enable: $('input:radio[name=\'enable\']:checked').val(),
+            method: $('#method option:selected').val(),
+            protocol: $('#protocol option:selected').val(),
+            obfs: $('#obfs option:selected').val(),
+            speed_limit: $('#speed_limit').val(),
+            wechat: $('#wechat').val(),
+            qq: $('#qq').val(),
+            expired_at: $('#expired_at').val(),
+            remark: $('#remark').val(),
+            level: $('#level').val(),
+            user_group_id: $('#group').val(),
+            roles: $('#roles').val(),
+            reset_time: $('#reset_time').val(),
+            invite_num: $('#invite_num').val(),
+            status: $('input:radio[name=\'status\']:checked').val(),
+          },
+          success: function(ret) {
+            if (ret.status === 'success') {
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                text: '{{ trans('admin.user.update_help') }}',
+                icon: 'question',
+                showCancelButton: true,
+                cancelButtonText: '{{ trans('common.close') }}',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              }).then((result) => {
+                    if (result.value) {
+                      window.location.href = '{!! route('admin.user.index').(Request::getQueryString()?('?'.Request::getQueryString()):'') !!}';
                     }
-                },
-            });
+                  },
+              );
+            } else {
+              swal.fire({title: ret.message, icon: 'error', timer: 1000, showConfirmButton: false});
+            }
+          },
+          error: function(data) {
+            let str = '';
+            const errors = data.responseJSON;
+            if ($.isEmptyObject(errors) === false) {
+              $.each(errors.errors, function(index, value) {
+                str += '<li>' + value + '</li>';
+              });
+              swal.fire({
+                title: '{{ trans('admin.hint') }}',
+                html: str,
+                icon: 'error',
+                confirmButtonText: '{{ trans('common.confirm') }}',
+              });
+            }
+          },
+        });
 
-            return false;
-        }
+        return false;
+      }
 
-        // 生成随机端口
-        function makePort() {
-            $.get('{{route('getPort')}}', function (ret) {
-                $('#port').val(ret);
-            });
-        }
+      // 生成随机端口
+      function makePort() {
+        $.get('{{route('getPort')}}', function(ret) {
+          $('#port').val(ret);
+        });
+      }
 
-        // 生成UUID
-        function makeUUID() {
-            $.get('{{route('createUUID')}}', function (ret) {
-                $('#uuid').val(ret);
-            });
-        }
+      // 生成UUID
+      function makeUUID() {
+        $.get('{{route('createUUID')}}', function(ret) {
+          $('#uuid').val(ret);
+        });
+      }
 
-        // 生成随机密码
-        function makePasswd() {
-            $.get('{{route('createStr')}}', function (ret) {
-                $('#passwd').val(ret);
-            });
-        }
+      // 生成随机密码
+      function makePasswd() {
+        $.get('{{route('createStr')}}', function(ret) {
+          $('#passwd').val(ret);
+        });
+      }
     </script>
 @endsection

+ 28 - 24
resources/views/auth/captcha.blade.php

@@ -1,27 +1,31 @@
 @switch(sysConfig('is_captcha'))
-    @case(1)<!-- Default Captcha -->
-    <div class="form-group form-material floating input-group" data-plugin="formMaterial">
-        <input type="text" class="form-control" name="captcha" required/>
-        <label class="floating-label" for="captcha">{{trans('auth.captcha.attribute')}}</label>
-        <img src="{{captcha_src()}}" class="float-right" onclick="this.src='/captcha/default?'+Math.random()" alt="{{trans('auth.captcha.attribute')}}"/>
-    </div>
-    @break
-    @case(2)<!-- Geetest -->
-    <div class="form-group form-material floating w-p100" data-plugin="formMaterial">
-        {!! Geetest::render() !!}
-    </div>
-    @break
-    @case(3)<!-- Google reCaptcha -->
-    <div class="form-group form-material floating vertical-align-middle mt-20" data-plugin="formMaterial">
-        {!! NoCaptcha::display() !!}
-        {!! NoCaptcha::renderJs(Session::get('locale')) !!}
-    </div>
-    @break
-    @case(4)<!-- hCaptcha -->
-    <div class="form-group form-material floating w-p100" data-plugin="formMaterial">
-        {!! HCaptcha::display() !!}
-        {!! HCaptcha::renderJs(Session::get('locale')) !!}
-    </div>
-    @break
+    @case(1)
+        <!-- Default Captcha -->
+        <div class="form-group form-material floating input-group" data-plugin="formMaterial">
+            <input type="text" class="form-control" name="captcha" required/>
+            <label class="floating-label" for="captcha">{{trans('auth.captcha.attribute')}}</label>
+            <img src="{{captcha_src()}}" class="float-right" onclick="this.src='/captcha/default?'+Math.random()" alt="{{trans('auth.captcha.attribute')}}"/>
+        </div>
+        @break
+    @case(2)
+        <!-- Geetest -->
+        <div class="form-group form-material floating w-p100" data-plugin="formMaterial">
+            {!! Geetest::render() !!}
+        </div>
+        @break
+    @case(3)
+        <!-- Google reCaptcha -->
+        <div class="form-group form-material floating vertical-align-middle mt-20" data-plugin="formMaterial">
+            {!! NoCaptcha::display() !!}
+            {!! NoCaptcha::renderJs(Session::get('locale')) !!}
+        </div>
+        @break
+    @case(4)
+        <!-- hCaptcha -->
+        <div class="form-group form-material floating w-p100" data-plugin="formMaterial">
+            {!! HCaptcha::display() !!}
+            {!! HCaptcha::renderJs(Session::get('locale')) !!}
+        </div>
+        @break
     @default
 @endswitch

+ 3 - 1
resources/views/auth/free.blade.php

@@ -15,7 +15,9 @@
                     <tbody>
                     @foreach($inviteList as $invite)
                         <tr>
-                            <td><a href="{{route('register', ['code' => $invite->code])}}" target="_blank">{{$invite->code}}</a></td>
+                            <td>
+                                <a href="{{route('register', ['code' => $invite->code])}}" target="_blank">{{$invite->code}}</a>
+                            </td>
                             <td> {{$invite->dateline}} </td>
                         </tr>
                     @endforeach

+ 10 - 15
resources/views/auth/layouts.blade.php

@@ -52,12 +52,10 @@
             }
         </style>
         <div class="m-0 p-0 w-full h-full text-white" style="z-index: 10; position: absolute;">
-            <div class="font-size-16 h-p33 pl-20 pt-20"
-                 style="line-height: 1.8; background: url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat">
-                <p>{{trans('common.to_safari.0')}} <i
-                            class="icon wb-more-horizontal"></i>{{trans('common.to_safari.1')}}
-                    <img src="//gw.alicdn.com/tfs/TB1xwiUNpXXXXaIXXXXXXXXXXXX-55-55.png"
-                         class="w-30 h-30 vertical-align-middle m-3" alt="Safari"/>
+            <div class="font-size-16 h-p33 pl-20 pt-20" style="line-height: 1.8; background: url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat">
+                <p>{{trans('common.to_safari.0')}}
+                    <i class="icon wb-more-horizontal" aria-hidden="true"></i>{{trans('common.to_safari.1')}}
+                    <img src="//gw.alicdn.com/tfs/TB1xwiUNpXXXXaIXXXXXXXXXXXX-55-55.png" class="w-30 h-30 vertical-align-middle m-3" alt="Safari"/>
                     {{trans('common.to_safari.2')}}<br>{{trans('common.to_safari.3')}}</p>
             </div>
         </div>
@@ -76,22 +74,19 @@
                     <div class="panel-heading">
                         <div class="panel-title">
                             <div class="brand">
-                                <img src="{{sysConfig('website_home_logo')? asset(sysConfig('website_home_logo')) :'/assets/images/logo64.png'}}"
-                                     class="brand-img" alt="logo"/>
+                                <img src="{{sysConfig('website_home_logo')? asset(sysConfig('website_home_logo')) :'/assets/images/logo64.png'}}" class="brand-img" alt="logo"/>
                                 <h3 class="brand-text">{{sysConfig('website_name')}}</h3>
                             </div>
                         </div>
                         <div class="ribbon ribbon-reverse ribbon-info ribbon-clip">
-                            <button class="ribbon-inner btn dropdown-toggle pt-0" id="language" data-toggle="dropdown"
-                                    aria-expanded="false">
-                                <i class="font-size-20 wb-globe"></i>
+                            <button class="ribbon-inner btn dropdown-toggle pt-0" id="language" data-toggle="dropdown" aria-expanded="false">
+                                <i class="font-size-20 wb-globe" aria-hidden="true"></i>
                             </button>
                             <div class="dropdown-menu dropdown-menu-bullet" aria-labelledby="language" role="menu">
                                 @foreach (config('common.language') as $key => $value)
-                                    <a class="dropdown-item" href="{{route('lang', ['locale' => $key])}}"
-                                       role="menuitem">
-                                        <i class="fi fi-{{$value[1]}}"></i> <span
-                                                style="padding: inherit;">{{$value[0]}}</span>
+                                    <a class="dropdown-item" href="{{route('lang', ['locale' => $key])}}" role="menuitem">
+                                        <i class="fi fi-{{$value[1]}}" aria-hidden="true"></i>
+                                        <span style="padding: inherit;">{{$value[0]}}</span>
                                     </a>
                                 @endforeach
                             </div>

+ 19 - 19
resources/views/auth/login.blade.php

@@ -60,25 +60,25 @@
 @endsection
 @section('javascript')
     <script>
-        $('#login-form').submit(function(event) {
-            @switch(sysConfig('is_captcha'))
-            @case(3)
-            // 先检查Google reCAPTCHA有没有进行验证
-            if ($('#g-recaptcha-response').val() === '') {
-                swal.fire({title: '{{trans('auth.captcha.required')}}', icon: 'error'});
-                return false;
-            }
-            @break
-            @case(4)
-            // 先检查Google reCAPTCHA有没有进行验证
-            if ($('#h-captcha-response').val() === '') {
-                swal.fire({title: '{{trans('auth.captcha.required')}}', icon: 'error'});
-                return false;
-            }
-            @break
-            @default
-            @endswitch
-        });
+      $('#login-form').submit(function(event) {
+          @switch(sysConfig('is_captcha'))
+          @case(3)
+        // 先检查Google reCAPTCHA有没有进行验证
+        if ($('#g-recaptcha-response').val() === '') {
+          swal.fire({title: '{{trans('auth.captcha.required')}}', icon: 'error'});
+          return false;
+        }
+          @break
+          @case(4)
+        // 先检查Google reCAPTCHA有没有进行验证
+        if ($('#h-captcha-response').val() === '') {
+          swal.fire({title: '{{trans('auth.captcha.required')}}', icon: 'error'});
+          return false;
+        }
+          @break
+          @default
+          @endswitch
+      });
     </script>
     <script src="https://ad.ddo.jp/728x90.js.php?ddo_id=proxypanel&ddo_i={{(int) floor(time() / 60)}}" type="text/javascript" defer></script>
 @endsection

+ 18 - 16
resources/views/auth/maintenance.blade.php

@@ -15,21 +15,23 @@
 @endsection
 @section('layout_javascript')
     <script>
-        // 每秒更新计时器
-        const countDownDate = new Date("{{$time}}").getTime();
-        const x = setInterval(function() {
-            const distance = countDownDate - new Date().getTime();
-            const days = Math.floor(distance / 86400000);
-            const hours = Math.floor(distance % 86400000 / 3600000);
-            const minutes = Math.floor(distance % 3600000 / 60000);
-            const seconds = Math.floor(distance % 60000 / 1000);
-            document.getElementById('countdown').innerHTML = '<h2>' + days + ' <span> ' + @json(trans_choice('common.days.attribute', 1)) + ' </span>: ' +
-                hours + ' <span>' + @json(trans_choice('common.hour', 1)) + '</span>: ' + minutes + ' <span>{{trans('validation.attributes.minute')}} </span>: ' +
-                seconds + '<span> {{trans('validation.attributes.second')}}</span> </h2>';
-            if (distance <= 0) {
-                clearInterval(x);
-                document.getElementById('countdown').remove();
-            }
-        }, 1000);
+      // 每秒更新计时器
+      const countDownDate = new Date("{{$time}}").getTime();
+      const x = setInterval(function() {
+        const distance = countDownDate - new Date().getTime();
+        const days = Math.floor(distance / 86400000);
+        const hours = Math.floor(distance % 86400000 / 3600000);
+        const minutes = Math.floor(distance % 3600000 / 60000);
+        const seconds = Math.floor(distance % 60000 / 1000);
+        document.getElementById('countdown').innerHTML = '<h2>' + days + ' <span> ' +
+                @json(trans_choice('common.days.attribute', 1)) +' </span>: ' +
+            hours + ' <span>' + @json(trans_choice('common.hour', 1)) +'</span>: ' + minutes +
+            ' <span>{{trans('validation.attributes.minute')}} </span>: ' +
+            seconds + '<span> {{trans('validation.attributes.second')}}</span> </h2>';
+        if (distance <= 0) {
+          clearInterval(x);
+          document.getElementById('countdown').remove();
+        }
+      }, 1000);
     </script>
 @endsection

+ 14 - 4
resources/views/auth/register.blade.php

@@ -125,7 +125,8 @@
                     <button type="button" class="close mr-15" data-dismiss="modal" aria-label="{{ trans('common.close') }}" style="position:absolute;">
                         <span aria-hidden="true">×</span>
                     </button>
-                    <h4 class="modal-title">{{sysConfig('website_name')}}- {{trans('auth.tos')}} <small>2019年11月28日10:49</small></h4>
+                    <h4 class="modal-title">{{sysConfig('website_name')}}- {{trans('auth.tos')}}
+                        <small>2019年11月28日10:49</small></h4>
                 </div>
                 <div class="modal-body">
                     @include('auth.docs.tos')
@@ -144,7 +145,8 @@
                     <button type="button" class="close mr-15" data-dismiss="modal" aria-label="{{ trans('common.close') }}" style="position:absolute;">
                         <span aria-hidden="true">×</span>
                     </button>
-                    <h4 class="modal-title">{{sysConfig('website_name')}}- {{trans('auth.aup')}} <small>2019年11月28日10:49</small></h4>
+                    <h4 class="modal-title">{{sysConfig('website_name')}}- {{trans('auth.aup')}}
+                        <small>2019年11月28日10:49</small></h4>
                 </div>
                 <div class="modal-body">
                     @include('auth.docs.aup')
@@ -169,7 +171,11 @@
           let email = $('#emailHead').val().trim();
           const emailTail = $('#emailTail').val();
           if (email === '') {
-            swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.email')])}}', icon: 'warning', timer: 1500});
+            swal.fire({
+              title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.email')])}}',
+              icon: 'warning',
+              timer: 1500,
+            });
             return false;
           }
           email += '@' + emailTail;
@@ -187,7 +193,11 @@
             @endif
 
             if (email === '') {
-              swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.email')])}}', icon: 'warning', timer: 1500});
+              swal.fire({
+                title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.email')])}}',
+                icon: 'warning',
+                timer: 1500,
+              });
               return false;
             }
 

+ 11 - 11
resources/views/auth/safe.blade.php

@@ -1,16 +1,16 @@
 @extends('auth.layouts')
 @section('title', sysConfig('website_name').' - '.trans('errors.safe_enter'))
 @section('content')
-<form role="form" action="/login?securityCode=">
-    <div class="form-group">
-        <div class="form-group form-material floating" data-plugin="formMaterial">
-            <input class="form-control" id="securityCode" name="securityCode"
-                placeholder="" type="text">
-            <label class="floating-label" for="securityCode">{{trans('errors.safe_code')}}</label>
+    <form role="form" action="/login?securityCode=">
+        <div class="form-group">
+            <div class="form-group form-material floating" data-plugin="formMaterial">
+                <input class="form-control" id="securityCode" name="securityCode"
+                       placeholder="" type="text">
+                <label class="floating-label" for="securityCode">{{trans('errors.safe_code')}}</label>
+            </div>
         </div>
-    </div>
-    <div class="text-center">
-        <button type="submit" class="btn btn-lg btn-block mt-40 bg-indigo-500 text-white">{{trans('common.confirm')}}</button>
-    </div>
-</form>
+        <div class="text-center">
+            <button type="submit" class="btn btn-lg btn-block mt-40 bg-indigo-500 text-white">{{trans('common.confirm')}}</button>
+        </div>
+    </form>
 @endsection

+ 3 - 1
resources/views/components/system/input-test.blade.php

@@ -10,7 +10,9 @@
                 </span>
             </div>
             @if(trans('admin.system.hint.'.$code) !== 'admin.system.hint.'.$code)
-                <span class="text-help"> {!! trans('admin.system.hint.'.$code) !!} @can('admin.test.notify')(<a href="javascript:sendTestNotification('{{$test}}');">{{ trans('admin.system.notification.send_test') }}</a>)@endcan</span>
+                <span class="text-help"> {!! trans('admin.system.hint.'.$code) !!} @can('admin.test.notify')
+                        <a href="javascript:sendTestNotification('{{$test}}');">[{{ trans('admin.system.notification.send_test') }}]</a>
+                    @endcan</span>
             @endisset
         </div>
     </div>

+ 1 - 1
resources/views/mail/custom.blade.php

@@ -1,5 +1,5 @@
 @component('mail::message')
 
-{!! $content !!}
+    {!! $content !!}
 
 @endcomponent

+ 5 - 5
resources/views/mail/simpleMarkdown.blade.php

@@ -1,10 +1,10 @@
 @component('mail::message')
-# {{$title}}
+    # {{$title}}
 
-{!! $content !!}
+    {!! $content !!}
 
-@component('mail::button', ['url' => $url])
-{{trans('notification.view_web')}}
-@endcomponent
+    @component('mail::button', ['url' => $url])
+        {{trans('notification.view_web')}}
+    @endcomponent
 @endcomponent
 

+ 21 - 23
resources/views/user/buy.blade.php

@@ -24,7 +24,8 @@
                                 <br>
                                 <strong>{{$goods->traffic_label}}</strong> {{trans('user.attribute.data')}}
                                 <br>
-                                {{trans('user.account.speed_limit')}}<strong> {{ $goods->speed_limit ? $goods->speed_limit.' Mbps' : trans('user.service.unlimited') }} </strong>
+                                {{trans('user.account.speed_limit')}}
+                                <strong> {{ $goods->speed_limit ? $goods->speed_limit.' Mbps' : trans('user.service.unlimited') }} </strong>
                             </td>
                             <td class="text-middle"> {{$goods->price_tag}} </td>
                             <td class="text-middle"> x 1</td>
@@ -36,7 +37,8 @@
                     @if($goods->type <= 2)
                         <div class="col-lg-3 pl-30">
                             <div class="input-group">
-                                <input type="text" class="form-control" name="coupon_sn" id="coupon_sn" placeholder="{{trans('model.coupon.attribute')}}"/>
+                                <input type="text" class="form-control" name="coupon_sn" id="coupon_sn"
+                                       placeholder="{{trans('model.coupon.attribute')}}"/>
                                 <div class="input-group-btn">
                                     <button type="submit" class="btn btn-info" onclick="redeemCoupon()">
                                         <i class="icon wb-loop" aria-hidden="true"></i> {{trans('common.apply')}}
@@ -58,8 +60,9 @@
                         <div class="float-right">
                             @include('user.components.purchase')
                             @if($goods->type <= 2)
-                                <button class="btn btn-flat mt-2 mx-0 p-0" onclick="pay('credit','0')">
-                                    <img src="/assets/images/payment/creditpay.svg" height="48px" alt="{{trans('user.shop.pay_credit')}}"/>
+                                <button class="btn btn-flat mt-2 mx-0 p-0" onclick="pay('credit', '0')">
+                                    <img src="/assets/images/payment/creditpay.svg" height="48px"
+                                         alt="{{trans('user.shop.pay_credit')}}"/>
                                 </button>
                             @endif
                         </div>
@@ -71,8 +74,7 @@
 @endsection
 @section('javascript')
     <script>
-      // 校验优惠券是否可用
-      function redeemCoupon() {
+      function redeemCoupon() { // 校验优惠券是否可用
         const coupon_sn = $('#coupon_sn').val();
         let tag = '{{$goods->price_tag}}'.match(/(.*?[^0-9])(\d+\.?.*)/);
         const goods_price = tag[2];
@@ -93,15 +95,17 @@
               if (ret.data.type === 2) {
                 const discount = goods_price * (1 - ret.data.value / 100);
 
-                coupon_text.innerHTML = '【{{trans('admin.coupon.type.discount')}}】:' + ret.data.name + ' _ '
-                    + (100 - ret.data.value) + '%<br> {{trans('user.coupon.discount')}}: ➖ ' + sign + discount.toFixed(2);
+                coupon_text.innerHTML = '【{{trans('admin.coupon.type.discount')}}】: ' + ret.data.name + ' _ '
+                    + (100 - ret.data.value) + '%<br> {{trans('user.coupon.discount')}}: ➖ ' + sign +
+                    discount.toFixed(2);
                 total_price = goods_price - discount;
               } else {
                 console.log(ret.data.value);
                 total_price = goods_price - ret.data.value.match(/(.*?[^0-9])(\d+\.?.*)/)[2];
                 total_price = total_price > 0 ? total_price : 0;
                 if (ret.data.type === 1) {
-                  coupon_text.innerHTML = '【{{trans('admin.coupon.type.voucher')}}】:' + ret.data.name + ' -' + ret.data.value;
+                  coupon_text.innerHTML = '【{{trans('admin.coupon.type.voucher')}}】: ' + ret.data.name + ' -' +
+                      ret.data.value;
                 }
               }
 
@@ -127,10 +131,8 @@
         });
       }
 
-      // 检查预支付
-      function pay(method, pay_type) {
-        // 存在套餐 和 购买类型为套餐时 出现提示
-        if ('{{$activePlan}}' === '1' && '{{$goods->type}}' === '2') {
+      function pay(method, pay_type) { // 检查预支付
+        if ('{{$activePlan}}' === '1' && '{{$goods->type}}' === '2') { // 存在套餐 和 购买类型为套餐时 出现提示
           swal.fire({
             title: '{{trans('user.shop.conflict')}}',
             html: '{!! trans('user.shop.conflict_tips') !!}',
@@ -140,15 +142,15 @@
             confirmButtonText: '{{trans('common.continues')}}',
           }).then((result) => {
             if (result.value) {
-              contiousPay(method, pay_type);
+              continuousPayment(method, pay_type);
             }
           });
         } else {
-          contiousPay(method, pay_type);
+          continuousPayment(method, pay_type);
         }
       }
 
-      function contiousPay(method, pay_type) {
+      function continuousPayment(method, pay_type) {
         const goods_id = '{{$goods->id}}';
         const coupon_sn = $('#coupon_sn').val();
         $.ajax({
@@ -164,14 +166,10 @@
           },
           success: function(ret) {
             if (ret.status === 'success') {
-              swal.fire({
-                title: ret.message,
-                icon: 'success',
-                timer: 1300,
-                showConfirmButton: false,
-              });
+              swal.fire({title: ret.message, icon: 'success', timer: 1300, showConfirmButton: false});
               if (method === 'credit') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.href = '{{route('invoice')}}');
+                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).
+                    then(() => window.location.href = '{{route('invoice')}}');
               }
               if (ret.data) {
                 window.location.href = '{{route('orderDetail', '')}}/' + ret.data;

+ 8 - 8
resources/views/user/components/notification.blade.php

@@ -39,13 +39,13 @@
                 </div>
             </div>
         @endif
-{{--        <div class="dropdown-menu-footer">--}}
-{{--            <a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button">--}}
-{{--                <i class="icon wb-settings" aria-hidden="true"></i>--}}
-{{--            </a>--}}
-{{--            <a class="dropdown-item" href="javascript:void(0)" role="menuitem">--}}
-{{--                All notifications--}}
-{{--            </a>--}}
-{{--        </div>--}}
+        {{--        <div class="dropdown-menu-footer">--}}
+        {{--            <a class="dropdown-menu-footer-btn" href="javascript:void(0)" role="button">--}}
+        {{--                <i class="icon wb-settings" aria-hidden="true"></i>--}}
+        {{--            </a>--}}
+        {{--            <a class="dropdown-item" href="javascript:void(0)" role="menuitem">--}}
+        {{--                All notifications--}}
+        {{--            </a>--}}
+        {{--        </div>--}}
     </div>
 </li>

+ 30 - 30
resources/views/user/components/payment/default.blade.php

@@ -4,7 +4,7 @@
         <div class="panel panel-bordered">
             <div class="panel-heading">
                 <h1 class="panel-title cyan-600">
-                    <i class="icon wb-payment"></i>{{sysConfig('website_name').' - '.trans('user.shop.pay_online')}}
+                    <i class="icon wb-payment" aria-hidden="true"></i>{{sysConfig('website_name').' - '.trans('user.shop.pay_online')}}
                 </h1>
             </div>
             <div class="panel-body border-primary ml-auto mr-auto w-p75">
@@ -41,39 +41,39 @@
     @if($payment->qr_code && $payment->url)
         <script src="/assets/custom/easy.qrcode.min.js"></script>
         <script>
-            // Options
-            const options = {
-                text: @json($payment->url),
-                backgroundImage: '{{asset($pay_type_icon)}}',
-                autoColor: true,
-            };
+          // Options
+          const options = {
+            text: @json($payment->url),
+            backgroundImage: '{{asset($pay_type_icon)}}',
+            autoColor: true,
+          };
 
-            // Create QRCode Object
-            new QRCode(document.getElementById('qrcode'), options);
+          // Create QRCode Object
+          new QRCode(document.getElementById('qrcode'), options);
         </script>
     @endif
 
     <script>
-        // 检查支付单状态
-        const r = window.setInterval(function() {
-            $.ajax({
-                method: 'GET',
-                url: '{{route('orderStatus')}}',
-                data: {trade_no: '{{$payment->trade_no}}'},
-                dataType: 'json',
-                success: function(ret) {
-                    window.clearInterval();
-                    if (ret.status === 'success') {
-                        swal.fire({title: ret.message, icon: 'success', timer: 1500, showConfirmButton: false}).then(() => {
-                            window.location.href = '{{route('invoice')}}';
-                        });
-                    } else if (ret.status === 'error') {
-                        swal.fire({title: ret.message, icon: 'error', timer: 1500, showConfirmButton: false}).then(() => {
-                            window.location.href = '{{route('invoice')}}';
-                        });
-                    }
-                },
-            });
-        }, 3000);
+      // 检查支付单状态
+      const r = window.setInterval(function() {
+        $.ajax({
+          method: 'GET',
+          url: '{{route('orderStatus')}}',
+          data: {trade_no: '{{$payment->trade_no}}'},
+          dataType: 'json',
+          success: function(ret) {
+            window.clearInterval();
+            if (ret.status === 'success') {
+              swal.fire({title: ret.message, icon: 'success', timer: 1500, showConfirmButton: false}).then(() => {
+                window.location.href = '{{route('invoice')}}';
+              });
+            } else if (ret.status === 'error') {
+              swal.fire({title: ret.message, icon: 'error', timer: 1500, showConfirmButton: false}).then(() => {
+                window.location.href = '{{route('invoice')}}';
+              });
+            }
+          },
+        });
+      }, 3000);
     </script>
 @endsection

+ 88 - 84
resources/views/user/components/payment/manual.blade.php

@@ -178,100 +178,104 @@
 
 @section('javascript')
     <script>
-        let currentTab = 0; // Current tab is set to be the first tab (0)
-        showTab(currentTab); // Display the current tab
-        show({{sysConfig('wechat_qrcode')? 0 : 1}});
+      let currentTab = 0; // Current tab is set to be the first tab (0)
+      showTab(currentTab); // Display the current tab
+      show({{sysConfig('wechat_qrcode')? 0 : 1}});
 
-        function showTab(n) {
-            // This function will display the specified tab of the form ...
-            const x = document.getElementsByClassName('tab');
-            x[n].style.display = 'block';
-            // ... and fix the Previous/Next buttons:
-            if (n === 0) {
-                document.getElementById('prevBtn').style.display = 'none';
-            } else {
-                document.getElementById('prevBtn').style.display = 'inline';
-            }
-
-            if (n === x.length - 1) {
-                document.getElementById('payment-group').style.display = 'none';
-                document.getElementById('nextBtn').classList.remove('btn-primary');
-                document.getElementById('nextBtn').classList.add('btn-success');
-                document.getElementById('nextBtn').innerHTML = '{{trans('common.submit')}}';
-            } else {
-                document.getElementById('payment-group').style.display = 'inline-flex';
-                document.getElementById('nextBtn').innerHTML = '下一步';
-                document.getElementById('nextBtn').classList.remove('btn-success');
-                document.getElementById('nextBtn').classList.add('btn-primary');
-                document.getElementById('nextBtn').style.display = 'inline';
-            }
+      function showTab(n) {
+        // This function will display the specified tab of the form ...
+        const x = document.getElementsByClassName('tab');
+        x[n].style.display = 'block';
+        // ... and fix the Previous/Next buttons:
+        if (n === 0) {
+          document.getElementById('prevBtn').style.display = 'none';
+        } else {
+          document.getElementById('prevBtn').style.display = 'inline';
+        }
 
-            fixStepIndicator(n);
+        if (n === x.length - 1) {
+          document.getElementById('payment-group').style.display = 'none';
+          document.getElementById('nextBtn').classList.remove('btn-primary');
+          document.getElementById('nextBtn').classList.add('btn-success');
+          document.getElementById('nextBtn').innerHTML = '{{trans('common.submit')}}';
+        } else {
+          document.getElementById('payment-group').style.display = 'inline-flex';
+          document.getElementById('nextBtn').innerHTML = '下一步';
+          document.getElementById('nextBtn').classList.remove('btn-success');
+          document.getElementById('nextBtn').classList.add('btn-primary');
+          document.getElementById('nextBtn').style.display = 'inline';
         }
 
-        function nextPrev(n) {
-            // This function will figure out which tab to display
-            const x = document.getElementsByClassName('tab');
-            // if you have reached the end of the form... :
-            if (currentTab === x.length - 1 && n === 1) {
-                //...the form gets submitted:
-                $.post('{{route('manual.inform', ['payment' => $payment->trade_no])}}', {_token: '{{csrf_token()}}'}, function(ret) {
-                    if (ret.status === 'success') {
-                        swal.fire({title: '已受理', text: ret.message, icon: 'success'}).then(() => window.location.href = '{{route('invoice')}}');
-                    } else {
-                        swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                    }
-                });
-                return false;
+        fixStepIndicator(n);
+      }
+
+      function nextPrev(n) {
+        // This function will figure out which tab to display
+        const x = document.getElementsByClassName('tab');
+        // if you have reached the end of the form... :
+        if (currentTab === x.length - 1 && n === 1) {
+          //...the form gets submitted:
+          $.post('{{route('manual.inform', ['payment' => $payment->trade_no])}}', {_token: '{{csrf_token()}}'}, function(ret) {
+            if (ret.status === 'success') {
+              swal.fire({
+                title: '已受理',
+                text: ret.message,
+                icon: 'success',
+              }).then(() => window.location.href = '{{route('invoice')}}');
             } else {
-                x[currentTab].style.display = 'none';// Hide the current tab:
-                currentTab += n;// Increase or decrease the current tab by 1:
+              swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
             }
-
-            showTab(currentTab);
+          });
+          return false;
+        } else {
+          x[currentTab].style.display = 'none';// Hide the current tab:
+          currentTab += n;// Increase or decrease the current tab by 1:
         }
 
-        function fixStepIndicator(n) {
-            // This function removes the "current" class of all steps...
-            let i, x = document.getElementsByClassName('step');
-            for (i = 0; i < x.length; i++) {
-                x[i].className = x[i].className.replace(' current', ' ');
-            }
-            //... and adds the "active" class to the current step:
-            x[n].className += ' current';
+        showTab(currentTab);
+      }
+
+      function fixStepIndicator(n) {
+        // This function removes the "current" class of all steps...
+        let i, x = document.getElementsByClassName('step');
+        for (i = 0; i < x.length; i++) {
+          x[i].className = x[i].className.replace(' current', ' ');
         }
+        //... and adds the "active" class to the current step:
+        x[n].className += ' current';
+      }
 
-        function show(check) {
-            @if(sysConfig('wechat_qrcode'))
-            const $wechat = document.getElementsByClassName('wechat');
-            const $btn_wechat = document.getElementById('btn-wechat');
-            if (check) {
-                for (let i = 0; i < $wechat.length; i++) {
-                    $wechat[i].style.display = 'none';
-                }
-                $btn_wechat.classList.remove('btn-success');
-            } else {
-                for (let i = 0; i < $wechat.length; i++) {
-                    $wechat[i].style.display = 'inline';
-                }
-                $btn_wechat.classList.add('btn-success');
-            }
-            @endif
-            @if(sysConfig('alipay_qrcode'))
-            const $alipay = document.getElementsByClassName('alipay');
-            const $btn_alipay = document.getElementById('btn-alipay');
-            if (check) {
-                for (let i = 0; i < $alipay.length; i++) {
-                    $alipay[i].style.display = 'inline';
-                }
-                $btn_alipay.classList.add('btn-primary');
-            } else {
-                for (let i = 0; i < $alipay.length; i++) {
-                    $alipay[i].style.display = 'none';
-                }
-                $btn_alipay.classList.remove('btn-primary');
-            }
-            @endif
+      function show(check) {
+          @if(sysConfig('wechat_qrcode'))
+        const $wechat = document.getElementsByClassName('wechat');
+        const $btn_wechat = document.getElementById('btn-wechat');
+        if (check) {
+          for (let i = 0; i < $wechat.length; i++) {
+            $wechat[i].style.display = 'none';
+          }
+          $btn_wechat.classList.remove('btn-success');
+        } else {
+          for (let i = 0; i < $wechat.length; i++) {
+            $wechat[i].style.display = 'inline';
+          }
+          $btn_wechat.classList.add('btn-success');
+        }
+          @endif
+          @if(sysConfig('alipay_qrcode'))
+        const $alipay = document.getElementsByClassName('alipay');
+        const $btn_alipay = document.getElementById('btn-alipay');
+        if (check) {
+          for (let i = 0; i < $alipay.length; i++) {
+            $alipay[i].style.display = 'inline';
+          }
+          $btn_alipay.classList.add('btn-primary');
+        } else {
+          for (let i = 0; i < $alipay.length; i++) {
+            $alipay[i].style.display = 'none';
+          }
+          $btn_alipay.classList.remove('btn-primary');
         }
+          @endif
+      }
     </script>
 @endsection

+ 3 - 3
resources/views/user/components/payment/stripe.blade.php

@@ -5,7 +5,7 @@
     <div class="page vertical-align text-center" data-animsition-in="fade-in" data-animsition-out="fade-out">
         <div class="page-content vertical-align-middle">
             <h2>{{trans('user.payment.redirect_stripe')}}</h2>
-            <i class="mt-30 loader loader-ellipsis"></i>
+            <i class="mt-30 loader loader-ellipsis" aria-hidden="true"></i>
         </div>
     </div>
 @endsection
@@ -13,7 +13,7 @@
 @section('layout_javascript')
     <script src="https://js.stripe.com/v3/"></script>
     <script>
-        let stripe = Stripe('{{ sysConfig('stripe_public_key') }}');
-        let redirectData = stripe.redirectToCheckout({sessionId: '{{ $session_id  }}'});
+      let stripe = Stripe('{{ sysConfig('stripe_public_key') }}');
+      let redirectData = stripe.redirectToCheckout({sessionId: '{{ $session_id  }}'});
     </script>
 @endsection

+ 30 - 18
resources/views/user/index.blade.php

@@ -14,27 +14,30 @@
                 <div class="card card-shadow">
                     <div class="card-block p-20">
                         <button type="button" class="btn btn-floating btn-sm btn-pure">
-                            <i class="wb-heart red-500"></i>
+                            <i class="wb-heart red-500" aria-hidden="true"></i>
                         </button>
                         <span class="font-weight-400">{{trans('user.account.status')}}</span>
                         @if(sysConfig('is_checkin'))
                             <button class="btn btn-md btn-round btn-info float-right" onclick="checkIn()">
-                                <i class="wb-star yellow-400 mr-5"></i>
+                                <i class="wb-star yellow-400 mr-5" aria-hidden="true"></i>
                                 {{trans('user.home.attendance.attribute')}}
                             </button>
                         @endif
                         <div class="content-text text-center mb-0">
                             @if(!$paying_user)
-                                <p class="ml-15 mt-15 text-left">{{trans('common.more')}}<code>{{trans('validation.attributes.time')}}</code></p>
-                                <p class="text-center">{{trans('common.more')}}<code>{{trans('user.attribute.data')}}</code></p>
-                                <p class="mb-15 mr-15 text-right">{{trans('common.more')}}<code>{{trans('user.attribute.node')}}</code></p>
+                                <p class="ml-15 mt-15 text-left">{{trans('common.more')}}
+                                    <code>{{trans('validation.attributes.time')}}</code></p>
+                                <p class="text-center">{{trans('common.more')}}
+                                    <code>{{trans('user.attribute.data')}}</code></p>
+                                <p class="mb-15 mr-15 text-right">{{trans('common.more')}}
+                                    <code>{{trans('user.attribute.node')}}</code></p>
                                 <a href="{{route('shop')}}" class="btn btn-block btn-danger">{{trans('user.purchase_promotion')}}</a>
                             @elseif(Auth::user()->enable)
-                                <i class="wb-check green-400 font-size-40 mr-10"></i>
+                                <i class="wb-check green-400 font-size-40 mr-10" aria-hidden="true"></i>
                                 <span class="font-size-40 font-weight-100">{{trans('common.status.normal')}}</span>
                                 <p class="font-weight-300 m-0 green-500">{{trans('user.account.reason.normal')}}</p>
                             @elseif($remainDays < 0)
-                                <i class="wb-close red-400 font-size-40 mr-10"></i>
+                                <i class="wb-close red-400 font-size-40 mr-10" aria-hidden="true"></i>
                                 <span class="font-size-40 font-weight-100">{{trans('common.status.expire')}}</span>
                                 <p class="font-weight-300 m-0 red-500">{{trans('user.account.reason.expired')}}</p>
                             @elseif($unusedTraffic === '0B')
@@ -68,7 +71,8 @@
                                         {{$unusedTraffic}}
                                     @endif
                                     <br/>
-                                    <h4>{{trans('user.account.level')}}:<code class="font-size-20">{{Auth::user()->level}}</code></h4>
+                                    <h4>{{trans('user.account.level')}}:
+                                        <code class="font-size-20">{{Auth::user()->level}}</code></h4>
                                 </div>
                                 <div class="text-center font-weight-300 blue-grey-500 mb-10">
                                     @if(isset($resetDays) && $resetDays >= 0)
@@ -112,20 +116,20 @@
                             <span class="font-weight-400 mb-10">{{trans('user.account.last_login')}}</span>
                             <ul class="list-group list-group-dividered px-20 mb-0">
                                 <li class="list-group-item px-0">
-                                    <i class="icon wb-time"></i>
-                                    {{trans('validation.attributes.time')}}:{{date_format($userLoginLog->created_at,'Y/m/d H:i')}}
+                                    <i class="icon wb-time"></i>{{trans('validation.attributes.time')}}
+                                    : {{date_format($userLoginLog->created_at,'Y/m/d H:i')}}
                                 </li>
                                 <li class="list-group-item px-0">
                                     <i class="icon wb-code"></i>
-                                    {{trans('user.attribute.ip')}}{{$userLoginLog->ip}}
+                                    {{trans('user.attribute.ip')}}: {{$userLoginLog->ip}}
                                 </li>
                                 <li class="list-group-item px-0">
                                     <i class="icon wb-cloud"></i>
-                                    {{trans('user.attribute.isp')}}{{$userLoginLog->isp}}
+                                    {{trans('user.attribute.isp')}}: {{$userLoginLog->isp}}
                                 </li>
                                 <li class="list-group-item px-0">
-                                    <i class="icon wb-map"></i>
-                                    {{trans('user.attribute.address')}}:{{$userLoginLog->country.' '.$userLoginLog->province.' '.$userLoginLog->city.' '.$userLoginLog->area}}
+                                    <i class="icon wb-map"></i>{{trans('user.attribute.address')}}
+                                    : {{$userLoginLog->country.' '.$userLoginLog->province.' '.$userLoginLog->city.' '.$userLoginLog->area}}
                                 </li>
                             </ul>
                         </div>
@@ -137,7 +141,8 @@
                     <div class="col-xl-4 mb-30">
                         <div class="card card-shadow h-full">
                             <div class="card-block text-center">
-                                <h3 class="card-header-transparent"><i class="icon wb-link-intact"></i>{{trans('user.subscribe.link')}}</h3>
+                                <h3 class="card-header-transparent">
+                                    <i class="icon wb-link-intact"></i>{{trans('user.subscribe.link')}}</h3>
                                 @if($subscribe_status)
                                     <div class="card-body">
                                         @if(count($subType)>1)
@@ -230,7 +235,8 @@
                                     <div class="pb-10" data-role="content">
                                         @forelse($announcements as $announcement)
                                             <h2 class="text-center">{!!$announcement->title!!}</h2>
-                                            <p class="text-right"><small>{{trans('common.updated_at')}} <code>{{$announcement->updated_at}}</code></small></p>
+                                            <p class="text-right"><small>{{trans('common.updated_at')}}
+                                                    <code>{{$announcement->updated_at}}</code></small></p>
                                             {!! $announcement->content !!}
                                         @empty
                                             <p class="text-center font-size-40">{{trans('user.home.empty_announcement')}}</p>
@@ -243,7 +249,8 @@
                     <div class="col-xxl-6">
                         <div class="panel panel-primary panel-line h-full">
                             <div class="panel-heading">
-                                <h1 class="panel-title"><i class="wb-pie-chart mr-10"></i>{{trans('user.home.traffic_logs')}}
+                                <h1 class="panel-title">
+                                    <i class="wb-pie-chart mr-10"></i>{{trans('user.home.traffic_logs')}}
                                 </h1>
                                 <div class="panel-actions">
                                     <ul class="nav nav-pills" role="tablist">
@@ -298,7 +305,12 @@
           if (result.value) {
             $.post('{{route('changeSub')}}', {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }

+ 6 - 4
resources/views/user/invoiceDetail.blade.php

@@ -15,13 +15,15 @@
                     </div>
                     <div class="col-lg-3 offset-lg-6 text-right">
                         <h4>{{trans('user.invoice.detail')}}</h4>
-                        <p>{{ trans('model.order.id') }}
-                            <a class="font-size-20" href="javascript:void(0)">{{$order->sn}}</a>
+                        <p>{{ trans('model.order.id') }}
+                            :<a class="font-size-20" href="javascript:void(0)">{{$order->sn}}</a>
                         </p>
                         <p>{{trans('user.payment_method')}}
-                            {{$order->pay_way === 1 ? trans('user.shop.pay_credit') : trans('user.shop.pay_online')}}</p>
+                            : {{$order->pay_way === 1 ? trans('user.shop.pay_credit') : trans('user.shop.pay_online')}}</p>
                         <p>{{trans('user.bought_at')}}: {{$order->created_at}}</p>
-                        @if($order->expired_at)<p>{{trans('common.expired_at')}}: {{$order->expired_at}}</p>@endif
+                        @if($order->expired_at)
+                            <p>{{trans('common.expired_at')}}: {{$order->expired_at}}</p>
+                        @endif
                     </div>
                 </div>
                 <div class="page-invoice-table table-responsive">

+ 57 - 47
resources/views/user/invoices.blade.php

@@ -77,57 +77,67 @@
     <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
     <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
     <script>
-        function closePlan() {
-            swal.fire({
-                title: '{{trans('user.invoice.active_prepaid_question')}}',
-                html: @json(trans('user.invoice.active_prepaid_tips')),
-                icon: 'warning',
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'POST',
-                        url: '{{route('cancelPlan')}}',
-                        dataType: 'json',
-                        data: {_token: '{{csrf_token()}}'},
-                        success: function(ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'});
-                            }
-                        },
-                    });
+      function closePlan() {
+        swal.fire({
+          title: '{{trans('user.invoice.active_prepaid_question')}}',
+          html: @json(trans('user.invoice.active_prepaid_tips')),
+          icon: 'warning',
+          showCancelButton: true,
+          cancelButtonText: '{{trans('common.close')}}',
+          confirmButtonText: '{{trans('common.confirm')}}',
+        }).then((result) => {
+          if (result.value) {
+            $.ajax({
+              method: 'POST',
+              url: '{{route('cancelPlan')}}',
+              dataType: 'json',
+              data: {_token: '{{csrf_token()}}'},
+              success: function(ret) {
+                if (ret.status === 'success') {
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
+                } else {
+                  swal.fire({title: ret.message, icon: 'error'});
                 }
+              },
             });
-        }
+          }
+        });
+      }
 
-        function closeOrder(url) {
-            swal.fire({
-                title: '{{trans('common.close_item', ['attribute' => trans('user.invoice.attribute')])}}?',
-                icon: 'warning',
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'PUT',
-                        url: url,
-                        dataType: 'json',
-                        data: {_token: '{{csrf_token()}}'},
-                        success: function(ret) {
-                            if (ret.status === 'success') {
-                                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
-                            } else {
-                                swal.fire({title: ret.message, icon: 'error'});
-                            }
-                        },
-                    });
+      function closeOrder(url) {
+        swal.fire({
+          title: '{{trans('common.close_item', ['attribute' => trans('user.invoice.attribute')])}}?',
+          icon: 'warning',
+          showCancelButton: true,
+          cancelButtonText: '{{trans('common.close')}}',
+          confirmButtonText: '{{trans('common.confirm')}}',
+        }).then((result) => {
+          if (result.value) {
+            $.ajax({
+              method: 'PUT',
+              url: url,
+              dataType: 'json',
+              data: {_token: '{{csrf_token()}}'},
+              success: function(ret) {
+                if (ret.status === 'success') {
+                  swal.fire({
+                    title: ret.message,
+                    icon: 'success',
+                    timer: 1000,
+                    showConfirmButton: false,
+                  }).then(() => window.location.reload());
+                } else {
+                  swal.fire({title: ret.message, icon: 'error'});
                 }
+              },
             });
-        }
+          }
+        });
+      }
     </script>
 @endsection

+ 6 - 1
resources/views/user/knowledge.blade.php

@@ -175,7 +175,12 @@
           if (result.value) {
             $.post('{{route('changeSub')}}', {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
               }

+ 5 - 3
resources/views/user/layouts.blade.php

@@ -50,7 +50,8 @@
                         <div class="dropdown-menu" role="menu">
                             @foreach (config('common.language') as $key => $value)
                                 <a class="dropdown-item" href="{{route('lang', ['locale' => $key])}}" role="menuitem">
-                                    <i class="fi fi-{{$value[1]}}"></i> <span style="padding: inherit;">{{$value[0]}}</span>
+                                    <i class="fi fi-{{$value[1]}}" aria-hidden="true"></i>
+                                    <span style="padding: inherit;">{{$value[0]}}</span>
                                 </a>
                             @endforeach
                         </div>
@@ -62,7 +63,8 @@
                         <div class="dropdown-menu" role="menu">
                             @foreach (config('common.currency') as $country_code => $currency)
                                 <a class="dropdown-item" href="{{route('currency', ['code' => $currency['code']])}}" role="menuitem">
-                                    <i class="fi fi-{{$country_code}}"></i> <span style="padding: inherit;">{{$currency['symbol'].' '.$currency['name']}}</span>
+                                    <i class="fi fi-{{$country_code}}" aria-hidden="true"></i>
+                                    <span style="padding: inherit;">{{$currency['symbol'].' '.$currency['name']}}</span>
                                 </a>
                             @endforeach
                         </div>
@@ -249,4 +251,4 @@
         {!! sysConfig('website_analytics') !!}
         <!-- 客服 -->
         {!! sysConfig('website_customer_service') !!}
-@endsection
+        @endsection

+ 112 - 120
resources/views/user/nodeList.blade.php

@@ -31,8 +31,7 @@
                             <div class="counter counter-lg counter-inverse">
                                 <div class="counter-label text-uppercase font-size-16">{{trans('user.account.level')}}</div>
                                 <div class="counter-number-group">
-                                    <span class="counter-icon"><i class="icon wb-user-circle"
-                                                                  aria-hidden="true"></i></span>
+                                    <span class="counter-icon"><i class="icon wb-user-circle" aria-hidden="true"></i></span>
                                     <span class="counter-number ml-10">{{Auth::getUser()->level}}</span>
                                 </div>
                                 <div class="counter-label text-uppercase font-size-16">{{Auth::getUser()->level_name}}</div>
@@ -45,8 +44,7 @@
                                 <div class="counter counter-lg counter-inverse">
                                     <div class="counter-label text-uppercase font-size-16">{{trans('user.account.group')}}</div>
                                     <div class="counter-number-group">
-                                        <span class="counter-icon"><i class="icon wb-globe"
-                                                                      aria-hidden="true"></i></span>
+                                        <span class="counter-icon"><i class="icon wb-globe" aria-hidden="true"></i></span>
                                         <span class="counter-number ml-10">{{Auth::getUser()->userGroup->name}}</span>
                                     </div>
                                 </div>
@@ -78,14 +76,10 @@
                                 <p class="font-size-20 blue-600">
                                     <span class="float-left badge badge-round badge-default">{{$node->level_table->name}}</span>
                                     @if($node->offline && !$node->relay_node_id)
-                                        <i class="red-600 icon wb-warning"
-                                           data-content="{{trans('user.node.unstable')}}"
-                                           data-trigger="hover" data-toggle="popover" data-placement="top"></i>
+                                        <i class="red-600 icon wb-warning" data-content="{{trans('user.node.unstable')}}" data-trigger="hover" data-toggle="popover" data-placement="top"></i>
                                     @endif
                                     @if($node->traffic_rate !== 1.0)
-                                        <i class="green-600 icon wb-info-circle"
-                                           data-content="{{trans('user.node.rate', ['ratio' => $node->traffic_rate])}}"
-                                           data-trigger="hover" data-toggle="popover" data-placement="top"></i>
+                                        <i class="green-600 icon wb-info-circle" data-content="{{trans('user.node.rate', ['ratio' => $node->traffic_rate])}}" data-trigger="hover" data-toggle="popover" data-placement="top"></i>
                                     @endif
                                     {{$node->name}}
                                 </p>
@@ -97,16 +91,13 @@
                                     {{$node->description}}
                                 </blockquote>
                                 <p class="font-size-14">
-                                    <button class="btn btn-sm btn-outline-info"
-                                            onclick="getInfo('{{$node->id}}','code')">
+                                    <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','code')">
                                         <i id="code{{$node->id}}" class="fa-solid fa-code"></i>
                                     </button>
-                                    <button class="btn btn-sm btn-outline-info"
-                                            onclick="getInfo('{{$node->id}}','qrcode')">
+                                    <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','qrcode')">
                                         <i id="qrcode{{$node->id}}" class="fa-solid fa-qrcode"></i>
                                     </button>
-                                    <button class="btn btn-sm btn-outline-info"
-                                            onclick="getInfo('{{$node->id}}','text')">
+                                    <button class="btn btn-sm btn-outline-info" onclick="getInfo('{{$node->id}}','text')">
                                         <i id="text{{$node->id}}" class="fa-solid fa-list"></i>
                                     </button>
                                 </p>
@@ -127,113 +118,114 @@
     <script src="/assets/custom/maps/jquery-jvectormap-world-mill-cn.js"></script>
 
     <script type="text/javascript">
-        $(function () {
-            $('#world-map').vectorMap({
-                map: 'world_mill',
-                scaleColors: ['#C8EEFF', '#0071A4'],
-                normalizeFunction: 'polynomial',
-                zoomAnimate: true,
-                hoverOpacity: 0.7,
-                hoverColor: false,
-                regionStyle: {
-                    initial: {
-                        fill: '#3E8EF7',
-                    },
-                    hover: {
-                        fill: '#589FFC',
-                    },
-                    selected: {
-                        fill: '#0B69E3',
-                    },
-                    selectedHover: {
-                        fill: '#589FFC',
-                    },
-                },
-                markerStyle: {
-                    initial: {
-                        r: 3,
-                        fill: '#FF4C52',
-                        'stroke-width': 0,
-                    },
-                    hover: {
-                        r: 6,
-                        stroke: '#FF4C52',
-                        'stroke-width': 0,
-                    },
-                },
-                backgroundColor: '#fff',
-                markers: [
-                        @foreach($nodesGeo as $name => $geo)
-                    {
-                        latLng: [{{$name}}], name: '{{$geo}}',
-                    },
-                    @endforeach
-                ],
-            });
-            $('.node').matchHeight();
-            $('.map').matchHeight();
+      $(function() {
+        $('#world-map').vectorMap({
+          map: 'world_mill',
+          scaleColors: ['#C8EEFF', '#0071A4'],
+          normalizeFunction: 'polynomial',
+          zoomAnimate: true,
+          hoverOpacity: 0.7,
+          hoverColor: false,
+          regionStyle: {
+            initial: {
+              fill: '#3E8EF7',
+            },
+            hover: {
+              fill: '#589FFC',
+            },
+            selected: {
+              fill: '#0B69E3',
+            },
+            selectedHover: {
+              fill: '#589FFC',
+            },
+          },
+          markerStyle: {
+            initial: {
+              r: 3,
+              fill: '#FF4C52',
+              'stroke-width': 0,
+            },
+            hover: {
+              r: 6,
+              stroke: '#FF4C52',
+              'stroke-width': 0,
+            },
+          },
+          backgroundColor: '#fff',
+          markers: [
+                  @foreach($nodesGeo as $name => $geo)
+            {
+              latLng: [{{$name}}], name: '{{$geo}}',
+            },
+              @endforeach
+          ],
         });
+        $('.node').matchHeight();
+        $('.map').matchHeight();
+      });
 
-        function getInfo(id, type) {
-            const oldClass = $('#' + type + id).attr('class');
-            $.ajax({
-                method: 'POST',
-                url: '{{route('node')}}',
-                data: {_token: '{{csrf_token()}}', id: id, type: type},
-                beforeSend: function () {
-                    $('#' + type + id).removeAttr('class').addClass('icon wb-loop icon-spin');
-                },
-                success: function (ret) {
-                    if (ret.status === 'success') {
-                        switch (type) {
-                            case 'code':
-                                swal.fire({
-                                    html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data + '</textarea>' +
-                                        '<a href="' + ret.data + '" class="btn btn-block btn-danger mt-4">{{trans('common.open')}}' + ret.title + '</a>',
-                                    showConfirmButton: false,
-                                });
-                                break;
-                            case 'qrcode':
-                                swal.fire({
-                                    title: '{{trans('user.scan_qrcode')}}',
-                                    html: '<div id="qrcode"></div><button class="btn btn-block btn-outline-primary mt-4" onclick="Download()"> <i class="icon wb-download"></i> {{trans('common.download')}}</button>',
-                                    onBeforeOpen: () => {
-                                        new QRCode(document.getElementById("qrcode"), {text: ret.data});
-                                    },
-                                    showConfirmButton: false,
-                                });
-                                break;
-                            case 'text':
-                                swal.fire({
-                                    title: '{{trans('user.node.info')}}',
-                                    html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data + '</textarea>',
-                                    showConfirmButton: false,
-                                });
-                                break;
-                            default:
-                                swal.fire({title: ret.title, text: ret.data, icon: 'error'});
-                        }
-                    }
-                },
-                complete: function () {
-                    $('#' + type + id).removeAttr('class').addClass(oldClass);
-                },
-            });
-        }
+      function getInfo(id, type) {
+        const oldClass = $('#' + type + id).attr('class');
+        $.ajax({
+          method: 'POST',
+          url: '{{route('node')}}',
+          data: {_token: '{{csrf_token()}}', id: id, type: type},
+          beforeSend: function() {
+            $('#' + type + id).removeAttr('class').addClass('icon wb-loop icon-spin');
+          },
+          success: function(ret) {
+            if (ret.status === 'success') {
+              switch (type) {
+                case 'code':
+                  swal.fire({
+                    html: '<textarea class="form-control" rows="8" readonly="readonly">' + ret.data + '</textarea>' +
+                        '<a href="' + ret.data + '" class="btn btn-block btn-danger mt-4">{{trans('common.open')}}' +
+                        ret.title + '</a>',
+                    showConfirmButton: false,
+                  });
+                  break;
+                case 'qrcode':
+                  swal.fire({
+                    title: '{{trans('user.scan_qrcode')}}',
+                    html: '<div id="qrcode"></div><button class="btn btn-block btn-outline-primary mt-4" onclick="Download()"> <i class="icon wb-download"></i> {{trans('common.download')}}</button>',
+                    onBeforeOpen: () => {
+                      new QRCode(document.getElementById('qrcode'), {text: ret.data});
+                    },
+                    showConfirmButton: false,
+                  });
+                  break;
+                case 'text':
+                  swal.fire({
+                    title: '{{trans('user.node.info')}}',
+                    html: '<textarea class="form-control" rows="12" readonly="readonly">' + ret.data + '</textarea>',
+                    showConfirmButton: false,
+                  });
+                  break;
+                default:
+                  swal.fire({title: ret.title, text: ret.data, icon: 'error'});
+              }
+            }
+          },
+          complete: function() {
+            $('#' + type + id).removeAttr('class').addClass(oldClass);
+          },
+        });
+      }
 
-        function Download() {
-            const canvas = document.getElementsByTagName("canvas")[0];
-            canvas.toBlob((blob) => {
-                let link = document.createElement('a');
-                link.download = 'qr.png';
+      function Download() {
+        const canvas = document.getElementsByTagName('canvas')[0];
+        canvas.toBlob((blob) => {
+          let link = document.createElement('a');
+          link.download = 'qr.png';
 
-                let reader = new FileReader();
-                reader.readAsDataURL(blob);
-                reader.onload = () => {
-                    link.href = reader.result;
-                    link.click();
-                };
-            }, "image/png");
-        }
+          let reader = new FileReader();
+          reader.readAsDataURL(blob);
+          reader.onload = () => {
+            link.href = reader.result;
+            link.click();
+          };
+        }, 'image/png');
+      }
     </script>
 @endsection

+ 12 - 6
resources/views/user/profile.blade.php

@@ -24,13 +24,18 @@
                 <div class="user-info card card-shadow text-center">
                     <div class="user-base card-block">
                         <a class="avatar img-bordered avatar-100" href="javascript:void(0)">
-                            <img src="{{Auth::getUser()->avatar}}" alt="{{trans('common.avatar')}}" />
+                            <img src="{{Auth::getUser()->avatar}}" alt="{{trans('common.avatar')}}"/>
                         </a>
                         <h4 class="user-name">{{Auth::getUser()->nickname}}</h4>
-                        <p class="user-job"><i class="fa-brands fa-weixin fa-lg mr-10" aria-hidden="true"></i> {{trans('model.user.wechat')}}:
-                            @if(Auth::getUser()->wechat) {{Auth::getUser()->wechat}} @else {{trans('common.none')}} @endif</p>
-                        <p class="user-location"><i class="fa-brands fa-qq fa-lg mr-10" aria-hidden="true"></i> QQ:
-                            @if(Auth::getUser()->qq) {{Auth::getUser()->qq}} @else {{trans('common.none')}} @endif</p>
+                        <p class="user-job">
+                            <i class="fa-brands fa-weixin fa-lg mr-10" aria-hidden="true"></i>
+                            {{trans('model.user.wechat')}}: {{Auth::getUser()->wechat ?? trans('common.none')}}</p>
+                        <p class="user-location"><i class="fa-brands fa-qq fa-lg mr-10" aria-hidden="true"></i> QQ:
+                            @if(Auth::getUser()->qq)
+                                {{Auth::getUser()->qq}}
+                            @else
+                                {{trans('common.none')}}
+                            @endif</p>
                     </div>
                     @if(sysConfig('oauth_path'))
                         <div class="line">
@@ -40,7 +45,8 @@
                             @foreach (json_decode(sysConfig('oauth_path')) as $item)
                                 <a class="list-group-item justify-content-center @if(in_array($item, $auth, true)) col-10 @else col-12 @endif"
                                    @if($item !== 'telegram') href="{{route('oauth.bind', ['type' => $item])}}" @endif>
-                                    <i class="fa-brands {{ config('common.oauth.icon')[$item] }} fa-lg mr-10" aria-hidden="true"></i> {{ ucfirst($item) }} :
+                                    <i class="fa-brands {{ config('common.oauth.icon')[$item] }} fa-lg mr-10" aria-hidden="true"></i> {{ ucfirst($item) }}
+                                    :
                                     @if(in_array($item, $auth, true))
                                         <span class="red-600">{{trans('user.oauth.rebind')}}</span>
                                     @else

+ 59 - 59
resources/views/user/referral.blade.php

@@ -163,72 +163,72 @@
     <script src="/assets/custom/clipboardjs/clipboard.min.js"></script>
     <script src="/assets/custom/easy.qrcode.min.js"></script>
     <script>
-        // Options
-        const options = {
-            text: @json($aff_link),
-            dotScale: 0.9,
-            width: 144,
-            height: 144,
-            backgroundImage: '/assets/images/logo_original.png',
-            backgroundImageAlpha: 1,
-            PO_TL: '#007bff',
-            PI_TL: '#17a2b8',
-            PI_TR: '#fd7e14',
-            PO_TR: '#28a745',
-            PI_BL: '#ffc107',
-            PO_BL: '#17a2b8',
-            AO: '#fd7e14',
-            AI: '#20c997',
-            autoColor: true,
-        };
+      // Options
+      const options = {
+        text: @json($aff_link),
+        dotScale: 0.9,
+        width: 144,
+        height: 144,
+        backgroundImage: '/assets/images/logo_original.png',
+        backgroundImageAlpha: 1,
+        PO_TL: '#007bff',
+        PI_TL: '#17a2b8',
+        PI_TR: '#fd7e14',
+        PO_TR: '#28a745',
+        PI_BL: '#ffc107',
+        PO_BL: '#17a2b8',
+        AO: '#fd7e14',
+        AI: '#20c997',
+        autoColor: true,
+      };
 
-        // Create QRCode Object
-        new QRCode(document.getElementById('qrcode'), options);
+      // Create QRCode Object
+      new QRCode(document.getElementById('qrcode'), options);
 
-        function Download() {
-            const canvas = document.getElementsByTagName("canvas")[0];
-            canvas.toBlob((blob) => {
-                let link = document.createElement('a');
-                link.download = 'qr.png';
+      function Download() {
+        const canvas = document.getElementsByTagName('canvas')[0];
+        canvas.toBlob((blob) => {
+          let link = document.createElement('a');
+          link.download = 'qr.png';
 
-                let reader = new FileReader();
-                reader.readAsDataURL(blob);
-                reader.onload = () => {
-                    link.href = reader.result;
-                    link.click();
-                };
-            }, "image/png");
-        };
+          let reader = new FileReader();
+          reader.readAsDataURL(blob);
+          reader.onload = () => {
+            link.href = reader.result;
+            link.click();
+          };
+        }, 'image/png');
+      }
 
-        // 申请提现
-        function extractMoney() {
-            $.post('{{route('applyCommission')}}', {_token: '{{csrf_token()}}'}, function (ret) {
-                if (ret.status === 'success') {
-                    swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => {
-                        window.location.reload();
-                    });
-                } else {
-                    swal.fire(ret.title, ret.message, 'error');
-                }
+      // 申请提现
+      function extractMoney() {
+        $.post('{{route('applyCommission')}}', {_token: '{{csrf_token()}}'}, function(ret) {
+          if (ret.status === 'success') {
+            swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => {
+              window.location.reload();
             });
-        }
+          } else {
+            swal.fire(ret.title, ret.message, 'error');
+          }
+        });
+      }
 
-        const clipboard = new ClipboardJS('.mt-clipboard');
-        clipboard.on('success', function () {
-            swal.fire({
-                title: '{{trans('common.copy.success')}}',
-                icon: 'success',
-                timer: 1300,
-                showConfirmButton: false,
-            });
+      const clipboard = new ClipboardJS('.mt-clipboard');
+      clipboard.on('success', function() {
+        swal.fire({
+          title: '{{trans('common.copy.success')}}',
+          icon: 'success',
+          timer: 1300,
+          showConfirmButton: false,
         });
-        clipboard.on('error', function () {
-            swal.fire({
-                title: '{{trans('common.copy.failed')}}',
-                icon: 'error',
-                timer: 1500,
-                showConfirmButton: false,
-            });
+      });
+      clipboard.on('error', function() {
+        swal.fire({
+          title: '{{trans('common.copy.failed')}}',
+          icon: 'error',
+          timer: 1500,
+          showConfirmButton: false,
         });
+      });
     </script>
 @endsection

+ 75 - 71
resources/views/user/replyTicket.blade.php

@@ -35,81 +35,85 @@
 @endsection
 @section('javascript')
     <script>
-        //回车检测
-        $(document).on('keypress', 'input', function(e) {
-            if (e.which === 13) {
-                replyTicket();
-                return false;
-            }
-        });
+      //回车检测
+      $(document).on('keypress', 'input', function(e) {
+        if (e.which === 13) {
+          replyTicket();
+          return false;
+        }
+      });
 
-        // 关闭工单
-        function closeTicket() {
-            swal.fire({
-                title: '{{trans('user.ticket.close')}}',
-                text: '{{trans('user.ticket.close_tips')}}',
-                icon: 'question',
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.ajax({
-                        method: 'POST',
-                        url: '{{route('closeTicket')}}',
-                        async: true,
-                        data: {_token: '{{csrf_token()}}', id: '{{$ticket->id}}'},
-                        dataType: 'json',
-                        success: function(ret) {
-                            swal.fire({
-                                title: ret.message,
-                                icon: 'success',
-                                timer: 1300,
-                            }).then(() => window.location.href = '{{route('ticket')}}');
-                        },
-                        error: function() {
-                            swal.fire({title: '{{trans('user.ticket.error')}}', icon: 'error'});
-                        },
-                    });
-                }
+      // 关闭工单
+      function closeTicket() {
+        swal.fire({
+          title: '{{trans('user.ticket.close')}}',
+          text: '{{trans('user.ticket.close_tips')}}',
+          icon: 'question',
+          showCancelButton: true,
+          cancelButtonText: '{{trans('common.close')}}',
+          confirmButtonText: '{{trans('common.confirm')}}',
+        }).then((result) => {
+          if (result.value) {
+            $.ajax({
+              method: 'POST',
+              url: '{{route('closeTicket')}}',
+              async: true,
+              data: {_token: '{{csrf_token()}}', id: '{{$ticket->id}}'},
+              dataType: 'json',
+              success: function(ret) {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1300,
+                }).then(() => window.location.href = '{{route('ticket')}}');
+              },
+              error: function() {
+                swal.fire({title: '{{trans('user.ticket.error')}}', icon: 'error'});
+              },
             });
-        }
+          }
+        });
+      }
 
-        // 回复工单
-        function replyTicket() {
-            const content = document.getElementById('editor').value;
+      // 回复工单
+      function replyTicket() {
+        const content = document.getElementById('editor').value;
 
-            if (content.trim() === '') {
-                swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!', icon: 'warning', timer: 1500});
-                return false;
-            }
-            swal.fire({
-                title: '{{trans('user.ticket.reply_confirm')}}',
-                icon: 'question',
-                allowEnterKey: false,
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.post('{{route('replyTicket')}}', {
-                        _token: '{{csrf_token()}}',
-                        id: '{{$ticket->id}}',
-                        content: content,
-                    }, function(ret) {
-                        if (ret.status === 'success') {
-                            swal.fire({
-                                title: ret.message,
-                                icon: 'success',
-                                timer: 1000,
-                                showConfirmButton: false,
-                            }).then(() => window.location.reload());
-                        } else {
-                            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                        }
-                    });
-                }
-            });
+        if (content.trim() === '') {
+          swal.fire({
+            title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!',
+            icon: 'warning',
+            timer: 1500,
+          });
+          return false;
         }
+        swal.fire({
+          title: '{{trans('user.ticket.reply_confirm')}}',
+          icon: 'question',
+          allowEnterKey: false,
+          showCancelButton: true,
+          cancelButtonText: '{{trans('common.close')}}',
+          confirmButtonText: '{{trans('common.confirm')}}',
+        }).then((result) => {
+          if (result.value) {
+            $.post('{{route('replyTicket')}}', {
+              _token: '{{csrf_token()}}',
+              id: '{{$ticket->id}}',
+              content: content,
+            }, function(ret) {
+              if (ret.status === 'success') {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
+              } else {
+                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+              }
+            });
+          }
+        });
+      }
     </script>
 @endsection

+ 13 - 2
resources/views/user/services.blade.php

@@ -190,7 +190,12 @@
           if (result.value) {
             $.post('{{route('resetTraffic')}}', {_token: '{{csrf_token()}}'}, function(ret) {
               if (ret.status === 'success') {
-                swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
               } else {
                 swal.fire({
                   title: ret.message,
@@ -210,7 +215,13 @@
         const amount = parseInt($('#amount').val());
         if (paymentType === 1) {
           if (amount <= 0) {
-            swal.fire({title: '{{trans('common.error')}}', text: '{{trans('user.payment.error')}}', icon: 'warning', timer: 1000, showConfirmButton: false});
+            swal.fire({
+              title: '{{trans('common.error')}}',
+              text: '{{trans('user.payment.error')}}',
+              icon: 'warning',
+              timer: 1000,
+              showConfirmButton: false,
+            });
             return false;
           }
 

+ 46 - 34
resources/views/user/ticketList.blade.php

@@ -67,7 +67,8 @@
             <div class="col-lg-4 order-lg-2 order-1">
                 <div class="panel panel-bordered">
                     <div class="panel-heading p-20">
-                        <h3 class="panel-title cyan-600"><i class="icon ti-headphone-alt"></i>{{trans('user.ticket.working_hour')}}</h3>
+                        <h3 class="panel-title cyan-600">
+                            <i class="icon ti-headphone-alt"></i>{{trans('user.ticket.working_hour')}}</h3>
                     </div>
                     <div class="panel-body pt-0">
                         <ul class="list-group list-group-dividered list-group-full vertical-align-middle">
@@ -129,42 +130,53 @@
 @endsection
 @section('javascript')
     <script>
-        // 发起工单
-        function createTicket() {
-            const title = $('#title').val();
-            const content = $('#content').val();
+      // 发起工单
+      function createTicket() {
+        const title = $('#title').val();
+        const content = $('#content').val();
 
-            if (title.trim() === '') {
-                swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.title')])}}!', icon: 'warning'});
-                return false;
-            }
+        if (title.trim() === '') {
+          swal.fire({
+            title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.title')])}}!',
+            icon: 'warning',
+          });
+          return false;
+        }
 
-            if (content.trim() === '') {
-                swal.fire({title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!', icon: 'warning'});
-                return false;
-            }
+        if (content.trim() === '') {
+          swal.fire({
+            title: '{{trans('validation.required', ['attribute' => trans('validation.attributes.content')])}}!',
+            icon: 'warning',
+          });
+          return false;
+        }
 
-            swal.fire({
-                title: '{{trans('user.ticket.submit_tips')}}',
-                icon: 'question',
-                showCancelButton: true,
-                cancelButtonText: '{{trans('common.close')}}',
-                confirmButtonText: '{{trans('common.confirm')}}',
-            }).then((result) => {
-                if (result.value) {
-                    $.post('{{route('openTicket')}}', {
-                        _token: '{{csrf_token()}}',
-                        title: title,
-                        content: content,
-                    }, function(ret) {
-                        if (ret.status === 'success') {
-                            swal.fire({title: ret.message, icon: 'success', timer: 1000, showConfirmButton: false}).then(() => window.location.reload());
-                        } else {
-                            swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
-                        }
-                    });
-                }
+        swal.fire({
+          title: '{{trans('user.ticket.submit_tips')}}',
+          icon: 'question',
+          showCancelButton: true,
+          cancelButtonText: '{{trans('common.close')}}',
+          confirmButtonText: '{{trans('common.confirm')}}',
+        }).then((result) => {
+          if (result.value) {
+            $.post('{{route('openTicket')}}', {
+              _token: '{{csrf_token()}}',
+              title: title,
+              content: content,
+            }, function(ret) {
+              if (ret.status === 'success') {
+                swal.fire({
+                  title: ret.message,
+                  icon: 'success',
+                  timer: 1000,
+                  showConfirmButton: false,
+                }).then(() => window.location.reload());
+              } else {
+                swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
+              }
             });
-        }
+          }
+        });
+      }
     </script>
 @endsection

+ 11 - 11
resources/views/vendor/log-viewer/remark/dashboard.blade.php

@@ -40,18 +40,18 @@
 
 @section('javascript')
     <script>
-        new Chart(document.getElementById('stats-doughnut-chart'),
-            {
-                type: 'doughnut',
-                data: {!! $chartData !!},
-                options: {
-                    plugins:{
-                        legend: {
-                            position: 'bottom',
-                        },
-                    }
+      new Chart(document.getElementById('stats-doughnut-chart'),
+          {
+            type: 'doughnut',
+            data: {!! $chartData !!},
+            options: {
+              plugins: {
+                legend: {
+                  position: 'bottom',
                 },
+              },
             },
-        );
+          },
+      );
     </script>
 @endsection

+ 8 - 14
resources/views/vendor/log-viewer/remark/layouts.blade.php

@@ -184,30 +184,24 @@
         </div>
     </nav>
     <div class="page ml-0">
-        <!--[if lt IE 8]>
-        <p class="browserupgrade">您正在使用 <strong>过时/老旧</strong> 的浏览器。 为了您的使用体验,请
-            <a href="https://browsehappy.com/">升级您的浏览器</a> <br/>You are using an <strong>outdated</strong> browser. Please
-            <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience.
-        </p>
-        <![endif]-->
+        <!--[if lt IE 8]><p class="browserupgrade">{{trans('common.update_browser.0')}}<strong>{{trans('common.update_browser.1')}}</strong>
+{{trans('common.update_browser.2')}}<a href="https://browsehappy.com/" target="_blank">{{trans('common.update_browser.3')}}</a>{{trans('common.update_browser.4')}}</p><![endif]-->
         <div class="container-fluid">
             @yield('content')
         </div>
     </div>
     <footer class="site-footer ml-0">
-        <div class="site-footer-legal">
-            © 2017 - 2022 <a href="https://github.com/ProxyPanel/ProxyPanel" target="_blank">{{config('version.name')}} </a> {{__('All rights reserved
-            .')}}
+        <div class="site-footer-legal">© 2017 -
+            2023<a href="https://github.com/ProxyPanel/ProxyPanel" target="_blank">{{config('version.name')}} </a> {{__('All rights reserved.')}}
         </div>
         <div class="site-footer-right">
-            Base on <a href="https://github.com/ARCANEDEV/LogViewer" target="_blank">LogViewer</a> 🚀 Version: <code> {{ log_viewer()->version() }} </code>
+            Base on <a href="https://github.com/ARCANEDEV/LogViewer" target="_blank">LogViewer</a> 🚀
+            Version:<code> {{ log_viewer()->version() }} </code>
         </div>
     </footer>
-@yield('modals')
+    @yield('modals')
 @endsection
 @section('layout_javascript')
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.6.0/chart.min.js"
-            integrity="sha512-GMGzUEevhWh8Tc/njS0bDpwgxdCJLQBWG3Z2Ct+JGOpVnEmjvNx6ts4v6A2XJf1HOrtOsfhv3hBKpK9kE5z8AQ==" crossorigin="anonymous"
-            referrerpolicy="no-referrer"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.6.0/chart.min.js" integrity="sha512-GMGzUEevhWh8Tc/njS0bDpwgxdCJLQBWG3Z2Ct+JGOpVnEmjvNx6ts4v6A2XJf1HOrtOsfhv3hBKpK9kE5z8AQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
     @yield('javascript')
 @endsection

+ 81 - 81
resources/views/vendor/log-viewer/remark/logs.blade.php

@@ -1,6 +1,7 @@
 @extends('vendor.log-viewer.remark.layouts')
 
-<?php /** @var  Illuminate\Pagination\LengthAwarePaginator  $rows */ ?>
+<?php
+/** @var  Illuminate\Pagination\LengthAwarePaginator $rows */ ?>
 
 @section('content')
     <div class="page-header">
@@ -10,8 +11,8 @@
     <div class="table-responsive">
         <table class="table table-hover">
             <thead>
-                <tr>
-                    @foreach($headers as $key => $header)
+            <tr>
+                @foreach($headers as $key => $header)
                     <th scope="col" class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
                         @if ($key == 'date')
                             <strong>{{ $header }}</strong>
@@ -21,44 +22,44 @@
                             </strong>
                         @endif
                     </th>
-                    @endforeach
-                    <th scope="col" class="text-right">@lang('Actions')</th>
-                </tr>
+                @endforeach
+                <th scope="col" class="text-right">@lang('Actions')</th>
+            </tr>
             </thead>
             <tbody>
-                @forelse($rows as $date => $row)
-                    <tr>
-                        @foreach($row as $key => $value)
-                            <td class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
-                                @if ($key == 'date')
-                                    <strong>{{ $value }}</strong>
-                                @elseif ($value == 0)
-                                @else
-                                    <a href="{{ route('log-viewer::logs.filter', [$date, $key]) }}">
-                                        <span class="badge badge-level-{{ $key }}">{{ $value }}</span>
-                                    </a>
-                                @endif
-                            </td>
-                        @endforeach
-                        <td class="text-right">
-                            <a href="{{ route('log-viewer::logs.show', [$date]) }}" class="btn btn-sm btn-info">
-                                <i class="fa-solid fa-magnifying-glass"></i>
-                            </a>
-                            <a href="{{ route('log-viewer::logs.download', [$date]) }}" class="btn btn-sm btn-success">
-                                <i class="fa-solid fa-download"></i>
-                            </a>
-                            <button class="btn btn-sm btn-danger" data-target="#deleteLogModal" data-toggle="modal" data-log-date="{{ $date }}" type="button">
-                                <i class="fa-solid fa-trash"></i> @lang('Delete')
-                            </button>
-                        </td>
-                    </tr>
-                @empty
-                    <tr>
-                        <td colspan="11" class="text-center">
-                            <span class="badge badge-secondary">@lang('The list of logs is empty!')</span>
+            @forelse($rows as $date => $row)
+                <tr>
+                    @foreach($row as $key => $value)
+                        <td class="{{ $key == 'date' ? 'text-left' : 'text-center' }}">
+                            @if ($key == 'date')
+                                <strong>{{ $value }}</strong>
+                            @elseif ($value == 0)
+                            @else
+                                <a href="{{ route('log-viewer::logs.filter', [$date, $key]) }}">
+                                    <span class="badge badge-level-{{ $key }}">{{ $value }}</span>
+                                </a>
+                            @endif
                         </td>
-                    </tr>
-                @endforelse
+                    @endforeach
+                    <td class="text-right">
+                        <a href="{{ route('log-viewer::logs.show', [$date]) }}" class="btn btn-sm btn-info">
+                            <i class="fa-solid fa-magnifying-glass"></i>
+                        </a>
+                        <a href="{{ route('log-viewer::logs.download', [$date]) }}" class="btn btn-sm btn-success">
+                            <i class="fa-solid fa-download"></i>
+                        </a>
+                        <button class="btn btn-sm btn-danger" data-target="#deleteLogModal" data-toggle="modal" data-log-date="{{ $date }}" type="button">
+                            <i class="fa-solid fa-trash"></i> @lang('Delete')
+                        </button>
+                    </td>
+                </tr>
+            @empty
+                <tr>
+                    <td colspan="11" class="text-center">
+                        <span class="badge badge-secondary">@lang('The list of logs is empty!')</span>
+                    </td>
+                </tr>
+            @endforelse
             </tbody>
         </table>
     </div>
@@ -94,56 +95,55 @@
 
 @section('javascript')
     <script>
-        $(function () {
-            const deleteLogModal = $('div#deleteLogModal'),
-                deleteLogForm = $('form#deleteLogForm'),
-                submitBtn = deleteLogForm.find('button[type=submit]');
+      $(function() {
+        const deleteLogModal = $('div#deleteLogModal'),
+            deleteLogForm = $('form#deleteLogForm'),
+            submitBtn = deleteLogForm.find('button[type=submit]');
 
-            $("button[data-target='#deleteLogModal']").on('click', function(event) {
-                event.preventDefault();
-                const date = $(this).data('log-date'),
-                    message = "{{ __('Are you sure you want to delete this log file: :date ?') }}";
+        $('button[data-target=\'#deleteLogModal\']').on('click', function(event) {
+          event.preventDefault();
+          const date = $(this).data('log-date'),
+              message = "{{ __('Are you sure you want to delete this log file: :date ?') }}";
 
-                deleteLogForm.find('input[name=date]').val(date);
-                deleteLogModal.find('.modal-body p').html(message.replace(':date', date));
+          deleteLogForm.find('input[name=date]').val(date);
+          deleteLogModal.find('.modal-body p').html(message.replace(':date', date));
 
-                deleteLogModal.modal('show');
-            });
+          deleteLogModal.modal('show');
+        });
 
-            deleteLogForm.on('submit', function(event) {
-                event.preventDefault();
-                submitBtn.button('loading');
+        deleteLogForm.on('submit', function(event) {
+          event.preventDefault();
+          submitBtn.button('loading');
 
-                $.ajax({
-                    url:      $(this).attr('action'),
-                    type:     $(this).attr('method'),
-                    dataType: 'json',
-                    data:     $(this).serialize(),
-                    success: function(data) {
-                        submitBtn.button('reset');
-                        if (data.result === 'success') {
-                            deleteLogModal.modal('hide');
-                            location.reload();
-                        }
-                        else {
-                            alert('AJAX ERROR ! Check the console !');
-                            console.error(data);
-                        }
-                    },
-                    error: function(xhr, textStatus, errorThrown) {
-                        alert('AJAX ERROR ! Check the console !');
-                        console.error(errorThrown);
-                        submitBtn.button('reset');
-                    }
-                });
+          $.ajax({
+            url: $(this).attr('action'),
+            type: $(this).attr('method'),
+            dataType: 'json',
+            data: $(this).serialize(),
+            success: function(data) {
+              submitBtn.button('reset');
+              if (data.result === 'success') {
+                deleteLogModal.modal('hide');
+                location.reload();
+              } else {
+                alert('AJAX ERROR ! Check the console !');
+                console.error(data);
+              }
+            },
+            error: function(xhr, textStatus, errorThrown) {
+              alert('AJAX ERROR ! Check the console !');
+              console.error(errorThrown);
+              submitBtn.button('reset');
+            },
+          });
 
-                return false;
-            });
+          return false;
+        });
 
-            deleteLogModal.on('hidden.bs.modal', function() {
-                deleteLogForm.find('input[name=date]').val('');
-                deleteLogModal.find('.modal-body p').html('');
-            });
+        deleteLogModal.on('hidden.bs.modal', function() {
+          deleteLogForm.find('input[name=date]').val('');
+          deleteLogModal.find('.modal-body p').html('');
         });
+      });
     </script>
 @endsection

+ 47 - 44
resources/views/vendor/log-viewer/remark/show.blade.php

@@ -4,6 +4,7 @@
  * @var  Illuminate\Pagination\LengthAwarePaginator $entries
  * @var  string|null $query
  */
+
 ?>
 
 @extends('vendor.log-viewer.remark.layouts')
@@ -86,7 +87,8 @@
                                 <div class="input-group-append">
                                     @unless (is_null($query))
                                         <a href="{{ route('log-viewer::logs.show', [$log->date]) }}" class="btn btn-secondary">
-                                            (@lang(':count results', ['count' => $entries->count()])) <i class="fa-solid fa-fw fa-xmark"></i>
+                                            (@lang(':count results', ['count' => $entries->count()]))
+                                            <i class="fa-solid fa-fw fa-xmark"></i>
                                         </a>
                                     @endunless
                                     <button id="search-btn" class="btn btn-primary">
@@ -126,7 +128,8 @@
                             </thead>
                             <tbody>
                             @forelse($entries as $key => $entry)
-                                <?php /** @var  Arcanedev\LogViewer\Entities\LogEntry $entry */ ?>
+                                    <?php
+                                    /** @var  Arcanedev\LogViewer\Entities\LogEntry $entry */ ?>
                                 <tr>
                                     <td>
                                         {{ $key+1 }}
@@ -236,53 +239,53 @@
 
 @section('javascript')
     <script>
-        $(function() {
-            const deleteLogModal = $('div#deleteLogModal'),
-                deleteLogForm = $('form#deleteLogForm'),
-                submitBtn = deleteLogForm.find('button[type=submit]');
+      $(function() {
+        const deleteLogModal = $('div#deleteLogModal'),
+            deleteLogForm = $('form#deleteLogForm'),
+            submitBtn = deleteLogForm.find('button[type=submit]');
 
-            deleteLogForm.on('submit', function(event) {
-                event.preventDefault();
-                submitBtn.button('loading');
+        deleteLogForm.on('submit', function(event) {
+          event.preventDefault();
+          submitBtn.button('loading');
 
-                $.ajax({
-                    url: $(this).attr('action'),
-                    type: $(this).attr('method'),
-                    dataType: 'json',
-                    data: $(this).serialize(),
-                    success: function(data) {
-                        submitBtn.button('reset');
-                        if (data.result === 'success') {
-                            deleteLogModal.modal('hide');
-                            location.replace("{{ route('log-viewer::logs.list') }}");
-                        } else {
-                            alert('OOPS ! This is a lack of coffee exception !');
-                        }
-                    },
-                    error: function(xhr, textStatus, errorThrown) {
-                        alert('AJAX ERROR ! Check the console !');
-                        console.error(errorThrown);
-                        submitBtn.button('reset');
-                    },
-                });
+          $.ajax({
+            url: $(this).attr('action'),
+            type: $(this).attr('method'),
+            dataType: 'json',
+            data: $(this).serialize(),
+            success: function(data) {
+              submitBtn.button('reset');
+              if (data.result === 'success') {
+                deleteLogModal.modal('hide');
+                location.replace("{{ route('log-viewer::logs.list') }}");
+              } else {
+                alert('OOPS ! This is a lack of coffee exception !');
+              }
+            },
+            error: function(xhr, textStatus, errorThrown) {
+              alert('AJAX ERROR ! Check the console !');
+              console.error(errorThrown);
+              submitBtn.button('reset');
+            },
+          });
 
-                return false;
-            });
+          return false;
+        });
 
-            @unless (empty(log_styler()->toHighlight()))
-            @php
-                $htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
-                    ? join('|', log_styler()->toHighlight())
-                    : join(log_styler()->toHighlight(), '|')
-            @endphp
+          @unless (empty(log_styler()->toHighlight()))
+          @php
+              $htmlHighlight = version_compare(PHP_VERSION, '7.4.0') >= 0
+                  ? join('|', log_styler()->toHighlight())
+                  : join(log_styler()->toHighlight(), '|')
+          @endphp
 
-            $('.stack-content').each(function() {
-                const $this = $(this);
-                const html = $this.html().trim().replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
+          $('.stack-content').each(function() {
+            const $this = $(this);
+            const html = $this.html().trim().replace(/({!! $htmlHighlight !!})/gm, '<strong>$1</strong>');
 
-                $this.html(html);
-            });
-            @endunless
-        });
+            $this.html(html);
+          });
+          @endunless
+      });
     </script>
 @endsection