mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-13 05:26:47 +00:00
🆕 feat(pages): change x-if to x-show for conditional rendering in admin and project support views
This commit is contained in:
@@ -162,7 +162,7 @@ $signEvent = function ($event) {
|
||||
:seo="new \RalphJSmit\Laravel\SEO\Support\SEOData(title: 'Wahlen ' . $election->year, description: 'Wahlen des Vereins im Jahr ' . $election->year)"
|
||||
>
|
||||
@volt
|
||||
<div x-cloak x-if="isAllowed" class="relative flex h-full" x-data="nostrApp(@this)"
|
||||
<div x-cloak x-show="isAllowed" class="relative flex h-full" x-data="nostrApp(@this)"
|
||||
wire:poll.600000ms="checkElection">
|
||||
|
||||
@php
|
||||
@@ -558,7 +558,7 @@ $signEvent = function ($event) {
|
||||
</div>
|
||||
|
||||
<!-- Log events -->
|
||||
<div x-cloak x-if="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">
|
||||
<header class="px-5 py-4">
|
||||
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Präsidium Log <span
|
||||
@@ -625,7 +625,7 @@ $signEvent = function ($event) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div x-cloak x-if="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">
|
||||
<header class="px-5 py-4">
|
||||
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Board Log <span
|
||||
|
||||
@@ -54,7 +54,7 @@ $saveElection = function ($index) {
|
||||
|
||||
<x-layouts.app title="{{ __('Wahlen') }}">
|
||||
@volt
|
||||
<div x-cloak class="relative flex h-full" x-if="isAllowed" x-data="{isAllowed: $wire.entangle('isAllowed').live}">
|
||||
<div x-cloak class="relative flex h-full" x-show="isAllowed" x-data="{isAllowed: $wire.entangle('isAllowed').live}">
|
||||
@foreach($elections as $election)
|
||||
<div class="w-full sm:w-1/3 p-4">
|
||||
<div class="shadow-lg rounded-lg overflow-hidden">
|
||||
|
||||
@@ -48,7 +48,7 @@ on([
|
||||
|
||||
<x-layouts.app title="{{ __('Mitglieder') }}">
|
||||
@volt
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-if="isAllowed" x-data="{isAllowed: $wire.entangle('isAllowed').live}" x-cloak>
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-show="isAllowed" x-data="{isAllowed: $wire.entangle('isAllowed').live}" x-cloak>
|
||||
<livewire:einundzwanzig-pleb-table/>
|
||||
</div>
|
||||
@endvolt
|
||||
|
||||
@@ -115,7 +115,7 @@ $handleNotApprove = function () {
|
||||
<x-layouts.app :seo="new SEOData(title: 'Unterstützung für: ' . $projectProposal->name,description: str($projectProposal->description)->limit(100, '...', true), image: $projectProposal->getFirstMediaUrl('main'))">
|
||||
@volt
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full" x-data="nostrDefault(@this)" x-cloak
|
||||
x-if="isAllowed">
|
||||
x-show="isAllowed">
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="max-w-5xl mx-auto flex flex-col lg:flex-row lg:space-x-8 xl:space-x-16">
|
||||
|
||||
@@ -72,7 +72,7 @@ $save = function () {
|
||||
|
||||
<x-layouts.app title="{{ $projectProposal->name }}">
|
||||
@volt
|
||||
<div x-cloak x-if="isAllowed" class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto"
|
||||
<div x-cloak x-show="isAllowed" class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto"
|
||||
x-data="nostrDefault(@this)">
|
||||
<form class="space-y-8 divide-y divide-gray-700 pb-24">
|
||||
<div class="space-y-8 divide-y divide-gray-700 sm:space-y-5">
|
||||
|
||||
@@ -64,7 +64,7 @@ $save = function () {
|
||||
|
||||
<x-layouts.app title="Neuer Vorschlag für eine Unterstützung">
|
||||
@volt
|
||||
<div x-cloak x-if="isAllowed" class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto"
|
||||
<div x-cloak x-show="isAllowed" class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto"
|
||||
x-data="nostrDefault(@this)">
|
||||
<form class="space-y-8 divide-y divide-gray-700 pb-24">
|
||||
<div class="space-y-8 divide-y divide-gray-700 sm:space-y-5">
|
||||
|
||||
@@ -74,7 +74,7 @@ $delete = function ($id) {
|
||||
>
|
||||
@volt
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto" x-data="nostrDefault(@this)" x-cloak
|
||||
x-if="isAllowed">
|
||||
x-show="show">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="sm:flex sm:justify-between sm:items-center mb-5">
|
||||
@@ -96,8 +96,10 @@ $delete = function ($id) {
|
||||
</form>
|
||||
|
||||
<!-- Add meetup button -->
|
||||
<x-button :href="route('association.projectSupport.create')" icon="plus"
|
||||
label="Projekt einreichen"/>
|
||||
@if($currentPleb && $currentPleb->status > 2)
|
||||
<x-button :href="route('association.projectSupport.create')" icon="plus"
|
||||
label="Projekt einreichen"/>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -197,11 +199,13 @@ $delete = function ($id) {
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||
label="Editieren"/>
|
||||
@endif
|
||||
<x-button
|
||||
icon="folder-open"
|
||||
xs
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||
label="Öffnen"/>
|
||||
@if($currentPleb && $currentPleb->status > 2)
|
||||
<x-button
|
||||
icon="folder-open"
|
||||
xs
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||
label="Öffnen"/>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user