Merge branch 'develop'

# Conflicts:
#	public/js/app.js
This commit is contained in:
Dennis
2021-09-23 08:26:03 +02:00
8 changed files with 27346 additions and 9 deletions

View File

@@ -3,7 +3,7 @@
With Ploi Core, you'll power-launch your webhosting company.
Using the ploi.io system as backbone you will be able to serve your customers your custom panel & feeling.
<p align="center"><img src="https://ploi-core.io/images/featured.png" width="100%"></p>
<p align="center"><img src="https://ploi-core.io/images/og.jpg" width="100%"></p>
## Documentation

View File

@@ -25,7 +25,7 @@ class Ploi
public function __construct(string $token = null, string $coreApiToken = null)
{
$this->url = app()->isLocal() ? 'http://core-api.ploi.test/' : 'https://core-api.ploi.io/';
$this->url = config('services.ploi-api.url');
if (!$token) {
$token = config('services.ploi.token');

View File

@@ -33,5 +33,9 @@ return [
'ploi' => [
'token' => env('PLOI_TOKEN'),
'core-token' => env('PLOI_CORE_TOKEN')
],
'ploi-api' => [
'url' => env('PLOI_API_URL', 'https://core-api.ploi.io/')
]
];

27335
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -142,7 +142,7 @@ export default {
computed: {
hasAccessToServers () {
return (this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete);
return this.$page.props.auth.can.length && (this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete);
}
},

View File

@@ -31,9 +31,10 @@ export default {
computed: {
hasServerAccess() {
return this.$page.props.auth.can.servers.create ||
return this.$page.props.auth.can.length &&
(this.$page.props.auth.can.servers.create ||
this.$page.props.auth.can.servers.delete ||
this.$page.props.auth.can.servers.update
this.$page.props.auth.can.servers.update)
}
},
@@ -49,7 +50,7 @@ export default {
title: this.__('Sites'),
to: this.route('sites.index'),
},
(this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete) ? {
this.$page.props.auth.can.length && (this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete) ? {
title: this.__('Servers'),
to: this.route('servers.index'),
} : null,

View File

@@ -42,7 +42,7 @@ export default {
to: this.route('sites.index'),
active: this.route().current('sites.*')
},
(this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete) ? {
this.$page.props.auth.can.length && (this.$page.props.auth.can.servers.create || this.$page.props.auth.can.servers.update || this.$page.props.auth.can.servers.delete) ? {
title: this.__('Servers'),
to: this.route('servers.index'),
} : null,

View File

@@ -17,7 +17,6 @@ export default {
},
props: {
items: {
type: Array,
required: true,
},
},