Something went wrong. Please try again.
- @endif
+ @if (request()->query->get('cancelled'))
+
+ @endif
@if (config('subscription.provider') !== null)
@endif
diff --git a/resources/views/subscription/success.blade.php b/resources/views/subscription/success.blade.php
deleted file mode 100644
index 9cb5911cb..000000000
--- a/resources/views/subscription/success.blade.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/resources/views/team/show.blade.php b/resources/views/team/index.blade.php
similarity index 83%
rename from resources/views/team/show.blade.php
rename to resources/views/team/index.blade.php
index 25a465452..3bb81512b 100644
--- a/resources/views/team/show.blade.php
+++ b/resources/views/team/index.blade.php
@@ -3,7 +3,7 @@
->user()
->currentTeam()" />
- user()
->currentTeam()" />
diff --git a/routes/web.php b/routes/web.php
index ce98b65b7..d59b9a48d 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -6,6 +6,12 @@
use App\Http\Controllers\MagicController;
use App\Http\Controllers\ProjectController;
use App\Http\Controllers\ServerController;
+use App\Http\Livewire\Boarding\Index;
+use App\Http\Livewire\Boarding\Server as BoardingServer;
+use App\Http\Livewire\Dashboard;
+use App\Http\Livewire\Server\All;
+use App\Http\Livewire\Server\Show;
+use App\Http\Livewire\Waitlist\Index as WaitlistIndex;
use App\Models\GithubApp;
use App\Models\GitlabApp;
use App\Models\InstanceSettings;
@@ -23,7 +29,10 @@
Route::post('/forgot-password', function (Request $request) {
if (is_transactional_emails_active()) {
- set_transanctional_email_settings();
+ $type = set_transanctional_email_settings();
+ if (!$type) {
+ return response()->json(['message' => 'Transactional emails are not active'], 400);
+ }
$request->validate([Fortify::email() => 'required|email']);
$status = Password::broker(config('fortify.passwords'))->sendResetLink(
$request->only(Fortify::email())
@@ -38,7 +47,7 @@
}
return response()->json(['message' => 'Transactional emails are not active'], 400);
})->name('password.forgot');
-Route::get('/waitlist', [Controller::class, 'waitlist'])->name('auth.waitlist');
+Route::get('/waitlist', WaitlistIndex::class)->name('waitlist.index');
Route::prefix('magic')->middleware(['auth'])->group(function () {
Route::get('/servers', [MagicController::class, 'servers']);
@@ -71,13 +80,9 @@
});
Route::middleware(['auth'])->group(function () {
- Route::get('/servers', fn () => view('server.all', [
- 'servers' => Server::ownedByCurrentTeam()->get()
- ]))->name('server.all');
+ Route::get('/servers', All::class)->name('server.all');
Route::get('/server/new', [ServerController::class, 'new_server'])->name('server.create');
- Route::get('/server/{server_uuid}', fn () => view('server.show', [
- 'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),
- ]))->name('server.show');
+ Route::get('/server/{server_uuid}', Show::class)->name('server.show');
Route::get('/server/{server_uuid}/proxy', fn () => view('server.proxy', [
'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),
]))->name('server.proxy');
@@ -92,18 +97,16 @@
Route::middleware(['auth'])->group(function () {
- Route::get('/', [Controller::class, 'dashboard'])->name('dashboard');
- Route::get('/boarding', [Controller::class, 'boarding'])->name('boarding');
- Route::middleware(['throttle:force-password-reset'])->group(function() {
+ Route::get('/', Dashboard::class)->name('dashboard');
+ Route::get('/boarding', Index::class)->name('boarding');
+ Route::middleware(['throttle:force-password-reset'])->group(function () {
Route::get('/force-password-reset', [Controller::class, 'force_passoword_reset'])->name('auth.force-password-reset');
});
- Route::get('/subscription', [Controller::class, 'subscription'])->name('subscription.show');
- Route::get('/subscription/success', fn () => view('subscription.success'))->name('subscription.success');
- Route::get('/subscription/cancel', fn () => view('profile'))->name('subscription.cancel');
+ Route::get('/subscription', [Controller::class, 'subscription'])->name('subscription.index');
Route::get('/settings', [Controller::class, 'settings'])->name('settings.configuration');
Route::get('/settings/license', [Controller::class, 'license'])->name('settings.license');
Route::get('/profile', fn () => view('profile', ['request' => request()]))->name('profile');
- Route::get('/team', [Controller::class, 'team'])->name('team.show');
+ Route::get('/team', [Controller::class, 'team'])->name('team.index');
Route::get('/team/new', fn () => view('team.create'))->name('team.create');
Route::get('/team/notifications', fn () => view('team.notifications'))->name('team.notifications');
Route::get('/team/storages', [Controller::class, 'storages'])->name('team.storages.all');
@@ -144,6 +147,26 @@
if ($settings->public_ipv6) {
$ipv6 = 'http://' . $settings->public_ipv6 . ':' . config('app.port');
}
+ if ($github_app->installation_id && session('from')) {
+ $source_id = data_get(session('from'), 'source_id');
+ if (!$source_id || $github_app->id !== $source_id) {
+ session()->forget('from');
+ } else {
+ $parameters = data_get(session('from'), 'parameters');
+ $back = data_get(session('from'), 'back');
+ $environment_name = data_get($parameters, 'environment_name');
+ $project_uuid = data_get($parameters, 'project_uuid');
+ $type = data_get($parameters, 'type');
+ $destination = data_get($parameters, 'destination');
+ session()->forget('from');
+ return redirect()->route($back, [
+ 'environment_name' => $environment_name,
+ 'project_uuid' => $project_uuid,
+ 'type' => $type,
+ 'destination' => $destination,
+ ]);
+ }
+ }
return view('source.github.show', [
'github_app' => $github_app,
'name' => $name,
diff --git a/routes/webhooks.php b/routes/webhooks.php
index 026b2ebc3..5d9257094 100644
--- a/routes/webhooks.php
+++ b/routes/webhooks.php
@@ -181,7 +181,7 @@
ray($email, $confirmation_code);
try {
$found = Waitlist::where('uuid', $confirmation_code)->where('email', $email)->first();
- if ($found && !$found->verified && $found->created_at > now()->subMinutes(config('constants.waitlist.confirmation_valid_for_minutes'))) {
+ if ($found && !$found->verified && $found->created_at > now()->subMinutes(config('constants.waitlist.expiration'))) {
$found->verified = true;
$found->save();
send_internal_notification('Waitlist confirmed: ' . $email);
@@ -267,9 +267,11 @@
break;
case 'customer.subscription.updated':
$subscriptionId = data_get($data, 'items.data.0.subscription');
+ $planId = data_get($data, 'items.data.0.plan.id');
$cancelAtPeriodEnd = data_get($data, 'cancel_at_period_end');
$subscription = Subscription::where('stripe_subscription_id', $subscriptionId)->firstOrFail();
$subscription->update([
+ 'stripe_plan_id' => $planId,
'stripe_cancel_at_period_end' => $cancelAtPeriodEnd,
]);
break;
@@ -277,6 +279,8 @@
$subscriptionId = data_get($data, 'items.data.0.subscription');
$subscription = Subscription::where('stripe_subscription_id', $subscriptionId)->firstOrFail();
$subscription->update([
+ 'stripe_subscription_id' => null,
+ 'stripe_plan_id'=> null,
'stripe_cancel_at_period_end' => false,
'stripe_invoice_paid' => false,
]);
diff --git a/tailwind.config.js b/tailwind.config.js
index 274f50773..46bd15c02 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -41,7 +41,7 @@ module.exports = {
coollabs: {
primary: "#323232",
"primary-focus": "#242424",
- secondary: "#4338ca",
+ secondary: "#6B16ED",
accent: "#4338ca",
neutral: "#1B1D1D",
"base-100": "#181818",
diff --git a/tests/Feature/DockerCommandsTest.php b/tests/Feature/DockerCommandsTest.phpold
similarity index 100%
rename from tests/Feature/DockerCommandsTest.php
rename to tests/Feature/DockerCommandsTest.phpold
diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php
new file mode 100644
index 000000000..e07cdfb06
--- /dev/null
+++ b/tests/Feature/ExampleTest.php
@@ -0,0 +1,7 @@
+get('/api/health');
+
+ $response->assertStatus(200);
+});
diff --git a/tests/Feature/RemoteProcessTest.php b/tests/Feature/RemoteProcessTest.phpold
similarity index 100%
rename from tests/Feature/RemoteProcessTest.php
rename to tests/Feature/RemoteProcessTest.phpold
diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php
new file mode 100644
index 000000000..44a4f337a
--- /dev/null
+++ b/tests/Unit/ExampleTest.php
@@ -0,0 +1,5 @@
+toBeTrue();
+});
diff --git a/tests/Unit/RulesTest.php b/tests/Unit/RulesTest.php
index 02e14ba48..585e7126c 100644
--- a/tests/Unit/RulesTest.php
+++ b/tests/Unit/RulesTest.php
@@ -1,5 +1,5 @@
expect(['dd', 'dump', 'ray'])
+ ->expect(['dd', 'dump'])
->not->toBeUsed();
diff --git a/versions.json b/versions.json
index 5215932b7..d50394f5b 100644
--- a/versions.json
+++ b/versions.json
@@ -4,7 +4,7 @@
"version": "3.12.36"
},
"v4": {
- "version": "4.0.0-beta.20"
+ "version": "4.0.0-beta.21"
}
}
}