mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-25 04:13:17 +00:00
🛠️ Refactor migrations, models, configs, and Blade files to apply consistent formatting, remove unnecessary lines, and improve readability.
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Contracts\Auth\Authenticatable;
|
|||||||
class NostrUser implements Authenticatable
|
class NostrUser implements Authenticatable
|
||||||
{
|
{
|
||||||
protected string $pubkey;
|
protected string $pubkey;
|
||||||
|
|
||||||
protected ?object $pleb;
|
protected ?object $pleb;
|
||||||
|
|
||||||
public function __construct(string $pubkey)
|
public function __construct(string $pubkey)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class SyncPlebs extends Command
|
|||||||
$npub = str($pleb)->trim();
|
$npub = str($pleb)->trim();
|
||||||
EinundzwanzigPleb::updateOrCreate(
|
EinundzwanzigPleb::updateOrCreate(
|
||||||
['npub' => $npub],
|
['npub' => $npub],
|
||||||
['pubkey' => (new Key())->convertToHex($npub)]
|
['pubkey' => (new Key)->convertToHex($npub)]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ class FetchEvents extends Command
|
|||||||
$plebs = \App\Models\EinundzwanzigPleb::query()
|
$plebs = \App\Models\EinundzwanzigPleb::query()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$subscription = new Subscription();
|
$subscription = new Subscription;
|
||||||
$subscriptionId = $subscription->setId();
|
$subscriptionId = $subscription->setId();
|
||||||
|
|
||||||
$filter1 = new Filter();
|
$filter1 = new Filter;
|
||||||
$filter1->setKinds([1]); // You can add multiple kind numbers
|
$filter1->setKinds([1]); // You can add multiple kind numbers
|
||||||
$filter1->setAuthors($plebs->pluck('pubkey')->toArray()); // You can add multiple authors
|
$filter1->setAuthors($plebs->pluck('pubkey')->toArray()); // You can add multiple authors
|
||||||
$filter1->setLimit(25); // Limit to fetch only a maximum of 25 events
|
$filter1->setLimit(25); // Limit to fetch only a maximum of 25 events
|
||||||
@@ -54,7 +54,7 @@ class FetchEvents extends Command
|
|||||||
new Relay('wss://nostr.wine'),
|
new Relay('wss://nostr.wine'),
|
||||||
new Relay('wss://nos.lol'),
|
new Relay('wss://nos.lol'),
|
||||||
];
|
];
|
||||||
$relaySet = new RelaySet();
|
$relaySet = new RelaySet;
|
||||||
$relaySet->setRelays($relays);
|
$relaySet->setRelays($relays);
|
||||||
|
|
||||||
$request = new Request($relaySet, $requestMessage);
|
$request = new Request($relaySet, $requestMessage);
|
||||||
@@ -64,7 +64,7 @@ class FetchEvents extends Command
|
|||||||
|
|
||||||
foreach ($response as $relay => $events) {
|
foreach ($response as $relay => $events) {
|
||||||
foreach ($events as $event) {
|
foreach ($events as $event) {
|
||||||
if (!isset($uniqueEvents[$event->event->id])) {
|
if (! isset($uniqueEvents[$event->event->id])) {
|
||||||
$uniqueEvents[$event->event->id] = $event;
|
$uniqueEvents[$event->event->id] = $event;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,6 +97,7 @@ class FetchEvents extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,11 +105,12 @@ class FetchEvents extends Command
|
|||||||
{
|
{
|
||||||
foreach ($event->tags as $tag) {
|
foreach ($event->tags as $tag) {
|
||||||
if ($tag[0] === 'e') {
|
if ($tag[0] === 'e') {
|
||||||
if ((isset($tag[3]) && $tag[3] === 'reply') || (!isset($tag[3]) && isset($tag[2]) && $tag[2] === '')) {
|
if ((isset($tag[3]) && $tag[3] === 'reply') || (! isset($tag[3]) && isset($tag[2]) && $tag[2] === '')) {
|
||||||
return 'reply';
|
return 'reply';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'root';
|
return 'root';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class FetchProfile extends Command
|
|||||||
$pubkey = $this->option('pubkey');
|
$pubkey = $this->option('pubkey');
|
||||||
if (empty($pubkey)) {
|
if (empty($pubkey)) {
|
||||||
$this->error('Please provide a pubkey');
|
$this->error('Please provide a pubkey');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class SyncProfiles extends Command
|
|||||||
{
|
{
|
||||||
$query = EinundzwanzigPleb::query();
|
$query = EinundzwanzigPleb::query();
|
||||||
|
|
||||||
if (!$this->option('all')) {
|
if (! $this->option('all')) {
|
||||||
$query->whereDoesntHave('profile');
|
$query->whereDoesntHave('profile');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ class SyncProfiles extends Command
|
|||||||
$bar->finish();
|
$bar->finish();
|
||||||
$this->info("\n✅ Successfully synced $count profiles!");
|
$this->info("\n✅ Successfully synced $count profiles!");
|
||||||
} else {
|
} else {
|
||||||
$this->info("⚡ No profiles to sync!");
|
$this->info('⚡ No profiles to sync!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ use ArchTech\Enums\Values;
|
|||||||
#[Meta(Label::class, Color::class)]
|
#[Meta(Label::class, Color::class)]
|
||||||
enum AssociationStatus: int
|
enum AssociationStatus: int
|
||||||
{
|
{
|
||||||
use InvokableCases;
|
|
||||||
use Names;
|
|
||||||
use Values;
|
|
||||||
use Options;
|
|
||||||
use Metadata;
|
|
||||||
use From;
|
use From;
|
||||||
|
use InvokableCases;
|
||||||
|
use Metadata;
|
||||||
|
use Names;
|
||||||
|
use Options;
|
||||||
|
use Values;
|
||||||
|
|
||||||
#[Label('kein Mitglied')] #[Color('cyan')]
|
#[Label('kein Mitglied')] #[Color('cyan')]
|
||||||
case DEFAULT = 1;
|
case DEFAULT = 1;
|
||||||
@@ -33,7 +33,7 @@ enum AssociationStatus: int
|
|||||||
{
|
{
|
||||||
return collect(self::options())
|
return collect(self::options())
|
||||||
->map(
|
->map(
|
||||||
fn(
|
fn (
|
||||||
$option,
|
$option,
|
||||||
$name
|
$name
|
||||||
) => [
|
) => [
|
||||||
|
|||||||
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
|
|||||||
use Attribute;
|
use Attribute;
|
||||||
|
|
||||||
#[Attribute]
|
#[Attribute]
|
||||||
class Color extends MetaProperty
|
class Color extends MetaProperty {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
|
|||||||
use Attribute;
|
use Attribute;
|
||||||
|
|
||||||
#[Attribute]
|
#[Attribute]
|
||||||
class Icon extends MetaProperty
|
class Icon extends MetaProperty {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
|
|||||||
use Attribute;
|
use Attribute;
|
||||||
|
|
||||||
#[Attribute]
|
#[Attribute]
|
||||||
class Label extends MetaProperty
|
class Label extends MetaProperty {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ use ArchTech\Enums\Values;
|
|||||||
#[Meta(Label::class, Color::class, Icon::class)]
|
#[Meta(Label::class, Color::class, Icon::class)]
|
||||||
enum NewsCategory: int
|
enum NewsCategory: int
|
||||||
{
|
{
|
||||||
use InvokableCases;
|
|
||||||
use Names;
|
|
||||||
use Values;
|
|
||||||
use Options;
|
|
||||||
use Metadata;
|
|
||||||
use From;
|
use From;
|
||||||
|
use InvokableCases;
|
||||||
|
use Metadata;
|
||||||
|
use Names;
|
||||||
|
use Options;
|
||||||
|
use Values;
|
||||||
|
|
||||||
#[Label('Organisation')] #[Color('cyan')] #[Icon('file-lines')]
|
#[Label('Organisation')] #[Color('cyan')] #[Icon('file-lines')]
|
||||||
case ORGANISATION = 1;
|
case ORGANISATION = 1;
|
||||||
@@ -27,7 +27,7 @@ enum NewsCategory: int
|
|||||||
{
|
{
|
||||||
return collect(self::options())
|
return collect(self::options())
|
||||||
->map(
|
->map(
|
||||||
fn(
|
fn (
|
||||||
$option,
|
$option,
|
||||||
$name
|
$name
|
||||||
) => [
|
) => [
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class GetProfile extends Controller
|
|||||||
|
|
||||||
public function __invoke($key, Request $request)
|
public function __invoke($key, Request $request)
|
||||||
{
|
{
|
||||||
if (!Profile::query()->where('pubkey', $key)->exists()) {
|
if (! Profile::query()->where('pubkey', $key)->exists()) {
|
||||||
$this->fetchProfile([$key]);
|
$this->fetchProfile([$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ class GetProfile extends Controller
|
|||||||
->where('pubkey', $key)
|
->where('pubkey', $key)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if (!$profile) {
|
if (! $profile) {
|
||||||
return response()->json(['message' => 'Profile not found'], 200);
|
return response()->json(['message' => 'Profile not found'], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class ApplicationForm extends Form
|
|||||||
{
|
{
|
||||||
#[Validate('nullable|string')]
|
#[Validate('nullable|string')]
|
||||||
public $reason = '';
|
public $reason = '';
|
||||||
|
|
||||||
#[Validate('boolean')]
|
#[Validate('boolean')]
|
||||||
public $check = false;
|
public $check = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ use PowerComponents\LivewirePowerGrid\Exportable;
|
|||||||
use PowerComponents\LivewirePowerGrid\Facades\Filter;
|
use PowerComponents\LivewirePowerGrid\Facades\Filter;
|
||||||
use PowerComponents\LivewirePowerGrid\Facades\Rule;
|
use PowerComponents\LivewirePowerGrid\Facades\Rule;
|
||||||
use PowerComponents\LivewirePowerGrid\Footer;
|
use PowerComponents\LivewirePowerGrid\Footer;
|
||||||
use PowerComponents\LivewirePowerGrid\Header;
|
|
||||||
use PowerComponents\LivewirePowerGrid\Lazy;
|
|
||||||
use PowerComponents\LivewirePowerGrid\PowerGrid;
|
use PowerComponents\LivewirePowerGrid\PowerGrid;
|
||||||
use PowerComponents\LivewirePowerGrid\PowerGridFields;
|
|
||||||
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
|
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
|
||||||
|
use PowerComponents\LivewirePowerGrid\PowerGridFields;
|
||||||
|
|
||||||
final class MeetupTable extends PowerGridComponent
|
final class MeetupTable extends PowerGridComponent
|
||||||
{
|
{
|
||||||
@@ -54,7 +52,7 @@ final class MeetupTable extends PowerGridComponent
|
|||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
Column::action('Action')
|
Column::action('Action'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +77,7 @@ final class MeetupTable extends PowerGridComponent
|
|||||||
->slot('Edit: '.$row->id)
|
->slot('Edit: '.$row->id)
|
||||||
->id()
|
->id()
|
||||||
->class('pg-btn-white dark:ring-pg-primary-600 dark:border-pg-primary-600 dark:hover:bg-pg-primary-700 dark:ring-offset-pg-primary-800 dark:text-pg-primary-300 dark:bg-pg-primary-700')
|
->class('pg-btn-white dark:ring-pg-primary-600 dark:border-pg-primary-600 dark:hover:bg-pg-primary-700 dark:ring-offset-pg-primary-800 dark:text-pg-primary-300 dark:bg-pg-primary-700')
|
||||||
->dispatch('edit', ['rowId' => $row->id])
|
->dispatch('edit', ['rowId' => $row->id]),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,11 @@ use Livewire\Attributes\On;
|
|||||||
trait WithNostrAuth
|
trait WithNostrAuth
|
||||||
{
|
{
|
||||||
public ?string $currentPubkey = null;
|
public ?string $currentPubkey = null;
|
||||||
|
|
||||||
public ?object $currentPleb = null;
|
public ?object $currentPleb = null;
|
||||||
|
|
||||||
public bool $isAllowed = false;
|
public bool $isAllowed = false;
|
||||||
|
|
||||||
public bool $canEdit = false;
|
public bool $canEdit = false;
|
||||||
|
|
||||||
#[On('nostrLoggedIn')]
|
#[On('nostrLoggedIn')]
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ use Spatie\Sluggable\SlugOptions;
|
|||||||
|
|
||||||
class City extends Model
|
class City extends Model
|
||||||
{
|
{
|
||||||
use HasSlug;
|
|
||||||
use Geoly;
|
use Geoly;
|
||||||
|
use HasSlug;
|
||||||
|
|
||||||
protected $connection = 'einundzwanzig';
|
protected $connection = 'einundzwanzig';
|
||||||
|
|
||||||
@@ -51,9 +51,9 @@ class City extends Model
|
|||||||
public function getSlugOptions(): SlugOptions
|
public function getSlugOptions(): SlugOptions
|
||||||
{
|
{
|
||||||
return SlugOptions::create()
|
return SlugOptions::create()
|
||||||
->generateSlugsFrom(['country.code', 'name'])
|
->generateSlugsFrom(['country.code', 'name'])
|
||||||
->saveSlugsTo('slug')
|
->saveSlugsTo('slug')
|
||||||
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createdBy(): BelongsTo
|
public function createdBy(): BelongsTo
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Spatie\Image\Enums\Fit;
|
use Spatie\Image\Enums\Fit;
|
||||||
use Spatie\Image\Manipulations;
|
|
||||||
use Spatie\MediaLibrary\HasMedia;
|
use Spatie\MediaLibrary\HasMedia;
|
||||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||||
@@ -15,8 +14,8 @@ use Spatie\Tags\HasTags;
|
|||||||
|
|
||||||
class Course extends Model implements HasMedia
|
class Course extends Model implements HasMedia
|
||||||
{
|
{
|
||||||
use InteractsWithMedia;
|
|
||||||
use HasTags;
|
use HasTags;
|
||||||
|
use InteractsWithMedia;
|
||||||
|
|
||||||
protected $connection = 'einundzwanzig';
|
protected $connection = 'einundzwanzig';
|
||||||
|
|
||||||
@@ -46,25 +45,25 @@ class Course extends Model implements HasMedia
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaConversions(Media $media = null): void
|
public function registerMediaConversions(?Media $media = null): void
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->addMediaConversion('preview')
|
->addMediaConversion('preview')
|
||||||
->fit(Fit::Crop, 300, 300)
|
->fit(Fit::Crop, 300, 300)
|
||||||
->nonQueued();
|
->nonQueued();
|
||||||
$this->addMediaConversion('thumb')
|
$this->addMediaConversion('thumb')
|
||||||
->fit(Fit::Crop, 130, 130)
|
->fit(Fit::Crop, 130, 130)
|
||||||
->width(130)
|
->width(130)
|
||||||
->height(130);
|
->height(130);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('logo')
|
$this->addMediaCollection('logo')
|
||||||
->singleFile()
|
->singleFile()
|
||||||
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
||||||
$this->addMediaCollection('images')
|
$this->addMediaCollection('images')
|
||||||
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createdBy(): BelongsTo
|
public function createdBy(): BelongsTo
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace App\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
||||||
|
|
||||||
class CourseEvent extends Model
|
class CourseEvent extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,5 +38,4 @@ class EinundzwanzigPleb extends Model implements CipherSweetEncrypted
|
|||||||
{
|
{
|
||||||
return $this->hasMany(PaymentEvent::class);
|
return $this->hasMany(PaymentEvent::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,10 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Event extends Model
|
class Event extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
public function renderedEvent()
|
public function renderedEvent()
|
||||||
{
|
{
|
||||||
return $this->hasOne(RenderedEvent::class, 'event_id', 'event_id');
|
return $this->hasOne(RenderedEvent::class, 'event_id', 'event_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,47 +23,49 @@ class Lecturer extends Model implements HasMedia
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that aren't mass assignable.
|
* The attributes that aren't mass assignable.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be cast to native types.
|
* The attributes that should be cast to native types.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'id' => 'integer',
|
'id' => 'integer',
|
||||||
'active' => 'boolean',
|
'active' => 'boolean',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static function booted()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
static::creating(function ($model) {
|
static::creating(function ($model) {
|
||||||
if (!$model->created_by) {
|
if (! $model->created_by) {
|
||||||
$model->created_by = auth()->id();
|
$model->created_by = auth()->id();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaConversions(Media $media = null): void
|
public function registerMediaConversions(?Media $media = null): void
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->addMediaConversion('preview')
|
->addMediaConversion('preview')
|
||||||
->fit(Fit::Crop, 300, 300)
|
->fit(Fit::Crop, 300, 300)
|
||||||
->nonQueued();
|
->nonQueued();
|
||||||
$this->addMediaConversion('thumb')
|
$this->addMediaConversion('thumb')
|
||||||
->fit(Fit::Crop, 130, 130)
|
->fit(Fit::Crop, 130, 130)
|
||||||
->width(130)
|
->width(130)
|
||||||
->height(130);
|
->height(130);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('avatar')
|
$this->addMediaCollection('avatar')
|
||||||
->singleFile()
|
->singleFile()
|
||||||
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
||||||
$this->addMediaCollection('images')
|
$this->addMediaCollection('images')
|
||||||
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,9 +74,9 @@ class Lecturer extends Model implements HasMedia
|
|||||||
public function getSlugOptions(): SlugOptions
|
public function getSlugOptions(): SlugOptions
|
||||||
{
|
{
|
||||||
return SlugOptions::create()
|
return SlugOptions::create()
|
||||||
->generateSlugsFrom(['name'])
|
->generateSlugsFrom(['name'])
|
||||||
->saveSlugsTo('slug')
|
->saveSlugsTo('slug')
|
||||||
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createdBy(): BelongsTo
|
public function createdBy(): BelongsTo
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ use Spatie\Sluggable\SlugOptions;
|
|||||||
|
|
||||||
class Meetup extends Model implements HasMedia
|
class Meetup extends Model implements HasMedia
|
||||||
{
|
{
|
||||||
use InteractsWithMedia;
|
|
||||||
use HasSlug;
|
use HasSlug;
|
||||||
|
use InteractsWithMedia;
|
||||||
|
|
||||||
protected $connection = 'einundzwanzig';
|
protected $connection = 'einundzwanzig';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ class Meetup extends Model implements HasMedia
|
|||||||
protected static function booted()
|
protected static function booted()
|
||||||
{
|
{
|
||||||
static::creating(function ($model) {
|
static::creating(function ($model) {
|
||||||
if (!$model->created_by) {
|
if (! $model->created_by) {
|
||||||
$model->created_by = auth()->id();
|
$model->created_by = auth()->id();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -57,7 +57,7 @@ class Meetup extends Model implements HasMedia
|
|||||||
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaConversions(Media $media = null): void
|
public function registerMediaConversions(?Media $media = null): void
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->addMediaConversion('preview')
|
->addMediaConversion('preview')
|
||||||
@@ -101,7 +101,7 @@ class Meetup extends Model implements HasMedia
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: fn() => url()->route('img',
|
get: fn () => url()->route('img',
|
||||||
[
|
[
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'w' => 900,
|
'w' => 900,
|
||||||
@@ -117,7 +117,7 @@ class Meetup extends Model implements HasMedia
|
|||||||
$nextEvent = $this->meetupEvents()->where('start', '>=', now())->orderBy('start')->first();
|
$nextEvent = $this->meetupEvents()->where('start', '>=', now())->orderBy('start')->first();
|
||||||
|
|
||||||
return Attribute::make(
|
return Attribute::make(
|
||||||
get: fn() => $nextEvent ? [
|
get: fn () => $nextEvent ? [
|
||||||
'start' => $nextEvent->start->toDateTimeString(),
|
'start' => $nextEvent->start->toDateTimeString(),
|
||||||
'portalLink' => url()->route('meetup.event.landing', ['country' => $this->city->country, 'meetupEvent' => $nextEvent]),
|
'portalLink' => url()->route('meetup.event.landing', ['country' => $this->city->country, 'meetupEvent' => $nextEvent]),
|
||||||
'location' => $nextEvent->location,
|
'location' => $nextEvent->location,
|
||||||
|
|||||||
@@ -6,7 +6,5 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Profile extends Model
|
class Profile extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,17 +15,19 @@ use Spatie\Sluggable\SlugOptions;
|
|||||||
|
|
||||||
class ProjectProposal extends Model implements HasMedia
|
class ProjectProposal extends Model implements HasMedia
|
||||||
{
|
{
|
||||||
use InteractsWithMedia;
|
|
||||||
use HasSlug;
|
use HasSlug;
|
||||||
|
use InteractsWithMedia;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that aren't mass assignable.
|
* The attributes that aren't mass assignable.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be cast to native types.
|
* The attributes that should be cast to native types.
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
@@ -33,10 +35,7 @@ class ProjectProposal extends Model implements HasMedia
|
|||||||
'einundzwanzig_pleb_id' => 'integer',
|
'einundzwanzig_pleb_id' => 'integer',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected static function booted()
|
protected static function booted() {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getSlugOptions(): SlugOptions
|
public function getSlugOptions(): SlugOptions
|
||||||
{
|
{
|
||||||
@@ -46,7 +45,7 @@ class ProjectProposal extends Model implements HasMedia
|
|||||||
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaConversions(Media $media = null): void
|
public function registerMediaConversions(?Media $media = null): void
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->addMediaConversion('preview')
|
->addMediaConversion('preview')
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
|||||||
|
|
||||||
class Venue extends Model implements HasMedia
|
class Venue extends Model implements HasMedia
|
||||||
{
|
{
|
||||||
use HasSlug;
|
|
||||||
use HasRelationships;
|
use HasRelationships;
|
||||||
|
use HasSlug;
|
||||||
use InteractsWithMedia;
|
use InteractsWithMedia;
|
||||||
|
|
||||||
protected $connection = 'einundzwanzig';
|
protected $connection = 'einundzwanzig';
|
||||||
@@ -48,22 +48,22 @@ class Venue extends Model implements HasMedia
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaConversions(Media $media = null): void
|
public function registerMediaConversions(?Media $media = null): void
|
||||||
{
|
{
|
||||||
$this
|
$this
|
||||||
->addMediaConversion('preview')
|
->addMediaConversion('preview')
|
||||||
->fit(Fit::Crop, 300, 300)
|
->fit(Fit::Crop, 300, 300)
|
||||||
->nonQueued();
|
->nonQueued();
|
||||||
$this->addMediaConversion('thumb')
|
$this->addMediaConversion('thumb')
|
||||||
->fit(Fit::Crop, 130, 130)
|
->fit(Fit::Crop, 130, 130)
|
||||||
->width(130)
|
->width(130)
|
||||||
->height(130);
|
->height(130);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('images')
|
$this->addMediaCollection('images')
|
||||||
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
->useFallbackUrl(asset('img/einundzwanzig.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,9 +72,9 @@ class Venue extends Model implements HasMedia
|
|||||||
public function getSlugOptions(): SlugOptions
|
public function getSlugOptions(): SlugOptions
|
||||||
{
|
{
|
||||||
return SlugOptions::create()
|
return SlugOptions::create()
|
||||||
->generateSlugsFrom(['city.slug', 'name'])
|
->generateSlugsFrom(['city.slug', 'name'])
|
||||||
->saveSlugsTo('slug')
|
->saveSlugsTo('slug')
|
||||||
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
->usingLanguage(Cookie::get('lang', config('app.locale')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createdBy(): BelongsTo
|
public function createdBy(): BelongsTo
|
||||||
@@ -89,12 +89,12 @@ class Venue extends Model implements HasMedia
|
|||||||
|
|
||||||
public function lecturers()
|
public function lecturers()
|
||||||
{
|
{
|
||||||
return $this->hasManyDeepFromRelations($this->courses(), (new Course())->lecturer());
|
return $this->hasManyDeepFromRelations($this->courses(), (new Course)->lecturer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function courses()
|
public function courses()
|
||||||
{
|
{
|
||||||
return $this->hasManyDeepFromRelations($this->events(), (new CourseEvent())->course());
|
return $this->hasManyDeepFromRelations($this->events(), (new CourseEvent)->course());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function courseEvents(): HasMany
|
public function courseEvents(): HasMany
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||||||
|
|
||||||
class Vote extends Model
|
class Vote extends Model
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that aren't mass assignable.
|
* The attributes that aren't mass assignable.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class NostrAuthServiceProvider extends ServiceProvider
|
|||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
Auth::provider('nostr', function (Application $app, array $config) {
|
Auth::provider('nostr', function (Application $app, array $config) {
|
||||||
return new NostrUserProvider();
|
return new NostrUserProvider;
|
||||||
});
|
});
|
||||||
|
|
||||||
Auth::extend('nostr-session', function (Application $app, string $name, array $config) {
|
Auth::extend('nostr-session', function (Application $app, string $name, array $config) {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace App\Support;
|
namespace App\Support;
|
||||||
|
|
||||||
use App\Auth\NostrUser;
|
use App\Auth\NostrUser;
|
||||||
use Illuminate\Support\Facades\Session;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Session;
|
||||||
|
|
||||||
class NostrAuth
|
class NostrAuth
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ trait NostrEventRendererTrait
|
|||||||
$profile = Profile::query()->where('pubkey', $event->pubkey)->first();
|
$profile = Profile::query()->where('pubkey', $event->pubkey)->first();
|
||||||
if ($profile && $profile->name) {
|
if ($profile && $profile->name) {
|
||||||
$name = $profile->name;
|
$name = $profile->name;
|
||||||
} elseif ($profile && !empty($profile->display_name)) {
|
} elseif ($profile && ! empty($profile->display_name)) {
|
||||||
$name = $profile->display_name;
|
$name = $profile->display_name;
|
||||||
} else {
|
} else {
|
||||||
$name = 'Anonymous';
|
$name = 'Anonymous';
|
||||||
@@ -30,7 +30,7 @@ trait NostrEventRendererTrait
|
|||||||
'event_id' => $event->event_id,
|
'event_id' => $event->event_id,
|
||||||
], [
|
], [
|
||||||
'html' => $content,
|
'html' => $content,
|
||||||
'profile_image' => $profile && $profile->picture !== '' ? $profile->picture : 'https://robohash.org/' . $profile->pubkey,
|
'profile_image' => $profile && $profile->picture !== '' ? $profile->picture : 'https://robohash.org/'.$profile->pubkey,
|
||||||
'profile_name' => $name,
|
'profile_name' => $name,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ trait NostrEventRendererTrait
|
|||||||
$profile = Profile::query()->where('pubkey', $pubkey)->first();
|
$profile = Profile::query()->where('pubkey', $pubkey)->first();
|
||||||
if ($profile && $profile->name) {
|
if ($profile && $profile->name) {
|
||||||
$name = $profile->name;
|
$name = $profile->name;
|
||||||
} elseif ($profile && !empty($profile->display_name)) {
|
} elseif ($profile && ! empty($profile->display_name)) {
|
||||||
$name = $profile->display_name;
|
$name = $profile->display_name;
|
||||||
} else {
|
} else {
|
||||||
$name = 'Anonymous';
|
$name = 'Anonymous';
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ trait NostrFetcherTrait
|
|||||||
'hex' => $item,
|
'hex' => $item,
|
||||||
'npub' => (new Key)->convertPublicKeyToBech32($item),
|
'npub' => (new Key)->convertPublicKeyToBech32($item),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$hex->push([
|
$hex->push([
|
||||||
@@ -30,10 +31,10 @@ trait NostrFetcherTrait
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$subscription = new Subscription();
|
$subscription = new Subscription;
|
||||||
$subscriptionId = $subscription->setId();
|
$subscriptionId = $subscription->setId();
|
||||||
|
|
||||||
$filter1 = new Filter();
|
$filter1 = new Filter;
|
||||||
$filter1->setKinds([0]); // You can add multiple kind numbers
|
$filter1->setKinds([0]); // You can add multiple kind numbers
|
||||||
$filter1->setAuthors($hex->pluck('hex')->toArray()); // You can add multiple author ids
|
$filter1->setAuthors($hex->pluck('hex')->toArray()); // You can add multiple author ids
|
||||||
$filters = [$filter1];
|
$filters = [$filter1];
|
||||||
@@ -54,7 +55,7 @@ trait NostrFetcherTrait
|
|||||||
try {
|
try {
|
||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
$data = $response[$relayUrl];
|
$data = $response[$relayUrl];
|
||||||
if (!empty($data)) {
|
if (! empty($data)) {
|
||||||
\Log::info('Successfully fetched data from relay: '.$relayUrl);
|
\Log::info('Successfully fetched data from relay: '.$relayUrl);
|
||||||
break; // Exit the loop if data is not empty
|
break; // Exit the loop if data is not empty
|
||||||
}
|
}
|
||||||
@@ -65,6 +66,7 @@ trait NostrFetcherTrait
|
|||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
\Log::warning('No data found from any relay');
|
\Log::warning('No data found from any relay');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach ($data as $item) {
|
foreach ($data as $item) {
|
||||||
@@ -94,5 +96,4 @@ trait NostrFetcherTrait
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,5 +50,5 @@ return [
|
|||||||
* the field to have a value and alerts the user if it is empty or undefined.
|
* the field to have a value and alerts the user if it is empty or undefined.
|
||||||
* Supported: "true", "false"
|
* Supported: "true", "false"
|
||||||
*/
|
*/
|
||||||
'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', FALSE)
|
'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', false),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ return [
|
|||||||
'public' => [
|
'public' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/public'),
|
'root' => storage_path('app/public'),
|
||||||
'url' => env('APP_URL') . '/storage',
|
'url' => env('APP_URL').'/storage',
|
||||||
'visibility' => 'public',
|
'visibility' => 'public',
|
||||||
'throw' => false,
|
'throw' => false,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'theme' => \PowerComponents\LivewirePowerGrid\Themes\Tailwind::class,
|
'theme' => \PowerComponents\LivewirePowerGrid\Themes\Tailwind::class,
|
||||||
//'theme' => \PowerComponents\LivewirePowerGrid\Themes\Bootstrap5::class,
|
// 'theme' => \PowerComponents\LivewirePowerGrid\Themes\Bootstrap5::class,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -30,10 +30,10 @@ return [
|
|||||||
'flatpickr' => [
|
'flatpickr' => [
|
||||||
'locales' => [
|
'locales' => [
|
||||||
'de_DE' => [
|
'de_DE' => [
|
||||||
'locale' => 'de',
|
'locale' => 'de',
|
||||||
'dateFormat' => 'd.m.Y H:i',
|
'dateFormat' => 'd.m.Y H:i',
|
||||||
'enableTime' => true,
|
'enableTime' => true,
|
||||||
'time_24hr' => true,
|
'time_24hr' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -128,14 +128,14 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'exportable' => [
|
'exportable' => [
|
||||||
'default' => 'openspout_v4',
|
'default' => 'openspout_v4',
|
||||||
'openspout_v4' => [
|
'openspout_v4' => [
|
||||||
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToXLS::class,
|
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToXLS::class,
|
||||||
'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToCsv::class,
|
'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToCsv::class,
|
||||||
],
|
],
|
||||||
'openspout_v3' => [
|
'openspout_v3' => [
|
||||||
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToXLS::class,
|
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToXLS::class,
|
||||||
'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToCsv::class,
|
'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToCsv::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ return [
|
|||||||
*/
|
*/
|
||||||
'cache_store' => null,
|
'cache_store' => null,
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When cache_store is enabled, this value will be used to determine
|
* When cache_store is enabled, this value will be used to determine
|
||||||
* how long the cache will be valid. If you set this to `null` the
|
* how long the cache will be valid. If you set this to `null` the
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ return [
|
|||||||
'-m 6', // for the slowest compression method in order to get the best compression.
|
'-m 6', // for the slowest compression method in order to get the best compression.
|
||||||
'-pass 10', // for maximizing the amount of analysis pass.
|
'-pass 10', // for maximizing the amount of analysis pass.
|
||||||
'-mt', // multithreading for some speed improvements.
|
'-mt', // multithreading for some speed improvements.
|
||||||
'-q 90', //quality factor that brings the least noticeable changes.
|
'-q 90', // quality factor that brings the least noticeable changes.
|
||||||
],
|
],
|
||||||
Spatie\ImageOptimizer\Optimizers\Avifenc::class => [
|
Spatie\ImageOptimizer\Optimizers\Avifenc::class => [
|
||||||
'-a cq-level=23', // constant quality level, lower values mean better quality and greater file size (0-63).
|
'-a cq-level=23', // constant quality level, lower values mean better quality and greater file size (0-63).
|
||||||
|
|||||||
@@ -42,6 +42,6 @@ return [
|
|||||||
|
|
||||||
'btc_pay' => [
|
'btc_pay' => [
|
||||||
'api_key' => env('BTC_PAY_API_KEY'),
|
'api_key' => env('BTC_PAY_API_KEY'),
|
||||||
]
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,6 @@ return new class extends Migration {
|
|||||||
*/
|
*/
|
||||||
public function down(): void
|
public function down(): void
|
||||||
{
|
{
|
||||||
Schema::table('einundzwanzig_plebs', function (Blueprint $table) {
|
Schema::table('einundzwanzig_plebs', function (Blueprint $table) {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
return new class extends Migration {
|
return new class extends Migration
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
<article
|
<article
|
||||||
wire:key="project_{{ $project->id }}"
|
wire:key="project_{{ $project->id }}"
|
||||||
class="flex bg-white dark:bg-gray-800 shadow-sm rounded-xl overflow-hidden">
|
wire:key="project_{{ $project->id }}"
|
||||||
<!-- Image -->
|
<flux:card class="flex overflow-hidden">
|
||||||
@if(!$project->sats_paid)
|
@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"
|
<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]) }}">
|
href="{{ route('association.projectSupport.item', ['projectProposal' => $project]) }}">
|
||||||
@@ -124,5 +124,5 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</flux:card>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
@php
|
||||||
|
$currentRoute = request()->route()->getName();
|
||||||
|
$isCurrentRouteClass = 'bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-100';
|
||||||
|
$isNotCurrentRouteClass = 'text-gray-600 dark:text-gray-400';
|
||||||
|
@endphp
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="dark">
|
||||||
<head>
|
<head>
|
||||||
@@ -32,6 +38,14 @@
|
|||||||
<flux:navbar.item icon="rss" :href="route('association.news')" :current="request()->routeIs('association.news')">News</flux:navbar.item>
|
<flux:navbar.item icon="rss" :href="route('association.news')" :current="request()->routeIs('association.news')">News</flux:navbar.item>
|
||||||
<flux:navbar.item icon="identification" :href="route('association.profile')" :current="request()->routeIs('association.profile')">Profil</flux:navbar.item>
|
<flux:navbar.item icon="identification" :href="route('association.profile')" :current="request()->routeIs('association.profile')">Profil</flux:navbar.item>
|
||||||
<flux:navbar.item icon="heart" :href="route('association.projectSupport')" :current="request()->routeIs('association.projectSupport')">Projekt-Unterstützungen</flux:navbar.item>
|
<flux:navbar.item icon="heart" :href="route('association.projectSupport')" :current="request()->routeIs('association.projectSupport')">Projekt-Unterstützungen</flux:navbar.item>
|
||||||
|
|
||||||
|
<flux:dropdown position="bottom">
|
||||||
|
<flux:navbar.item icon:trailing="chevron-down">Admin</flux:navbar.item>
|
||||||
|
|
||||||
|
<flux:navmenu>
|
||||||
|
<flux:navmenu.item :href="route('association.members.admin')" :current="request()->routeIs('association.members.admin')">Mitglieder</flux:navmenu.item>
|
||||||
|
</flux:navmenu>
|
||||||
|
</flux:dropdown>
|
||||||
@endif
|
@endif
|
||||||
</flux:navbar>
|
</flux:navbar>
|
||||||
|
|
||||||
@@ -60,7 +74,7 @@
|
|||||||
</flux:navbar>
|
</flux:navbar>
|
||||||
</flux:header>
|
</flux:header>
|
||||||
|
|
||||||
<flux:sidebar sticky collapsible="mobile" class="bg-zinc-50 dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-700">
|
<flux:sidebar sticky collapsible="mobile" class="lg:hidden bg-zinc-50 dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-700">
|
||||||
<flux:sidebar.header>
|
<flux:sidebar.header>
|
||||||
<flux:sidebar.brand
|
<flux:sidebar.brand
|
||||||
href="/"
|
href="/"
|
||||||
@@ -77,9 +91,28 @@
|
|||||||
<flux:sidebar.item icon="rss" :href="route('association.news')" :current="request()->routeIs('association.news')">News</flux:sidebar.item>
|
<flux:sidebar.item icon="rss" :href="route('association.news')" :current="request()->routeIs('association.news')">News</flux:sidebar.item>
|
||||||
<flux:sidebar.item icon="identification" :href="route('association.profile')" :current="request()->routeIs('association.profile')">Meine Mitgliedschaft</flux:sidebar.item>
|
<flux:sidebar.item icon="identification" :href="route('association.profile')" :current="request()->routeIs('association.profile')">Meine Mitgliedschaft</flux:sidebar.item>
|
||||||
<flux:sidebar.item icon="heart" :href="route('association.projectSupport')" :current="request()->routeIs('association.projectSupport')">Projekt-Unterstützungen</flux:sidebar.item>
|
<flux:sidebar.item icon="heart" :href="route('association.projectSupport')" :current="request()->routeIs('association.projectSupport')">Projekt-Unterstützungen</flux:sidebar.item>
|
||||||
|
|
||||||
|
<flux:sidebar.group heading="Admin" class="grid">
|
||||||
|
<flux:sidebar.item icon="users" :href="route('association.members.admin')" :current="request()->routeIs('association.members.admin')">Mitglieder</flux:sidebar.item>
|
||||||
|
</flux:sidebar.group>
|
||||||
|
|
||||||
|
<flux:sidebar.group heading="Info" class="grid">
|
||||||
|
<flux:sidebar.item href="https://gitworkshop.dev/r/naddr1qvzqqqrhnypzqzklvar4enzu53t06vpzu3h465nwkzhk9p9ls4y5crwhs3lnu5pnqy88wumn8ghj7mn0wvhxcmmv9uqpxetfde6kuer6wasku7nfvukkummnw3eqdgsn8w/issues" target="_blank">Issues/Feedback</flux:sidebar.item>
|
||||||
|
<flux:sidebar.item :href="route('changelog')">Changelog</flux:sidebar.item>
|
||||||
|
<flux:sidebar.item href="https://github.com/HolgerHatGarkeineNode/einundzwanzig-nostr" target="_blank">Github</flux:sidebar.item>
|
||||||
|
<flux:sidebar.item href="https://einundzwanzig.space/kontakt/" target="_blank">Impressum</flux:sidebar.item>
|
||||||
|
</flux:sidebar.group>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<x-layouts.navigation.admin :currentRoute="request()->route()->getName()"/>
|
@if(\App\Support\NostrAuth::check())
|
||||||
|
<flux:sidebar.spacer />
|
||||||
|
<form method="post" action="{{ route('logout') }}" @submit="$dispatch('nostrLoggedOut')">
|
||||||
|
@csrf
|
||||||
|
<flux:sidebar.item icon="arrow-right-start-on-rectangle" type="submit">Logout</flux:sidebar.item>
|
||||||
|
</form>
|
||||||
|
@else
|
||||||
|
<flux:sidebar.item icon="user" @click="openNostrLogin">Mit Nostr verbinden</flux:sidebar.item>
|
||||||
|
@endif
|
||||||
</flux:sidebar.nav>
|
</flux:sidebar.nav>
|
||||||
</flux:sidebar>
|
</flux:sidebar>
|
||||||
|
|
||||||
|
|||||||
@@ -518,9 +518,9 @@ new class extends Component {
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="grid sm:grid-cols-2 gap-6">
|
<div class="grid sm:grid-cols-2 gap-6">
|
||||||
<div
|
<div
|
||||||
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl">
|
<div class="grid sm:grid-cols-2 gap-6">
|
||||||
<div class="flex flex-col h-full p-5">
|
<flux:card>
|
||||||
<header>
|
<header>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<i class="fa-sharp-duotone fa-solid {{ $positions['presidency']['icon'] }} w-9 h-9 fill-current text-white"></i>
|
<i class="fa-sharp-duotone fa-solid {{ $positions['presidency']['icon'] }} w-9 h-9 fill-current text-white"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -562,7 +562,7 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 class="mt-6 text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1 sm:mb-0 ml-2">
|
<h1 class="mt-6 text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1 sm:mb-0 ml-2">
|
||||||
@@ -571,8 +571,8 @@ new class extends Component {
|
|||||||
<div class="grid gap-6">
|
<div class="grid gap-6">
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl">
|
<flux:card>
|
||||||
<div class="flex flex-col h-full p-5">
|
<div class="flex flex-col h-full p-5">
|
||||||
<div class="grow mt-2">
|
<div class="grow mt-2">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<span>Klicke auf den Kandidaten, um seine Position als Vorstandsmitglied zu bestätigen.</span>
|
<span>Klicke auf den Kandidaten, um seine Position als Vorstandsmitglied zu bestätigen.</span>
|
||||||
@@ -597,7 +597,7 @@ new class extends Component {
|
|||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -607,7 +607,7 @@ new class extends Component {
|
|||||||
|
|
||||||
<!-- Log events -->
|
<!-- Log events -->
|
||||||
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
|
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl mb-8">
|
<flux:card mb-8>
|
||||||
<header class="px-5 py-4">
|
<header class="px-5 py-4">
|
||||||
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Präsidium Log <span
|
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Präsidium Log <span
|
||||||
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedEvents) }}</span>
|
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedEvents) }}</span>
|
||||||
@@ -671,10 +671,10 @@ new class extends Component {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
|
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl mb-8">
|
<flux:card mb-8>
|
||||||
<header class="px-5 py-4">
|
<header class="px-5 py-4">
|
||||||
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Board Log <span
|
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Board Log <span
|
||||||
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedBoardEvents) }}</span>
|
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedBoardEvents) }}</span>
|
||||||
@@ -738,7 +738,7 @@ new class extends Component {
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -749,13 +749,13 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||||
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
|
<flux:card>
|
||||||
<div class="px-4 py-5 sm:px-6">
|
<div class="px-4 py-5 sm:px-6">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">Wahlen</h3>
|
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">Wahlen</h3>
|
||||||
<p class="mt-1 max-w">
|
<p class="mt-1 max-w">
|
||||||
Du bist nicht berechtigt, die Wahlen einzusehen.
|
Du bist nicht berechtigt, die Wahlen einzusehen.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ use App\Enums\NewsCategory;
|
|||||||
use App\Models\Notification;
|
use App\Models\Notification;
|
||||||
use App\Support\NostrAuth;
|
use App\Support\NostrAuth;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Livewire\Component;
|
|
||||||
use Livewire\Attributes\Layout;
|
use Livewire\Attributes\Layout;
|
||||||
use Livewire\Attributes\Title;
|
use Livewire\Attributes\Title;
|
||||||
|
use Livewire\Component;
|
||||||
use Livewire\WithFileUploads;
|
use Livewire\WithFileUploads;
|
||||||
|
|
||||||
new
|
new
|
||||||
@@ -35,8 +35,11 @@ class extends Component {
|
|||||||
$currentPubkey = NostrAuth::pubkey();
|
$currentPubkey = NostrAuth::pubkey();
|
||||||
$currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $currentPubkey)->first();
|
$currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $currentPubkey)->first();
|
||||||
|
|
||||||
if ($currentPleb && $currentPleb->association_status->value > 1 && $currentPleb->paymentEvents()->where('year',
|
if (
|
||||||
date('Y'))->where('paid', true)->exists()) {
|
$currentPleb
|
||||||
|
&& $currentPleb->association_status->value > 1
|
||||||
|
&& $currentPleb->paymentEvents()->where('year', date('Y'))->where('paid', true)->exists()
|
||||||
|
) {
|
||||||
$this->isAllowed = true;
|
$this->isAllowed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,8 +161,8 @@ class extends Component {
|
|||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
@forelse($news as $post)
|
@forelse($news as $post)
|
||||||
<article wire:key="post_{{ $post->id }}"
|
<article wire:key="post_{{ $post->id }}"
|
||||||
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
|
<article wire:key="post_{{ $post->id }}"
|
||||||
<div class="flex flex-start space-x-4">
|
<flux:card>
|
||||||
<!-- Avatar -->
|
<!-- Avatar -->
|
||||||
<div class="shrink-0 mt-1.5">
|
<div class="shrink-0 mt-1.5">
|
||||||
<img class="w-8 h-8 rounded-full"
|
<img class="w-8 h-8 rounded-full"
|
||||||
@@ -220,11 +223,11 @@ class extends Component {
|
|||||||
</flux:button>
|
</flux:button>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</flux:card>
|
||||||
@empty
|
@empty
|
||||||
<article class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
|
<flux:card>
|
||||||
<p>Keine News vorhanden.</p>
|
<p>Keine News vorhanden.</p>
|
||||||
</article>
|
</flux:card>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -243,7 +246,7 @@ class extends Component {
|
|||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
|
|
||||||
@if($canEdit)
|
@if($canEdit)
|
||||||
<div class="bg-white dark:bg-gray-800 p-4 rounded-xl">
|
<flux:card>
|
||||||
<div
|
<div
|
||||||
class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase mb-4">
|
class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase mb-4">
|
||||||
News anlegen
|
News anlegen
|
||||||
@@ -269,29 +272,30 @@ class extends Component {
|
|||||||
/>
|
/>
|
||||||
@endforeach
|
@endforeach
|
||||||
</flux:select>
|
</flux:select>
|
||||||
<flux:error name="form.category" />
|
<flux:error name="form.category"/>
|
||||||
</flux:field>
|
</flux:field>
|
||||||
</div>
|
</div>
|
||||||
<div wire:dirty>
|
<div wire:dirty>
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Titel</flux:label>
|
<flux:label>Titel</flux:label>
|
||||||
<flux:input wire:model="form.name" placeholder="News-Titel" />
|
<flux:input wire:model="form.name" placeholder="News-Titel"/>
|
||||||
<flux:error name="form.name" />
|
<flux:error name="form.name"/>
|
||||||
</flux:field>
|
</flux:field>
|
||||||
</div>
|
</div>
|
||||||
<div wire:dirty>
|
<div wire:dirty>
|
||||||
<flux:field>
|
<flux:field>
|
||||||
<flux:label>Beschreibung</flux:label>
|
<flux:label>Beschreibung</flux:label>
|
||||||
<flux:description>optional</flux:description>
|
<flux:description>optional</flux:description>
|
||||||
<flux:textarea wire:model="form.description" rows="4" placeholder="Beschreibung..." />
|
<flux:textarea wire:model="form.description" rows="4"
|
||||||
<flux:error name="form.description" />
|
placeholder="Beschreibung..."/>
|
||||||
|
<flux:error name="form.description"/>
|
||||||
</flux:field>
|
</flux:field>
|
||||||
</div>
|
</div>
|
||||||
<flux:button wire:click="save" class="w-full">
|
<flux:button wire:click="save" class="w-full">
|
||||||
Hinzufügen
|
Hinzufügen
|
||||||
</flux:button>
|
</flux:button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -304,7 +308,7 @@ class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||||
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
|
<flux:card>
|
||||||
<div class="px-4 py-5 sm:px-6">
|
<div class="px-4 py-5 sm:px-6">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
|
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
|
||||||
News
|
News
|
||||||
@@ -312,7 +316,7 @@ class extends Component {
|
|||||||
<p class="mt-1 max-w">
|
<p class="mt-1 max-w">
|
||||||
Du bist nicht berechtigt, die News einzusehen.
|
Du bist nicht berechtigt, die News einzusehen.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ new class extends Component {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-white dark:bg-[#1B1B1B] shadow-sm rounded-xl mb-8">
|
<flux:card mb-8>
|
||||||
<div class="flex flex-col md:flex-row md:-mr-px">
|
<div class="flex flex-col md:flex-row md:-mr-px">
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
@@ -340,8 +340,7 @@ new class extends Component {
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Panel -->
|
<!-- Panel -->
|
||||||
<div class="grow">
|
<div class="grow">
|
||||||
@@ -359,7 +358,7 @@ new class extends Component {
|
|||||||
Login und Signer-Apps
|
Login und Signer-Apps
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
|
<flux:card>
|
||||||
<div
|
<div
|
||||||
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
||||||
<!-- Left side -->
|
<!-- Left side -->
|
||||||
@@ -382,8 +381,8 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
|
<flux:card>
|
||||||
<div
|
<div
|
||||||
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
||||||
<!-- Left side -->
|
<!-- Left side -->
|
||||||
@@ -407,8 +406,8 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
|
<flux:card>
|
||||||
<div
|
<div
|
||||||
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
||||||
<!-- Left side -->
|
<!-- Left side -->
|
||||||
@@ -431,8 +430,8 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
|
<flux:card>
|
||||||
<div
|
<div
|
||||||
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
|
||||||
<!-- Left side -->
|
<!-- Left side -->
|
||||||
@@ -454,7 +453,7 @@ new class extends Component {
|
|||||||
Browser Firefox
|
Browser Firefox
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -476,8 +475,8 @@ new class extends Component {
|
|||||||
</template>
|
</template>
|
||||||
@if($currentPubkey && $currentPleb->association_status->value < 2)
|
@if($currentPubkey && $currentPleb->association_status->value < 2)
|
||||||
<div
|
<div
|
||||||
class="inline-flex min-w-80 px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-100">
|
<flux:card>
|
||||||
<div class="flex w-full justify-between items-start">
|
<div class="flex w-full justify-between items-start">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
|
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
|
||||||
width="16" height="16" viewBox="0 0 16 16">
|
width="16" height="16" viewBox="0 0 16 16">
|
||||||
@@ -486,7 +485,7 @@ new class extends Component {
|
|||||||
</svg>
|
</svg>
|
||||||
<div>Profil in der Datenbank vorhanden.</div>
|
<div>Profil in der Datenbank vorhanden.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@@ -524,8 +523,8 @@ new class extends Component {
|
|||||||
@endif
|
@endif
|
||||||
@if($currentPubkey)
|
@if($currentPubkey)
|
||||||
<div
|
<div
|
||||||
class="mt-6 inline-flex flex-col w-full px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
|
<flux:card class="mt-6">
|
||||||
<div class="flex w-full justify-between items-start">
|
<div class="flex w-full justify-between items-start">
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3"
|
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3"
|
||||||
width="16"
|
width="16"
|
||||||
@@ -578,7 +577,7 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -588,8 +587,8 @@ new class extends Component {
|
|||||||
@if($currentPleb && $currentPleb->association_status->value > 1)
|
@if($currentPleb && $currentPleb->association_status->value > 1)
|
||||||
<div class="flex flex-col space-y-4">
|
<div class="flex flex-col space-y-4">
|
||||||
<div
|
<div
|
||||||
class="inline-flex flex-col w-full max-w-lg px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
|
<flux:card class="max-w-lg">
|
||||||
<div class="flex w-full justify-between items-start">
|
<div class="flex w-full justify-between items-start">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
|
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
|
||||||
width="16"
|
width="16"
|
||||||
@@ -604,7 +603,7 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</section>
|
</section>
|
||||||
@@ -612,8 +611,8 @@ new class extends Component {
|
|||||||
<section>
|
<section>
|
||||||
@if($currentPleb && $currentPleb->association_status->value > 1)
|
@if($currentPleb && $currentPleb->association_status->value > 1)
|
||||||
<div
|
<div
|
||||||
class="inline-flex flex-col w-full px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
|
<flux:card>
|
||||||
<div class="flex w-full justify-between items-start">
|
<div class="flex w-full justify-between items-start">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3" width="16"
|
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3" width="16"
|
||||||
height="16" viewBox="0 0 16 16">
|
height="16" viewBox="0 0 16 16">
|
||||||
@@ -717,9 +716,12 @@ new class extends Component {
|
|||||||
</td>
|
</td>
|
||||||
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
|
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
|
||||||
@if($payment->btc_pay_invoice)
|
@if($payment->btc_pay_invoice)
|
||||||
<x-button target="_blank" xs
|
<flux:button href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"
|
||||||
label="Quittung"
|
target="_blank"
|
||||||
href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"/>
|
size="xs"
|
||||||
|
variant="subtle">
|
||||||
|
Quittung
|
||||||
|
</flux:button>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -731,7 +733,7 @@ new class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</flux:card>
|
||||||
@endif
|
@endif
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ class extends Component {
|
|||||||
<div class="md:flex">
|
<div class="md:flex">
|
||||||
<!-- Left column -->
|
<!-- Left column -->
|
||||||
<div class="w-full md:w-60 mb-4 md:mb-0">
|
<div class="w-full md:w-60 mb-4 md:mb-0">
|
||||||
<div
|
<flux:card>
|
||||||
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
|
|
||||||
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
|
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
|
||||||
Details
|
Details
|
||||||
</h2>
|
</h2>
|
||||||
@@ -73,26 +72,25 @@ class extends Component {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Right column -->
|
<!-- Right column -->
|
||||||
<div class="flex-1 md:ml-8">
|
<div class="flex-1 md:ml-8">
|
||||||
<div
|
<flux:card>
|
||||||
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
|
|
||||||
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
|
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
|
||||||
Beschreibung
|
Beschreibung
|
||||||
</h2>
|
</h2>
|
||||||
<p class="text-sm text-gray-800 dark:text-gray-100">
|
<p class="text-sm text-gray-800 dark:text-gray-100">
|
||||||
{{ $project->description ?? 'Keine Beschreibung' }}
|
{{ $project->description ?? 'Keine Beschreibung' }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||||
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
|
<flux:card>
|
||||||
<div class="px-4 py-5 sm:px-6">
|
<div class="px-4 py-5 sm:px-6">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
|
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
|
||||||
Projektförderung
|
Projektförderung
|
||||||
@@ -100,7 +98,7 @@ class extends Component {
|
|||||||
<p class="mt-1 max-w">
|
<p class="mt-1 max-w">
|
||||||
Du bist nicht berechtigt, die Projektförderung einzusehen.
|
Du bist nicht berechtigt, die Projektförderung einzusehen.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</flux:card>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
|
|||||||
Reference in New Issue
Block a user