mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
enable nostr nip-05 login
This commit is contained in:
72
app/Http/Livewire/Auth/Login.php
Normal file
72
app/Http/Livewire/Auth/Login.php
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Livewire\Auth;
|
||||||
|
|
||||||
|
use App\Models\Team;
|
||||||
|
use App\Models\User;
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class Login extends Component
|
||||||
|
{
|
||||||
|
public array $userProfile = [];
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'userProfile.npub' => 'required|string',
|
||||||
|
'userProfile.pubkey' => 'required|string',
|
||||||
|
|
||||||
|
'userProfile.banner' => 'required|string',
|
||||||
|
'userProfile.image' => 'required|string',
|
||||||
|
|
||||||
|
'userProfile.name' => 'required|string',
|
||||||
|
'userProfile.username' => 'required|string',
|
||||||
|
'userProfile.website' => 'required|string',
|
||||||
|
'userProfile.about' => 'required|string',
|
||||||
|
'userProfile.displayName' => 'required|string',
|
||||||
|
'userProfile.lud16' => 'required|string',
|
||||||
|
'userProfile.nip05' => 'required|string',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updatedUserProfile($value)
|
||||||
|
{
|
||||||
|
if ($value['npub']) {
|
||||||
|
$firstUser = User::query()->where('nostr', $value['npub'])->first();
|
||||||
|
if ($firstUser) {
|
||||||
|
auth()->login($firstUser, true);
|
||||||
|
|
||||||
|
return to_route('welcome');
|
||||||
|
} else {
|
||||||
|
$fakeName = str()->random(10);
|
||||||
|
// create User
|
||||||
|
$user = User::create([
|
||||||
|
'is_lecturer' => true,
|
||||||
|
'name' => $fakeName,
|
||||||
|
'email' => str($fakeName)->slug() . '@portal.einundzwanzig.space',
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'lnbits' => [
|
||||||
|
'read_key' => null,
|
||||||
|
'url' => null,
|
||||||
|
'wallet_id' => null,
|
||||||
|
],
|
||||||
|
'nostr' => $value['npub'],
|
||||||
|
]);
|
||||||
|
$user->ownedTeams()
|
||||||
|
->save(Team::forceCreate([
|
||||||
|
'user_id' => $user->id,
|
||||||
|
'name' => $fakeName . "'s Team",
|
||||||
|
'personal_team' => true,
|
||||||
|
]));
|
||||||
|
auth()->login($user, true);
|
||||||
|
|
||||||
|
return to_route('welcome');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.auth.login')->layout('layouts.guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
44
app/Http/Livewire/Auth/LoginWithNDK.php
Normal file
44
app/Http/Livewire/Auth/LoginWithNDK.php
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Livewire\Auth;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Livewire\Component;
|
||||||
|
|
||||||
|
class LoginWithNDK extends Component
|
||||||
|
{
|
||||||
|
public $existingAccount = false;
|
||||||
|
|
||||||
|
public array $userProfile = [];
|
||||||
|
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'userProfile.npub' => 'required|string',
|
||||||
|
'userProfile.pubkey' => 'required|string',
|
||||||
|
|
||||||
|
'userProfile.banner' => 'required|string',
|
||||||
|
'userProfile.image' => 'required|string',
|
||||||
|
|
||||||
|
'userProfile.name' => 'required|string',
|
||||||
|
'userProfile.username' => 'required|string',
|
||||||
|
'userProfile.website' => 'required|string',
|
||||||
|
'userProfile.about' => 'required|string',
|
||||||
|
'userProfile.displayName' => 'required|string',
|
||||||
|
'userProfile.lud16' => 'required|string',
|
||||||
|
'userProfile.nip05' => 'required|string',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updatedUserProfile($value)
|
||||||
|
{
|
||||||
|
if (User::query()->where('nostr', $value['npub'])->exists()) {
|
||||||
|
$this->existingAccount = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render()
|
||||||
|
{
|
||||||
|
return view('livewire.auth.login-with-n-d-k')->layout('layouts.guest');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,7 +59,7 @@ class OrangePillForm extends Component
|
|||||||
public function save()
|
public function save()
|
||||||
{
|
{
|
||||||
if (!auth()->check()) {
|
if (!auth()->check()) {
|
||||||
return to_route('auth.ln');
|
return to_route('auth.login');
|
||||||
}
|
}
|
||||||
$this->validate();
|
$this->validate();
|
||||||
$this->orangePill->save();
|
$this->orangePill->save();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Meetups extends Component
|
|||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
if (!auth()->user()) {
|
if (!auth()->user()) {
|
||||||
return to_route('auth.ln');
|
return to_route('auth.login');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->meetups = Meetup::query()
|
$this->meetups = Meetup::query()
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ class Authenticate extends Middleware
|
|||||||
*/
|
*/
|
||||||
protected function redirectTo(Request $request): ?string
|
protected function redirectTo(Request $request): ?string
|
||||||
{
|
{
|
||||||
return $request->expectsJson() ? null : route('auth.ln');
|
return $request->expectsJson() ? null : route('auth.login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"@alpinejs/collapse": "^3.10.5",
|
"@alpinejs/collapse": "^3.10.5",
|
||||||
"@alpinejs/focus": "^3.11.1",
|
"@alpinejs/focus": "^3.11.1",
|
||||||
"@alpinejs/intersect": "^3.11.1",
|
"@alpinejs/intersect": "^3.11.1",
|
||||||
|
"@nostr-dev-kit/ndk": "^0.8.20-1",
|
||||||
"@tailwindcss/forms": "^0.5.2",
|
"@tailwindcss/forms": "^0.5.2",
|
||||||
"@tailwindcss/line-clamp": "^0.4.2",
|
"@tailwindcss/line-clamp": "^0.4.2",
|
||||||
"@tailwindcss/typography": "^0.5.0",
|
"@tailwindcss/typography": "^0.5.0",
|
||||||
|
|||||||
91
public/img/nostr.svg
Normal file
91
public/img/nostr.svg
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
<svg fill="#ffffff" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="25px" height="25px" viewBox="0 0 571.004 571.004"
|
||||||
|
xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M533.187,269.019c-1.432-1.746-2.219-3.876-1.252-5.993c1.868-4.08,0.611-7.658-0.931-11.465
|
||||||
|
c-0.877-2.167-0.796-4.716-1.15-7.095c-0.221-1.493-0.057-3.199-0.742-4.435c-1.775-3.199-3.812-6.275-5.949-9.245
|
||||||
|
c-2.681-3.717-5.564-7.291-8.38-10.914c-3.325-4.284-6.581-8.633-10.09-12.766c-0.706-0.833-2.604-1.42-3.607-1.085
|
||||||
|
c-2.411,0.808-4.732,2.052-6.874,3.452c-2.771,1.812-5.435,3.317-8.928,3.713c-3.953,0.453-8.062,1.403-11.604,3.154
|
||||||
|
c-5.189,2.562-9.747,6.401-14.924,9c-4.913,2.464-8.328,6.112-11.184,10.567c-0.783,1.22-1.705,2.371-2.685,3.444
|
||||||
|
c-3.252,3.574-5.549,7.629-7.051,12.248c-1.154,3.554-2.378,7.226-4.373,10.322c-1.963,3.044-3.256,6.194-4.162,9.601
|
||||||
|
c-0.285,1.065-0.44,2.167-0.656,3.251c-2.212-0.539-4.19-0.873-6.06-1.518c-1.709-0.592-3.684-1.15-4.879-2.375
|
||||||
|
c-2.979-3.052-6.528-5.059-10.388-6.577c-3.448-1.354-6.581-3.06-9.441-5.496c-1.514-1.29-3.771-1.738-5.721-2.489
|
||||||
|
c-1.419-0.547-3.043-0.714-4.3-1.501c-3.439-2.146-6.639-4.68-10.11-6.765c-2.256-1.359-4.737-2.542-7.271-3.166
|
||||||
|
c-1.722-0.424-2.293-0.865-2.216-2.599c0.241-5.227-0.832-10.175-3.235-14.872c-2.855-5.582-8.723-8.625-14.777-7.589
|
||||||
|
c-2.697,0.461-5.573,1.347-8.128,0.833c-3.329-0.669-6.516-2-10.028-1.861c-0.612,0.025-1.31-0.437-1.864-0.82
|
||||||
|
c-4.076-2.832-8.152-5.663-12.163-8.584c-1.489-1.085-2.782-1.154-4.442-0.322c-1.221,0.612-2.705,0.955-4.08,0.967
|
||||||
|
c-6.047,0.062-12.098-0.082-18.148-0.077c-5.173,0.004-10.498,1.815-15.377-1.399c-0.241-0.159-0.588-0.216-0.886-0.221
|
||||||
|
c-3.023-0.028-4.488-1.632-5.096-4.524c-0.171-0.82-1.436-1.971-2.236-2c-3.986-0.143-7.984-0.041-11.971,0.139
|
||||||
|
c-2.187,0.102-4.619,0.004-6.483,0.922c-3.941,1.942-7.556,4.533-11.355,6.773c-1.505,0.889-3.023,1.085-3.872-0.763
|
||||||
|
c0.979-1.261,2.337-2.272,2.627-3.525c0.771-3.37-3.705-7.181-6.969-6.059c-1.498,0.514-3.003,1.208-4.272,2.138
|
||||||
|
c-2.464,1.807-4.725,3.896-7.144,5.769c-3.011,2.33-6.055,4.655-10.449,4.737c0.983-3.753-1.718-5.104-4.108-6.597
|
||||||
|
c-1.094-0.686-2.293-1.281-3.525-1.652c-3.276-1-6.348-0.763-8.956,1.828c-2.158,2.142-3.488,2.179-6.014,0.367
|
||||||
|
c-3.081-2.208-3.986-2.175-7.128,0c-1.122,0.775-2.346,1.832-3.586,1.926c-4.268,0.318-6.646,3.052-8.931,6.132
|
||||||
|
c-1.632,2.203-3.244,4.472-5.173,6.405c-4.378,4.39-8.911,8.629-13.48,12.815c-0.608,0.559-1.95,0.873-2.709,0.608
|
||||||
|
c-3.378-1.191-5.582-3.823-6.899-7.001c-2.521-6.075-4.957-12.203-7.07-18.429c-0.816-2.399-1.11-5.165-0.865-7.687
|
||||||
|
c0.559-5.786,1.771-11.51,2.411-17.291c1.196-10.796,3.583-21.343,7.405-31.445c6.773-17.891,13.934-35.643,21.2-53.342
|
||||||
|
c4.619-11.249,7.817-22.852,10.167-34.75c1.644-8.319,2.477-16.63,1.901-25.137c-0.286-4.227,0.232-8.56,0.808-12.787
|
||||||
|
c1.669-12.232-2.46-19.547-13.843-24.068c-1.403-0.559-2.766-1.228-4.149-1.844c-2.15,0-4.3,0-6.455,0
|
||||||
|
c-2.909,0.91-5.871,1.681-8.715,2.762c-3.827,1.457-7.989,2.484-10.51,6.145c-1.701,2.472-4.088,3.5-6.916,4.06
|
||||||
|
c-3.9,0.771-7.797,1.62-11.62,2.705c-3.378,0.959-6.369,2.709-9.135,5.872c6.863,1.652,13.211,3.305,19.617,4.692
|
||||||
|
c7.629,1.652,14.558,4.729,20.518,9.763c2.954,2.493,5.667,5.447,6.165,9.425c0.51,4.084,0.608,8.271,0.392,12.383
|
||||||
|
c-0.563,10.694-4.137,20.661-7.976,30.515c-2.358,6.059-5.406,11.876-7.36,18.054c-4.321,13.656-8.486,27.348-14.19,40.522
|
||||||
|
c-3.309,7.646-6.83,15.251-8.307,23.534c-1.722,9.657-3.264,19.343-4.917,29.013c-0.845,4.958-0.877,10.049-2.864,14.819
|
||||||
|
c-0.873,2.093-1.269,4.406-1.693,6.654c-0.975,5.182-1.832,10.379-2.733,15.573c0,7.838,0,15.675,0,23.513
|
||||||
|
c0.632,3.905,1.363,7.801,1.877,11.722c1.481,11.232,4.773,21.955,8.825,32.489c0.816,2.121,1.322,4.378,1.783,6.613
|
||||||
|
c0.718,3.473,1.069,7.365,4.309,9.303c2.427,1.452,2.982,3.402,3.603,5.671c1.828,6.684,1.318,13.428,0.147,20.086
|
||||||
|
c-1.114,6.341-0.845,12.525,0.861,18.65c2.313,8.318,4.72,16.613,7.291,24.859c0.461,1.48,1.71,2.896,2.946,3.916
|
||||||
|
c5.3,4.382,10.735,8.605,16.108,12.897c0.355,0.281,0.645,0.656,0.914,1.028c2.652,3.672,6.373,5.879,10.677,6.638
|
||||||
|
c8.262,1.457,16.275,4.117,24.664,4.929c1.363,0.131,2.742,0.453,4.035,0.906c2.362,0.828,4.696,1.733,7.038,2.623
|
||||||
|
c1.257,0.824,2.391,1.832,3.415,3.064c-0.698,2.239-1.901,4.234-3.199,6.164c-3.529,5.239-8.344,8.948-14.007,11.633
|
||||||
|
c-5.818,2.754-11.975,4.442-18.242,5.744c-8.115,1.686-16.259,3.231-24.378,4.88c-6.789,1.379-13.248,3.79-19.633,6.414
|
||||||
|
c-8.25,3.39-16.463,6.879-24.77,10.13c-6.447,2.525-13.158,4.149-20.086,4.68c-2.077,0.159-4.178,0.017-6.267,0.065
|
||||||
|
c-0.604,0.017-1.326,0.045-1.783,0.367c-3.46,2.437-7.446,3.407-11.481,4.272c-1.607,0.347-3.203,0.742-4.802,1.117
|
||||||
|
c-4.423,1.049-7.703,3.672-10.237,7.36c-2.481,3.619-3.827,7.691-4.762,11.914c-1.26,5.708-1.685,11.521-1.921,17.344
|
||||||
|
c-0.306,7.405-0.526,14.814-0.828,22.22c-0.082,2.023-0.367,4.035-0.486,6.059c-0.033,0.592,0.012,1.302,0.314,1.779
|
||||||
|
c3.525,5.654,7.299,11.126,12.276,15.643c4.251,3.859,8.993,6.769,14.819,7.557c0.171,0.024,0.326,0.175,0.485,0.265
|
||||||
|
c1.775,0,3.55,0,5.32,0c1.032-0.253,2.085-0.444,3.097-0.767c2.216-0.702,4.415-1.461,6.663-2.212
|
||||||
|
c-0.196-1.881-0.971-3.166-2.317-3.962c-1.236-0.734-2.595-1.301-3.958-1.771c-1.73-0.596-3.55-0.942-5.275-1.554
|
||||||
|
c-1.114-0.396-2.208-0.968-3.174-1.648c-1.367-0.968-1.979-2.424-2.052-4.097c0.069-0.102,0.118-0.257,0.212-0.298
|
||||||
|
c4.643-1.885,7.16-5.879,9.694-9.837c0.298-0.461,0.294-1.195,0.241-1.787c-0.445-4.696-1.775-9.184-3.354-13.599
|
||||||
|
c-1.75-4.884-3.595-9.73-5.333-14.614c-0.551-1.547-0.836-3.183-1.326-4.749c-0.318-1.017,0.11-1.543,0.938-1.971
|
||||||
|
c1.64-0.841,3.423-0.832,5.189-0.886c2.464-0.073,4.945,0.041,7.393-0.188c1.408-0.131,2.925-0.515,4.121-1.236
|
||||||
|
c13.692-8.303,28.474-14.003,43.791-18.413c13.876-3.998,27.997-6.915,42.244-9.229c6.247-1.012,12.501-1.967,18.76-2.897
|
||||||
|
c0.918-0.134,1.665-0.428,2.371-1.027c4.227-3.595,9.217-5.586,14.635-6.259c5.773-0.715,11.608-0.951,17.393-1.563
|
||||||
|
c3.578-0.379,7.161-0.905,10.678-1.656c4.308-0.918,8.045-3.129,11.146-6.205c2.688-2.669,5.132-5.59,7.593-8.482
|
||||||
|
c3.28-3.855,6.414-7.834,9.727-11.661c1.02-1.179,2.432-2.012,3.631-3.039c0.792-0.674,1.501-0.653,2.391-0.11
|
||||||
|
c4.125,2.529,8.576,4.32,13.199,5.712c5.716,1.722,11.566,2.75,17.495,3.374c10.983,1.159,22,1.204,33.023,0.906
|
||||||
|
c3.166-0.086,6.333-0.09,9.503-0.184c0.93-0.029,1.718,0.171,2.473,0.729c3.309,2.444,6.646,4.852,9.963,7.291
|
||||||
|
c3.117,2.293,6.345,4.402,9.927,5.92c0.641,0.273,1.277,0.612,1.95,0.735c2.758,0.497,4.741,2.235,6.744,4.002
|
||||||
|
c5.908,5.214,11.343,10.894,16.161,17.111c6.324,8.156,12.468,16.455,18.617,24.745c6.152,8.295,12.342,16.557,19.396,24.125
|
||||||
|
c6.863,7.36,14.423,13.868,23.122,18.984c0.775,0.457,1.432,0.955,1.844,1.815c3.187,6.655,8.475,11.09,15.076,14.093
|
||||||
|
c6.81,3.097,14.006,4.256,21.444,4.142c10.33-0.159,20.062-2.53,28.906-8.014c5.264-3.264,9.572-7.471,12.347-13.097
|
||||||
|
c1.15-2.338,2.109-4.737,2.269-7.385c0.016-0.29,0.212-0.571,0.326-0.853c0-0.633,0-1.27,0-1.901
|
||||||
|
c-3.488-0.6-6.802,0.208-10.045,1.362c-3.101,1.102-6.124,2.416-9.25,3.443c-2.692,0.886-5.442,1.673-8.225,2.195
|
||||||
|
c-4.554,0.853-8.042-1.113-10.037-5.41c0.804-1.049,1.995-1.195,3.194-1.253c2.338-0.113,4.685-0.143,7.022-0.302
|
||||||
|
c0.799-0.053,1.664-0.249,2.338-0.648c0.6-0.359,1.121-1.024,1.411-1.673c0.498-1.126,0.311-1.44-0.869-2.085
|
||||||
|
c-3.402-1.856-6.993-3.264-10.714-4.324c-8.421-2.399-17.055-3.028-25.757-3.061c-1.836-0.008-3.677-0.004-5.513,0.082
|
||||||
|
c-0.963,0.045-1.66-0.249-2.366-0.906c-4.843-4.5-9.094-9.53-13.166-14.721c-6.613-8.429-12.48-17.389-18.47-26.259
|
||||||
|
c-2.836-4.198-5.786-8.319-8.769-12.411c-0.999-1.375-2.244-2.574-3.419-3.811c-0.384-0.404-0.885-0.727-1.383-0.991
|
||||||
|
c-1.358-0.727-2.269-0.408-2.905,1.003c-0.229,0.511-0.379,1.062-0.648,1.828c-0.633-0.465-1.179-0.841-1.697-1.253
|
||||||
|
c-5.03-4.019-8.866-9.058-11.905-14.655c-2.954-5.446-5.627-11.048-8.344-16.626c-2.607-5.353-5.092-10.767-8.438-15.712
|
||||||
|
c-1.521-2.248-3.317-4.312-4.9-6.523c-0.783-1.094-1.709-1.229-2.949-1.094c-5.324,0.579-10.625,0.494-15.843-0.894
|
||||||
|
c-2.591-0.689-5.035-1.718-7.1-3.488c-1.473-1.269-2.562-2.746-3.211-4.513c1.95-0.433,3.893-0.897,5.818-1.424
|
||||||
|
c6.459-1.767,12.926-2.469,19.552-2.081c7.964,0.466,15.92,1.159,23.892,1.437c2.853,0.098,5.966-0.172,8.557-1.244
|
||||||
|
c3.859-1.596,7.544-3.799,10.971-6.206c5.075-3.566,9.702-7.78,14.847-11.232c2.379-1.595,3.203-3.292,3.306-5.92
|
||||||
|
c0.134-3.509,1.9-4.781,5.3-4.149c0.6,0.114,1.203,0.253,1.787,0.44c3.852,1.229,7.633,1.028,11.489-0.163
|
||||||
|
c2.962-0.914,6.066-1.354,9.053-2.195c0.547-0.154,1.024-1.199,1.163-1.909c0.094-0.481-0.616-1.068-0.693-1.648
|
||||||
|
c-0.127-0.922-0.384-2.402,0.057-2.705c0.854-0.575,2.154-0.656,3.265-0.636c0.881,0.016,1.733,0.62,2.627,0.729
|
||||||
|
c2.064,0.258,3.995,0.021,5.247-1.986c1.232-1.971,1.277-3.864-0.163-5.757c-0.465-0.608-1.069-1.249-1.191-1.946
|
||||||
|
c-0.163-0.938-0.273-2.199,0.212-2.881c1.779-2.488,3.771-4.83,5.77-7.152c1.828-2.121,4.251-3.354,6.997-3.541
|
||||||
|
c0.967-0.065,2.158,0.742,2.966,1.465c0.633,0.562,0.686,1.729,1.261,2.407c0.674,0.795,1.628,1.347,2.465,2.007
|
||||||
|
c0.571-0.877,1.358-1.688,1.656-2.651c0.311-0.992-0.028-2.175,0.236-3.187c0.213-0.812,0.743-1.738,1.416-2.195
|
||||||
|
c3.591-2.439,7.442-4.524,10.861-7.177c2.574-1.991,4.508-4.786,6.944-6.98c4.182-3.771,9.526-5.097,14.789-6.472
|
||||||
|
c3.452-0.901,4.194-1.921,3.134-5.365c-0.514-1.673-1.228-3.309-2.052-4.854c-1.062-1.987-0.531-3.362,1.297-4.402
|
||||||
|
c0.727-0.412,1.498-0.751,2.252-1.114c2.387-1.139,4.08-2.701,4.688-5.521c0.612-2.827,1.75-5.549,2.741-8.286
|
||||||
|
c1.339-3.692,2.432-7.65,7.34-8.144c0.147-0.017,0.294-0.061,0.441-0.094c0-1.077,0-2.15,0-3.228
|
||||||
|
c-1.135-1.775-2.15-3.639-3.432-5.3C536.084,271.981,534.492,270.614,533.187,269.019z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 9.3 KiB |
@@ -5,8 +5,12 @@ import Alpine from 'alpinejs'
|
|||||||
import collapse from '@alpinejs/collapse'
|
import collapse from '@alpinejs/collapse'
|
||||||
import intersect from '@alpinejs/intersect'
|
import intersect from '@alpinejs/intersect'
|
||||||
import focus from '@alpinejs/focus'
|
import focus from '@alpinejs/focus'
|
||||||
|
import NDK, { NDKNip07Signer, NDKEvent } from "@nostr-dev-kit/ndk"
|
||||||
|
|
||||||
window.Alpine = Alpine
|
window.Alpine = Alpine
|
||||||
|
window.NDK = NDK
|
||||||
|
window.NDKNip07Signer = NDKNip07Signer
|
||||||
|
window.NDKEvent = NDKEvent
|
||||||
|
|
||||||
Alpine.plugin(collapse)
|
Alpine.plugin(collapse)
|
||||||
Alpine.plugin(intersect)
|
Alpine.plugin(intersect)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex items-center justify-left mt-4">
|
<div class="flex items-center justify-left mt-4">
|
||||||
<x-button href="{{ route('auth.ln') }}" primary icon="lightning-bolt">LNURL-Auth</x-button>
|
<x-button href="{{ route('auth.login') }}" primary icon="lightning-bolt">LNURL-Auth</x-button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</x-jet-authentication-card>
|
</x-jet-authentication-card>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</div>--}}
|
</div>--}}
|
||||||
|
|
||||||
<div class="flex items-center justify-left mt-4">
|
<div class="flex items-center justify-left mt-4">
|
||||||
<x-button href="{{ route('auth.ln') }}" primary icon="lightning-bolt">LNURL-Auth</x-button>
|
<x-button href="{{ route('auth.login') }}" primary icon="lightning-bolt">Login</x-button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</x-jet-authentication-card>
|
</x-jet-authentication-card>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(app()->environment('local'))
|
@if(false && app()->environment('local'))
|
||||||
<div class="flex items-center justify-end mt-4">
|
<div class="flex items-center justify-end mt-4">
|
||||||
|
|
||||||
<x-button icon="login" secondary class="ml-4" wire:click="switchToEmailLogin">
|
<x-button icon="login" secondary class="ml-4" wire:click="switchToEmailLogin">
|
||||||
@@ -100,6 +100,13 @@
|
|||||||
style="text-decoration: none; list-style: outside;"
|
style="text-decoration: none; list-style: outside;"
|
||||||
>Balance of Satoshis</a
|
>Balance of Satoshis</a
|
||||||
>,
|
>,
|
||||||
|
<a
|
||||||
|
target="_blank"
|
||||||
|
href="https://www.walletofsatoshi.com/"
|
||||||
|
class="leading-6 text-blue-400 bg-transparent cursor-pointer"
|
||||||
|
style="text-decoration: none; list-style: outside;"
|
||||||
|
>Wallet of Satoshi</a
|
||||||
|
>,
|
||||||
<a
|
<a
|
||||||
target="_blank" href="https://blixtwallet.github.io"
|
target="_blank" href="https://blixtwallet.github.io"
|
||||||
class="leading-6 text-blue-400 bg-transparent cursor-pointer"
|
class="leading-6 text-blue-400 bg-transparent cursor-pointer"
|
||||||
@@ -208,12 +215,6 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pt-12">
|
|
||||||
<p class="text-xs">{{ __('Zeus bug:') }} <a target="_blank"
|
|
||||||
href="https://github.com/ZeusLN/zeus/issues/1045">https://github.com/ZeusLN/zeus/issues/1045</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div wire:poll="checkAuth" wire:key="checkAuth"></div>
|
<div wire:poll="checkAuth" wire:key="checkAuth"></div>
|
||||||
</x-jet-authentication-card>
|
</x-jet-authentication-card>
|
||||||
|
|||||||
52
resources/views/livewire/auth/login-with-n-d-k.blade.php
Normal file
52
resources/views/livewire/auth/login-with-n-d-k.blade.php
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<x-jet-authentication-card>
|
||||||
|
|
||||||
|
<x-slot name="logo">
|
||||||
|
<x-jet-authentication-card-logo/>
|
||||||
|
</x-slot>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div
|
||||||
|
wire:ignore
|
||||||
|
x-data="{
|
||||||
|
userProfile: @entangle('userProfile'),
|
||||||
|
init() {
|
||||||
|
const nip07signer = new window.NDKNip07Signer();
|
||||||
|
const ndk = new window.NDK({
|
||||||
|
explicitRelayUrls: ['wss://nostr.codingarena.de'],
|
||||||
|
signer: nip07signer
|
||||||
|
});
|
||||||
|
|
||||||
|
ndk.connect();
|
||||||
|
},
|
||||||
|
login() {
|
||||||
|
nip07signer.user().then(async (user) => {
|
||||||
|
if (!!user.npub) {
|
||||||
|
console.log('user pub: ' + user.npub);
|
||||||
|
const ndkUser = ndk.getUser({
|
||||||
|
npub: user.npub,
|
||||||
|
});
|
||||||
|
await ndkUser.fetchProfile();
|
||||||
|
console.log(ndkUser);
|
||||||
|
this.userProfile = ndkUser.profile;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div class="space-y-6" x-init="init()">
|
||||||
|
<x-button x-show="!userProfile.npub" primary label="NIP-07 Login" icon="login" @click="login()"/>
|
||||||
|
<p x-text="userProfile.npub"></p>
|
||||||
|
<p x-text="userProfile.about"></p>
|
||||||
|
<img :src="userProfile.image" alt="image"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if($existingAccount)
|
||||||
|
<div class="mt-12 text-red-500 space-y-6">
|
||||||
|
<p>Es existiert ein Account mit dem npub {{ $userProfile['npub'] }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</x-jet-authentication-card>
|
||||||
141
resources/views/livewire/auth/login.blade.php
Normal file
141
resources/views/livewire/auth/login.blade.php
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<x-jet-authentication-card>
|
||||||
|
<x-slot name="logo">
|
||||||
|
<x-jet-authentication-card-logo/>
|
||||||
|
</x-slot>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="flex justify-center space-x-4"
|
||||||
|
wire:ignore
|
||||||
|
x-data="{
|
||||||
|
userProfile: @entangle('userProfile'),
|
||||||
|
ndk: null,
|
||||||
|
nip07signer: null,
|
||||||
|
init() {
|
||||||
|
this.nip07signer = new window.NDKNip07Signer();
|
||||||
|
this.ndk = new window.NDK({
|
||||||
|
explicitRelayUrls: ['wss://nos.lol', 'wss://eden.nostr.land', 'wss://relay.damus.io', 'wss://nostr.einundzwanzig.space'],
|
||||||
|
signer: this.nip07signer
|
||||||
|
});
|
||||||
|
|
||||||
|
this.ndk.connect();
|
||||||
|
},
|
||||||
|
login() {
|
||||||
|
this.nip07signer.user().then(async (user) => {
|
||||||
|
if (!!user.npub) {
|
||||||
|
console.log('user pub: ' + user.npub);
|
||||||
|
const ndkUser = this.ndk.getUser({
|
||||||
|
npub: user.npub,
|
||||||
|
});
|
||||||
|
await ndkUser.fetchProfile();
|
||||||
|
console.log(ndkUser);
|
||||||
|
this.userProfile = ndkUser.profile;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
|
||||||
|
<x-button lg primary @click="login()">
|
||||||
|
<svg class="svg-inline--fa mr-2" fill="#ffffff" version="1.1" id="nostr" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
height="20px" viewBox="0 0 571.004 571.004"
|
||||||
|
xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<path d="M533.187,269.019c-1.432-1.746-2.219-3.876-1.252-5.993c1.868-4.08,0.611-7.658-0.931-11.465
|
||||||
|
c-0.877-2.167-0.796-4.716-1.15-7.095c-0.221-1.493-0.057-3.199-0.742-4.435c-1.775-3.199-3.812-6.275-5.949-9.245
|
||||||
|
c-2.681-3.717-5.564-7.291-8.38-10.914c-3.325-4.284-6.581-8.633-10.09-12.766c-0.706-0.833-2.604-1.42-3.607-1.085
|
||||||
|
c-2.411,0.808-4.732,2.052-6.874,3.452c-2.771,1.812-5.435,3.317-8.928,3.713c-3.953,0.453-8.062,1.403-11.604,3.154
|
||||||
|
c-5.189,2.562-9.747,6.401-14.924,9c-4.913,2.464-8.328,6.112-11.184,10.567c-0.783,1.22-1.705,2.371-2.685,3.444
|
||||||
|
c-3.252,3.574-5.549,7.629-7.051,12.248c-1.154,3.554-2.378,7.226-4.373,10.322c-1.963,3.044-3.256,6.194-4.162,9.601
|
||||||
|
c-0.285,1.065-0.44,2.167-0.656,3.251c-2.212-0.539-4.19-0.873-6.06-1.518c-1.709-0.592-3.684-1.15-4.879-2.375
|
||||||
|
c-2.979-3.052-6.528-5.059-10.388-6.577c-3.448-1.354-6.581-3.06-9.441-5.496c-1.514-1.29-3.771-1.738-5.721-2.489
|
||||||
|
c-1.419-0.547-3.043-0.714-4.3-1.501c-3.439-2.146-6.639-4.68-10.11-6.765c-2.256-1.359-4.737-2.542-7.271-3.166
|
||||||
|
c-1.722-0.424-2.293-0.865-2.216-2.599c0.241-5.227-0.832-10.175-3.235-14.872c-2.855-5.582-8.723-8.625-14.777-7.589
|
||||||
|
c-2.697,0.461-5.573,1.347-8.128,0.833c-3.329-0.669-6.516-2-10.028-1.861c-0.612,0.025-1.31-0.437-1.864-0.82
|
||||||
|
c-4.076-2.832-8.152-5.663-12.163-8.584c-1.489-1.085-2.782-1.154-4.442-0.322c-1.221,0.612-2.705,0.955-4.08,0.967
|
||||||
|
c-6.047,0.062-12.098-0.082-18.148-0.077c-5.173,0.004-10.498,1.815-15.377-1.399c-0.241-0.159-0.588-0.216-0.886-0.221
|
||||||
|
c-3.023-0.028-4.488-1.632-5.096-4.524c-0.171-0.82-1.436-1.971-2.236-2c-3.986-0.143-7.984-0.041-11.971,0.139
|
||||||
|
c-2.187,0.102-4.619,0.004-6.483,0.922c-3.941,1.942-7.556,4.533-11.355,6.773c-1.505,0.889-3.023,1.085-3.872-0.763
|
||||||
|
c0.979-1.261,2.337-2.272,2.627-3.525c0.771-3.37-3.705-7.181-6.969-6.059c-1.498,0.514-3.003,1.208-4.272,2.138
|
||||||
|
c-2.464,1.807-4.725,3.896-7.144,5.769c-3.011,2.33-6.055,4.655-10.449,4.737c0.983-3.753-1.718-5.104-4.108-6.597
|
||||||
|
c-1.094-0.686-2.293-1.281-3.525-1.652c-3.276-1-6.348-0.763-8.956,1.828c-2.158,2.142-3.488,2.179-6.014,0.367
|
||||||
|
c-3.081-2.208-3.986-2.175-7.128,0c-1.122,0.775-2.346,1.832-3.586,1.926c-4.268,0.318-6.646,3.052-8.931,6.132
|
||||||
|
c-1.632,2.203-3.244,4.472-5.173,6.405c-4.378,4.39-8.911,8.629-13.48,12.815c-0.608,0.559-1.95,0.873-2.709,0.608
|
||||||
|
c-3.378-1.191-5.582-3.823-6.899-7.001c-2.521-6.075-4.957-12.203-7.07-18.429c-0.816-2.399-1.11-5.165-0.865-7.687
|
||||||
|
c0.559-5.786,1.771-11.51,2.411-17.291c1.196-10.796,3.583-21.343,7.405-31.445c6.773-17.891,13.934-35.643,21.2-53.342
|
||||||
|
c4.619-11.249,7.817-22.852,10.167-34.75c1.644-8.319,2.477-16.63,1.901-25.137c-0.286-4.227,0.232-8.56,0.808-12.787
|
||||||
|
c1.669-12.232-2.46-19.547-13.843-24.068c-1.403-0.559-2.766-1.228-4.149-1.844c-2.15,0-4.3,0-6.455,0
|
||||||
|
c-2.909,0.91-5.871,1.681-8.715,2.762c-3.827,1.457-7.989,2.484-10.51,6.145c-1.701,2.472-4.088,3.5-6.916,4.06
|
||||||
|
c-3.9,0.771-7.797,1.62-11.62,2.705c-3.378,0.959-6.369,2.709-9.135,5.872c6.863,1.652,13.211,3.305,19.617,4.692
|
||||||
|
c7.629,1.652,14.558,4.729,20.518,9.763c2.954,2.493,5.667,5.447,6.165,9.425c0.51,4.084,0.608,8.271,0.392,12.383
|
||||||
|
c-0.563,10.694-4.137,20.661-7.976,30.515c-2.358,6.059-5.406,11.876-7.36,18.054c-4.321,13.656-8.486,27.348-14.19,40.522
|
||||||
|
c-3.309,7.646-6.83,15.251-8.307,23.534c-1.722,9.657-3.264,19.343-4.917,29.013c-0.845,4.958-0.877,10.049-2.864,14.819
|
||||||
|
c-0.873,2.093-1.269,4.406-1.693,6.654c-0.975,5.182-1.832,10.379-2.733,15.573c0,7.838,0,15.675,0,23.513
|
||||||
|
c0.632,3.905,1.363,7.801,1.877,11.722c1.481,11.232,4.773,21.955,8.825,32.489c0.816,2.121,1.322,4.378,1.783,6.613
|
||||||
|
c0.718,3.473,1.069,7.365,4.309,9.303c2.427,1.452,2.982,3.402,3.603,5.671c1.828,6.684,1.318,13.428,0.147,20.086
|
||||||
|
c-1.114,6.341-0.845,12.525,0.861,18.65c2.313,8.318,4.72,16.613,7.291,24.859c0.461,1.48,1.71,2.896,2.946,3.916
|
||||||
|
c5.3,4.382,10.735,8.605,16.108,12.897c0.355,0.281,0.645,0.656,0.914,1.028c2.652,3.672,6.373,5.879,10.677,6.638
|
||||||
|
c8.262,1.457,16.275,4.117,24.664,4.929c1.363,0.131,2.742,0.453,4.035,0.906c2.362,0.828,4.696,1.733,7.038,2.623
|
||||||
|
c1.257,0.824,2.391,1.832,3.415,3.064c-0.698,2.239-1.901,4.234-3.199,6.164c-3.529,5.239-8.344,8.948-14.007,11.633
|
||||||
|
c-5.818,2.754-11.975,4.442-18.242,5.744c-8.115,1.686-16.259,3.231-24.378,4.88c-6.789,1.379-13.248,3.79-19.633,6.414
|
||||||
|
c-8.25,3.39-16.463,6.879-24.77,10.13c-6.447,2.525-13.158,4.149-20.086,4.68c-2.077,0.159-4.178,0.017-6.267,0.065
|
||||||
|
c-0.604,0.017-1.326,0.045-1.783,0.367c-3.46,2.437-7.446,3.407-11.481,4.272c-1.607,0.347-3.203,0.742-4.802,1.117
|
||||||
|
c-4.423,1.049-7.703,3.672-10.237,7.36c-2.481,3.619-3.827,7.691-4.762,11.914c-1.26,5.708-1.685,11.521-1.921,17.344
|
||||||
|
c-0.306,7.405-0.526,14.814-0.828,22.22c-0.082,2.023-0.367,4.035-0.486,6.059c-0.033,0.592,0.012,1.302,0.314,1.779
|
||||||
|
c3.525,5.654,7.299,11.126,12.276,15.643c4.251,3.859,8.993,6.769,14.819,7.557c0.171,0.024,0.326,0.175,0.485,0.265
|
||||||
|
c1.775,0,3.55,0,5.32,0c1.032-0.253,2.085-0.444,3.097-0.767c2.216-0.702,4.415-1.461,6.663-2.212
|
||||||
|
c-0.196-1.881-0.971-3.166-2.317-3.962c-1.236-0.734-2.595-1.301-3.958-1.771c-1.73-0.596-3.55-0.942-5.275-1.554
|
||||||
|
c-1.114-0.396-2.208-0.968-3.174-1.648c-1.367-0.968-1.979-2.424-2.052-4.097c0.069-0.102,0.118-0.257,0.212-0.298
|
||||||
|
c4.643-1.885,7.16-5.879,9.694-9.837c0.298-0.461,0.294-1.195,0.241-1.787c-0.445-4.696-1.775-9.184-3.354-13.599
|
||||||
|
c-1.75-4.884-3.595-9.73-5.333-14.614c-0.551-1.547-0.836-3.183-1.326-4.749c-0.318-1.017,0.11-1.543,0.938-1.971
|
||||||
|
c1.64-0.841,3.423-0.832,5.189-0.886c2.464-0.073,4.945,0.041,7.393-0.188c1.408-0.131,2.925-0.515,4.121-1.236
|
||||||
|
c13.692-8.303,28.474-14.003,43.791-18.413c13.876-3.998,27.997-6.915,42.244-9.229c6.247-1.012,12.501-1.967,18.76-2.897
|
||||||
|
c0.918-0.134,1.665-0.428,2.371-1.027c4.227-3.595,9.217-5.586,14.635-6.259c5.773-0.715,11.608-0.951,17.393-1.563
|
||||||
|
c3.578-0.379,7.161-0.905,10.678-1.656c4.308-0.918,8.045-3.129,11.146-6.205c2.688-2.669,5.132-5.59,7.593-8.482
|
||||||
|
c3.28-3.855,6.414-7.834,9.727-11.661c1.02-1.179,2.432-2.012,3.631-3.039c0.792-0.674,1.501-0.653,2.391-0.11
|
||||||
|
c4.125,2.529,8.576,4.32,13.199,5.712c5.716,1.722,11.566,2.75,17.495,3.374c10.983,1.159,22,1.204,33.023,0.906
|
||||||
|
c3.166-0.086,6.333-0.09,9.503-0.184c0.93-0.029,1.718,0.171,2.473,0.729c3.309,2.444,6.646,4.852,9.963,7.291
|
||||||
|
c3.117,2.293,6.345,4.402,9.927,5.92c0.641,0.273,1.277,0.612,1.95,0.735c2.758,0.497,4.741,2.235,6.744,4.002
|
||||||
|
c5.908,5.214,11.343,10.894,16.161,17.111c6.324,8.156,12.468,16.455,18.617,24.745c6.152,8.295,12.342,16.557,19.396,24.125
|
||||||
|
c6.863,7.36,14.423,13.868,23.122,18.984c0.775,0.457,1.432,0.955,1.844,1.815c3.187,6.655,8.475,11.09,15.076,14.093
|
||||||
|
c6.81,3.097,14.006,4.256,21.444,4.142c10.33-0.159,20.062-2.53,28.906-8.014c5.264-3.264,9.572-7.471,12.347-13.097
|
||||||
|
c1.15-2.338,2.109-4.737,2.269-7.385c0.016-0.29,0.212-0.571,0.326-0.853c0-0.633,0-1.27,0-1.901
|
||||||
|
c-3.488-0.6-6.802,0.208-10.045,1.362c-3.101,1.102-6.124,2.416-9.25,3.443c-2.692,0.886-5.442,1.673-8.225,2.195
|
||||||
|
c-4.554,0.853-8.042-1.113-10.037-5.41c0.804-1.049,1.995-1.195,3.194-1.253c2.338-0.113,4.685-0.143,7.022-0.302
|
||||||
|
c0.799-0.053,1.664-0.249,2.338-0.648c0.6-0.359,1.121-1.024,1.411-1.673c0.498-1.126,0.311-1.44-0.869-2.085
|
||||||
|
c-3.402-1.856-6.993-3.264-10.714-4.324c-8.421-2.399-17.055-3.028-25.757-3.061c-1.836-0.008-3.677-0.004-5.513,0.082
|
||||||
|
c-0.963,0.045-1.66-0.249-2.366-0.906c-4.843-4.5-9.094-9.53-13.166-14.721c-6.613-8.429-12.48-17.389-18.47-26.259
|
||||||
|
c-2.836-4.198-5.786-8.319-8.769-12.411c-0.999-1.375-2.244-2.574-3.419-3.811c-0.384-0.404-0.885-0.727-1.383-0.991
|
||||||
|
c-1.358-0.727-2.269-0.408-2.905,1.003c-0.229,0.511-0.379,1.062-0.648,1.828c-0.633-0.465-1.179-0.841-1.697-1.253
|
||||||
|
c-5.03-4.019-8.866-9.058-11.905-14.655c-2.954-5.446-5.627-11.048-8.344-16.626c-2.607-5.353-5.092-10.767-8.438-15.712
|
||||||
|
c-1.521-2.248-3.317-4.312-4.9-6.523c-0.783-1.094-1.709-1.229-2.949-1.094c-5.324,0.579-10.625,0.494-15.843-0.894
|
||||||
|
c-2.591-0.689-5.035-1.718-7.1-3.488c-1.473-1.269-2.562-2.746-3.211-4.513c1.95-0.433,3.893-0.897,5.818-1.424
|
||||||
|
c6.459-1.767,12.926-2.469,19.552-2.081c7.964,0.466,15.92,1.159,23.892,1.437c2.853,0.098,5.966-0.172,8.557-1.244
|
||||||
|
c3.859-1.596,7.544-3.799,10.971-6.206c5.075-3.566,9.702-7.78,14.847-11.232c2.379-1.595,3.203-3.292,3.306-5.92
|
||||||
|
c0.134-3.509,1.9-4.781,5.3-4.149c0.6,0.114,1.203,0.253,1.787,0.44c3.852,1.229,7.633,1.028,11.489-0.163
|
||||||
|
c2.962-0.914,6.066-1.354,9.053-2.195c0.547-0.154,1.024-1.199,1.163-1.909c0.094-0.481-0.616-1.068-0.693-1.648
|
||||||
|
c-0.127-0.922-0.384-2.402,0.057-2.705c0.854-0.575,2.154-0.656,3.265-0.636c0.881,0.016,1.733,0.62,2.627,0.729
|
||||||
|
c2.064,0.258,3.995,0.021,5.247-1.986c1.232-1.971,1.277-3.864-0.163-5.757c-0.465-0.608-1.069-1.249-1.191-1.946
|
||||||
|
c-0.163-0.938-0.273-2.199,0.212-2.881c1.779-2.488,3.771-4.83,5.77-7.152c1.828-2.121,4.251-3.354,6.997-3.541
|
||||||
|
c0.967-0.065,2.158,0.742,2.966,1.465c0.633,0.562,0.686,1.729,1.261,2.407c0.674,0.795,1.628,1.347,2.465,2.007
|
||||||
|
c0.571-0.877,1.358-1.688,1.656-2.651c0.311-0.992-0.028-2.175,0.236-3.187c0.213-0.812,0.743-1.738,1.416-2.195
|
||||||
|
c3.591-2.439,7.442-4.524,10.861-7.177c2.574-1.991,4.508-4.786,6.944-6.98c4.182-3.771,9.526-5.097,14.789-6.472
|
||||||
|
c3.452-0.901,4.194-1.921,3.134-5.365c-0.514-1.673-1.228-3.309-2.052-4.854c-1.062-1.987-0.531-3.362,1.297-4.402
|
||||||
|
c0.727-0.412,1.498-0.751,2.252-1.114c2.387-1.139,4.08-2.701,4.688-5.521c0.612-2.827,1.75-5.549,2.741-8.286
|
||||||
|
c1.339-3.692,2.432-7.65,7.34-8.144c0.147-0.017,0.294-0.061,0.441-0.094c0-1.077,0-2.15,0-3.228
|
||||||
|
c-1.135-1.775-2.15-3.639-3.432-5.3C536.084,271.981,534.492,270.614,533.187,269.019z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
Nostr NIP-07
|
||||||
|
</x-button>
|
||||||
|
|
||||||
|
<x-button
|
||||||
|
:href="route('auth.ln')"
|
||||||
|
lg primary>
|
||||||
|
<i class="fa-thin fa-bolt-lightning mr-2"></i>
|
||||||
|
LNURL-auth
|
||||||
|
</x-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</x-jet-authentication-card>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="hidden lg:flex lg:flex-1 lg:justify-end">
|
<div class="hidden lg:flex lg:flex-1 lg:justify-end">
|
||||||
@if(!auth()->check())
|
@if(!auth()->check())
|
||||||
<a href="{{ route('auth.ln') }}" class="text-sm font-semibold leading-6 text-gray-900">Log in <span
|
<a href="{{ route('auth.login') }}" class="text-sm font-semibold leading-6 text-gray-900">Log in <span
|
||||||
aria-hidden="true">→</span></a>
|
aria-hidden="true">→</span></a>
|
||||||
@else
|
@else
|
||||||
<form method="POST" action="{{ route('logout') }}" class="inline">
|
<form method="POST" action="{{ route('logout') }}" class="inline">
|
||||||
@@ -91,9 +91,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="py-6">
|
<div class="py-6">
|
||||||
@if(!auth()->check())
|
@if(!auth()->check())
|
||||||
<a href="{{ route('auth.ln') }}"
|
<a href="{{ route('auth.login') }}"
|
||||||
class="-mx-3 block rounded-lg py-2.5 px-3 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50">Log
|
class="-mx-3 block rounded-lg py-2.5 px-3 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50">
|
||||||
in</a>
|
Log in</a>
|
||||||
@else
|
@else
|
||||||
<form method="POST" action="{{ route('logout') }}" class="inline">
|
<form method="POST" action="{{ route('logout') }}" class="inline">
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="py-2 sm:py-0">
|
<div class="py-2 sm:py-0">
|
||||||
@if(!auth()->check())
|
@if(!auth()->check())
|
||||||
<x-button secondary href="{{ route('auth.ln') }}">
|
<x-button secondary href="{{ route('auth.login') }}">
|
||||||
<i class="fa-thin fa-sign-in"></i>
|
<i class="fa-thin fa-sign-in"></i>
|
||||||
{{ __('Login') }}
|
{{ __('Login') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
<li>{{ __('Log in so that you can edit your participation at any time.') }}</li>
|
<li>{{ __('Log in so that you can edit your participation at any time.') }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="w-full flex justify-end">
|
<div class="w-full flex justify-end">
|
||||||
<x-button xs secondary :href="route('auth.ln')">
|
<x-button xs secondary :href="route('auth.login')">
|
||||||
<i class="fa fa-thin fa-sign-in"></i>
|
<i class="fa fa-thin fa-sign-in"></i>
|
||||||
{{ __('Login') }}
|
{{ __('Login') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
<li>{{ __('Log in so that you can edit your participation at any time.') }}</li>
|
<li>{{ __('Log in so that you can edit your participation at any time.') }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="w-full flex justify-end">
|
<div class="w-full flex justify-end">
|
||||||
<x-button xs secondary :href="route('auth.ln')">
|
<x-button xs secondary :href="route('auth.login')">
|
||||||
<i class="fa fa-thin fa-sign-in"></i>
|
<i class="fa fa-thin fa-sign-in"></i>
|
||||||
{{ __('Login') }}
|
{{ __('Login') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
|
|||||||
476
routes/web.php
476
routes/web.php
@@ -2,43 +2,40 @@
|
|||||||
|
|
||||||
use App\Http\Livewire\News\InternArticleView;
|
use App\Http\Livewire\News\InternArticleView;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Laravel\Socialite\Facades\Socialite;
|
|
||||||
use Illuminate\Support\Facades\Response;
|
use Illuminate\Support\Facades\Response;
|
||||||
|
use Laravel\Socialite\Facades\Socialite;
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/bsc', \App\Http\Livewire\Specials\BalticSeaCircle::class)
|
->get('/bsc', \App\Http\Livewire\Specials\BalticSeaCircle::class)
|
||||||
->name('specials.bsc');
|
->name('specials.bsc');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/', \App\Http\Livewire\Frontend\Welcome::class)
|
->get('/', \App\Http\Livewire\Frontend\Welcome::class)
|
||||||
->name('welcome');
|
->name('welcome');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/hello', \App\Http\Livewire\Hello::class)
|
->get('/hello', \App\Http\Livewire\Hello::class)
|
||||||
->name('hello');
|
->name('hello');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/kaninchenbau', \App\Http\Livewire\Helper\FollowTheRabbit::class)
|
->get('/kaninchenbau', \App\Http\Livewire\Helper\FollowTheRabbit::class)
|
||||||
->name('kaninchenbau');
|
->name('kaninchenbau');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/bindles', \App\Http\Livewire\Bindle\Gallery::class)
|
->get('/bindles', \App\Http\Livewire\Bindle\Gallery::class)
|
||||||
->name('bindles');
|
->name('bindles');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/buecherverleih', \App\Http\Livewire\BooksForPlebs\BookRentalGuide::class)
|
->get('/buecherverleih', \App\Http\Livewire\BooksForPlebs\BookRentalGuide::class)
|
||||||
->name('buecherverleih');
|
->name('buecherverleih');
|
||||||
|
|
||||||
Route::get('/img/{path}', \App\Http\Controllers\ImageController::class)
|
Route::get('/img/{path}', \App\Http\Controllers\ImageController::class)
|
||||||
->where('path', '.*')
|
->where('path', '.*')
|
||||||
->name('img');
|
->name('img');
|
||||||
|
|
||||||
Route::get('/img-public/{path}', \App\Http\Controllers\ImageController::class)
|
Route::get('/img-public/{path}', \App\Http\Controllers\ImageController::class)
|
||||||
->where('path', '.*')
|
->where('path', '.*')
|
||||||
->name('imgPublic');
|
->name('imgPublic');
|
||||||
|
|
||||||
Route::get('auth/auth47', \App\Http\Livewire\Auth\Auth47Component::class)
|
|
||||||
->name('auth.auth47');
|
|
||||||
|
|
||||||
Route::post('auth/auth47-callback', function (Request $request) {
|
Route::post('auth/auth47-callback', function (Request $request) {
|
||||||
$auth47Version = $request->auth47_response;
|
$auth47Version = $request->auth47_response;
|
||||||
@@ -46,15 +43,15 @@ Route::post('auth/auth47-callback', function (Request $request) {
|
|||||||
$signature = $request->signature;
|
$signature = $request->signature;
|
||||||
$nym = $request->nym;
|
$nym = $request->nym;
|
||||||
})
|
})
|
||||||
->name('auth.auth47.callback');
|
->name('auth.auth47.callback');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/news', \App\Http\Livewire\News\ArticleOverview::class)
|
->get('/news', \App\Http\Livewire\News\ArticleOverview::class)
|
||||||
->name('article.overview');
|
->name('article.overview');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/news/authors', \App\Http\Livewire\News\AuthorsOverview::class)
|
->get('/news/authors', \App\Http\Livewire\News\AuthorsOverview::class)
|
||||||
->name('authors.overview');
|
->name('authors.overview');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* News
|
* News
|
||||||
@@ -62,12 +59,12 @@ Route::middleware([])
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('news.')
|
->as('news.')
|
||||||
->prefix('/news')
|
->prefix('/news')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/{libraryItem?}', \App\Http\Livewire\News\Form\NewsArticleForm::class)
|
Route::get('/form/{libraryItem?}', \App\Http\Livewire\News\Form\NewsArticleForm::class)
|
||||||
->name('form');
|
->name('form');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exports
|
* Exports
|
||||||
@@ -75,13 +72,13 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('export.')
|
->as('export.')
|
||||||
->prefix('/export')
|
->prefix('/export')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/meetup-event/{meetupEvent}',
|
Route::get('/meetup-event/{meetupEvent}',
|
||||||
\App\Http\Controllers\Export\MeetupEventAttendeesExportController::class)
|
\App\Http\Controllers\Export\MeetupEventAttendeesExportController::class)
|
||||||
->name('meetupEvent');
|
->name('meetupEvent');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Content Creator
|
* Content Creator
|
||||||
@@ -89,12 +86,12 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('contentCreator.')
|
->as('contentCreator.')
|
||||||
->prefix('/content-creator')
|
->prefix('/content-creator')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/{lecturer?}', \App\Http\Livewire\ContentCreator\Form\ContentCreatorForm::class)
|
Route::get('/form/{lecturer?}', \App\Http\Livewire\ContentCreator\Form\ContentCreatorForm::class)
|
||||||
->name('form');
|
->name('form');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bitcoin Event
|
* Bitcoin Event
|
||||||
@@ -102,12 +99,12 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('bitcoinEvent.')
|
->as('bitcoinEvent.')
|
||||||
->prefix('/bitcoin-event')
|
->prefix('/bitcoin-event')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/{bitcoinEvent?}', \App\Http\Livewire\BitcoinEvent\Form\BitcoinEventForm::class)
|
Route::get('/form/{bitcoinEvent?}', \App\Http\Livewire\BitcoinEvent\Form\BitcoinEventForm::class)
|
||||||
->name('form');
|
->name('form');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Course
|
* Course
|
||||||
@@ -115,14 +112,14 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('course.')
|
->as('course.')
|
||||||
->prefix('/course')
|
->prefix('/course')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/course/{course?}', \App\Http\Livewire\School\Form\CourseForm::class)
|
Route::get('/form/course/{course?}', \App\Http\Livewire\School\Form\CourseForm::class)
|
||||||
->name('form.course');
|
->name('form.course');
|
||||||
Route::get('/form/course-event/{courseEvent?}', \App\Http\Livewire\School\Form\CourseEventForm::class)
|
Route::get('/form/course-event/{courseEvent?}', \App\Http\Livewire\School\Form\CourseEventForm::class)
|
||||||
->name('form.courseEvent');
|
->name('form.courseEvent');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Venue
|
* Venue
|
||||||
@@ -130,12 +127,12 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('venue.')
|
->as('venue.')
|
||||||
->prefix('/venue')
|
->prefix('/venue')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/{venue?}', \App\Http\Livewire\Venue\Form\VenueForm::class)
|
Route::get('/form/{venue?}', \App\Http\Livewire\Venue\Form\VenueForm::class)
|
||||||
->name('form');
|
->name('form');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cities
|
* Cities
|
||||||
@@ -143,226 +140,229 @@ Route::middleware([
|
|||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->as('city.')
|
->as('city.')
|
||||||
->prefix('/city')
|
->prefix('/city')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/form/{city?}', \App\Http\Livewire\City\Form\CityForm::class)
|
Route::get('/form/{city?}', \App\Http\Livewire\City\Form\CityForm::class)
|
||||||
->name('form');
|
->name('form');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/news/{libraryItem:slug}', InternArticleView::class)
|
->get('/news/{libraryItem:slug}', InternArticleView::class)
|
||||||
->name('article.view');
|
->name('article.view');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/library-item/{libraryItem:slug}', InternArticleView::class)
|
->get('/library-item/{libraryItem:slug}', InternArticleView::class)
|
||||||
->name('libraryItem.view');
|
->name('libraryItem.view');
|
||||||
|
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->get('/lecturer-material/{libraryItem:slug}', InternArticleView::class)
|
->get('/lecturer-material/{libraryItem:slug}', InternArticleView::class)
|
||||||
->name('lecturerMaterial.view');
|
->name('lecturerMaterial.view');
|
||||||
|
|
||||||
Route::get('/project/voting/{projectProposal:slug}', \App\Http\Livewire\ProjectProposal\ProjectProposalVoting::class)
|
Route::get('/project/voting/{projectProposal:slug}', \App\Http\Livewire\ProjectProposal\ProjectProposalVoting::class)
|
||||||
->name('voting.projectFunding')
|
->name('voting.projectFunding')
|
||||||
->middleware(['auth']);
|
->middleware(['auth']);
|
||||||
|
|
||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->get('/my-meetups', \App\Http\Livewire\Profile\Meetups::class)
|
->get('/my-meetups', \App\Http\Livewire\Profile\Meetups::class)
|
||||||
->name('profile.meetups');
|
->name('profile.meetups');
|
||||||
|
|
||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->get('/lnbits', \App\Http\Livewire\Profile\LNBits::class)
|
->get('/lnbits', \App\Http\Livewire\Profile\LNBits::class)
|
||||||
->name('profile.lnbits');
|
->name('profile.lnbits');
|
||||||
|
|
||||||
Route::middleware([
|
Route::middleware([
|
||||||
'auth',
|
'auth',
|
||||||
])
|
])
|
||||||
->get('/change-lightning-wallet', \App\Http\Livewire\Wallet\LightningWallet::class)
|
->get('/change-lightning-wallet', \App\Http\Livewire\Wallet\LightningWallet::class)
|
||||||
->name('profile.wallet');
|
->name('profile.wallet');
|
||||||
|
|
||||||
Route::get('/auth/ln', \App\Http\Livewire\Auth\LNUrlAuth::class)
|
Route::get('/auth/ln', \App\Http\Livewire\Auth\LNUrlAuth::class)
|
||||||
->name('auth.ln');
|
->name('auth.ln');
|
||||||
|
|
||||||
|
Route::get('/auth/login', \App\Http\Livewire\Auth\Login::class)
|
||||||
|
->name('auth.login');
|
||||||
|
|
||||||
Route::get('/auth/twitter', function () {
|
Route::get('/auth/twitter', function () {
|
||||||
return Socialite::driver('twitter')
|
return Socialite::driver('twitter')
|
||||||
->scopes([
|
->scopes([
|
||||||
'tweet.write',
|
'tweet.write',
|
||||||
'offline.access',
|
'offline.access',
|
||||||
])
|
])
|
||||||
->redirect();
|
->redirect();
|
||||||
})
|
})
|
||||||
->name('auth.twitter.redirect');
|
->name('auth.twitter.redirect');
|
||||||
|
|
||||||
Route::get('/auth/twitter/callback', function () {
|
Route::get('/auth/twitter/callback', function () {
|
||||||
$twitterUser = Socialite::driver('twitter')
|
$twitterUser = Socialite::driver('twitter')
|
||||||
->user();
|
->user();
|
||||||
$twitterAccount = \App\Models\TwitterAccount::updateOrCreate([
|
$twitterAccount = \App\Models\TwitterAccount::updateOrCreate([
|
||||||
'twitter_id' => $twitterUser->id,
|
'twitter_id' => $twitterUser->id,
|
||||||
], [
|
], [
|
||||||
'twitter_id' => $twitterUser->id,
|
'twitter_id' => $twitterUser->id,
|
||||||
'refresh_token' => $twitterUser->refreshToken,
|
'refresh_token' => $twitterUser->refreshToken,
|
||||||
'nickname' => $twitterUser->nickname,
|
'nickname' => $twitterUser->nickname,
|
||||||
'token' => $twitterUser->token,
|
'token' => $twitterUser->token,
|
||||||
'expires_in' => $twitterUser->expiresIn,
|
'expires_in' => $twitterUser->expiresIn,
|
||||||
'data' => [],
|
'data' => [],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
echo 'Twitter account updated. We can now tweet on: '.$twitterUser->name;
|
echo 'Twitter account updated. We can now tweet on: ' . $twitterUser->name;
|
||||||
exit;
|
exit;
|
||||||
})
|
})
|
||||||
->name('auth.twitter');
|
->name('auth.twitter');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* School
|
* School
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('school.')
|
->as('school.')
|
||||||
->prefix('/{country:code}/school')
|
->prefix('/{country:code}/school')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/city', \App\Http\Livewire\School\CityTable::class)
|
Route::get('/city', \App\Http\Livewire\School\CityTable::class)
|
||||||
->name('table.city');
|
->name('table.city');
|
||||||
|
|
||||||
Route::get('/lecturer', \App\Http\Livewire\School\LecturerTable::class)
|
Route::get('/lecturer', \App\Http\Livewire\School\LecturerTable::class)
|
||||||
->name('table.lecturer');
|
->name('table.lecturer');
|
||||||
|
|
||||||
Route::get('/venue', \App\Http\Livewire\School\VenueTable::class)
|
Route::get('/venue', \App\Http\Livewire\School\VenueTable::class)
|
||||||
->name('table.venue');
|
->name('table.venue');
|
||||||
|
|
||||||
Route::get('/course', \App\Http\Livewire\School\CourseTable::class)
|
Route::get('/course', \App\Http\Livewire\School\CourseTable::class)
|
||||||
->name('table.course');
|
->name('table.course');
|
||||||
|
|
||||||
Route::get('/event', \App\Http\Livewire\School\EventTable::class)
|
Route::get('/event', \App\Http\Livewire\School\EventTable::class)
|
||||||
->name('table.event');
|
->name('table.event');
|
||||||
|
|
||||||
Route::get('/{lecturer:slug}', \App\Http\Livewire\School\LecturerLandingPage::class)
|
Route::get('/{lecturer:slug}', \App\Http\Livewire\School\LecturerLandingPage::class)
|
||||||
->name('landingPage.lecturer');
|
->name('landingPage.lecturer');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Library
|
* Library
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('library.')
|
->as('library.')
|
||||||
->prefix('/{country:code}/library')
|
->prefix('/{country:code}/library')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/library-item/form/{libraryItem?}', \App\Http\Livewire\Library\Form\LibraryItemForm::class)
|
Route::get('/library-item/form/{libraryItem?}', \App\Http\Livewire\Library\Form\LibraryItemForm::class)
|
||||||
->name('libraryItem.form')
|
->name('libraryItem.form')
|
||||||
->middleware(['auth']);
|
->middleware(['auth']);
|
||||||
|
|
||||||
Route::get('/library-item', \App\Http\Livewire\Library\LibraryTable::class)
|
Route::get('/library-item', \App\Http\Livewire\Library\LibraryTable::class)
|
||||||
->name('table.libraryItems');
|
->name('table.libraryItems');
|
||||||
|
|
||||||
Route::get('/podcast-episodes', \App\Http\Livewire\Library\PodcastEpisodesTable::class)
|
Route::get('/podcast-episodes', \App\Http\Livewire\Library\PodcastEpisodesTable::class)
|
||||||
->name('table.podcastsEpisodes');
|
->name('table.podcastsEpisodes');
|
||||||
|
|
||||||
Route::get('/content-creator', \App\Http\Livewire\Library\LibraryTable::class)
|
Route::get('/content-creator', \App\Http\Livewire\Library\LibraryTable::class)
|
||||||
->name('table.lecturer');
|
->name('table.lecturer');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Project Funding
|
* Project Funding
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('project.')
|
->as('project.')
|
||||||
->prefix('/{country:code}/project-funding')
|
->prefix('/{country:code}/project-funding')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/project/form/{projectProposal?}',
|
Route::get('/project/form/{projectProposal?}',
|
||||||
\App\Http\Livewire\ProjectProposal\Form\ProjectProposalForm::class)
|
\App\Http\Livewire\ProjectProposal\Form\ProjectProposalForm::class)
|
||||||
->name('projectProposal.form')
|
->name('projectProposal.form')
|
||||||
->middleware(['auth']);
|
->middleware(['auth']);
|
||||||
|
|
||||||
Route::get('/projects', \App\Http\Livewire\ProjectProposal\ProjectProposalTable::class)
|
Route::get('/projects', \App\Http\Livewire\ProjectProposal\ProjectProposalTable::class)
|
||||||
->name('table.projectFunding');
|
->name('table.projectFunding');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Books
|
* Books
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('bookCases.')
|
->as('bookCases.')
|
||||||
->prefix('/{country:code}/book-cases')
|
->prefix('/{country:code}/book-cases')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/book-case/form/{bookCase}/{orangePill?}', \App\Http\Livewire\BookCase\Form\OrangePillForm::class)
|
Route::get('/book-case/form/{bookCase}/{orangePill?}', \App\Http\Livewire\BookCase\Form\OrangePillForm::class)
|
||||||
->name('form')
|
->name('form')
|
||||||
->middleware(['auth']);
|
->middleware(['auth']);
|
||||||
|
|
||||||
Route::get('/city', \App\Http\Livewire\BookCase\CityTable::class)
|
Route::get('/city', \App\Http\Livewire\BookCase\CityTable::class)
|
||||||
->name('table.city');
|
->name('table.city');
|
||||||
|
|
||||||
Route::get('/heatmap', \App\Http\Livewire\BookCase\Heatmap::class)
|
Route::get('/heatmap', \App\Http\Livewire\BookCase\Heatmap::class)
|
||||||
->name('heatmap');
|
->name('heatmap');
|
||||||
|
|
||||||
Route::get('/world-map', \App\Http\Livewire\BookCase\WorldMap::class)
|
Route::get('/world-map', \App\Http\Livewire\BookCase\WorldMap::class)
|
||||||
->name('world');
|
->name('world');
|
||||||
|
|
||||||
Route::get('/overview', \App\Http\Livewire\BookCase\BookCaseTable::class)
|
Route::get('/overview', \App\Http\Livewire\BookCase\BookCaseTable::class)
|
||||||
->name('table.bookcases');
|
->name('table.bookcases');
|
||||||
|
|
||||||
Route::get('/book-case/{bookCase}', \App\Http\Livewire\BookCase\CommentBookCase::class)
|
Route::get('/book-case/{bookCase}', \App\Http\Livewire\BookCase\CommentBookCase::class)
|
||||||
->name('comment.bookcase');
|
->name('comment.bookcase');
|
||||||
|
|
||||||
Route::get('/high-score-table', \App\Http\Livewire\BookCase\HighscoreTable::class)
|
Route::get('/high-score-table', \App\Http\Livewire\BookCase\HighscoreTable::class)
|
||||||
->name('highScoreTable');
|
->name('highScoreTable');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Events
|
* Events
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('bitcoinEvent.')
|
->as('bitcoinEvent.')
|
||||||
->prefix('/{country:code}/event')
|
->prefix('/{country:code}/event')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('stream-calendar', \App\Http\Controllers\DownloadBitcoinEventCalendar::class)
|
Route::get('stream-calendar', \App\Http\Controllers\DownloadBitcoinEventCalendar::class)
|
||||||
->name('ics');
|
->name('ics');
|
||||||
Route::get('overview', \App\Http\Livewire\BitcoinEvent\BitcoinEventTable::class)
|
Route::get('overview', \App\Http\Livewire\BitcoinEvent\BitcoinEventTable::class)
|
||||||
->name('table.bitcoinEvent');
|
->name('table.bitcoinEvent');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Meetups
|
* Meetups
|
||||||
* */
|
* */
|
||||||
Route::middleware([])
|
Route::middleware([])
|
||||||
->as('meetup.')
|
->as('meetup.')
|
||||||
->prefix('/{country:code}/meetup')
|
->prefix('/{country:code}/meetup')
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
|
Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class)
|
||||||
->name('ics');
|
->name('ics');
|
||||||
|
|
||||||
Route::get('world', \App\Http\Livewire\Meetup\WorldMap::class)
|
Route::get('world', \App\Http\Livewire\Meetup\WorldMap::class)
|
||||||
->name('world');
|
->name('world');
|
||||||
|
|
||||||
Route::get('overview', \App\Http\Livewire\Meetup\MeetupTable::class)
|
Route::get('overview', \App\Http\Livewire\Meetup\MeetupTable::class)
|
||||||
->name('table.meetup');
|
->name('table.meetup');
|
||||||
|
|
||||||
Route::get('embed', \App\Http\Livewire\Meetup\Embed\CountryMap::class)
|
Route::get('embed', \App\Http\Livewire\Meetup\Embed\CountryMap::class)
|
||||||
->name('embed.countryMap');
|
->name('embed.countryMap');
|
||||||
|
|
||||||
Route::get('/meetup/form/{meetup?}', \App\Http\Livewire\Meetup\Form\MeetupForm::class)
|
Route::get('/meetup/form/{meetup?}', \App\Http\Livewire\Meetup\Form\MeetupForm::class)
|
||||||
->name('meetup.form')
|
->name('meetup.form')
|
||||||
->middleware([
|
->middleware([
|
||||||
'auth',
|
'auth',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::get('/meetup-events/form/{meetupEvent?}', \App\Http\Livewire\Meetup\Form\MeetupEventForm::class)
|
Route::get('/meetup-events/form/{meetupEvent?}', \App\Http\Livewire\Meetup\Form\MeetupEventForm::class)
|
||||||
->name('event.form')
|
->name('event.form')
|
||||||
->middleware([
|
->middleware([
|
||||||
'auth',
|
'auth',
|
||||||
'needMeetup',
|
'needMeetup',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::get('/meetup-events/l/{meetupEvent}', \App\Http\Livewire\Meetup\LandingPageEvent::class)
|
Route::get('/meetup-events/l/{meetupEvent}', \App\Http\Livewire\Meetup\LandingPageEvent::class)
|
||||||
->name('event.landing');
|
->name('event.landing');
|
||||||
|
|
||||||
Route::get('/meetup-events', \App\Http\Livewire\Meetup\MeetupEventTable::class)
|
Route::get('/meetup-events', \App\Http\Livewire\Meetup\MeetupEventTable::class)
|
||||||
->name('table.meetupEvent');
|
->name('table.meetupEvent');
|
||||||
|
|
||||||
Route::get('/{meetup:slug}', \App\Http\Livewire\Meetup\LandingPage::class)
|
Route::get('/{meetup:slug}', \App\Http\Livewire\Meetup\LandingPage::class)
|
||||||
->name('landing');
|
->name('landing');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Authenticated
|
* Authenticated
|
||||||
@@ -371,69 +371,69 @@ Route::middleware([
|
|||||||
'auth:sanctum',
|
'auth:sanctum',
|
||||||
config('jetstream.auth_session'),
|
config('jetstream.auth_session'),
|
||||||
])
|
])
|
||||||
->group(function () {
|
->group(function () {
|
||||||
/*
|
/*
|
||||||
* Dashboard
|
* Dashboard
|
||||||
* */
|
* */
|
||||||
Route::get('/dashboard', function () {
|
Route::get('/dashboard', function () {
|
||||||
return view('dashboard');
|
return view('dashboard');
|
||||||
})
|
})
|
||||||
->name('dashboard');
|
->name('dashboard');
|
||||||
/*
|
/*
|
||||||
* Meetup OSM
|
* Meetup OSM
|
||||||
* */
|
* */
|
||||||
Route::get('/meetup-osm/table', \App\Http\Livewire\Meetup\PrepareForBtcMapTable::class)
|
Route::get('/meetup-osm/table', \App\Http\Livewire\Meetup\PrepareForBtcMapTable::class)
|
||||||
->name('osm.meetups');
|
->name('osm.meetups');
|
||||||
Route::get('/meetup-osm/item/{meetup}', \App\Http\Livewire\Meetup\PrepareForBtcMapItem::class)
|
Route::get('/meetup-osm/item/{meetup}', \App\Http\Livewire\Meetup\PrepareForBtcMapItem::class)
|
||||||
->name('osm.meetups.item');
|
->name('osm.meetups.item');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::feeds();
|
Route::feeds();
|
||||||
|
|
||||||
Route::get('/download', function () {
|
Route::get('/download', function () {
|
||||||
|
|
||||||
// Get the file path from the public folder
|
// Get the file path from the public folder
|
||||||
$filePath = public_path("buecherverleih.zip");
|
$filePath = public_path("buecherverleih.zip");
|
||||||
|
|
||||||
$filename = "buecherverleih.zip";
|
$filename = "buecherverleih.zip";
|
||||||
|
|
||||||
// Check if the file exists
|
// Check if the file exists
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a response with the file for download
|
// Generate a response with the file for download
|
||||||
return Response::download($filePath, $filename);
|
return Response::download($filePath, $filename);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/download-flyer', function () {
|
Route::get('/download-flyer', function () {
|
||||||
|
|
||||||
// Get the file path from the public folder
|
// Get the file path from the public folder
|
||||||
$filePath = public_path("flyer.zip");
|
$filePath = public_path("flyer.zip");
|
||||||
|
|
||||||
$filename = "flyer.zip";
|
$filename = "flyer.zip";
|
||||||
|
|
||||||
// Check if the file exists
|
// Check if the file exists
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a response with the file for download
|
// Generate a response with the file for download
|
||||||
return Response::download($filePath, $filename);
|
return Response::download($filePath, $filename);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/download-etiketten', function () {
|
Route::get('/download-etiketten', function () {
|
||||||
|
|
||||||
// Get the file path from the public folder
|
// Get the file path from the public folder
|
||||||
$filePath = public_path("etiketten.zip");
|
$filePath = public_path("etiketten.zip");
|
||||||
|
|
||||||
$filename = "etiketten.zip";
|
$filename = "etiketten.zip";
|
||||||
|
|
||||||
// Check if the file exists
|
// Check if the file exists
|
||||||
if (!file_exists($filePath)) {
|
if (!file_exists($filePath)) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a response with the file for download
|
// Generate a response with the file for download
|
||||||
return Response::download($filePath, $filename);
|
return Response::download($filePath, $filename);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user