From 5a3f5eb972cbfbb533f77aea5007d0ce7df79d2c Mon Sep 17 00:00:00 2001 From: Dominikaninn <130690231+PrabuckiDominik@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:26:10 +0200 Subject: [PATCH] #63 - add login page (#64) * add login page * fix code style * move h-full to :root --- app/Http/Controllers/GithubController.php | 7 +++++++ resources/assets/images/blumilk.png | Bin 0 -> 6276 bytes resources/css/app.css | 4 ++++ resources/js/Layouts/GuestLayout.vue | 20 ++++++++++++++++++++ resources/js/Pages/Login.vue | 19 +++++++++++++++++++ resources/views/app.blade.php | 6 ++++-- routes/web.php | 3 ++- 7 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 resources/assets/images/blumilk.png create mode 100644 resources/js/Layouts/GuestLayout.vue create mode 100755 resources/js/Pages/Login.vue diff --git a/app/Http/Controllers/GithubController.php b/app/Http/Controllers/GithubController.php index 5d88a729..5c4bb42e 100644 --- a/app/Http/Controllers/GithubController.php +++ b/app/Http/Controllers/GithubController.php @@ -10,6 +10,8 @@ use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Bus; +use Inertia\Inertia; +use Inertia\Response; use Laravel\Socialite\Facades\Socialite; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -73,4 +75,9 @@ public function status(string $batchId): JsonResponse "finished" => $batch->finished(), ]); } + + public function login(): Response + { + return Inertia::render("Login"); + } } diff --git a/resources/assets/images/blumilk.png b/resources/assets/images/blumilk.png new file mode 100644 index 0000000000000000000000000000000000000000..a05420ed35d51223a587ec51ffe523e844e22f1a GIT binary patch literal 6276 zcmb_>XH*njvu+QP1q4KrBnKr(1_=^HhMXjfFht2YNs>G-C=NjoksJjDZ89q8kOc`2 zNpJueV8|dKImg@Y`tDul+~4QyUR~Y0R(GxH>fKfKJRSGIK$Di5of-fDT5T%JDRfjl$n)8%VT8I z!CCIy7Kd>Qcs@z2z^{upqM@5bpN;qY-zA&scj3384CVRVR| z2^n*`t+k3i_gCaX6D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^o?b<-Z&ArJ`Qp7Sn8+PpkkSxIMTU&bXwGt%3qaeK|ek|?rntsnQaz%9nE2q3|}(_ zTBJRtuC-PnrH!go?Nm#mmgDI=a;F(m@!4 z?veiIewSE7_9PDvkFd-x^7y!`u*|9ZQQYY7(349`dX0Zl?ee30h(7_Vk2M>xSh`#p zukn6?E}qn$!=vy>X0(b~=w$Q82C1*HhsSC=_@ie+P}FS265yaM9H{=|1|D;#9Zo~* z!zhmW**ER{r9P92Ua=qH#1`gOiQ!VigW16g)7uLNdwYHC92{0Q9|HFe4yx8yRzgcL zr?G4r62dF1KzPy95*FZ4=Cb_H<;DCpX1Px-P124nKPx;s{mqX5;SA_XZ1);6qt9h8 zx}a7yz|e4jqAQ7$@JFs63G~yZ4&*P11ad49>wSpl-yp<}>M7g4fNgTb7N{rtZi3yi zBhbf2G8*X9v$VtS^zrwq`0j8nLlXqTljV~9L*OaqIepGV(R1qQ1EBMnxplG=%5H8M z_Js9bCUGFn3H9#W*&L=w$Fs)!`V~=^K4pPYC85AA>YNfHa)#Uk>{mmkoFT+WiPD?o zp`?zDI%xvF^_t}iFeh9)LeyZasz3tJI9%331-dynZ!4SmL{XKEr2CS|!(Bwp(bAVw!Am5Pgt=O}?;>(RVSt((~r zyB}Ldqj|<=<@&QNeVPJ~j+P1rWXDz?NI#BW79q0^7W)_4XU&6H4b2g@;>>=kp9SB0 zmAR(b$cj241_u!sZ|3peX`TOKc>Y84{MY9#{9d9m^3=Agd z+Oy=3<^Y{BzRn#V0Q{lHMHnH2I~^xVBm?6x0`6o=ac`=;@#ATF6c9%$q^t(9y#JTl z4FLHfWZy)E03t#WUB>(#}KwI4aQF;GS^#1{Ta`+?w literal 0 HcmV?d00001 diff --git a/resources/css/app.css b/resources/css/app.css index b5c61c95..9853a38b 100755 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,3 +1,7 @@ @tailwind base; @tailwind components; @tailwind utilities; + +:root, body, #app { + height: 100%; +} diff --git a/resources/js/Layouts/GuestLayout.vue b/resources/js/Layouts/GuestLayout.vue new file mode 100644 index 00000000..faf1322b --- /dev/null +++ b/resources/js/Layouts/GuestLayout.vue @@ -0,0 +1,20 @@ + diff --git a/resources/js/Pages/Login.vue b/resources/js/Pages/Login.vue new file mode 100755 index 00000000..9b35f532 --- /dev/null +++ b/resources/js/Pages/Login.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index 9911d029..6e58f545 100755 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -6,7 +6,9 @@ @vite('resources/js/app.ts') @inertiaHead - -@inertia + +
+ @inertia +
diff --git a/routes/web.php b/routes/web.php index dd669eca..463b1209 100755 --- a/routes/web.php +++ b/routes/web.php @@ -7,8 +7,9 @@ use Inertia\Response; Route::get("/", fn(): Response => inertia("Welcome")); +Route::get("/auth/login", [GithubController::class, "login"])->name("login"); Route::get("/auth/redirect", [GithubController::class, "redirect"]); Route::get("/auth/callback", [GithubController::class, "callback"]); -Route::get("/{organizationId}/fetch", [GithubController::class, "fetchData"]); +Route::get("/{organizationId}/fetch", [GithubController::class, "fetchData"])->middleware("auth");