changeset 2:ac199a7a8931 default tip

Changes to the views and only defualt option is available
author luka
date Tue, 19 Aug 2025 20:32:36 -0400
parents a2a3059de103
children
files src/Console/InstallCommand.php stubs/default/resources/views/auth/login.blade.php stubs/default/resources/views/layouts/guest.blade.php stubs/default/resources/views/layouts/navigation.blade.php stubs/default/resources/views/welcome.blade.php
diffstat 5 files changed, 76 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/src/Console/InstallCommand.php	Thu Aug 14 21:09:25 2025 -0400
+++ b/src/Console/InstallCommand.php	Tue Aug 19 20:32:36 2025 -0400
@@ -3,7 +3,6 @@
 namespace Wizard\Auth\Console;
 
 use Illuminate\Console\Command;
-use Illuminate\Contracts\Console\PromptsForMissingInput;
 use Illuminate\Filesystem\Filesystem;
 use Illuminate\Support\Arr;
 use Illuminate\Support\Str;
@@ -19,8 +18,8 @@
 use function Laravel\Prompts\multiselect;
 use function Laravel\Prompts\select;
 
-#[AsCommand(name: 'breeze:install')]
-class InstallCommand extends Command implements PromptsForMissingInput
+#[AsCommand(name: 'auth:install')]
+class InstallCommand extends Command 
 {
     use InstallsBladeStack;
 
@@ -29,14 +28,14 @@
      *
      * @var string
      */
-    protected $signature = 'breeze:install {stack : The development stack that should be installed (blade)}';
+    protected $signature = 'auth:install';
 
     /**
      * The console command description.
      *
      * @var string
      */
-    protected $description = 'Install the Breeze controllers and resources';
+    protected $description = 'Install the Basic Auth controllers and resources';
 
     /**
      * Execute the console command.
@@ -57,11 +56,7 @@
     {
         (new Filesystem)->ensureDirectoryExists(base_path('tests/Feature'));
 
-        $stubStack = match ($this->argument('stack')) {
-            default => 'default',
-        };
-
-        (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/'.$stubStack.'/tests/Feature', base_path('tests/Feature'));
+        (new Filesystem)->copyDirectory(__DIR__.'/../../stubs/default/tests/Feature', base_path('tests/Feature'));
 
         return true;
     }
@@ -340,34 +335,6 @@
     }
 
     /**
-     * Prompt for missing input arguments using the returned questions.
-     *
-     * @return array
-     */
-    protected function promptForMissingArgumentsUsing()
-    {
-        return [
-            'stack' => fn () => select(
-                label: 'Which Breeze stack would you like to install?',
-                options: [
-                    'blade' => 'Blade',
-                ],
-                scroll: 6,
-            ),
-        ];
-    }
-
-    /**
-     * Interact further with the user if they were prompted for missing arguments.
-     *
-     * @return void
-     */
-    protected function afterPromptingForMissingArguments(InputInterface $input, OutputInterface $output)
-    {
-        $stack = $input->getArgument('stack');
-    }
-
-    /**
      * Determine whether the project is already using Pest.
      *
      * @return bool
--- a/stubs/default/resources/views/auth/login.blade.php	Thu Aug 14 21:09:25 2025 -0400
+++ b/stubs/default/resources/views/auth/login.blade.php	Tue Aug 19 20:32:36 2025 -0400
@@ -8,14 +8,16 @@
         <!-- Email Address -->
         <div class="mb-3">
             <x-input-label for="email" :value="__('Email')" />
-            <x-text-input id="email" class="form-control" type="email" name="email" :value="old('email')" required autofocus autocomplete="username" />
+            <x-text-input id="email" class="form-control" type="email" name="email" :value="old('email')" required
+                autofocus autocomplete="username" />
             <x-input-error :messages="$errors->get('email')" class="mt-2" />
         </div>
 
         <!-- Password -->
         <div class="mb-3">
             <x-input-label for="password" :value="__('Password')" />
-            <x-text-input id="password" class="form-control" type="password" name="password" required autocomplete="current-password" />
+            <x-text-input id="password" class="form-control" type="password" name="password" required
+                autocomplete="current-password" />
             <x-input-error :messages="$errors->get('password')" class="mt-2" />
         </div>
 
@@ -27,16 +29,22 @@
             </label>
         </div>
 
-        <div class="d-flex justify-content-end">
-            @if (Route::has('password.request'))
-                <a class="text-decoration-underline text-muted me-3" href="{{ route('password.request') }}">
-                    {{ __('Forgot your password?') }}
-                </a>
-            @endif
-
-            <x-primary-button class="btn btn-primary">
+        <div class="d-flex justify-content-between align-items-center">
+            <div class="d-flex flex-column">
+                @if (Route::has('password.request'))
+                    <a class="text-decoration-none text-muted mb-2" href="{{ route('password.request') }}">
+                        {{ __('Forgot your password?') }}
+                    </a>
+                @endif
+                @if (Route::has('register'))
+                    <a class="text-decoration-none text-muted" href="{{ route('register') }}">
+                        {{ __('Don\'t have an account?') }}
+                    </a>
+                @endif
+            </div>
+            <button type="submit" class="btn btn-primary">
                 {{ __('Log in') }}
-            </x-primary-button>
+            </button>
         </div>
     </form>
 </x-guest-layout>
--- a/stubs/default/resources/views/layouts/guest.blade.php	Thu Aug 14 21:09:25 2025 -0400
+++ b/stubs/default/resources/views/layouts/guest.blade.php	Tue Aug 19 20:32:36 2025 -0400
@@ -7,22 +7,18 @@
 
         <title>{{ config('app.name', 'Laravel') }}</title>
 
-        <!-- Fonts -->
-        <link rel="preconnect" href="https://fonts.bunny.net">
-        <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
-
         <!-- Scripts -->
-        @vite(['resources/css/app.css', 'resources/js/app.js'])
+        @vite(['resources/sass/app.scss', 'resources/js/app.js'])
     </head>
-    <body class="font-sans text-gray-900 antialiased">
-        <div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
+    <body class="bg-light text-dark">
+        <div class="d-flex flex-column min-vh-100 justify-content-center align-items-center pt-3 pt-sm-0 bg-light">
             <div>
                 <a href="/">
-                    <x-application-logo class="w-20 h-20 fill-current text-gray-500" />
+                    <x-application-logo class="w-20 h-20 text-secondary" />
                 </a>
             </div>
 
-            <div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">
+            <div class="w-100 mt-4 p-4 bg-white shadow-sm overflow-hidden rounded" style="max-width: 32rem;">
                 {{ $slot }}
             </div>
         </div>
--- a/stubs/default/resources/views/layouts/navigation.blade.php	Thu Aug 14 21:09:25 2025 -0400
+++ b/stubs/default/resources/views/layouts/navigation.blade.php	Tue Aug 19 20:32:36 2025 -0400
@@ -10,9 +10,9 @@
         <div :class="{ 'collapse': !open, 'navbar-collapse': open }" class="collapse navbar-collapse" id="navbarNav">
             <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                 <li class="nav-item">
-                    <x-nav-link :href="route('projects.index')" :active="request()->routeIs('projects.index')" class="nav-link">
-                        {{ __('Projects') }}
-                    </x-nav-link>
+                    {{-- <x-nav-link :href="route('projects.index')" :active="request()->routeIs('projects.index')" class="nav-link"> --}}
+                    {{--     {{ __('Projects') }} --}}
+                    {{-- </x-nav-link> --}}
                 </li>
             </ul>
             <ul class="navbar-nav ms-auto">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stubs/default/resources/views/welcome.blade.php	Tue Aug 19 20:32:36 2025 -0400
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <title>{{ config('app.name', '') }} </title>
+    <!-- Scripts -->
+    @vite(['resources/sass/app.scss', 'resources/js/app.js'])
+</head>
+
+<body class="font-sans antialiased bg-light">
+    <header class="p-4 w-100 text-body-secondary mb-3 d-none d-lg-block">
+        @if (Route::has('login'))
+            <nav class="d-flex align-items-center justify-content-end gap-2">
+                @auth
+                    <a href="{{ url('/dashboard') }}" class="btn btn-outline-secondary btn-sm">
+                        Dashboard
+                    </a>
+                @else
+                    <a href="{{ route('login') }}" class="btn btn-outline-secondary btn-sm">
+                        Log in
+                    </a>
+                    @if (Route::has('register'))
+                        <a href="{{ route('register') }}" class="btn btn-outline-secondary btn-sm">
+                            Register
+                        </a>
+                    @endif
+                @endauth
+            </nav>
+        @endif
+    </header>
+    <div class="text-dark d-flex p-3 p-lg-4 align-items-center justify-content-center flex-column">
+        <main class="text-center">
+            <h1>Welcome to Laravel</h1>
+            <p class="lead">This is a basic homepage for your Laravel application.</p>
+        </main>
+        @if (Route::has('login'))
+            <div class="d-none d-lg-block" style="height: 58px;"></div>
+        @endif
+    </div>
+</body>
+
+</html>