Skip to content

Commit

Permalink
Tweaks to uninstaller #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Riley committed Aug 19, 2022
1 parent d1ce996 commit db82e38
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 deletions src/Controllers/UninstallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public function index()
'root' => base_path('app'),
]);

$baseDir = Storage::build([
'driver' => 'local',
'root' => base_path()
]);

if ($packages->exists($installDirectory)) {
$packages->deleteDirectory($installDirectory);
}
Expand All @@ -57,10 +62,14 @@ public function index()
$appDir->delete('Http/Middleware/HandleInertiaRequests.php');
}

$this->runCommand(["rm,", ".env"]);
$this->runCommand(["cp", ".env-clean", ".env"]);
$this->runCommand(["rm", "composer.json"]);
$this->runCommand(["cp", "composer-clean.json", "composer.json"]);
if ($baseDir->exists('.env-clean')) {
$this->runCommand(["rm,", ".env"]);
$this->runCommand(["cp", ".env-clean", ".env"]);
}
if ($baseDir->exists('composer-clean.json')) {
$this->runCommand(["rm", "composer.json"]);
$this->runCommand(["cp", "composer-clean.json", "composer.json"]);
}

$this->runComposerUpdate();

Expand Down
2 changes: 1 addition & 1 deletion src/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
/* ******************************************
* STEP TWO
****************************************** */
this.installMessage = `Extracting AdminUI ${this.version} package...`;
this.installMessage = "Extracting AdminUI " + this.version " + package...";
const stepTwoResult = await fetch("{{ route('adminui.installer.two') }}", {
method: "POST",
headers: jsonHeaders,
Expand Down
4 changes: 2 additions & 2 deletions src/views/maintenance.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<x-adminui-installer::layout title="AdminUI Installer: Installation already exists">
<x-adminui-installer::layout title="Site is not currently available">
<div class="max-w-xl">
<div class="flex justify-center mb-4 transition-colors duration-300">
<x-adminui-installer::logo width="w-20"></x-adminui-installer::logo>
</div>
<p class="mt-8">
This webiste is currently undergoing maintenance.<br />
This website is currently undergoing maintenance.<br />
Please check back in a few minutes.
</p>
</div>
Expand Down

0 comments on commit db82e38

Please sign in to comment.