diff --git a/.gitignore b/.gitignore index dbcf5907..58e14883 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ yarn-error.log .env.testing storage/invoices.zip storage/app/public/logo.png +*vscode diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 366569af..74ddb1f9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,12 @@ When contributing to this repository, please go through the open issues to see i Please note we have a code of conduct, please follow it in all your interactions with the project. +If you added any Strings which are displayed at the frontend please localize them (e.g. "New String" -> {{ __('New String') }}) and run the localization string generation: + +```cmd +php artisan translatable:export en +``` + ## Pull request process 1. Give your PR a good descriptive title, so we can view immediately what the PR is about. diff --git a/app/Classes/Pterodactyl.php b/app/Classes/Pterodactyl.php index 710fbb12..20caa00a 100644 --- a/app/Classes/Pterodactyl.php +++ b/app/Classes/Pterodactyl.php @@ -17,7 +17,7 @@ class Pterodactyl /** * @description per_page option to pull more than the default 50 from pterodactyl */ - public CONST PER_PAGE = 200; + public const PER_PAGE = 200; //TODO: Extend error handling (maybe logger for more errors when debugging) @@ -48,7 +48,11 @@ class Pterodactyl */ public static function getEggs(Nest $nest) { - $response = self::client()->get("/application/nests/{$nest->id}/eggs?include=nest,variables&per_page=" . self::PER_PAGE); + try { + $response = self::client()->get("/application/nests/{$nest->id}/eggs?include=nest,variables&per_page=" . self::PER_PAGE); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); return $response->json()['data']; } @@ -59,7 +63,11 @@ class Pterodactyl */ public static function getNodes() { - $response = self::client()->get('/application/nodes?per_page=' . self::PER_PAGE); + try { + $response = self::client()->get('/application/nodes?per_page=' . self::PER_PAGE); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); return $response->json()['data']; } @@ -70,7 +78,11 @@ class Pterodactyl */ public static function getNests() { - $response = self::client()->get('/application/nests?per_page=' . self::PER_PAGE); + try { + $response = self::client()->get('/application/nests?per_page=' . self::PER_PAGE); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); return $response->json()['data']; } @@ -81,8 +93,13 @@ class Pterodactyl */ public static function getLocations() { - $response = self::client()->get('/application/locations?per_page=' . self::PER_PAGE); + try { + $response = self::client()->get('/application/locations?per_page=' . self::PER_PAGE); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); + return $response->json()['data']; } @@ -125,8 +142,13 @@ class Pterodactyl public static function getAllocations(Node $node) { $per_page = Configuration::getValueByKey('ALLOCATION_LIMIT', 200); - $response = self::client()->get("/application/nodes/{$node->id}/allocations?per_page={$per_page}"); + try { + $response = self::client()->get("/application/nodes/{$node->id}/allocations?per_page={$per_page}"); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); + return $response->json(); } @@ -171,20 +193,29 @@ class Pterodactyl "default" => $allocationId ] ]); - } public static function suspendServer(Server $server) { - $response = self::client()->post("/application/servers/$server->pterodactyl_id/suspend"); + try { + $response = self::client()->post("/application/servers/$server->pterodactyl_id/suspend"); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); + return $response; } public static function unSuspendServer(Server $server) { - $response = self::client()->post("/application/servers/$server->pterodactyl_id/unsuspend"); + try { + $response = self::client()->post("/application/servers/$server->pterodactyl_id/unsuspend"); + } catch (Exception $e) { + throw self::getException(); + } if ($response->failed()) throw self::getException(); + return $response; } @@ -195,9 +226,29 @@ class Pterodactyl */ public function getUser(int $pterodactylId) { - $response = self::client()->get("/application/users/{$pterodactylId}"); + try { + $response = self::client()->get("/application/users/{$pterodactylId}"); + } catch (Exception $e) { + throw self::getException(); + } + if ($response->failed()) throw self::getException(); - if ($response->failed()) return $response->json(); + return $response->json()['attributes']; + } + + /** + * Get serverAttributes by pterodactyl id + * @param int $pterodactylId + * @return mixed + */ + public static function getServerAttributes(string $pterodactylId) + { + try { + $response = self::client()->get("/application/servers/{$pterodactylId}?include=egg,node,nest,location"); + } catch (Exception $e) { + throw self::getException(); + } + if ($response->failed()) throw self::getException(); return $response->json()['attributes']; } } diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 5944480b..ff096502 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -24,8 +24,35 @@ class ServerController extends Controller /** Display a listing of the resource. */ public function index() { + $servers = Auth::user()->servers; + + //Get and set server infos each server + foreach ($servers as $server) { + + //Get server infos from ptero + $serverAttributes = Pterodactyl::getServerAttributes($server->pterodactyl_id); + + $serverRelationships = $serverAttributes['relationships']; + $serverLocationAttributes = $serverRelationships['location']['attributes']; + + //Set server infos + $server->location = $serverLocationAttributes['long'] ? + $serverLocationAttributes['long'] : + $serverLocationAttributes['short']; + + $server->egg = $serverRelationships['egg']['attributes']['name']; + $server->nest = $serverRelationships['nest']['attributes']['name']; + + $server->node = $serverRelationships['node']['attributes']['name']; + + //get productname by product_id for server + $product = Product::find($server->product_id); + + $server->product = $product; + } + return view('servers.index')->with([ - 'servers' => Auth::user()->Servers + 'servers' => $servers ]); } @@ -134,10 +161,11 @@ class ServerController extends Controller $response = Pterodactyl::createServer($server, $egg, $allocationId); if ($response->failed()) return $this->serverCreationFailed($response, $server); + $serverAttributes = $response->json()['attributes']; //update server with pterodactyl_id $server->update([ - 'pterodactyl_id' => $response->json()['attributes']['id'], - 'identifier' => $response->json()['attributes']['identifier'] + 'pterodactyl_id' => $serverAttributes['id'], + 'identifier' => $serverAttributes['identifier'] ]); if (Configuration::getValueByKey('SERVER_CREATE_CHARGE_FIRST_HOUR', 'true') == 'true') { diff --git a/composer.json b/composer.json index 72b510b8..99c01bed 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "hidehalo/nanoid-php": "^1.1", + "kkomelin/laravel-translatable-string-exporter": "^1.14", "laravel/framework": "^8.12", "laravel/tinker": "^2.5", "laravel/ui": "^3.2", diff --git a/composer.lock b/composer.lock index b925d663..41805ee1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2d4d66f2322f8c630c609cf446f7c402", + "content-hash": "ed0357bbf827f4e6078d2ed41ce3fa17", "packages": [ { "name": "asm89/stack-cors", @@ -1697,6 +1697,67 @@ }, "time": "2020-12-11T09:24:45+00:00" }, + { + "name": "kkomelin/laravel-translatable-string-exporter", + "version": "1.14.0", + "source": { + "type": "git", + "url": "https://github.com/kkomelin/laravel-translatable-string-exporter.git", + "reference": "9dce1e5f8ed59a1b58e77ec7d84f1427d5e29f0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kkomelin/laravel-translatable-string-exporter/zipball/9dce1e5f8ed59a1b58e77ec7d84f1427d5e29f0a", + "reference": "9dce1e5f8ed59a1b58e77ec7d84f1427d5e29f0a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/support": "^5.4|^6|^7|^8", + "illuminate/translation": "^5.4|^6|^7|^8", + "php": ">=5.4.0", + "symfony/finder": "^3.2|^4|^5" + }, + "require-dev": { + "orchestra/testbench": "^3.4|^4.0|^5.0|^6.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "KKomelin\\TranslatableStringExporter\\Providers\\ExporterServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "KKomelin\\TranslatableStringExporter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Komelin", + "email": "konstantin.komelin@gmail.com" + } + ], + "description": "Translatable String Exporter for Laravel", + "keywords": [ + "export", + "exporter", + "json", + "laravel", + "translations" + ], + "support": { + "issues": "https://github.com/kkomelin/laravel-translatable-string-exporter/issues", + "source": "https://github.com/kkomelin/laravel-translatable-string-exporter/tree/1.14.0" + }, + "time": "2021-08-08T06:48:21+00:00" + }, { "name": "laravel/framework", "version": "v8.76.2", diff --git a/config/app.php b/config/app.php index 5a9b94c2..75201148 100644 --- a/config/app.php +++ b/config/app.php @@ -193,6 +193,9 @@ return [ App\Providers\RouteServiceProvider::class, Yajra\DataTables\DataTablesServiceProvider::class, + KKomelin\TranslatableStringExporter\Providers\ExporterServiceProvider::class, + + ], /* diff --git a/resources/lang/en.json b/resources/lang/en.json index 9fc85f1b..000ff4a1 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -1,338 +1,160 @@ { - "Activity Logs": "Activity Logs", - "No recent activity from cronjobs": "No recent activity from cronjobs", - "Check the docs for it here": "Check the docs for it here", - "Are cronjobs running?": "Are cronjobs running?", - "Causer": "Causer", - "Description": "Description", - "Created at": "Created at", - - "Edit Configuration": "Edit Configuration", - "Text Field": "Text Field", - "Cancel": "Cancel", - "Close": "Close", - "Save": "Save", - "true": "true", - "false": "false", - - "Configurations": "Configurations", - "Dashboard": "Dashboard", - "Key": "Key", - "Value": "Value", - "Type": "Type", - - "Admin Overview": "Admin Overview", - "Support server": "Support server", - "Documentation": "Documentation", - "Github": "Github", - "Support ControlPanel": "Support ControlPanel", - "Servers": "Servers", - "Users": "Users", - "Total": "Total", - "Payments": "Payments", - "Pterodactyl": "Pterodactyl", - "Sync": "Sync", - "Resources": "Resources", - "Count": "Count", - "Locations": "Locations", - "Node": "Node", - "Nodes": "Nodes", - "Nests": "Nests", - "Eggs": "Eggs", - "Last updated :date": "Last updated :date", - "Purchase": "Purchase", - - "ID": "ID", - "User": "User", - "Amount": "Amount", - "Product Price": "Product Price", - "Tax": "Tax", - "Total Price": "Total Price", - "Payment_ID": "Payment_ID", - "Payer_ID": "Payer_ID", - - "Product": "Product", - "Products": "Products", - "Create": "Create", - "Product Details": "Product Details", - "Server Details": "Server Details", - - "Product Linking": "Product Linking", - "Name": "Name", - "Price in": "Price in", - "Memory": "Memory", - "Cpu": "Cpu", - "Swap": "Swap", - "Disk": "Disk", - "Minimum": "Minimum", - "IO": "IO", - "Databases": "Databases", - "Database": "Database", - "Backups": "Backups", - "Allocations": "Allocations", - "Disabled": "Disabled", - "Submit": "Submit", - "This product will only be available for these nodes": "This product will only be available for these nodes", - "This product will only be available for these eggs": "This product will only be available for these eggs", - "Will hide this option from being selected": "Will hide this option from being selected", - "Link your products to nodes and eggs to create dynamic pricing for each option": "Link your products to nodes and eggs to create dynamic pricing for each option", - "Setting to -1 will use the value from configuration.": "Setting to -1 will use the value from configuration.", - "This is what the users sees": "This is what the users sees", - "Edit": "Edit", - - "Price": "Price", - "Are you sure you wish to delete?": "Are you sure you wish to delete?", - "Create new": "Create new", - "Show": "Show", - "Updated at": "Updated at", - "Suspended at": "Suspended at", - - "Settings": "Settings", - "Dashboard icons": "Dashboard icons", - "Select panel icon": "Select panel icon", - "Select panel favicon": "Select panel favicon", - - "Token": "Token", - "Last used": "Last used", - - "Store": "Store", - "Currency code": "Currency code", - "Checkout the paypal docs to select the appropriate code": "Checkout the paypal docs to select the appropriate code", - "Quantity": "Quantity", - "Amount given to the user after purchasing": "Amount given to the user after purchasing", - "Display": "Display", - "This is what the user sees at store and checkout": "This is what the user sees at store and checkout", - "This is what the user sees at checkout": "This is what the user sees at checkout", - "Adds 1000 credits to your account": "Adds 1000 credits to your account", - - "Active": "Active", - "No payment method is configured.": "No payment method is configured.", - "To configure the payment methods, head to the .env and add the required options for your prefered payment method.": "To configure the payment methods, head to the .env and add the required options for your prefered payment method.", - - "Useful Links": "Useful Links", - "Icon class name": "Icon class name", - "You can find available free icons": "You can find available free icons", - "Title": "Title", - "Link": "Link", - - "Username": "Username", - "Email": "Email", - "Pterodactly ID": "Pterodactly ID", - "Server Limit": "Server Limit", - "Role": "Role", - "Administrator": "Administrator", - "Client": "Client", - "Member": "Member", - "New Password": "New Password", - "Confirm Password": "Confirm Password", - "This ID refers to the user account created on pterodactyls panel.": "This ID refers to the user account created on pterodactyls panel.", - "Only edit this if you know what youre doing :)": "Only edit this if you know what youre doing :)", - - "Verified": "Verified", - "Last seen": "Last seen", - "Notify": "Notify", - - "All": "All", - "Send via": "Send via", - "Content": "Content", - "Notifications": "Notifications", - - "Usage": "Usage", - - "Config": "Config", - - "Vouchers": "Vouchers", - "Voucher details": "Voucher details", - "Memo": "Memo", - "Code": "Code", - "Uses": "Uses", - "Expires at": "Expires at", - "Max": "Max", - "Random": "Random", - - "Status": "Status", - "Used / Uses": "Used / Uses", - "Expires": "Expires", - - "Please confirm your password before continuing.": "Please confirm your password before continuing.", - "Password": "Password", - "Forgot Your Password?": "Forgot Your Password?", - "Sign in to start your session": "Sign in to start your session", - "Remember Me": "Remember Me", - "Sign In": "Sign In", - "Register a new membership": "Register a new membership", - "You forgot your password? Here you can easily retrieve a new password.": "You forgot your password? Here you can easily retrieve a new password.", - "Request new password": "Request new password", - "Login": "Login", - "You are only one step a way from your new password, recover your password now.": "You are only one step a way from your new password, recover your password now.", - "Retype password": "Retype password", - "Change password": "Change password", - "I already have a membership": "I already have a membership", - "Register": "Register", - "Verify Your Email Address": "Verify Your Email Address", - "A fresh verification link has been sent to your email address.": "A fresh verification link has been sent to your email address.", - "Before proceeding, please check your email for a verification link.": "Before proceeding, please check your email for a verification link.", - "If you did not receive the email": "If you did not receive the email", - "click here to request another": "click here to request another", - - "Home": "Home", - "Languages": "Languages", - "See all Notifications": "See all Notifications", - "Profile": "Profile", - "Log back in": "Log back in", - "Logout": "Logout", - "Administration": "Administration", - "Overview": "Overview", - "Application API": "Application API", - "Management": "Management", - "Other": "Other", - "Logs": "Logs", - "Redeem code": "Redeem code", - - "You have not yet verified your email address": "You have not yet verified your email address", - "Click here to resend verification email": "Click here to resend verification email", - "Please contact support If you didnt receive your verification email.": "Please contact support If you didnt receive your verification email.", - - "Thank you for your purchase!": "Thank you for your purchase!", - "Your payment has been confirmed; Your credit balance has been updated.": "Your payment has been confirmed; Your credit balance has been updated.", - - "Payment ID": "Payment ID", - "Balance": "Balance", - "User ID": "User ID", - "Thanks": "Thanks", - - "Redeem voucher code": "Redeem voucher code", - "Redeem": "Redeem", - - "All notifications": "All notifications", - - "Required Email verification!": "Required Email verification!", - "Required Discord verification!": "Required Discord verification!", - "You have not yet verified your discord account": "You have not yet verified your discord account", - "Login with discord": "Login with discord", - "Please contact support If you face any issues.": "Please contact support If you face any issues.", - "Due to system settings you are required to verify your discord account!": "Due to system settings you are required to verify your discord account!", - "It looks like this hasnt been set-up correctly! Please contact support.": "It looks like this hasnt been set-up correctly! Please contact support.", - - "Change Password": "Change Password", - "Current Password": "Current Password", - "Save Changes": "Save Changes", - "Re-Sync Discord": "Re-Sync Discord", - "You are verified!": "You are verified!", - "By verifying your discord account, you receive extra Credits and increased Server amounts": "By verifying your discord account, you receive extra Credits and increased Server amounts", - "Server configuration": "Server configuration", - "Error!": "Error!", - "Make sure to link your products to nodes and eggs.": "Make sure to link your products to nodes and eggs.", - "There has to be at least 1 valid product for server creation": "There has to be at least 1 valid product for server creation", - "No products available!": "No products available!", - "No nodes have been linked!": "No nodes have been linked!", - "No nests available!": "No nests available!", - "No eggs have been linked!": "No eggs have been linked!", - "Software / Games": "Software / Games", - "Please select software ...": "Please select software ...", - "Specification": "Specification", - "No selection": "No selection", - "per month": "per month", - "Not enough credits!": "Not enough credits!", - "Not enough" : "Not enough", - "Please select a configuration ...": "Please select a configuration ...", - "No resources found matching current configuration": "No resources found matching current configuration", - "No nodes found matching current configuration": "No nodes found matching current configuration", - "Please select a node ...": "Please select a node ...", - "Create server": "Create server", - "Use your servers on our": "Use your servers on our", - "pterodactyl panel": "pterodactyl panel", - "Server limit reached!": "Server limit reached!", - "Create Server": "Create Server", - "Manage": "Manage", - "Delete server": "Delete server", - "Price per Hour": "Price per Hour", - "Price per Month": "Price per Month", - - "Date": "Date", - "To": "To", - "From": "From", - "Pending": "Pending", - "Subtotal": "Subtotal", - "Submit Payment": "Submit Payment", - "Payment Methods": "Payment Methods", - "Payment method": "Payment method", - "By purchasing this product you agree and accept our terms of service": "By purchasing this product you agree and accept our terms of service", - "There are no store products!": "There are no store products!", - "The store is not correctly configured!": "The store is not correctly configured!", - "Out of Credits in": "Out of Credits in", - - "days": "days", - "hours": "hours", - "You ran out of Credits": "You ran out of Credits", - - "Profile updated": "Profile updated", - - "You are required to verify your email address before you can create a server.": "You are required to verify your email address before you can create a server.", - "You are required to link your discord account before you can create a server.": "You are required to link your discord account before you can create a server.", - "No allocations satisfying the requirements for automatic deployment on this node were found.": "No allocations satisfying the requirements for automatic deployment on this node were found.", - "Server removed": "Server removed", - "Server created": "Server created", - "An exception has occurred while trying to remove a resource \"": "An exception has occurred while trying to remove a resource \"", - "You are required to verify your email address before you can purchase credits.": "You are required to verify your email address before you can purchase credits.", - "You are required to link your discord account before you can purchase ": "You are required to link your discord account before you can purchase ", - - "Warning!": "Warning!", - "api key created!": "api key created!", "api key updated!": "api key updated!", "api key has been removed!": "api key has been removed!", + "Edit": "Edit", + "Delete": "Delete", "configuration has been updated!": "configuration has been updated!", - "Pterodactyl synced": "Pterodactyl synced", - "Your credit balance has been increased!": "Your credit balance has been increased!", - "Payment was Canceled": "Payment was Canceled", - "Store item has been created!": "Store item has been created!", "Store item has been updated!": "Store item has been updated!", "Product has been updated!": "Product has been updated!", "Store item has been removed!": "Store item has been removed!", + "unknown": "unknown", + "Pterodactyl synced": "Pterodactyl synced", + "Your credit balance has been increased!": "Your credit balance has been increased!", + "Your payment is being processed!": "Your payment is being processed!", + "Your payment has been canceled!": "Your payment has been canceled!", + "Payment method": "Payment method", + "Invoice": "Invoice", "Product has been created!": "Product has been created!", "Product has been removed!": "Product has been removed!", + "Show": "Show", + "Clone": "Clone", + "Server removed": "Server removed", + "An exception has occurred while trying to remove a resource \"": "An exception has occurred while trying to remove a resource \"", "Server has been updated!": "Server has been updated!", + "Unsuspend": "Unsuspend", + "Suspend": "Suspend", "Icons updated!": "Icons updated!", "link has been created!": "link has been created!", "link has been updated!": "link has been updated!", + "product has been removed!": "product has been removed!", + "User does not exists on pterodactyl's panel": "User does not exists on pterodactyl's panel", "user has been removed!": "user has been removed!", "Notification sent!": "Notification sent!", "User has been updated!": "User has been updated!", - "User does not exists on pterodactyl's panel": "User does not exists on pterodactyl's panel", + "Login as User": "Login as User", "voucher has been created!": "voucher has been created!", "voucher has been updated!": "voucher has been updated!", "voucher has been removed!": "voucher has been removed!", "This voucher has reached the maximum amount of uses": "This voucher has reached the maximum amount of uses", "This voucher has expired": "This voucher has expired", "You already redeemed this voucher code": "You already redeemed this voucher code", - "You can't redeem this voucher because you would exceed the limit of ": "You can't redeem this voucher because you would exceed the limit of ", "have been added to your balance!": "have been added to your balance!", - "Invoice": "Invoice", - "Serial No.": "Serial No.", - "Invoice date": "Invoice date", - "Seller": "Seller", - "Buyer": "Buyer", - "Address": "Address", - "VAT code": "VAT code", - "Phone": "Phone", - "Units": "Units", - "Qty": "Qty", - "Discount": "Discount", - "Sub total": "Sub total", - "Total discount": "Total discount", - "Taxable amount": "Taxable amount", - "Total taxes": "Total taxes", - "Tax rate": "Tax rate", - "Total amount": "Total amount", - "Please pay until": "Please pay until", - "Amount in words": "Amount in words", - "Notes": "Notes", - "Shipping": "Shipping", - "Paid": "Paid", - "Due:": "Due:", + "Users": "Users", + "VALID": "VALID", + "days": "days", + "hours": "hours", + "You ran out of Credits": "You ran out of Credits", + "Profile updated": "Profile updated", + "Server limit reached!": "Server limit reached!", + "You are required to verify your email address before you can create a server.": "You are required to verify your email address before you can create a server.", + "You are required to link your discord account before you can create a server.": "You are required to link your discord account before you can create a server.", + "Server created": "Server created", + "No allocations satisfying the requirements for automatic deployment on this node were found.": "No allocations satisfying the requirements for automatic deployment on this node were found.", + "You are required to verify your email address before you can purchase credits.": "You are required to verify your email address before you can purchase credits.", + "You are required to link your discord account before you can purchase Credits": "You are required to link your discord account before you can purchase Credits", + "EXPIRED": "EXPIRED", + "Payment Confirmation": "Payment Confirmation", + "Payment Confirmed!": "Payment Confirmed!", + "Your Payment was successful!": "Your Payment was successful!", + "Hello": "Hello", + "Your payment was processed successfully!": "Your payment was processed successfully!", + "Status": "Status", + "Price": "Price", + "Type": "Type", + "Amount": "Amount", + "Balance": "Balance", + "User ID": "User ID", + "Server Creation Error": "Server Creation Error", + "Your servers have been suspended!": "Your servers have been suspended!", + "To automatically re-enable your server\/s, you need to purchase more credits.": "To automatically re-enable your server\/s, you need to purchase more credits.", + "Purchase credits": "Purchase credits", + "If you have any questions please let us know.": "If you have any questions please let us know.", + "Regards": "Regards", + "Getting started!": "Getting started!", + "Activity Logs": "Activity Logs", + "Dashboard": "Dashboard", + "No recent activity from cronjobs": "No recent activity from cronjobs", + "Are cronjobs running?": "Are cronjobs running?", + "Check the docs for it here": "Check the docs for it here", + "Causer": "Causer", + "Description": "Description", + "Created at": "Created at", + "Application API": "Application API", + "Create": "Create", + "Memo": "Memo", + "Submit": "Submit", + "Create new": "Create new", + "Token": "Token", + "Last used": "Last used", + "Are you sure you wish to delete?": "Are you sure you wish to delete?", + "Edit Configuration": "Edit Configuration", + "Text Field": "Text Field", + "Cancel": "Cancel", + "Save": "Save", + "Configurations": "Configurations", + "Key": "Key", + "Value": "Value", + "Nests": "Nests", + "Sync": "Sync", + "Active": "Active", + "ID": "ID", + "eggs": "eggs", + "Name": "Name", + "Nodes": "Nodes", + "Location": "Location", + "Admin Overview": "Admin Overview", + "Support server": "Support server", + "Documentation": "Documentation", + "Github": "Github", + "Support ControlPanel": "Support ControlPanel", + "Servers": "Servers", + "Total": "Total", + "Payments": "Payments", + "Pterodactyl": "Pterodactyl", + "Resources": "Resources", + "Count": "Count", + "Locations": "Locations", + "Eggs": "Eggs", + "Last updated :date": "Last updated :date", + "Product Price": "Product Price", + "Tax Value": "Tax Value", + "Tax Percentage": "Tax Percentage", + "Total Price": "Total Price", + "Payment ID": "Payment ID", + "Payment Method": "Payment Method", + "Products": "Products", + "Product Details": "Product Details", + "Disabled": "Disabled", + "Will hide this option from being selected": "Will hide this option from being selected", + "Price in": "Price in", + "Memory": "Memory", + "Cpu": "Cpu", + "Swap": "Swap", + "This is what the users sees": "This is what the users sees", + "Disk": "Disk", + "Minimum": "Minimum", + "Setting to -1 will use the value from configuration.": "Setting to -1 will use the value from configuration.", + "IO": "IO", + "Databases": "Databases", + "Backups": "Backups", + "Allocations": "Allocations", + "Product Linking": "Product Linking", + "Link your products to nodes and eggs to create dynamic pricing for each option": "Link your products to nodes and eggs to create dynamic pricing for each option", + "This product will only be available for these nodes": "This product will only be available for these nodes", + "This product will only be available for these eggs": "This product will only be available for these eggs", + "Product": "Product", + "CPU": "CPU", + "Updated at": "Updated at", + "User": "User", + "Config": "Config", + "Suspended at": "Suspended at", + "Settings": "Settings", + "Dashboard icons": "Dashboard icons", "Invoice Settings": "Invoice Settings", + "Select panel icon": "Select panel icon", + "Select panel favicon": "Select panel favicon", "Download all Invoices": "Download all Invoices", "Enter your companys name": "Enter your companys name", "Enter your companys address": "Enter your companys address", @@ -341,30 +163,187 @@ "Enter your companys email address": "Enter your companys email address", "Enter your companys website": "Enter your companys website", "Enter your custom invoice prefix": "Enter your custom invoice prefix", + "Logo": "Logo", "Select Invoice Logo": "Select Invoice Logo", - - "Payment Confirmation": "Payment Confirmation", - "Payment Confirmed!": "Payment Confirmed!", - "Server Creation Error": "Server Creation Error", - "Your servers have been suspended!": "Your servers have been suspended!", - "To automatically re-enable your server/s, you need to purchase more credits.": "To automatically re-enable your server/s, you need to purchase more credits.", - "Purchase credits": "Purchase credits", - "If you have any questions please let us know.": "If you have any questions please let us know.", - "Regards": "Regards", - - "Getting started!": "Getting started!", - "EXPIRED": "EXPIRED", - "VALID": "VALID", - - "Unsuspend": "Unsuspend", - "Suspend": "Suspend", - "Delete": "Delete", - "Login as User": "Login as User", - "Clone": "Clone", - - "Amount due": "Amount due", - - "Your Payment was successful!": "Your Payment was successful!", - "Hello": "Hello", - "Your payment was processed successfully!": "Your payment was processed successfully!" -} + "Store": "Store", + "Currency code": "Currency code", + "Checkout the paypal docs to select the appropriate code": "Checkout the paypal docs to select the appropriate code", + "Quantity": "Quantity", + "Amount given to the user after purchasing": "Amount given to the user after purchasing", + "Display": "Display", + "This is what the user sees at store and checkout": "This is what the user sees at store and checkout", + "Adds 1000 credits to your account": "Adds 1000 credits to your account", + "This is what the user sees at checkout": "This is what the user sees at checkout", + "No payment method is configured.": "No payment method is configured.", + "To configure the payment methods, head to the .env and add the required options for your prefered payment method.": "To configure the payment methods, head to the .env and add the required options for your prefered payment method.", + "Useful Links": "Useful Links", + "Icon class name": "Icon class name", + "You can find available free icons": "You can find available free icons", + "Title": "Title", + "Link": "Link", + "description": "description", + "Icon": "Icon", + "Username": "Username", + "Email": "Email", + "Pterodactyl ID": "Pterodactyl ID", + "This ID refers to the user account created on pterodactyls panel.": "This ID refers to the user account created on pterodactyls panel.", + "Only edit this if you know what youre doing :)": "Only edit this if you know what youre doing :)", + "Server Limit": "Server Limit", + "Role": "Role", + " Administrator": " Administrator", + "Client": "Client", + "Member": "Member", + "New Password": "New Password", + "Confirm Password": "Confirm Password", + "Notify": "Notify", + "Avatar": "Avatar", + "Verified": "Verified", + "Last seen": "Last seen", + "Notifications": "Notifications", + "All": "All", + "Send via": "Send via", + "Database": "Database", + "Content": "Content", + "Server limit": "Server limit", + "Discord": "Discord", + "Usage": "Usage", + "IP": "IP", + "Vouchers": "Vouchers", + "Voucher details": "Voucher details", + "Summer break voucher": "Summer break voucher", + "Code": "Code", + "Random": "Random", + "Uses": "Uses", + "A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher.": "A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher.", + "Max": "Max", + "Expires at": "Expires at", + "Used \/ Uses": "Used \/ Uses", + "Expires": "Expires", + "Sign in to start your session": "Sign in to start your session", + "Password": "Password", + "Remember Me": "Remember Me", + "Sign In": "Sign In", + "Forgot Your Password?": "Forgot Your Password?", + "Register a new membership": "Register a new membership", + "Please confirm your password before continuing.": "Please confirm your password before continuing.", + "You forgot your password? Here you can easily retrieve a new password.": "You forgot your password? Here you can easily retrieve a new password.", + "Request new password": "Request new password", + "Login": "Login", + "You are only one step a way from your new password, recover your password now.": "You are only one step a way from your new password, recover your password now.", + "Retype password": "Retype password", + "Change password": "Change password", + "Register": "Register", + "I already have a membership": "I already have a membership", + "Verify Your Email Address": "Verify Your Email Address", + "A fresh verification link has been sent to your email address.": "A fresh verification link has been sent to your email address.", + "Before proceeding, please check your email for a verification link.": "Before proceeding, please check your email for a verification link.", + "If you did not receive the email": "If you did not receive the email", + "click here to request another": "click here to request another", + "per month": "per month", + "Out of Credits in": "Out of Credits in", + "Home": "Home", + "See all Notifications": "See all Notifications", + "Redeem code": "Redeem code", + "Profile": "Profile", + "Log back in": "Log back in", + "Logout": "Logout", + "Administration": "Administration", + "Overview": "Overview", + "Management": "Management", + "Other": "Other", + "Logs": "Logs", + "Warning!": "Warning!", + "You have not yet verified your email address": "You have not yet verified your email address", + "Click here to resend verification email": "Click here to resend verification email", + "Please contact support If you didnt receive your verification email.": "Please contact support If you didnt receive your verification email.", + "Thank you for your purchase!": "Thank you for your purchase!", + "Your payment has been confirmed; Your credit balance has been updated.": "Your payment has been confirmed; Your credit balance has been updated.", + "Thanks": "Thanks", + "Redeem voucher code": "Redeem voucher code", + "Close": "Close", + "Redeem": "Redeem", + "All notifications": "All notifications", + "Required Email verification!": "Required Email verification!", + "Required Discord verification!": "Required Discord verification!", + "You have not yet verified your discord account": "You have not yet verified your discord account", + "Login with discord": "Login with discord", + "Please contact support If you face any issues.": "Please contact support If you face any issues.", + "Due to system settings you are required to verify your discord account!": "Due to system settings you are required to verify your discord account!", + "It looks like this hasnt been set-up correctly! Please contact support.": "It looks like this hasnt been set-up correctly! Please contact support.", + "Change Password": "Change Password", + "Current Password": "Current Password", + "Link your discord account!": "Link your discord account!", + "By verifying your discord account, you receive extra Credits and increased Server amounts": "By verifying your discord account, you receive extra Credits and increased Server amounts", + "Login with Discord": "Login with Discord", + "You are verified!": "You are verified!", + "Re-Sync Discord": "Re-Sync Discord", + "Save Changes": "Save Changes", + "Server configuration": "Server configuration", + "Error!": "Error!", + "Make sure to link your products to nodes and eggs.": "Make sure to link your products to nodes and eggs.", + "There has to be at least 1 valid product for server creation": "There has to be at least 1 valid product for server creation", + "No products available!": "No products available!", + "No nodes have been linked!": "No nodes have been linked!", + "No nests available!": "No nests available!", + "No eggs have been linked!": "No eggs have been linked!", + "Software \/ Games": "Software \/ Games", + "Please select software ...": "Please select software ...", + "---": "---", + "Specification ": "Specification ", + "Node": "Node", + "Resource Data:": "Resource Data:", + "MB": "MB", + "MySQL": "MySQL", + "ports": "ports", + "Not enough": "Not enough", + "Create server": "Create server", + "Please select a node ...": "Please select a node ...", + "No nodes found matching current configuration": "No nodes found matching current configuration", + "Please select a resource ...": "Please select a resource ...", + "No resources found matching current configuration": "No resources found matching current configuration", + "Please select a configuration ...": "Please select a configuration ...", + "Not enough credits!": "Not enough credits!", + "Create Server": "Create Server", + "Software": "Software", + "Specification": "Specification", + "Resource plan": "Resource plan", + "per Hour": "per Hour", + "per Month": "per Month", + "Manage": "Manage", + "Are you sure?": "Are you sure?", + "This is an irreversible action, all files of this server will be removed.": "This is an irreversible action, all files of this server will be removed.", + "Yes, delete it!": "Yes, delete it!", + "No, cancel!": "No, cancel!", + "Canceled ...": "Canceled ...", + "Deletion has been canceled.": "Deletion has been canceled.", + "Date": "Date", + "To": "To", + "From": "From", + "Pending": "Pending", + "Subtotal": "Subtotal", + "Payment Methods": "Payment Methods", + "Amount Due": "Amount Due", + "Tax": "Tax", + "Submit Payment": "Submit Payment", + "Purchase": "Purchase", + "There are no store products!": "There are no store products!", + "The store is not correctly configured!": "The store is not correctly configured!", + "Serial No.": "Serial No.", + "Invoice date": "Invoice date", + "Seller": "Seller", + "Buyer": "Buyer", + "Address": "Address", + "VAT Code": "VAT Code", + "Phone": "Phone", + "Units": "Units", + "Discount": "Discount", + "Total discount": "Total discount", + "Taxable amount": "Taxable amount", + "Tax rate": "Tax rate", + "Total taxes": "Total taxes", + "Shipping": "Shipping", + "Total amount": "Total amount", + "Notes": "Notes", + "Amount in words": "Amount in words", + "Please pay until": "Please pay until" +} \ No newline at end of file diff --git a/resources/sass/app.scss b/resources/sass/app.scss index afe9b4de..995cfd6c 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -1,8 +1,7 @@ // Fonts -@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback'); +@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"); // Bootstrap -@import '../css/stylesheet.css'; -@import '../css/adminlte.min.css'; -@import '../css/slim.min.css'; - +@import "../css/stylesheet.css"; +@import "../css/adminlte.min.css"; +@import "../css/slim.min.css"; diff --git a/resources/views/servers/index.blade.php b/resources/views/servers/index.blade.php index 8b41bdef..b2ee0eff 100644 --- a/resources/views/servers/index.blade.php +++ b/resources/views/servers/index.blade.php @@ -6,12 +6,13 @@
-

{{__('Servers')}}

+

{{ __('Servers') }}

@@ -25,96 +26,184 @@
-
-

{{__('Use your servers on our')}} {{__('pterodactyl panel')}}

- Servers->count() >= Auth::user()->server_limit) disabled="disabled" title="{{__('Server limit reached!')}}" @endif href="{{route('servers.create')}}" class="btn @if(Auth::user()->Servers->count() >= Auth::user()->server_limit) disabled @endif btn-primary">{{__('Create Server')}} + -
- @foreach($servers as $server) -
-
-
-
-
{{$server->name}}
-
-