mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-27 21:30:16 +00:00
🎉 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:
@@ -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)
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user