mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-25 04:13:17 +00:00
✨ Add Livewire Flux components and new tests for project proposal and editing forms
This commit is contained in:
@@ -70,14 +70,18 @@
|
||||
|
||||
|
||||
@if(\App\Support\NostrAuth::check())
|
||||
<form method="post" action="{{ route('logout') }}"
|
||||
@submit="$dispatch('nostrLoggedOut')">
|
||||
@csrf
|
||||
<x-button secondary label="Logout" type="submit"/>
|
||||
</form>
|
||||
@else
|
||||
<x-button wire:key="loginBtn" label="Mit Nostr verbinden" @click="openNostrLogin"
|
||||
x-show="!$store.nostr.user"/>
|
||||
<form method="post" action="{{ route('logout') }}"
|
||||
@submit="$dispatch('nostrLoggedOut')">
|
||||
@csrf
|
||||
<flux:button secondary type="submit">
|
||||
Logout
|
||||
</flux:button>
|
||||
</form>
|
||||
@else
|
||||
<flux:button wire:key="loginBtn" @click="openNostrLogin"
|
||||
x-show="!$store.nostr.user">
|
||||
Mit Nostr verbinden
|
||||
</flux:button>
|
||||
@endif
|
||||
|
||||
<!-- Info button -->
|
||||
|
||||
@@ -88,26 +88,30 @@
|
||||
@if(
|
||||
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|
||||
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
|
||||
)
|
||||
<x-button
|
||||
)
|
||||
<flux:button
|
||||
icon="trash"
|
||||
xs
|
||||
negative
|
||||
wire:click="confirmDelete({{ $project->id }})"
|
||||
label="Löschen"/>
|
||||
<x-button
|
||||
wire:loading.attr="disabled">
|
||||
Löschen
|
||||
</flux:button>
|
||||
<flux:button
|
||||
icon="pencil"
|
||||
xs
|
||||
secondary
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
|
||||
label="Editieren"/>
|
||||
:href="route('association.projectSupport.edit', ['projectProposal' => $project])">
|
||||
Editieren
|
||||
</flux:button>
|
||||
@endif
|
||||
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
|
||||
<x-button
|
||||
<flux:button
|
||||
icon="folder-open"
|
||||
xs
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
|
||||
label="Öffnen"/>
|
||||
:href="route('association.projectSupport.item', ['projectProposal' => $project])">
|
||||
Öffnen
|
||||
</flux:button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="py-2">
|
||||
|
||||
@@ -3,11 +3,10 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{!! seo($seo ?? null) !!}
|
||||
{!! seo($seo ?? null) !}
|
||||
|
||||
<title>{{ $title ?? 'Page Title' }}</title>
|
||||
@livewireStyles
|
||||
@wireUiScripts
|
||||
@stack('scripts')
|
||||
@vite(['resources/js/app.js','resources/css/app.css'])
|
||||
@googlefonts
|
||||
@@ -15,183 +14,92 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
|
||||
@include('components.layouts.partials.styles')
|
||||
@fluxAppearance
|
||||
</head>
|
||||
<body
|
||||
class="font-sans antialiased bg-gray-100 dark:bg-[#222222] text-gray-600 dark:text-gray-400"
|
||||
:class="{ 'sidebar-expanded': sidebarExpanded }"
|
||||
x-data="{ sidebarOpen: false, sidebarExpanded: localStorage.getItem('sidebar-expanded') == 'true', inboxSidebarOpen: false }"
|
||||
x-init="$watch('sidebarExpanded', value => localStorage.setItem('sidebar-expanded', value))"
|
||||
<body class="min-h-screen bg-white dark:bg-zinc-800 antialiased"
|
||||
x-data="nostrLogin"
|
||||
>
|
||||
<x-dialog />
|
||||
<x-notifications />
|
||||
<script>
|
||||
if (localStorage.getItem('sidebar-expanded') == 'true') {
|
||||
document.querySelector('body').classList.add('sidebar-expanded');
|
||||
} else {
|
||||
document.querySelector('body').classList.remove('sidebar-expanded');
|
||||
}
|
||||
</script>
|
||||
<div x-data="nostrLogin"
|
||||
class="flex h-[100dvh] overflow-hidden">
|
||||
<livewire:layout.sidebar/>
|
||||
<div
|
||||
class="relative flex flex-col flex-1 overflow-y-auto overflow-x-hidden">
|
||||
<!-- Site header -->
|
||||
<header
|
||||
class="sticky top-0 before:absolute before:inset-0 before:backdrop-blur-md before:bg-white/90 dark:before:bg-[#222222]/90 lg:before:bg-[#222222]/90 dark:lg:before:bg-[#222222]/90 before:-z-10 max-lg:shadow-sm z-30">
|
||||
<div class="px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex items-center justify-between h-16 lg:border-b border-gray-200 dark:border-gray-700/60">
|
||||
<flux:header container class="bg-zinc-50 dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="bars-2" inset="left" />
|
||||
|
||||
<!-- Header: Left side -->
|
||||
<div class="flex">
|
||||
<!-- Hamburger button -->
|
||||
<button
|
||||
class="text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 lg:hidden"
|
||||
@click.stop="sidebarOpen = !sidebarOpen"
|
||||
aria-controls="sidebar"
|
||||
:aria-expanded="sidebarOpen"
|
||||
>
|
||||
<span class="sr-only">Open sidebar</span>
|
||||
<svg class="w-6 h-6 fill-current" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="4" y="5" width="16" height="2"/>
|
||||
<rect x="4" y="11" width="16" height="2"/>
|
||||
<rect x="4" y="17" width="16" height="2"/>
|
||||
</svg>
|
||||
</button>
|
||||
<flux:brand href="/" name="Einundzwanzig" class="max-lg:hidden dark:hidden">
|
||||
<img src="{{ asset('einundzwanzig-alpha.jpg') }}" alt="Logo" class="h-6 w-6">
|
||||
</flux:brand>
|
||||
<flux:brand href="/" name="Einundzwanzig" class="max-lg:hidden! hidden dark:flex">
|
||||
<img src="{{ asset('einundzwanzig-alpha.jpg') }}" alt="Logo" class="h-6 w-6">
|
||||
</flux:brand>
|
||||
|
||||
</div>
|
||||
<flux:navbar class="-mb-px max-lg:hidden">
|
||||
@if(\App\Support\NostrAuth::check())
|
||||
<flux:navbar.item icon="rss" :href="route('association.news')" {{ request()->routeIs('association.news') ? 'current' : '' }}>News</flux:navbar.item>
|
||||
<flux:navbar.item icon="id-card-clip" :href="route('association.profile')" {{ request()->routeIs('association.profile') ? 'current' : '' }}>Profil</flux:navbar.item>
|
||||
<flux:navbar.item icon="hand-heart" :href="route('association.projectSupport')" {{ request()->routeIs('association.projectSupport') ? 'current' : '' }}>Projekt-Unterstützungen</flux:navbar.item>
|
||||
@endif
|
||||
</flux:navbar>
|
||||
|
||||
<!-- Header: Right side -->
|
||||
<div class="flex items-center space-x-3">
|
||||
<flux:spacer />
|
||||
|
||||
{{--@include('components.layouts.partials.search-button')--}}
|
||||
<flux:navbar class="me-4">
|
||||
<flux:dropdown position="bottom" align="end" class="max-lg:hidden">
|
||||
<flux:navbar.item icon:trailing="information-circle">Info</flux:navbar.item>
|
||||
|
||||
{{--@include('components.layouts.partials.notification-buttons')--}}
|
||||
<flux:menu>
|
||||
<flux:menu.item href="https://gitworkshop.dev/r/naddr1qvzqqqrhnypzqzklvar4enzu53t06vpzu3h465nwkzhk9p9ls4y5crwhs3lnu5pnqy88wumn8ghj7mn0wvhxcmmv9uqpxetfde6kuer6wasku7nfvukkummnw3eqdgsn8w/issues" target="_blank">Issues/Feedback</flux:menu.item>
|
||||
<flux:menu.item :href="route('changelog')">Changelog</flux:menu.item>
|
||||
<flux:menu.item href="https://github.com/HolgerHatGarkeineNode/einundzwanzig-nostr" target="_blank">Github</flux:menu.item>
|
||||
<flux:menu.item href="https://einundzwanzig.space/kontakt/" target="_blank">Impressum</flux:menu.item>
|
||||
</flux:menu>
|
||||
</flux:dropdown>
|
||||
|
||||
@if(\App\Support\NostrAuth::check())
|
||||
<form method="post" action="{{ route('logout') }}" @submit="$dispatch('nostrLoggedOut')">
|
||||
@csrf
|
||||
<flux:navbar.item type="submit" icon="arrow-right-start-on-rectangle">Logout</flux:navbar.item>
|
||||
</form>
|
||||
@else
|
||||
<flux:navbar.item icon="user" wire:key="loginBtn" @click="openNostrLogin">Mit Nostr verbinden</flux:navbar.item>
|
||||
@endif
|
||||
</flux:navbar>
|
||||
</flux:header>
|
||||
|
||||
@if(\App\Support\NostrAuth::check())
|
||||
<form method="post" action="{{ route('logout') }}"
|
||||
@submit="$dispatch('nostrLoggedOut')">
|
||||
@csrf
|
||||
<x-button secondary label="Logout" type="submit"/>
|
||||
</form>
|
||||
@else
|
||||
<x-button wire:key="loginBtn" label="Mit Nostr verbinden" @click="openNostrLogin"
|
||||
x-show="!$store.nostr.user"/>
|
||||
@endif
|
||||
<flux:sidebar sticky collapsible="mobile" class="bg-zinc-50 dark:bg-zinc-900 border-r border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.header>
|
||||
<flux:sidebar.brand
|
||||
href="/"
|
||||
name="Einundzwanzig"
|
||||
>
|
||||
<img src="{{ asset('einundzwanzig-alpha.jpg') }}" alt="Logo" class="h-6 w-6">
|
||||
</flux:sidebar.brand>
|
||||
|
||||
<!-- Info button -->
|
||||
<div class="relative inline-flex" x-data="{ open: false }">
|
||||
<button
|
||||
class="w-8 h-8 flex items-center justify-center hover:bg-[#1B1B1B] lg:hover:bg-[#1B1B1B] dark:hover:bg-[#1B1B1B]/50 dark:lg:hover:bg-[#1B1B1B] rounded-full"
|
||||
:class="{ 'bg-gray-200 dark:bg-[#1B1B1B]': open }"
|
||||
aria-haspopup="true"
|
||||
@click.prevent="open = !open"
|
||||
:aria-expanded="open"
|
||||
>
|
||||
<span class="sr-only">Info</span>
|
||||
<svg class="fill-current text-gray-500/80 dark:text-gray-400/80" width="16" height="16"
|
||||
viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M9 7.5a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0v-4ZM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"/>
|
||||
<path fill-rule="evenodd"
|
||||
d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16Zm6-8A6 6 0 1 1 2 8a6 6 0 0 1 12 0Z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div
|
||||
class="origin-top-right z-10 absolute top-full right-0 min-w-44 bg-white dark:bg-[#1B1B1B] border border-gray-200 dark:border-[#1B1B1B]/60 py-1.5 rounded-lg shadow-lg overflow-hidden mt-1"
|
||||
@click.outside="open = false"
|
||||
@keydown.escape.window="open = false"
|
||||
x-show="open"
|
||||
x-transition:enter="transition ease-out duration-200 transform"
|
||||
x-transition:enter-start="opacity-0 -translate-y-2"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-out duration-200"
|
||||
x-transition:leave-start="opacity-100"
|
||||
x-transition:leave-end="opacity-0"
|
||||
x-cloak
|
||||
>
|
||||
<div
|
||||
class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase pt-1.5 pb-2 px-3">
|
||||
Information
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="font-medium text-sm text-amber-500 hover:text-amber-600 dark:hover:text-amber-400 flex items-center py-1 px-3"
|
||||
target="_blank"
|
||||
href="https://gitworkshop.dev/r/naddr1qvzqqqrhnypzqzklvar4enzu53t06vpzu3h465nwkzhk9p9ls4y5crwhs3lnu5pnqy88wumn8ghj7mn0wvhxcmmv9uqpxetfde6kuer6wasku7nfvukkummnw3eqdgsn8w/issues"
|
||||
@click="open = false" @focus="open = true"
|
||||
@focusout="open = false">
|
||||
<i class="fa-sharp-duotone fa-solid fa-code w-3 h-3 fill-current text-amber-500 shrink-0 mr-2"></i>
|
||||
<span>Issues/Feedback</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="font-medium text-sm text-amber-500 hover:text-amber-600 dark:hover:text-amber-400 flex items-center py-1 px-3"
|
||||
href="{{ route('changelog') }}" @click="open = false" @focus="open = true"
|
||||
@focusout="open = false">
|
||||
<i class="fa-sharp-duotone fa-solid fa-code w-3 h-3 fill-current text-amber-500 shrink-0 mr-2"></i>
|
||||
<span>Changelog</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="font-medium text-sm text-amber-500 hover:text-amber-600 dark:hover:text-amber-400 flex items-center py-1 px-3"
|
||||
href="https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr"
|
||||
target="_blank" @click="open = false" @focus="open = true"
|
||||
@focusout="open = false">
|
||||
<i class="fa-brands fa-github w-3 h-3 fill-current text-amber-500 shrink-0 mr-2"></i>
|
||||
<span>Github</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="font-medium text-sm text-amber-500 hover:text-amber-600 dark:hover:text-amber-400 flex items-center py-1 px-3"
|
||||
href="https://einundzwanzig.space/kontakt/" target="_blank"
|
||||
@click="open = false" @focus="open = true"
|
||||
@focusout="open = false">
|
||||
<i class="fa-sharp-duotone fa-solid fa-info w-3 h-3 fill-current text-amber-500 shrink-0 mr-2"></i>
|
||||
<span>Impressum</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<flux:sidebar.collapse class="in-data-flux-sidebar-on-desktop:not(in-data-flux-sidebar-collapsed-desktop):-mr-2" />
|
||||
</flux:sidebar.header>
|
||||
|
||||
{{--@include('components.layouts.partials.dark-mode-toggle')--}}
|
||||
<flux:sidebar.nav>
|
||||
@if(\App\Support\NostrAuth::check())
|
||||
<flux:sidebar.item icon="rss" :href="route('association.news')" {{ request()->routeIs('association.news') ? 'current' : '' }}>News</flux:sidebar.item>
|
||||
<flux:sidebar.item icon="id-card-clip" :href="route('association.profile')" {{ request()->routeIs('association.profile') ? 'current' : '' }}>Meine Mitgliedschaft</flux:sidebar.item>
|
||||
<flux:sidebar.item icon="hand-heart" :href="route('association.projectSupport')" {{ request()->routeIs('association.projectSupport') ? 'current' : '' }}>Projekt-Unterstützungen</flux:sidebar.item>
|
||||
@endif
|
||||
|
||||
<!-- Divider -->
|
||||
{{--<hr class="w-px h-6 bg-gray-200 dark:bg-gray-700/60 border-none"/>--}}
|
||||
@include('components.layouts.navigation.admin')
|
||||
</flux:sidebar.nav>
|
||||
</flux:sidebar>
|
||||
|
||||
{{--@include('components.layouts.partials.user-button')--}}
|
||||
<flux:main container>
|
||||
{{ $slot }}
|
||||
</flux:main>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<main class="grow">
|
||||
{{ $slot }}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
@livewireScriptConfig
|
||||
<script>
|
||||
window.wnjParams = {
|
||||
position: 'bottom',
|
||||
// The only accepted value is 'bottom', default is top
|
||||
accent: 'orange',
|
||||
// Supported values: cyan (default), green, purple, red, orange, neutral, stone
|
||||
startHidden: false,
|
||||
// If the host page has a button that call `getPublicKey` to start a
|
||||
// login procedure, the minimized widget can be hidden until connected
|
||||
compactMode: false,
|
||||
// Show the minimized widget in a compact form
|
||||
disableOverflowFix: false,
|
||||
// If the host page on mobile has an horizontal scrolling, the floating
|
||||
// element/modal are pushed to the extreme right/bottom and exit the
|
||||
// viewport. A style is injected in the html/body elements fix this.
|
||||
// This option permit to disable this default behavior
|
||||
}
|
||||
</script>
|
||||
<script src="{{ asset('dist/window.nostr.min.js.js') }}"></script>
|
||||
@fluxScripts
|
||||
@livewireScriptConfig
|
||||
<script>
|
||||
window.wnjParams = {
|
||||
position: 'bottom',
|
||||
accent: 'orange',
|
||||
startHidden: false,
|
||||
compactMode: false,
|
||||
disableOverflowFix: false,
|
||||
}
|
||||
</script>
|
||||
<script src="{{ asset('dist/window.nostr.min.js.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -78,11 +78,16 @@ new class extends Component {
|
||||
{{ $election['year'] }}
|
||||
</div>
|
||||
<div class="shadow-lg rounded-lg overflow-hidden">
|
||||
<x-textarea wire:model="elections.{{ $loop->index }}.candidates" rows="25"
|
||||
label="candidates" placeholder=""/>
|
||||
<flux:field>
|
||||
<flux:label>Kandidaten</flux:label>
|
||||
<flux:textarea wire:model="elections.{{ $loop->index }}.candidates" rows="25" placeholder="Kandidaten..."/>
|
||||
<flux:error name="elections.{{ $loop->index }}.candidates" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<x-button label="Speichern" wire:click="saveElection({{ $loop->index }})" wire:loading.attr="disabled"/>
|
||||
<flux:button wire:click="saveElection({{ $loop->index }})" wire:loading.attr="disabled">
|
||||
Speichern
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -475,19 +475,19 @@ new class extends Component {
|
||||
<div
|
||||
class="flex items-center justify-between before:absolute before:inset-0 before:backdrop-blur-md before:bg-gray-50/90 dark:before:bg-[#1B1B1B]/90 before:-z-10 border-b border-gray-200 dark:border-gray-700/60 px-4 sm:px-6 md:px-5 h-16">
|
||||
<div
|
||||
class="flex flex-col space-y-2 sm:space-y-0 sm:flex-row justify-between items-center w-full">
|
||||
<div>
|
||||
@if($isNotClosed)
|
||||
<x-badge success
|
||||
label="Die Wahl ist geöffnet bis zum {{ $election->end_time?->timezone('Europe/Berlin')->format('d.m.Y H:i') }}"/>
|
||||
@else
|
||||
<x-badge negative label="Die Wahl ist geschlossen"/>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<x-button secondary
|
||||
:href="route('association.election.admin', ['election' => $election])"
|
||||
label="Wahl-Admin"/>
|
||||
class="flex flex-col space-y-2 sm:space-y-0 sm:flex-row justify-between items-center w-full">
|
||||
<div>
|
||||
@if($isNotClosed)
|
||||
<flux:badge color="success" label="Die Wahl ist geöffnet bis zum {{ $election->end_time?->timezone('Europe/Berlin')->format('d.m.Y H:i') }}"/>
|
||||
@else
|
||||
<flux:badge color="danger" label="Die Wahl ist geschlossen"/>
|
||||
@endif
|
||||
</div>
|
||||
<div>
|
||||
<flux:button secondary
|
||||
:href="route('association.election.admin', ['election' => $election])"
|
||||
label="Wahl-Admin">
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -202,19 +202,22 @@ class extends Component {
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2 flex justify-end w-full space-x-2">
|
||||
<x-button
|
||||
<flux:button
|
||||
xs
|
||||
target="_blank"
|
||||
:href="url()->temporarySignedRoute('dl', now()->addMinutes(30), ['media' => $post->getFirstMedia('pdf')])"
|
||||
label="Öffnen"
|
||||
primary icon="cloud-arrow-down"/>
|
||||
icon="cloud-arrow-down">
|
||||
Öffnen
|
||||
</flux:button>
|
||||
@if($canEdit)
|
||||
<x-button
|
||||
<flux:button
|
||||
xs
|
||||
negative
|
||||
wire:click="delete({{ $post->id }})"
|
||||
wire:loading.attr="disabled"
|
||||
label="Löschen"
|
||||
negative icon="trash"/>
|
||||
icon="trash">
|
||||
Löschen
|
||||
</flux:button>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
@@ -253,27 +256,40 @@ class extends Component {
|
||||
@enderror
|
||||
</div>
|
||||
<div wire:dirty>
|
||||
<x-native-select
|
||||
wire:model="form.category"
|
||||
label="Kategorie"
|
||||
placeholder="Wähle Kategorie"
|
||||
:options="\App\Enums\NewsCategory::selectOptions()"
|
||||
option-label="label" option-value="value"
|
||||
/>
|
||||
<flux:field>
|
||||
<flux:label>Kategorie</flux:label>
|
||||
<flux:select
|
||||
wire:model="form.category"
|
||||
placeholder="Wähle Kategorie"
|
||||
>
|
||||
@foreach(\App\Enums\NewsCategory::selectOptions() as $category)
|
||||
<flux:select.option
|
||||
:label="$category['label']"
|
||||
:value="$category['value']"
|
||||
/>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
<flux:error name="form.category" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:dirty>
|
||||
<x-input label="Titel" wire:model="form.name"/>
|
||||
<flux:field>
|
||||
<flux:label>Titel</flux:label>
|
||||
<flux:input wire:model="form.name" placeholder="News-Titel" />
|
||||
<flux:error name="form.name" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:dirty>
|
||||
<x-textarea
|
||||
description="optional"
|
||||
label="Beschreibung" wire:model="form.description"/>
|
||||
<flux:field>
|
||||
<flux:label>Beschreibung</flux:label>
|
||||
<flux:description>optional</flux:description>
|
||||
<flux:textarea wire:model="form.description" rows="4" placeholder="Beschreibung..." />
|
||||
<flux:error name="form.description" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<button
|
||||
wire:click="save"
|
||||
class="btn-sm w-full bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300">
|
||||
<flux:button wire:click="save" class="w-full">
|
||||
Hinzufügen
|
||||
</button>
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -503,19 +503,22 @@ new class extends Component {
|
||||
sich bitte direkt an den Vorstand.</a>
|
||||
</h4>
|
||||
<div class="sm:flex sm:items-center space-y-4 sm:space-y-0 sm:space-x-4 mt-5">
|
||||
<div class="sm:w-1/2 flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div wire:dirty>
|
||||
<x-checkbox wire:model="form.check"
|
||||
label="Ich stimme den Vereins-Statuten zu"/>
|
||||
</div>
|
||||
<div class="sm:w-1/2 flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div wire:dirty>
|
||||
<flux:field variant="inline">
|
||||
<flux:checkbox wire:model="form.check" label="Ich stimme den Vereins-Statuten zu"/>
|
||||
<flux:error name="form.check" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div>
|
||||
<a href="https://einundzwanzig.space/verein/" target="_blank"
|
||||
class="text-amber-500">Statuten</a>
|
||||
</div>
|
||||
</div>
|
||||
<x-button label="Mit deinem aktuellen Nostr-Profil Mitglied werden"
|
||||
wire:click="save({{ AssociationStatus::PASSIVE() }})"/>
|
||||
<flux:button wire:click="save({{ AssociationStatus::PASSIVE() }})">
|
||||
Mit deinem aktuellen Nostr-Profil Mitglied werden
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -543,25 +546,35 @@ new class extends Component {
|
||||
diese Adresse AES-256 verschlüsselt in der Datenbank ab.
|
||||
</div>
|
||||
<div
|
||||
class="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2 text-amber-500">
|
||||
<x-toggle xl warning
|
||||
wire:model.live="no"
|
||||
wire:dirty
|
||||
label="NEIN">
|
||||
<x-slot name="description">
|
||||
<span class="py-2 text-amber-500">Ich informiere mich selbst in der News Sektion und gebe keine E-Mail Adresse raus.</span>
|
||||
</x-slot>
|
||||
</x-toggle>
|
||||
class="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2 text-amber-500">
|
||||
<flux:field variant="inline" xl>
|
||||
<flux:label>NEIN</flux:label>
|
||||
<flux:description>Ich informiere mich selbst in der News Sektion und gebe keine E-Mail Adresse raus.</flux:description>
|
||||
<flux:switch
|
||||
wire:model.live="no"
|
||||
wire:dirty
|
||||
/>
|
||||
<flux:error name="no" />
|
||||
</flux:field>
|
||||
</div>
|
||||
@if($showEmail)
|
||||
<div wire:key="showEmail"
|
||||
class="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2">
|
||||
<x-input wire:model.live.debounce="fax" wire:dirty label="Fax-Nummer"/>
|
||||
<x-input wire:model.live.debounce="email" wire:dirty
|
||||
label="E-Mail Adresse"/>
|
||||
<flux:field>
|
||||
<flux:label>Fax-Nummer</flux:label>
|
||||
<flux:input wire:model.live.debounce="fax" wire:dirty placeholder="Fax-Nummer"/>
|
||||
<flux:error name="fax" />
|
||||
</flux:field>
|
||||
<flux:field>
|
||||
<flux:label>E-Mail Adresse</flux:label>
|
||||
<flux:input type="email" wire:model.live.debounce="email" wire:dirty placeholder="E-Mail Adresse"/>
|
||||
<flux:error name="email" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:key="showSave" class="flex space-x-2 mt-2">
|
||||
<x-button wire:click="saveEmail" label="Speichern"/>
|
||||
<flux:button wire:click="saveEmail" wire:loading.attr="disabled">
|
||||
Speichern
|
||||
</flux:button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -70,23 +70,22 @@ class extends Component {
|
||||
</h2>
|
||||
<div class="space-y-4">
|
||||
<div wire:dirty>
|
||||
<x-input label="Name" wire:model="form.name"/>
|
||||
@error('form.name')
|
||||
<span class="text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
<flux:field>
|
||||
<flux:label>Name</flux:label>
|
||||
<flux:input wire:model="form.name" placeholder="Projektname" />
|
||||
<flux:error name="form.name" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:dirty>
|
||||
<x-textarea label="Beschreibung" wire:model="form.description"/>
|
||||
@error('form.description')
|
||||
<span class="text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
<flux:field>
|
||||
<flux:label>Beschreibung</flux:label>
|
||||
<flux:textarea wire:model="form.description" rows="6" placeholder="Projektbeschreibung..." />
|
||||
<flux:error name="form.description" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<button
|
||||
wire:click="save"
|
||||
wire:loading.attr="disabled"
|
||||
class="w-full btn-sm bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300">
|
||||
<flux:button wire:click="save" wire:loading.attr="disabled" variant="primary" class="w-full">
|
||||
Speichern
|
||||
</button>
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,13 @@ class extends Component {
|
||||
$currentPubkey = NostrAuth::pubkey();
|
||||
$currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $currentPubkey)->first();
|
||||
|
||||
if ($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id) {
|
||||
if (
|
||||
(
|
||||
$currentPleb
|
||||
&& $currentPleb->id === $project->einundzwanzig_pleb_id
|
||||
)
|
||||
|| in_array($currentPleb->npub, config('einundzwanzig.config.current_board'))
|
||||
) {
|
||||
$this->isAllowed = true;
|
||||
$this->form = [
|
||||
'name' => $project->name,
|
||||
@@ -76,23 +82,22 @@ class extends Component {
|
||||
</h2>
|
||||
<div class="space-y-4">
|
||||
<div wire:dirty>
|
||||
<x-input label="Name" wire:model="form.name"/>
|
||||
@error('form.name')
|
||||
<span class="text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
<flux:field>
|
||||
<flux:label>Name</flux:label>
|
||||
<flux:input wire:model="form.name" placeholder="Projektname" />
|
||||
<flux:error name="form.name" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:dirty>
|
||||
<x-textarea label="Beschreibung" wire:model="form.description"/>
|
||||
@error('form.description')
|
||||
<span class="text-red-500">{{ $message }}</span>
|
||||
@enderror
|
||||
<flux:field>
|
||||
<flux:label>Beschreibung</flux:label>
|
||||
<flux:textarea wire:model="form.description" rows="6" placeholder="Projektbeschreibung..." />
|
||||
<flux:error name="form.description" />
|
||||
</flux:field>
|
||||
</div>
|
||||
<button
|
||||
wire:click="update"
|
||||
wire:loading.attr="disabled"
|
||||
class="w-full btn-sm bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300">
|
||||
<flux:button wire:click="update" wire:loading.attr="disabled" variant="primary" class="w-full">
|
||||
Speichern
|
||||
</button>
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -118,14 +118,15 @@ new class extends Component {
|
||||
|
||||
<!-- Search form -->
|
||||
<form class="relative">
|
||||
<x-input type="search" wire:model.live.debounce="search"
|
||||
placeholder="Suche"/>
|
||||
<flux:input type="search" wire:model.live.debounce="search"
|
||||
placeholder="Suche" icon="magnifying-glass"/>
|
||||
</form>
|
||||
|
||||
|
||||
<!-- Add meetup button -->
|
||||
@if($currentPleb && $currentPleb->association_status->value > 1 && $currentPleb->paymentEvents()->where('year', date('Y'))->where('paid', true)->exists())
|
||||
<x-button :href="route('association.projectSupport.create')" icon="plus"
|
||||
label="Projekt einreichen"/>
|
||||
<flux:button :href="route('association.projectSupport.create')" icon="plus" variant="primary">
|
||||
Projekt einreichen
|
||||
</flux:button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user