mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-16 08:46:48 +00:00
🔄 chore(deps): update multiple dependencies in yarn.lock to latest versions for improved compatibility
This commit is contained in:
@@ -15,7 +15,7 @@ class SyncProfiles extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'sync:profiles';
|
protected $signature = 'sync:profiles {--all : Fetch all plebs}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@@ -29,11 +29,26 @@ class SyncProfiles extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$plebs = EinundzwanzigPleb::query()
|
$query = EinundzwanzigPleb::query();
|
||||||
->whereDoesntHave('profile')
|
|
||||||
->get();
|
if (!$this->option('all')) {
|
||||||
if ($plebs->count() > 0) {
|
$query->whereDoesntHave('profile');
|
||||||
|
}
|
||||||
|
|
||||||
|
$plebs = $query->get();
|
||||||
|
$count = $plebs->count();
|
||||||
|
|
||||||
|
$this->info("\n🔄 Syncing profiles...");
|
||||||
|
|
||||||
|
if ($count > 0) {
|
||||||
|
$bar = $this->output->createProgressBar($count);
|
||||||
|
$bar->start();
|
||||||
$this->fetchProfile($plebs->pluck('npub')->toArray());
|
$this->fetchProfile($plebs->pluck('npub')->toArray());
|
||||||
|
|
||||||
|
$bar->finish();
|
||||||
|
$this->info("\n✅ Successfully synced $count profiles!");
|
||||||
|
} else {
|
||||||
|
$this->info("⚡ No profiles to sync!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1089
composer.lock
generated
1089
composer.lock
generated
File diff suppressed because it is too large
Load Diff
124
resources/views/components/project-card.blade.php
Normal file
124
resources/views/components/project-card.blade.php
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
@props(['project', 'currentPleb', 'section' => 'all'])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$boardVotes = $project->votes->filter(function ($vote) {
|
||||||
|
return in_array($vote->einundzwanzigPleb->npub, config('einundzwanzig.config.current_board'));
|
||||||
|
});
|
||||||
|
$approveCount = $boardVotes->where('value', 1)->count();
|
||||||
|
$disapproveCount = $boardVotes->where('value', 0)->count();
|
||||||
|
|
||||||
|
$shouldDisplay = match($section) {
|
||||||
|
'all' => true,
|
||||||
|
'new' => $approveCount < 3,
|
||||||
|
'supported' => $project->sats_paid > 0,
|
||||||
|
'rejected' => $disapproveCount >= 3,
|
||||||
|
'approved' => ($approveCount === 3 || $disapproveCount !== 3),
|
||||||
|
default => true,
|
||||||
|
};
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if($shouldDisplay)
|
||||||
|
|
||||||
|
<article
|
||||||
|
wire:key="project_{{ $project->id }}"
|
||||||
|
class="flex bg-white dark:bg-gray-800 shadow-sm rounded-xl overflow-hidden">
|
||||||
|
<!-- Image -->
|
||||||
|
@if(!$project->sats_paid)
|
||||||
|
<a class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||||
|
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||||
|
<img class="absolute object-cover object-center w-full h-full"
|
||||||
|
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||||
|
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||||
|
<img class="rounded-full h-8 w-8"
|
||||||
|
src="{{ $project->einundzwanzigPleb->profile->picture ?? asset('einundzwanzig-alpha.jpg') }}"
|
||||||
|
alt="">
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<div
|
||||||
|
class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
||||||
|
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||||
|
<img class="absolute object-cover object-center w-full h-full"
|
||||||
|
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
||||||
|
<button class="absolute top-0 right-0 mt-4 mr-4">
|
||||||
|
<img class="rounded-full h-8 w-8"
|
||||||
|
src="{{ $project->einundzwanzigPleb->profile->picture ?? asset('einundzwanzig-alpha.jpg') }}"
|
||||||
|
alt="">
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<!-- Content -->
|
||||||
|
<div class="grow p-5 flex flex-col">
|
||||||
|
<div class="grow">
|
||||||
|
<div class="text-sm font-semibold text-amber-500 uppercase mb-2">
|
||||||
|
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}
|
||||||
|
</div>
|
||||||
|
<div class="inline-flex mb-2">
|
||||||
|
<h3 class="text-lg font-bold text-gray-800 dark:text-gray-100">
|
||||||
|
{{ $project->name }}
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="text-sm line-clamp-1 sm:line-clamp-3">
|
||||||
|
{!! strip_tags($project->description) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Footer -->
|
||||||
|
<div class="flex justify-between items-center mt-3">
|
||||||
|
<!-- Tag -->
|
||||||
|
<div
|
||||||
|
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||||
|
<span>{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
||||||
|
<a href="{{ $project->website }}" target="_blank">Webseite</a>
|
||||||
|
</div>
|
||||||
|
<!-- Avatars -->
|
||||||
|
@if($project->votes->where('value', true)->count() > 0)
|
||||||
|
<div class="hidden sm:flex items-center space-x-2">
|
||||||
|
<div class="text-xs font-medium text-gray-400 dark:text-gray-300 italic">
|
||||||
|
Anzahl der Unterstützer:
|
||||||
|
+{{ $project->votes->where('value', true)->count() }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="flex flex-col sm:flex-row justify-between items-center mt-3 space-y-2 sm:space-y-0">
|
||||||
|
@if(
|
||||||
|
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
||||||
|
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
|
||||||
|
)
|
||||||
|
<x-button
|
||||||
|
icon="trash"
|
||||||
|
xs
|
||||||
|
negative
|
||||||
|
wire:click="confirmDelete({{ $project->id }})"
|
||||||
|
label="Löschen"/>
|
||||||
|
<x-button
|
||||||
|
icon="pencil"
|
||||||
|
xs
|
||||||
|
secondary
|
||||||
|
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||||
|
label="Editieren"/>
|
||||||
|
@endif
|
||||||
|
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
|
||||||
|
<x-button
|
||||||
|
icon="folder-open"
|
||||||
|
xs
|
||||||
|
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||||
|
label="Öffnen"/>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="py-2">
|
||||||
|
@if($project->sats_paid)
|
||||||
|
<div
|
||||||
|
class="text-sm inline-flex font-medium bg-green-500/20 text-green-700 rounded-full text-center px-2.5 py-1">
|
||||||
|
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats
|
||||||
|
unterstützt
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
@endif
|
||||||
@@ -16,6 +16,7 @@ name('association.projectSupport');
|
|||||||
|
|
||||||
state([
|
state([
|
||||||
'search' => '',
|
'search' => '',
|
||||||
|
'activeFilter' => 'all',
|
||||||
'projects' => fn()
|
'projects' => fn()
|
||||||
=> \App\Models\ProjectProposal::query()
|
=> \App\Models\ProjectProposal::query()
|
||||||
->with([
|
->with([
|
||||||
@@ -29,6 +30,17 @@ state([
|
|||||||
'currentPleb' => null,
|
'currentPleb' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$projects = computed(function () {
|
||||||
|
return $this->projects
|
||||||
|
->when($this->search, function ($collection) {
|
||||||
|
return $collection->filter(function ($project) {
|
||||||
|
return str_contains(strtolower($project->name), strtolower($this->search)) ||
|
||||||
|
str_contains(strtolower($project->description), strtolower($this->search)) ||
|
||||||
|
str_contains(strtolower($project->einundzwanzigPleb->profile->name), strtolower($this->search));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
on([
|
on([
|
||||||
'nostrLoggedIn' => function ($pubkey) {
|
'nostrLoggedIn' => function ($pubkey) {
|
||||||
$this->currentPubkey = $pubkey;
|
$this->currentPubkey = $pubkey;
|
||||||
@@ -104,147 +116,42 @@ $delete = function ($id) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Filters -->
|
<!-- Filters -->
|
||||||
{{--<div class="mb-5">
|
<div class="mb-5">
|
||||||
<ul class="flex flex-wrap -m-1">
|
<ul class="flex flex-wrap -m-1">
|
||||||
<li class="m-1">
|
<li class="m-1">
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800 transition">View All</button>
|
<button wire:click="$set('activeFilter', 'all')"
|
||||||
|
class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border {{ $activeFilter === 'all' ? 'border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800' : 'border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400' }} transition">
|
||||||
|
Alle
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="m-1">
|
<li class="m-1">
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Online</button>
|
<button wire:click="$set('activeFilter', 'new')"
|
||||||
|
class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border {{ $activeFilter === 'new' ? 'border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800' : 'border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400' }} transition">
|
||||||
|
Neu
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="m-1">
|
<li class="m-1">
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Local</button>
|
<button wire:click="$set('activeFilter', 'supported')"
|
||||||
|
class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border {{ $activeFilter === 'supported' ? 'border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800' : 'border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400' }} transition">
|
||||||
|
Unterstützt
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="m-1">
|
<li class="m-1">
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Week</button>
|
<button wire:click="$set('activeFilter', 'rejected')"
|
||||||
</li>
|
class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border {{ $activeFilter === 'rejected' ? 'border-transparent shadow-sm bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-800' : 'border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400' }} transition">
|
||||||
<li class="m-1">
|
Abgelehnt
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">This Month</button>
|
</button>
|
||||||
</li>
|
|
||||||
<li class="m-1">
|
|
||||||
<button class="inline-flex items-center justify-center text-sm font-medium leading-5 rounded-full px-3 py-1 border border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-sm bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 transition">Following</button>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>--}}
|
</div>
|
||||||
<div class="text-sm text-gray-500 dark:text-gray-400 italic mb-4">{{ count($projects) }} Projekte</div>
|
<div class="text-sm text-gray-500 dark:text-gray-400 italic mb-4">{{ $this->projects->count() }}Projekte
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div class="grid xl:grid-cols-2 gap-6 mb-8">
|
<div class="grid xl:grid-cols-2 gap-6 mb-8">
|
||||||
|
@foreach($this->projects as $project)
|
||||||
@foreach($projects as $project)
|
<x-project-card :project="$project" :currentPleb="$currentPleb" :section="$activeFilter"/>
|
||||||
@php
|
|
||||||
$boardVotes = $project->votes->filter(function ($vote) {
|
|
||||||
return in_array($vote->einundzwanzigPleb->npub, config('einundzwanzig.config.current_board'));
|
|
||||||
});
|
|
||||||
$approveCount = $boardVotes->where('value', 1)->count();
|
|
||||||
$disapproveCount = $boardVotes->where('value', 0)->count();
|
|
||||||
@endphp
|
|
||||||
@if($approveCount === 3 || $disapproveCount !== 3)
|
|
||||||
<article
|
|
||||||
wire:key="project_{{ $project->id }}"
|
|
||||||
class="flex bg-white dark:bg-gray-800 shadow-sm rounded-xl overflow-hidden">
|
|
||||||
<!-- Image -->
|
|
||||||
@if(!$project->sats_paid)
|
|
||||||
<a class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
|
||||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
|
||||||
<img class="absolute object-cover object-center w-full h-full"
|
|
||||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
|
||||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
|
||||||
<img class="rounded-full h-8 w-8"
|
|
||||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
|
||||||
alt="">
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
@else
|
|
||||||
<div
|
|
||||||
class="relative block w-24 sm:w-56 xl:sidebar-expanded:w-40 2xl:sidebar-expanded:w-56 shrink-0"
|
|
||||||
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
|
||||||
<img class="absolute object-cover object-center w-full h-full"
|
|
||||||
src="{{ $project->getFirstMediaUrl('main') }}" alt="Meetup 01">
|
|
||||||
<button class="absolute top-0 right-0 mt-4 mr-4">
|
|
||||||
<img class="rounded-full h-8 w-8"
|
|
||||||
src="{{ $project->einundzwanzigPleb->profile->picture }}"
|
|
||||||
alt="">
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<!-- Content -->
|
|
||||||
<div class="grow p-5 flex flex-col">
|
|
||||||
<div class="grow">
|
|
||||||
<div class="text-sm font-semibold text-amber-500 uppercase mb-2">
|
|
||||||
Eingereicht von: {{ $project->einundzwanzigPleb->profile->name }}
|
|
||||||
</div>
|
|
||||||
<div class="inline-flex mb-2">
|
|
||||||
<h3 class="text-lg font-bold text-gray-800 dark:text-gray-100">
|
|
||||||
{{ $project->name }}
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="text-sm line-clamp-1 sm:line-clamp-3">
|
|
||||||
{!! strip_tags($project->description) !!}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Footer -->
|
|
||||||
<div class="flex justify-between items-center mt-3">
|
|
||||||
<!-- Tag -->
|
|
||||||
<div
|
|
||||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
|
||||||
<span>{{ number_format($project->support_in_sats, 0, ',', '.') }} Sats</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="text-xs inline-flex items-center font-bold border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-200 rounded-full text-center px-2.5 py-1">
|
|
||||||
<a href="{{ $project->website }}" target="_blank">Webseite</a>
|
|
||||||
</div>
|
|
||||||
<!-- Avatars -->
|
|
||||||
@if($project->votes->where('value', true)->count() > 0)
|
|
||||||
<div class="hidden sm:flex items-center space-x-2">
|
|
||||||
<div class="text-xs font-medium text-gray-400 dark:text-gray-300 italic">
|
|
||||||
Anzahl der Unterstützer:
|
|
||||||
+{{ $project->votes->where('value', true)->count() }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="flex flex-col sm:flex-row justify-between items-center mt-3 space-y-2 sm:space-y-0">
|
|
||||||
@if(
|
|
||||||
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
|
||||||
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
|
|
||||||
)
|
|
||||||
<x-button
|
|
||||||
icon="trash"
|
|
||||||
xs
|
|
||||||
negative
|
|
||||||
wire:click="confirmDelete({{ $project->id }})"
|
|
||||||
label="Löschen"/>
|
|
||||||
<x-button
|
|
||||||
icon="pencil"
|
|
||||||
xs
|
|
||||||
secondary
|
|
||||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
|
||||||
label="Editieren"/>
|
|
||||||
@endif
|
|
||||||
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
|
|
||||||
<x-button
|
|
||||||
icon="folder-open"
|
|
||||||
xs
|
|
||||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
|
||||||
label="Öffnen"/>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<div class="py-2">
|
|
||||||
@if($project->sats_paid)
|
|
||||||
<div
|
|
||||||
class="text-sm inline-flex font-medium bg-green-500/20 text-green-700 rounded-full text-center px-2.5 py-1">
|
|
||||||
Wurde mit {{ number_format($project->sats_paid, 0, ',', '.') }} Sats
|
|
||||||
unterstützt
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user