🎉 update(deps): bump dependencies for email-validator, pretty-package-versions, and others to latest versions

🔒 refactor(auth): streamline access control logic in election and project support forms

 add(styles): include partial styles for better layout management

🚀 feat(layout): integrate new styles partial into main layout for consistent design

🆕 create(partials): add styles partial to manage CSS styles more effectively
This commit is contained in:
fsociety
2025-03-23 23:28:02 +01:00
parent ffa6564d00
commit 0b5b6cc9ad
12 changed files with 133 additions and 126 deletions

View File

@@ -56,9 +56,6 @@ $getOtherVotes = function () {
$handleNostrLoggedIn = function ($pubkey) {
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
if ($this->currentPleb->association_status->value < 2) {
return $this->js('alert("Du bist hierzu nicht berechtigt.")');
}
$this->isAllowed = true;
$this->ownVoteExists = Vote::query()
->where('project_proposal_id', $this->projectProposal->id)

View File

@@ -35,12 +35,6 @@ on([
'nostrLoggedIn' => function ($pubkey) {
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
if (
$this->currentPleb->id !== $this->projectProposal->einundzwanzig_pleb_id
&& !in_array($this->currentPleb->npub, config('einundzwanzig.config.current_board'), true)
) {
return $this->js('alert("Du bist hierzu nicht berechtigt.")');
}
$this->isAllowed = true;
},
'nostrLoggedOut' => function () {

View File

@@ -29,9 +29,6 @@ on([
'nostrLoggedIn' => function ($pubkey) {
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
if ($this->currentPleb->association_status->value < 3) {
return $this->js('alert("Du bist hierzu nicht berechtigt.")');
}
$this->isAllowed = true;
},
'nostrLoggedOut' => function () {

View File

@@ -33,9 +33,6 @@ on([
'nostrLoggedIn' => function ($pubkey) {
$this->currentPubkey = $pubkey;
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
if ($this->currentPleb->association_status->value < 2) {
return $this->js('alert("Du bist hierzu nicht berechtigt.")');
}
$this->isAllowed = true;
},
'nostrLoggedOut' => function () {
@@ -98,7 +95,7 @@ $delete = function ($id) {
</form>
<!-- Add meetup button -->
@if($currentPleb && $currentPleb->association_status->value > 2)
@if($currentPleb && $currentPleb->association_status->value > 1)
<x-button :href="route('association.projectSupport.create')" icon="plus"
label="Projekt einreichen"/>
@endif