Bugfixes in server settings, site creation
This commit is contained in:
@@ -38,7 +38,17 @@ class SiteController extends Controller
|
||||
} else {
|
||||
$server = Server::query()
|
||||
->where('maximum_sites', '>', 0)
|
||||
->doesntHave('users')
|
||||
->where(function ($query) {
|
||||
return $query
|
||||
->where(function ($query) {
|
||||
return $query->whereHas('users', function ($query) {
|
||||
return $query->where('user_id', auth()->id());
|
||||
});
|
||||
})
|
||||
->orWhere(function ($query) {
|
||||
return $query->doesntHave('users');
|
||||
});
|
||||
})
|
||||
->withCount('sites')
|
||||
->inRandomOrder()
|
||||
->first();
|
||||
|
||||
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
<Container>
|
||||
<PageHeader>
|
||||
<template #start>
|
||||
<PageHeaderTitle>{{ __('Settings') }}</PageHeaderTitle>
|
||||
<PageHeaderTitle>{{ server.name }}</PageHeaderTitle>
|
||||
</template>
|
||||
</PageHeader>
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
to: this.route('servers.show', this.server.id),
|
||||
active: this.route().current('servers.show')
|
||||
},
|
||||
{
|
||||
this.can('servers', 'update') ? {
|
||||
title: this.__('Settings'),
|
||||
to: this.route('servers.settings.show', this.server.id),
|
||||
active: this.route().current('servers.settings.show')
|
||||
},
|
||||
} : null,
|
||||
],
|
||||
}
|
||||
},
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
}
|
||||
|
||||
// If it includes a create true parameter, then we open the creation modal
|
||||
if(window.location.search.includes('create=true')){
|
||||
if(window.location.search.includes('create=')){
|
||||
this.modalIsOpen = true;
|
||||
}
|
||||
if(window.location.search.includes('server=')){
|
||||
|
||||
Reference in New Issue
Block a user