mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2025-12-14 06:36:46 +00:00
feat: add voting feature toggle
This commit introduces a new feature toggle 'voting' to enable/disable voting. It also includes minor formatting adjustments in election admin blade files.
This commit is contained in:
@@ -14,6 +14,8 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'voting' => env('ENABLE_VOTING', false),
|
||||||
|
|
||||||
'relay' => env('NOSTR_RELAY'),
|
'relay' => env('NOSTR_RELAY'),
|
||||||
'nostr' => env('NOSTR_P'),
|
'nostr' => env('NOSTR_P'),
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ mount(function () {
|
|||||||
->get()
|
->get()
|
||||||
->toArray();
|
->toArray();
|
||||||
$this->loadEvents();
|
$this->loadEvents();
|
||||||
if ($this->election->end_time->isPast()) {
|
if ($this->election->end_time->isPast() || !config('services.voting')) {
|
||||||
$this->isNotClosed = false;
|
$this->isNotClosed = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ $loadEvents = function () {
|
|||||||
|
|
||||||
<!-- Cards -->
|
<!-- Cards -->
|
||||||
<div class="grid grid-cols-12 gap-6">
|
<div class="grid grid-cols-12 gap-6">
|
||||||
|
|
||||||
@foreach($positions as $key => $position)
|
@foreach($positions as $key => $position)
|
||||||
<div wire:key="pos_{{ $key }}" wire:ignore
|
<div wire:key="pos_{{ $key }}" wire:ignore
|
||||||
class="flex flex-col col-span-full sm:col-span-6 bg-white dark:bg-gray-800 shadow-sm rounded-xl">
|
class="flex flex-col col-span-full sm:col-span-6 bg-white dark:bg-gray-800 shadow-sm rounded-xl">
|
||||||
|
|||||||
Reference in New Issue
Block a user