From 31b4589eabf717a2b89890b6d869726ec1e6f87f Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 18 Jan 2017 00:21:05 +0100 Subject: [PATCH] Contribution to feature/new-theme (#254) * add translation to navigation * redesign base.api.index view add translations * remove license derp * translate never in base.api.index view * simplify user drop down for now add translations --- resources/lang/en/base.php | 8 ++ resources/lang/en/navigation.php | 27 +++++++ resources/lang/en/strings.php | 8 ++ .../pterodactyl/base/api/index.blade.php | 81 +++++++++++++++++++ .../pterodactyl/layouts/master.blade.php | 46 ++++++----- 5 files changed, 149 insertions(+), 21 deletions(-) create mode 100644 resources/lang/en/navigation.php create mode 100644 resources/themes/pterodactyl/base/api/index.blade.php diff --git a/resources/lang/en/base.php b/resources/lang/en/base.php index 49f90ff33..bc0571912 100644 --- a/resources/lang/en/base.php +++ b/resources/lang/en/base.php @@ -7,6 +7,14 @@ return [ 'header_sub' => 'Servers you own and have access to.', 'list' => 'Server List', ], + 'api' => [ + 'index' => [ + 'header' => 'API Access', + 'header_sub' => 'Manage your API access keys.', + 'list' => 'API Keys', + 'create_new' => 'Create new API key' + ], + ], 'account' => [ 'header' => 'Your Account', 'header_sub' => 'Manage your account details.', diff --git a/resources/lang/en/navigation.php b/resources/lang/en/navigation.php new file mode 100644 index 000000000..679188e47 --- /dev/null +++ b/resources/lang/en/navigation.php @@ -0,0 +1,27 @@ + 'Home', + 'account' => [ + 'header' => 'ACCOUNT MANAGEMENT', + 'my_account' => 'My Account', + 'security_controls' => 'Security Controls', + 'api_access' => 'API Access', + 'my_servers' => 'My Servers' + ], + 'server' => [ + 'header' => 'SERVER MANAGEMENT', + 'console' => 'Console', + 'file_management' => 'File Management', + 'file_browser' => 'File Browser', + 'create_file' => 'Create File', + 'upload_files' => 'Upload Files', + 'subusers' => 'Subusers', + 'task_management' => 'Task Management', + 'configuration' => 'Configuration', + 'port_allocations' => 'Port Allocations', + 'sftp_settings' => 'SFTP Settings', + 'startup_parameters' => 'Startup Parameters', + 'databases' => 'Databases' + ], +]; diff --git a/resources/lang/en/strings.php b/resources/lang/en/strings.php index 95d6bc347..98b3304f9 100644 --- a/resources/lang/en/strings.php +++ b/resources/lang/en/strings.php @@ -28,4 +28,12 @@ return [ 'configuration' => 'Configuration', 'sftp' => 'SFTP', 'databases' => 'Databases', + 'memo' => 'Memo', + 'created' => 'Created', + 'expires' => 'Expires', + 'public_key' => 'Public key', + 'api_access' => 'Api Access', + 'never' => 'never', + 'sign_out' => 'Sign out', + 'admin_control' => 'Admin Control' ]; diff --git a/resources/themes/pterodactyl/base/api/index.blade.php b/resources/themes/pterodactyl/base/api/index.blade.php new file mode 100644 index 000000000..8d59ba153 --- /dev/null +++ b/resources/themes/pterodactyl/base/api/index.blade.php @@ -0,0 +1,81 @@ +{{-- Copyright (c) 2015 - 2016 Dane Everitt --}} + +{{-- Permission is hereby granted, free of charge, to any person obtaining a copy --}} +{{-- of this software and associated documentation files (the "Software"), to deal --}} +{{-- in the Software without restriction, including without limitation the rights --}} +{{-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --}} +{{-- copies of the Software, and to permit persons to whom the Software is --}} +{{-- furnished to do so, subject to the following conditions: --}} + +{{-- The above copyright notice and this permission notice shall be included in all --}} +{{-- copies or substantial portions of the Software. --}} + +{{-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --}} +{{-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --}} +{{-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --}} +{{-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --}} +{{-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --}} +{{-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --}} +{{-- SOFTWARE. --}} +@extends('layouts.master') + +@section('title') + {{ trans('base.api.index.header') }} +@endsection + +@section('content-header') +

{{ trans('base.api.index.header') }}{{ trans('base.api.index.header_sub')}}

+ +@endsection + +@section('content') +
+
+
+
+

{{ trans('base.api.index.list')}}

+
+
+ + + + + + + + + + @foreach ($keys as $key) + + + + + + + + @endforeach + +
{{ trans('strings.public_key') }}{{ trans('strings.memo') }}
{{ $key->public }}{{ $key->memo }} + +
+
+ +
+
+
+@endsection diff --git a/resources/themes/pterodactyl/layouts/master.blade.php b/resources/themes/pterodactyl/layouts/master.blade.php index a7200587a..048cd6db6 100644 --- a/resources/themes/pterodactyl/layouts/master.blade.php +++ b/resources/themes/pterodactyl/layouts/master.blade.php @@ -55,12 +55,16 @@ - + --}}
  • @@ -107,46 +111,46 @@ @endif