From 14b1f13fe07381684de86615c08db8e7b64446ba Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 15 Dec 2019 18:11:56 -0800 Subject: [PATCH] Obliterate swaths of old template code --- .../Controllers/Base/AccountController.php | 0 .../Controllers/Base/AccountKeyController.php | 107 ---------- .../Controllers/Base/ClientApiController.php | 109 ---------- .../Controllers/Base/SecurityController.php | 134 ------------ .../Requests/Base/AccountDataFormRequest.php | 71 ------- app/Http/Requests/Base/ApiKeyFormRequest.php | 75 ------- .../Base/CreateClientApiKeyRequest.php | 21 -- .../Requests/Base/StoreAccountKeyRequest.php | 23 -- resources/views/base/account.blade.php | 147 ------------- resources/views/base/api/index.blade.php | 123 ----------- resources/views/base/api/new.blade.php | 47 ----- resources/views/base/index.blade.php | 108 ---------- resources/views/base/security.blade.php | 135 ------------ resources/views/server/console.blade.php | 45 ---- .../views/server/databases/index.blade.php | 198 ------------------ resources/views/server/files/add.blade.php | 98 --------- resources/views/server/files/edit.blade.php | 59 ------ resources/views/server/files/index.blade.php | 54 ----- resources/views/server/files/list.blade.php | 170 --------------- resources/views/server/index.blade.php | 85 -------- .../views/server/schedules/index.blade.php | 98 --------- .../views/server/schedules/new.blade.php | 145 ------------- .../views/server/schedules/view.blade.php | 163 -------------- .../server/settings/allocation.blade.php | 120 ----------- .../views/server/settings/name.blade.php | 50 ----- .../views/server/settings/sftp.blade.php | 54 ----- .../views/server/settings/startup.blade.php | 87 -------- resources/views/server/users/index.blade.php | 132 ------------ resources/views/server/users/new.blade.php | 91 -------- resources/views/server/users/view.blade.php | 96 --------- routes/base.php | 29 --- 31 files changed, 2874 deletions(-) delete mode 100644 app/Http/Controllers/Base/AccountController.php delete mode 100644 app/Http/Controllers/Base/AccountKeyController.php delete mode 100644 app/Http/Controllers/Base/ClientApiController.php delete mode 100644 app/Http/Controllers/Base/SecurityController.php delete mode 100644 app/Http/Requests/Base/AccountDataFormRequest.php delete mode 100644 app/Http/Requests/Base/ApiKeyFormRequest.php delete mode 100644 app/Http/Requests/Base/CreateClientApiKeyRequest.php delete mode 100644 app/Http/Requests/Base/StoreAccountKeyRequest.php delete mode 100644 resources/views/base/account.blade.php delete mode 100644 resources/views/base/api/index.blade.php delete mode 100644 resources/views/base/api/new.blade.php delete mode 100644 resources/views/base/index.blade.php delete mode 100644 resources/views/base/security.blade.php delete mode 100644 resources/views/server/console.blade.php delete mode 100644 resources/views/server/databases/index.blade.php delete mode 100644 resources/views/server/files/add.blade.php delete mode 100644 resources/views/server/files/edit.blade.php delete mode 100644 resources/views/server/files/index.blade.php delete mode 100644 resources/views/server/files/list.blade.php delete mode 100644 resources/views/server/index.blade.php delete mode 100644 resources/views/server/schedules/index.blade.php delete mode 100644 resources/views/server/schedules/new.blade.php delete mode 100644 resources/views/server/schedules/view.blade.php delete mode 100644 resources/views/server/settings/allocation.blade.php delete mode 100644 resources/views/server/settings/name.blade.php delete mode 100644 resources/views/server/settings/sftp.blade.php delete mode 100644 resources/views/server/settings/startup.blade.php delete mode 100644 resources/views/server/users/index.blade.php delete mode 100644 resources/views/server/users/new.blade.php delete mode 100644 resources/views/server/users/view.blade.php diff --git a/app/Http/Controllers/Base/AccountController.php b/app/Http/Controllers/Base/AccountController.php deleted file mode 100644 index e69de29b..00000000 diff --git a/app/Http/Controllers/Base/AccountKeyController.php b/app/Http/Controllers/Base/AccountKeyController.php deleted file mode 100644 index 5a4e1b5f..00000000 --- a/app/Http/Controllers/Base/AccountKeyController.php +++ /dev/null @@ -1,107 +0,0 @@ -alert = $alert; - $this->keyService = $keyService; - $this->repository = $repository; - } - - /** - * Display a listing of all account API keys. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\View\View - */ - public function index(Request $request): View - { - return view('base.api.index', [ - 'keys' => $this->repository->getAccountKeys($request->user()), - ]); - } - - /** - * Display account API key creation page. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\View\View - */ - public function create(Request $request): View - { - return view('base.api.new'); - } - - /** - * Handle saving new account API key. - * - * @param \Pterodactyl\Http\Requests\Base\StoreAccountKeyRequest $request - * @return \Illuminate\Http\RedirectResponse - * - * @throws \Pterodactyl\Exceptions\Model\DataValidationException - */ - public function store(StoreAccountKeyRequest $request) - { - $this->keyService->setKeyType(ApiKey::TYPE_ACCOUNT)->handle([ - 'user_id' => $request->user()->id, - 'allowed_ips' => $request->input('allowed_ips'), - 'memo' => $request->input('memo'), - ]); - - $this->alert->success(trans('base.api.index.keypair_created'))->flash(); - - return redirect()->route('account.api'); - } - - /** - * Delete an account API key from the Panel via an AJAX request. - * - * @param \Illuminate\Http\Request $request - * @param string $identifier - * @return \Illuminate\Http\Response - */ - public function revoke(Request $request, string $identifier): Response - { - $this->repository->deleteAccountKey($request->user(), $identifier); - - return response('', 204); - } -} diff --git a/app/Http/Controllers/Base/ClientApiController.php b/app/Http/Controllers/Base/ClientApiController.php deleted file mode 100644 index 4051ffe7..00000000 --- a/app/Http/Controllers/Base/ClientApiController.php +++ /dev/null @@ -1,109 +0,0 @@ -alert = $alert; - $this->creationService = $creationService; - $this->repository = $repository; - } - - /** - * Return all of the API keys available to this user. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\View\View - */ - public function index(Request $request): View - { - return view('base.api.index', [ - 'keys' => $this->repository->getAccountKeys($request->user()), - ]); - } - - /** - * Render UI to allow creation of an API key. - * - * @return \Illuminate\View\View - */ - public function create(): View - { - return view('base.api.new'); - } - - /** - * Create the API key and return the user to the key listing page. - * - * @param \Pterodactyl\Http\Requests\Base\CreateClientApiKeyRequest $request - * @return \Illuminate\Http\RedirectResponse - * - * @throws \Pterodactyl\Exceptions\Model\DataValidationException - */ - public function store(CreateClientApiKeyRequest $request): RedirectResponse - { - $allowedIps = null; - if (! is_null($request->input('allowed_ips'))) { - $allowedIps = json_encode(explode(PHP_EOL, $request->input('allowed_ips'))); - } - - $this->creationService->setKeyType(ApiKey::TYPE_ACCOUNT)->handle([ - 'memo' => $request->input('memo'), - 'allowed_ips' => $allowedIps, - 'user_id' => $request->user()->id, - ]); - - $this->alert->success('A new client API key has been generated for your account.')->flash(); - - return redirect()->route('account.api'); - } - - /** - * Delete a client's API key from the panel. - * - * @param \Illuminate\Http\Request $request - * @param $identifier - * @return \Illuminate\Http\Response - */ - public function delete(Request $request, $identifier): Response - { - $this->repository->deleteAccountKey($request->user(), $identifier); - - return response('', 204); - } -} diff --git a/app/Http/Controllers/Base/SecurityController.php b/app/Http/Controllers/Base/SecurityController.php deleted file mode 100644 index 8ec1dd0e..00000000 --- a/app/Http/Controllers/Base/SecurityController.php +++ /dev/null @@ -1,134 +0,0 @@ -alert = $alert; - $this->config = $config; - $this->repository = $repository; - $this->toggleTwoFactorService = $toggleTwoFactorService; - $this->twoFactorSetupService = $twoFactorSetupService; - } - - /** - * Return information about the user's two-factor authentication status. If not enabled setup their - * secret and return information to allow the user to proceede with setup. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\JsonResponse - * @throws \Pterodactyl\Exceptions\Model\DataValidationException - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function index(Request $request): JsonResponse - { - if ($request->user()->use_totp) { - return JsonResponse::create([ - 'enabled' => true, - ]); - } - - $response = $this->twoFactorSetupService->handle($request->user()); - - return JsonResponse::create([ - 'enabled' => false, - 'qr_image' => $response, - 'secret' => '', - ]); - } - - /** - * Verifies that 2FA token received is valid and will work on the account. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\JsonResponse - * - * @throws \Pterodactyl\Exceptions\Model\DataValidationException - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function store(Request $request): JsonResponse - { - try { - $this->toggleTwoFactorService->handle($request->user(), $request->input('token') ?? ''); - } catch (TwoFactorAuthenticationTokenInvalid $exception) { - $error = true; - } - - return JsonResponse::create([ - 'success' => ! isset($error), - ]); - } - - /** - * Disables TOTP on an account. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\JsonResponse - * - * @throws \Pterodactyl\Exceptions\Model\DataValidationException - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function delete(Request $request): JsonResponse - { - try { - $this->toggleTwoFactorService->handle($request->user(), $request->input('token') ?? '', false); - } catch (TwoFactorAuthenticationTokenInvalid $exception) { - $error = true; - } - - return JsonResponse::create([ - 'success' => ! isset($error), - ]); - } -} diff --git a/app/Http/Requests/Base/AccountDataFormRequest.php b/app/Http/Requests/Base/AccountDataFormRequest.php deleted file mode 100644 index 802fc17d..00000000 --- a/app/Http/Requests/Base/AccountDataFormRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -. - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ - -namespace Pterodactyl\Http\Requests\Base; - -use Pterodactyl\Models\User; -use Pterodactyl\Http\Requests\FrontendUserFormRequest; -use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException; - -class AccountDataFormRequest extends FrontendUserFormRequest -{ - /** - * @return bool - * @throws \Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException - */ - public function authorize() - { - if (! parent::authorize()) { - return false; - } - - // Verify password matches when changing password or email. - if (in_array($this->input('do_action'), ['password', 'email'])) { - if (! password_verify($this->input('current_password'), $this->user()->password)) { - throw new InvalidPasswordProvidedException(trans('validation.internal.invalid_password')); - } - } - - return true; - } - - /** - * @return array - */ - public function rules() - { - $modelRules = User::getRulesForUpdate($this->user()); - - switch ($this->input('do_action')) { - case 'email': - $rules = [ - 'new_email' => array_get($modelRules, 'email'), - ]; - break; - case 'password': - $rules = [ - 'new_password' => 'required|confirmed|string|min:8', - 'new_password_confirmation' => 'required', - ]; - break; - case 'identity': - $rules = [ - 'name_first' => array_get($modelRules, 'name_first'), - 'name_last' => array_get($modelRules, 'name_last'), - 'username' => array_get($modelRules, 'username'), - 'language' => array_get($modelRules, 'language'), - ]; - break; - default: - abort(422); - } - - return $rules; - } -} diff --git a/app/Http/Requests/Base/ApiKeyFormRequest.php b/app/Http/Requests/Base/ApiKeyFormRequest.php deleted file mode 100644 index 01722dab..00000000 --- a/app/Http/Requests/Base/ApiKeyFormRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -. - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ - -namespace Pterodactyl\Http\Requests\Base; - -use Exception; -use IPTools\Network; -use Pterodactyl\Http\Requests\FrontendUserFormRequest; - -class ApiKeyFormRequest extends FrontendUserFormRequest -{ - /** - * Rules applied to data passed in this request. - * - * @return array - */ - public function rules() - { - $this->parseAllowedIntoArray(); - - return [ - 'memo' => 'required|nullable|string|max:500', - 'permissions' => 'sometimes|present|array', - 'admin_permissions' => 'sometimes|present|array', - 'allowed_ips' => 'present', - 'allowed_ips.*' => 'sometimes|string', - ]; - } - - /** - * Parse the string of allowed IPs into an array. - */ - protected function parseAllowedIntoArray() - { - $loop = []; - if (! empty($this->input('allowed_ips'))) { - foreach (explode(PHP_EOL, $this->input('allowed_ips')) as $ip) { - $loop[] = trim($ip); - } - } - - $this->merge(['allowed_ips' => $loop]); - } - - /** - * Run additional validation rules on the request to ensure all of the data is good. - * - * @param \Illuminate\Validation\Validator $validator - */ - public function withValidator($validator) - { - $validator->after(function ($validator) { - /* @var \Illuminate\Validation\Validator $validator */ - if (empty($this->input('permissions')) && empty($this->input('admin_permissions'))) { - $validator->errors()->add('permissions', 'At least one permission must be selected.'); - } - - foreach ($this->input('allowed_ips') as $ip) { - $ip = trim($ip); - - try { - Network::parse($ip); - } catch (Exception $ex) { - $validator->errors()->add('allowed_ips', 'Could not parse IP ' . $ip . ' because it is in an invalid format.'); - } - } - }); - } -} diff --git a/app/Http/Requests/Base/CreateClientApiKeyRequest.php b/app/Http/Requests/Base/CreateClientApiKeyRequest.php deleted file mode 100644 index b8e7bbfe..00000000 --- a/app/Http/Requests/Base/CreateClientApiKeyRequest.php +++ /dev/null @@ -1,21 +0,0 @@ - 'required|string|max:255', - 'allowed_ips' => 'nullable|string', - ]; - } -} diff --git a/app/Http/Requests/Base/StoreAccountKeyRequest.php b/app/Http/Requests/Base/StoreAccountKeyRequest.php deleted file mode 100644 index 2cfc2278..00000000 --- a/app/Http/Requests/Base/StoreAccountKeyRequest.php +++ /dev/null @@ -1,23 +0,0 @@ - 'required|nullable|string|max:500', - 'allowed_ips' => 'present', - 'allowed_ips.*' => 'sometimes|string', - ]; - } -} diff --git a/resources/views/base/account.blade.php b/resources/views/base/account.blade.php deleted file mode 100644 index c01ebbc1..00000000 --- a/resources/views/base/account.blade.php +++ /dev/null @@ -1,147 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('base.account.header') -@endsection - -@section('content-header') -

@lang('base.account.header')@lang('base.account.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-
-

@lang('base.account.update_pass')

-
-
-
-
- -
- -
-
-
- -
- -

@lang('auth.password_requirements')

-
-
-
- -
- -
-
-
- -
-
-
-
-
-
-
-
-
-
-
-

@lang('base.account.update_identity')

-
-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- -

@lang('base.account.username_help', [ 'requirements' => 'a-z A-Z 0-9 _ - .'])

-
-
-
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-
-

@lang('base.account.update_email')

-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-
-
-
-@endsection diff --git a/resources/views/base/api/index.blade.php b/resources/views/base/api/index.blade.php deleted file mode 100644 index 99e5a1ca..00000000 --- a/resources/views/base/api/index.blade.php +++ /dev/null @@ -1,123 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('base.api.index.header') -@endsection - -@section('content-header') -

@lang('base.api.index.header')@lang('base.api.index.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

Credentials List

- -
-
- - - - - - - - - @foreach($keys as $key) - - - - - - - - @endforeach -
KeyMemoLast UsedCreated
- - •••••••• - - - {{ $key->memo }} - @if(!is_null($key->last_used_at)) - @datetimeHuman($key->last_used_at) - @else - — - @endif - @datetimeHuman($key->created_at) - - - -
-
-
-
-
-@endsection - -@section('footer-scripts') - @parent - -@endsection diff --git a/resources/views/base/api/new.blade.php b/resources/views/base/api/new.blade.php deleted file mode 100644 index 8c927265..00000000 --- a/resources/views/base/api/new.blade.php +++ /dev/null @@ -1,47 +0,0 @@ -@extends('layouts.master') - -@section('title') - @lang('base.api.new.header') -@endsection - -@section('content-header') -

@lang('base.api.new.header')@lang('base.api.new.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-
- - -
-

Set an easy to understand description for this API key to help you identify it later on.

-
-
-
-
-
-
-
- - -
-

If you would like to limit this API key to specific IP addresses enter them above, one per line. CIDR notation is allowed for each IP address. Leave blank to allow any IP address.

-
- -
-
-
-
-@endsection diff --git a/resources/views/base/index.blade.php b/resources/views/base/index.blade.php deleted file mode 100644 index 8b44b48d..00000000 --- a/resources/views/base/index.blade.php +++ /dev/null @@ -1,108 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('base.index.header') -@endsection - -@section('content-header') -

@lang('base.index.header')@lang('base.index.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('base.index.list')

-
-
-
- -
- -
-
-
-
-
-
- - - - - - - - - - - - - - @foreach($servers as $server) - - - - - - - - - - @if($server->node->maintenance_mode) - - @else - - @endif - - @if (! empty($server->description)) - - - - @endif - @endforeach - -
@lang('strings.id')@lang('strings.name')@lang('strings.node')@lang('strings.connection')@lang('strings.relation')@lang('strings.status')
description)) rowspan="2" @endif>{{ $server->uuidShort }}{{ $server->name }}{{ $server->getRelation('node')->name }}{{ $server->getRelation('allocation')->alias }}:{{ $server->getRelation('allocation')->port }} - @if($server->user->id === Auth::user()->id) - @lang('strings.owner') - @elseif(Auth::user()->root_admin) - @lang('strings.admin') - @else - @lang('strings.subuser') - @endif - - @lang('strings.under_maintenance') - - -

{{ str_limit($server->description, 400) }}

-
- @if($servers->hasPages()) - - @endif -
-
-
-@endsection - -@section('footer-scripts') - @parent - - {!! Theme::js('js/frontend/serverlist.js') !!} -@endsection diff --git a/resources/views/base/security.blade.php b/resources/views/base/security.blade.php deleted file mode 100644 index 7c4693dd..00000000 --- a/resources/views/base/security.blade.php +++ /dev/null @@ -1,135 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('base.security.header') -@endsection - -@section('content-header') -

@lang('base.security.header')@lang('base.security.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('base.security.sessions')

-
- @if(!is_null($sessions)) -
- - - - - - - - - @foreach($sessions as $session) - - - - - - - @endforeach - -
@lang('strings.id')@lang('strings.ip')@lang('strings.last_activity')
{{ substr($session->id, 0, 6) }}{{ $session->ip_address }}{{ Carbon::createFromTimestamp($session->last_activity)->diffForHumans() }} - - - -
-
- @else -
-

@lang('base.security.session_mgmt_disabled')

-
- @endif -
-
-
-
-
-

@lang('base.security.2fa_header')

-
- @if(Auth::user()->use_totp) -
-
-

@lang('base.security.2fa_enabled')

-
- -
- -

@lang('base.security.2fa_token_help')

-
-
-
- -
- @else -
-
- @lang('base.security.2fa_disabled') -
- -
- @endif -
-
-
- -@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/2fa-modal.js') !!} -@endsection diff --git a/resources/views/server/console.blade.php b/resources/views/server/console.blade.php deleted file mode 100644 index d1dea1d5..00000000 --- a/resources/views/server/console.blade.php +++ /dev/null @@ -1,45 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} - - - - {{ config('app.name', 'Pterodactyl') }} - Console → {{ $server->name }} - @include('layouts.scripts') - {!! Theme::css('vendor/bootstrap/bootstrap.min.css') !!} - {!! Theme::css('css/terminal.css') !!} - - - -
-
-
-
container:~/$
- -
-
- - - - {!! Theme::js('js/laroute.js') !!} - {!! Theme::js('vendor/ansi/ansi_up.js') !!} - {!! Theme::js('vendor/jquery/jquery.min.js') !!} - {!! Theme::js('vendor/socketio/socket.io.v203.min.js') !!} - {!! Theme::js('vendor/bootstrap-notify/bootstrap-notify.min.js') !!} - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/mousewheel/jquery.mousewheel-min.js') !!} - {!! Theme::js('js/frontend/console.js') !!} - - diff --git a/resources/views/server/databases/index.blade.php b/resources/views/server/databases/index.blade.php deleted file mode 100644 index 99b1e096..00000000 --- a/resources/views/server/databases/index.blade.php +++ /dev/null @@ -1,198 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.config.database.header') -@endsection - -@section('content-header') -

@lang('server.config.database.header')@lang('server.config.database.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.config.database.your_dbs')

-
- @if(count($databases) > 0) -
- - - - - - - - @can('reset-db-password', $server)@endcan - - @foreach($databases as $database) - - - - - - @if(Gate::allows('reset-db-password', $server) || Gate::allows('delete-database', $server)) - - @endif - - @endforeach - -
@lang('strings.database')@lang('strings.username')@lang('strings.password')@lang('server.config.database.host')
{{ $database->database }}{{ $database->username }} - - •••••••• - - - {{ $database->host->host }}:{{ $database->host->port }} - @can('delete-database', $server) - - @endcan - @can('reset-db-password', $server) - - @endcan -
-
- @else -
-
- @lang('server.config.database.no_dbs') -
-
- @endif -
-
- @if($allowCreation && Gate::allows('create-database', $server)) -
-
-
-

Create New Database

-
- @if($overLimit) -
-
- You are currently using {{ count($databases) }} of your {{ $server->database_limit ?? '∞' }} allowed databases. -
-
- @else -
-
-
- -
- s{{ $server->id }}_ - -
-
-
- - -

This should reflect the IP address that connections are allowed from. Uses standard MySQL notation. If unsure leave as %.

-
-
- -
- @endif -
-
- @endif -
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - -@endsection diff --git a/resources/views/server/files/add.blade.php b/resources/views/server/files/add.blade.php deleted file mode 100644 index fd6bf736..00000000 --- a/resources/views/server/files/add.blade.php +++ /dev/null @@ -1,98 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.files.add.header') -@endsection - -@section('scripts') - {{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}} - {!! Theme::css('vendor/select2/select2.min.css') !!} - @parent -@endsection - -@section('content-header') -

@lang('server.files.add.header')@lang('server.files.add.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
- /home/container/ - -
-
-
- -
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('vendor/select2/select2.full.min.js') !!} - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/ace/ace.js') !!} - {!! Theme::js('vendor/ace/ext-modelist.js') !!} - {!! Theme::js('vendor/ace/ext-whitespace.js') !!} - {!! Theme::js('vendor/lodash/lodash.js') !!} - {!! Theme::js('js/frontend/files/editor.js') !!} - -@endsection diff --git a/resources/views/server/files/edit.blade.php b/resources/views/server/files/edit.blade.php deleted file mode 100644 index 6716a164..00000000 --- a/resources/views/server/files/edit.blade.php +++ /dev/null @@ -1,59 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.files.edit.header') -@endsection - -@section('content-header') -

@lang('server.files.edit.header')@lang('server.files.edit.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

{{ $file }}

- -
- - -
-
- -
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/ace/ace.js') !!} - {!! Theme::js('vendor/ace/ext-modelist.js') !!} - {!! Theme::js('vendor/ace/ext-whitespace.js') !!} - {!! Theme::js('js/frontend/files/editor.js') !!} - -@endsection diff --git a/resources/views/server/files/index.blade.php b/resources/views/server/files/index.blade.php deleted file mode 100644 index 4dd0c090..00000000 --- a/resources/views/server/files/index.blade.php +++ /dev/null @@ -1,54 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.files.header') -@endsection - -@section('content-header') -

@lang('server.files.header')@lang('server.files.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-
-
@lang('server.files.loading')
-
-
- -
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/async/async.min.js') !!} - {!! Theme::js('vendor/lodash/lodash.js') !!} - {!! Theme::js('vendor/siofu/client.min.js') !!} - @if(App::environment('production')) - {!! Theme::js('js/frontend/files/filemanager.min.js?hash=cd7ec731dc633e23ec36144929a237d18c07d2f0') !!} - @else - {!! Theme::js('js/frontend/files/src/index.js') !!} - {!! Theme::js('js/frontend/files/src/contextmenu.js') !!} - {!! Theme::js('js/frontend/files/src/actions.js') !!} - @endif - {!! Theme::js('js/frontend/files/upload.js') !!} -@endsection diff --git a/resources/views/server/files/list.blade.php b/resources/views/server/files/list.blade.php deleted file mode 100644 index f8abc5a7..00000000 --- a/resources/views/server/files/list.blade.php +++ /dev/null @@ -1,170 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} - -
-

/home/container{{ $directory['header'] }}

-
- - - - - - -
-
-
- - - - - - - - - - - - @if (isset($directory['first']) && $directory['first'] === true) - - - - - - - - @endif - @if (isset($directory['show']) && $directory['show'] === true) - - - - - - - - @endif - @foreach ($folders as $folder) - - - - - - - - @endforeach - @foreach ($files as $file) - - - - - - - - @endforeach - -
- - @lang('server.files.file_name')
- ← {{ $directory['link_show'] }} -
- - - {{ $folder['entry'] }} - - -
- {{-- oh boy --}} - @if(in_array($file['mime'], [ - 'application/x-7z-compressed', - 'application/zip', - 'application/x-compressed-zip', - 'application/x-tar', - 'application/x-gzip', - 'application/x-bzip', - 'application/x-bzip2', - 'application/java-archive' - ])) - - @elseif(in_array($file['mime'], [ - 'application/json', - 'application/javascript', - 'application/xml', - 'application/xhtml+xml', - 'text/xml', - 'text/css', - 'text/html', - 'text/x-perl', - 'text/x-shellscript' - ])) - - @elseif(starts_with($file['mime'], 'image')) - - @elseif(starts_with($file['mime'], 'video')) - - @elseif(starts_with($file['mime'], 'video')) - - @elseif(starts_with($file['mime'], 'application/vnd.ms-powerpoint')) - - @elseif(in_array($file['mime'], [ - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'application/msword' - ]) || starts_with($file['mime'], 'application/vnd.ms-word')) - - @elseif(in_array($file['mime'], [ - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - ]) || starts_with($file['mime'], 'application/vnd.ms-excel')) - - @elseif($file['mime'] === 'application/pdf') - - @else - - @endif - - @if(in_array($file['mime'], $editableMime)) - @can('edit-files', $server) - {{ $file['entry'] }} - @else - {{ $file['entry'] }} - @endcan - @else - {{ $file['entry'] }} - @endif - - -
-
diff --git a/resources/views/server/index.blade.php b/resources/views/server/index.blade.php deleted file mode 100644 index 9cb4ba4a..00000000 --- a/resources/views/server/index.blade.php +++ /dev/null @@ -1,85 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - {{ trans('server.index.title', [ 'name' => $server->name]) }} -@endsection - -@section('scripts') - @parent - {!! Theme::css('css/terminal.css') !!} -@endsection - -@section('content-header') -

@lang('server.index.header')@lang('server.index.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-
-
-
container:~/$
- -
-
- -
- -
-
-
-
-
-
-
-

Memory Usage

-
-
- -
-
-
-
-
-
-

CPU Usage

-
-
- -
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('vendor/ansi/ansi_up.js') !!} - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/mousewheel/jquery.mousewheel-min.js') !!} - {!! Theme::js('js/frontend/console.js') !!} - {!! Theme::js('vendor/chartjs/chart.min.js') !!} - {!! Theme::js('vendor/jquery/date-format.min.js') !!} - @if($server->nest->name === 'Minecraft' && $server->nest->author === 'support@pterodactyl.io') - {!! Theme::js('js/plugins/minecraft/eula.js') !!} - @endif -@endsection diff --git a/resources/views/server/schedules/index.blade.php b/resources/views/server/schedules/index.blade.php deleted file mode 100644 index aefcef5d..00000000 --- a/resources/views/server/schedules/index.blade.php +++ /dev/null @@ -1,98 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.schedule.header') -@endsection - -@section('content-header') -

@lang('server.schedule.header')@lang('server.schedule.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.schedule.current')

- -
-
- - - - - - - - - - - @foreach($schedules as $schedule) - is_active)class="muted muted-hover"@endif> - - - - - - - - @endforeach - -
@lang('strings.name')@lang('strings.queued')@lang('strings.tasks')@lang('strings.last_run')@lang('strings.next_run')
- @can('edit-schedule', $server) - - {{ $schedule->name ?? trans('server.schedule.unnamed') }} - - @else - {{ $schedule->name ?? trans('server.schedule.unnamed') }} - @endcan - - @if ($schedule->is_processing) - @lang('strings.yes') - @else - @lang('strings.no') - @endif - {{ $schedule->tasks_count }} - @if($schedule->last_run_at) - {{ Carbon::parse($schedule->last_run_at)->toDayDateTimeString() }}
({{ Carbon::parse($schedule->last_run_at)->diffForHumans() }}) - @else - @lang('strings.not_run_yet') - @endif -
- @if($schedule->is_active) - {{ Carbon::parse($schedule->next_run_at)->toDayDateTimeString() }}
({{ Carbon::parse($schedule->next_run_at)->diffForHumans() }}) - @else - n/a - @endif -
- @can('delete-schedule', $server) - - @endcan - @can('toggle-schedule', $server) - - - @endcan -
-
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('js/frontend/tasks/management-actions.js') !!} -@endsection diff --git a/resources/views/server/schedules/new.blade.php b/resources/views/server/schedules/new.blade.php deleted file mode 100644 index bb925c25..00000000 --- a/resources/views/server/schedules/new.blade.php +++ /dev/null @@ -1,145 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.schedules.new.header') -@endsection - -@section('scripts') - {{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}} - {!! Theme::css('vendor/select2/select2.min.css') !!} - @parent -@endsection - -@section('content-header') -

@lang('server.schedule.new.header')@lang('server.schedule.new.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-

@lang('server.schedule.setup')

-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
-
-
- @include('partials.schedules.task-template') - -
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/select2/select2.full.min.js') !!} - {!! Theme::js('js/frontend/tasks/view-actions.js') !!} -@endsection diff --git a/resources/views/server/schedules/view.blade.php b/resources/views/server/schedules/view.blade.php deleted file mode 100644 index 370b4f0b..00000000 --- a/resources/views/server/schedules/view.blade.php +++ /dev/null @@ -1,163 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.schedules.edit.header') -@endsection - -@section('scripts') - {{-- This has to be loaded before the AdminLTE theme to avoid dropdown issues. --}} - {!! Theme::css('vendor/select2/select2.min.css') !!} - @parent -@endsection - -@section('content-header') -

@lang('server.schedule.manage.header'){{ $schedule->name }}

- -@endsection - -@section('content') -
-
-
-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
- -
-
-
- -
-
-
-
- -
-
-
-
-
-
- @include('partials.schedules.task-template') - -
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - {!! Theme::js('vendor/select2/select2.full.min.js') !!} - {!! Theme::js('js/frontend/tasks/view-actions.js') !!} - -@endsection diff --git a/resources/views/server/settings/allocation.blade.php b/resources/views/server/settings/allocation.blade.php deleted file mode 100644 index cc195240..00000000 --- a/resources/views/server/settings/allocation.blade.php +++ /dev/null @@ -1,120 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.config.allocation.header') -@endsection - -@section('content-header') -

@lang('server.config.allocation.header')@lang('server.config.allocation.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.config.allocation.available')

-
-
- - - - - - - - - @foreach ($allocations as $allocation) - - - - - - - @endforeach - -
@lang('strings.ip')@lang('strings.alias')@lang('strings.port')
- {{ $allocation->ip }} - - @if(is_null($allocation->ip_alias)) - @lang('strings.none') - @else - {{ $allocation->ip_alias }} - @endif - {{ $allocation->port }} - @if($allocation->id === $server->allocation_id) - @lang('strings.primary') - @else - @lang('strings.make_primary') - @endif -
-
- -
-
-
-
-
-

@lang('server.config.allocation.help')

-
-
-

@lang('server.config.allocation.help_text')

-
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - -@endsection diff --git a/resources/views/server/settings/name.blade.php b/resources/views/server/settings/name.blade.php deleted file mode 100644 index 6d59162d..00000000 --- a/resources/views/server/settings/name.blade.php +++ /dev/null @@ -1,50 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.config.name.header') -@endsection - -@section('content-header') -

@lang('server.config.name.header')@lang('server.config.name.header_sub')

- -@endsection - -@section('content') -
-
-
-
-
-
- -
- -

@lang('server.config.name.details')

-
-
-
- -
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} -@endsection diff --git a/resources/views/server/settings/sftp.blade.php b/resources/views/server/settings/sftp.blade.php deleted file mode 100644 index 5da21ef7..00000000 --- a/resources/views/server/settings/sftp.blade.php +++ /dev/null @@ -1,54 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.config.sftp.header') -@endsection - -@section('content-header') -

@lang('server.config.sftp.header')@lang('server.config.sftp.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.config.sftp.details')

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} -@endsection diff --git a/resources/views/server/settings/startup.blade.php b/resources/views/server/settings/startup.blade.php deleted file mode 100644 index 594dae4d..00000000 --- a/resources/views/server/settings/startup.blade.php +++ /dev/null @@ -1,87 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.config.startup.header') -@endsection - -@section('content-header') -

@lang('server.config.startup.header')@lang('server.config.startup.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.config.startup.command')

-
-
-
- -
-
-
-
- @can('edit-startup', $server) -
- @foreach($variables as $v) -
-
-
-

{{ $v->name }}

-
-
- user_editable) - name="environment[{{ $v->env_variable }}]" - @else - readonly - @endif - class="form-control" type="text" value="{{ old('environment.' . $v->env_variable, $server_values[$v->env_variable]) }}" /> -

{{ $v->description }}

-

- @if($v->required && $v->user_editable ) - @lang('strings.required') - @elseif(! $v->required && $v->user_editable) - @lang('strings.optional') - @endif - @if(! $v->user_editable) - @lang('strings.read_only') - @endif -

-
- -
-
- @endforeach -
-
- -
-
-
- @endcan -
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} -@endsection diff --git a/resources/views/server/users/index.blade.php b/resources/views/server/users/index.blade.php deleted file mode 100644 index 632e79f8..00000000 --- a/resources/views/server/users/index.blade.php +++ /dev/null @@ -1,132 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.users.header') -@endsection - -@section('content-header') -

@lang('server.users.header')@lang('server.users.header_sub')

- -@endsection - -@section('content') -
-
-
-
-

@lang('server.users.list')

- @can('create-subuser', $server) - - @endcan -
-
- - - - - - - - - @can('view-subuser', $server)@endcan - @can('delete-subuser', $server)@endcan - - @foreach($subusers as $subuser) - - - - - - @can('view-subuser', $server) - - @endcan - @can('delete-subuser', $server) - - @endcan - - @endforeach - -
@lang('strings.username')@lang('strings.email')@lang('strings.2fa')
User Image{{ $subuser->user->username }} - {{ $subuser->user->email }} - @if($subuser->user->use_totp) - - @else - - @endif - - - - - - - - -
-
-
-
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - - -@endsection diff --git a/resources/views/server/users/new.blade.php b/resources/views/server/users/new.blade.php deleted file mode 100644 index 81231a70..00000000 --- a/resources/views/server/users/new.blade.php +++ /dev/null @@ -1,91 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.users.new.header') -@endsection - -@section('content-header') -

@lang('server.users.new.header')@lang('server.users.new.header_sub')

- -@endsection - -@section('content') - -
-
-
-
-
-
- -
- {!! csrf_field() !!} - -

@lang('server.users.new.email_help')

-
-
-
- -
-
-
-
- @foreach($permissions as $block => $perms) -
-
-
-

@lang('server.users.new.' . $block . '_header')

-
-
- @foreach($perms as $permission => $daemon) -
-
- - -
-

@lang('server.users.new.' . str_replace('-', '_', $permission) . '.description')

-
- @endforeach -
-
-
- @if ($loop->iteration % 2 === 0) -
- @endif - @endforeach -
-
-@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - -@endsection diff --git a/resources/views/server/users/view.blade.php b/resources/views/server/users/view.blade.php deleted file mode 100644 index f175bb44..00000000 --- a/resources/views/server/users/view.blade.php +++ /dev/null @@ -1,96 +0,0 @@ -{{-- Pterodactyl - Panel --}} -{{-- Copyright (c) 2015 - 2017 Dane Everitt --}} - -{{-- This software is licensed under the terms of the MIT license. --}} -{{-- https://opensource.org/licenses/MIT --}} -@extends('layouts.master') - -@section('title') - @lang('server.users.new.header') -@endsection - -@section('content-header') -

@lang('server.users.edit.header')@lang('server.users.edit.header_sub')

- -@endsection - -@section('content') -@can('edit-subuser', $server) -
-@endcan -
-
-
-
-
- -
- {!! csrf_field() !!} - -
-
-
- @can('edit-subuser', $server) -
- - {!! method_field('PATCH') !!} - -
- @endcan -
-
-
-
- @foreach($permlist as $block => $perms) -
-
-
-

@lang('server.users.new.' . $block . '_header')

-
-
- @foreach($perms as $permission => $daemon) -
-
- - -
-

@lang('server.users.new.' . str_replace('-', '_', $permission) . '.description')

-
- @endforeach -
-
-
- @if ($loop->iteration % 2 === 0) -
- @endif - @endforeach -
-@can('edit-subuser', $server) -
-@endcan -@endsection - -@section('footer-scripts') - @parent - {!! Theme::js('js/frontend/server.socket.js') !!} - -@endsection diff --git a/routes/base.php b/routes/base.php index 517aa522..4d43235c 100644 --- a/routes/base.php +++ b/routes/base.php @@ -6,34 +6,5 @@ Route::get('/account', 'IndexController@index')->name('account'); Route::get('/locales/{locale}/{namespace}.json', 'LocaleController') ->where('namespace', '.*'); -/* -|-------------------------------------------------------------------------- -| Account API Controller Routes -|-------------------------------------------------------------------------- -| -| Endpoint: /account/api -| -*/ -Route::group(['prefix' => 'account/api'], function () { - Route::get('/', 'ClientApiController@index')->name('account.api'); - Route::get('/new', 'ClientApiController@create')->name('account.api.new'); - Route::post('/new', 'ClientApiController@store'); - Route::delete('/revoke/{identifier}', 'ClientApiController@delete')->name('account.api.revoke'); -}); - -/* -|-------------------------------------------------------------------------- -| Account Security Controller Routes -|-------------------------------------------------------------------------- -| -| Endpoint: /account/security -| -*/ -Route::group(['prefix' => 'account/two_factor'], function () { - Route::get('/', 'SecurityController@index')->name('account.two_factor'); - Route::post('/totp', 'SecurityController@store')->name('account.two_factor.enable'); - Route::post('/totp/disable', 'SecurityController@delete')->name('account.two_factor.disable'); -}); - Route::get('/{react}', 'IndexController@index') ->where('react', '^(?!(\/)?(api|auth|admin|daemon)).+');