Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements on console UI for install command #4559

Merged
merged 21 commits into from
Aug 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3874986
Improvements on console UI for install command
promatik Jul 30, 2022
c6d5e06
Apply fixes from StyleCI
StyleCIBot Jul 30, 2022
2fc5279
Added missing function to RequireDevTools class
promatik Jul 30, 2022
e143e84
Merge branch 'install-console-ui-improvements' of https://github.com/…
promatik Jul 30, 2022
ded4d72
Fix for PHP7
promatik Jul 30, 2022
38a82cd
Apply suggestions from code review
promatik Jul 31, 2022
83368c4
Fix console width win/unix
promatik Jul 31, 2022
97858ba
Merge branch 'install-console-ui-improvements' of https://github.com/…
promatik Aug 1, 2022
02284b6
Default bar color to gray
promatik Aug 1, 2022
8c037c1
Apply suggestions from code review
tabacitu Aug 1, 2022
fa5d428
Setup installation on a low verbose level
promatik Aug 1, 2022
0417172
Merge branch 'install-console-ui-improvements' of https://github.com/…
promatik Aug 1, 2022
2ab770b
Apply fixes from StyleCI
StyleCIBot Aug 1, 2022
e1e0f2a
Added steps as info block titles
promatik Aug 2, 2022
4a91035
Apply fixes from StyleCI
StyleCIBot Aug 2, 2022
e06af5f
Using color instead of back ticks in artisan serve code snippet
promatik Aug 2, 2022
853eab7
Merge branch 'install-console-ui-improvements' of https://github.com/…
promatik Aug 2, 2022
a4bf6b1
Validate if user model has timestamps
promatik Aug 2, 2022
b72ccd7
Replace bcrypt with Hash::make
promatik Aug 2, 2022
ff69474
Removed user count
promatik Aug 2, 2022
9a629d6
Get back user count
promatik Aug 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/app/Console/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ private function createUsers()
$userClass = config('backpack.base.user_model_fqn', 'App\Models\User');
$userModel = new $userClass();

// Count current users
$currentUsers = $userModel->count();

$this->newLine();
$this->infoBlock('Creating an admin:', 'Step 2');
$this->note('Quickly jump in your admin panel, using the email & password you choose here.');
$this->note('Currently there '.trans_choice("{0} are <fg=blue>no users</>|{1} is <fg=blue>1 user</>|[2,*] are <fg=blue>$currentUsers users</>", $currentUsers).' in the database.');
promatik marked this conversation as resolved.
Show resolved Hide resolved
$this->note(sprintf('Using <fg=blue>%s</> table, defined in the <fg=blue>%s</> model.', $userModel->getTable(), $userClass));

$total = 0;
while ($this->confirm(' Add '.($total ? 'another' : 'an').' admin user?')) {
Expand Down