Refactor admin form layout, improve bible reference input, re-enable client-side cookie access, and try manual focus on login modal
This commit is contained in:
100
pages/admin.vue
100
pages/admin.vue
@@ -39,23 +39,25 @@
|
||||
<div class="space-y-4">
|
||||
<h3 class="text-lg font-medium text-gray-900">Basic Information</h3>
|
||||
|
||||
<UFormGroup label="Sermon Title" name="title" required>
|
||||
<UInput
|
||||
v-model="form.title"
|
||||
placeholder="Enter sermon title"
|
||||
:disabled="loading"
|
||||
size="sm"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<div class="flex flex-wrap items-end gap-x-4 gap-y-2 mb-4">
|
||||
<UFormGroup label="Sermon Title" name="title" required class="w-full sm:max-w-xs">
|
||||
<UInput
|
||||
v-model="form.title"
|
||||
placeholder="Enter sermon title"
|
||||
:disabled="loading"
|
||||
size="sm"
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup label="Sermon Date" name="date" required>
|
||||
<UInput
|
||||
v-model="form.date"
|
||||
type="date"
|
||||
:disabled="loading"
|
||||
size="sm"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UFormGroup label="Sermon Date" name="date" required class="w-full sm:max-w-[150px]">
|
||||
<UInput
|
||||
v-model="form.date"
|
||||
type="date"
|
||||
:disabled="loading"
|
||||
size="sm"
|
||||
/>
|
||||
</UFormGroup>
|
||||
</div>
|
||||
|
||||
<div class="bg-blue-50 p-4 rounded-lg">
|
||||
<p class="text-sm text-blue-800">
|
||||
@@ -70,42 +72,40 @@
|
||||
|
||||
<!-- Bible References -->
|
||||
<div class="space-y-2">
|
||||
<div class="flex justify-between items-center">
|
||||
<h3 class="text-lg font-medium text-gray-900">Bible References</h3>
|
||||
<UButton
|
||||
@click="addBibleReference"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
icon="i-heroicons-plus"
|
||||
<h3 class="text-lg font-medium text-gray-900">Bible References</h3>
|
||||
<div
|
||||
v-for="(reference, index) in form.bibleReferences"
|
||||
:key="index"
|
||||
class="flex items-center gap-2"
|
||||
>
|
||||
<UInput
|
||||
v-model="form.bibleReferences[index]"
|
||||
:placeholder="`Bible reference ${index + 1}`"
|
||||
:disabled="loading"
|
||||
>
|
||||
Add Reference
|
||||
</UButton>
|
||||
</div>
|
||||
|
||||
<div class="space-y-2">
|
||||
<div
|
||||
v-for="(reference, index) in form.bibleReferences"
|
||||
:key="index"
|
||||
class="flex gap-2"
|
||||
>
|
||||
<UInput
|
||||
v-model="form.bibleReferences[index]"
|
||||
:placeholder="`Bible reference ${index + 1}`"
|
||||
:disabled="loading"
|
||||
class="flex-1"
|
||||
size="lg"
|
||||
/>
|
||||
<UButton
|
||||
@click="removeBibleReference(index)"
|
||||
variant="outline"
|
||||
color="red"
|
||||
size="sm"
|
||||
icon="i-heroicons-minus"
|
||||
:disabled="loading"
|
||||
/>
|
||||
</div>
|
||||
class="flex-1"
|
||||
size="lg"
|
||||
/>
|
||||
<UButton
|
||||
@click="removeBibleReference(index)"
|
||||
variant="ghost"
|
||||
color="red"
|
||||
size="sm"
|
||||
icon="i-heroicons-minus"
|
||||
:disabled="loading"
|
||||
v-if="form.bibleReferences.length > 1"
|
||||
/>
|
||||
</div>
|
||||
<UButton
|
||||
@click="addBibleReference"
|
||||
variant="link"
|
||||
color="primary"
|
||||
icon="i-heroicons-plus"
|
||||
:disabled="loading"
|
||||
:padded="false"
|
||||
class="-ml-1 mt-2"
|
||||
>
|
||||
Add another reference
|
||||
</UButton>
|
||||
</div>
|
||||
|
||||
<!-- Personal Application -->
|
||||
|
||||
Reference in New Issue
Block a user