Release 202507061803
This commit is contained in:
@@ -10,6 +10,7 @@ import Button from '../../../../components/Button.astro'
|
||||
import FormSection from '../../../../components/FormSection.astro'
|
||||
import FormSubSection from '../../../../components/FormSubSection.astro'
|
||||
import InputCardGroup from '../../../../components/InputCardGroup.astro'
|
||||
import InputCheckbox from '../../../../components/InputCheckbox.astro'
|
||||
import InputCheckboxGroup from '../../../../components/InputCheckboxGroup.astro'
|
||||
import InputImageFile from '../../../../components/InputImageFile.astro'
|
||||
import InputSelect from '../../../../components/InputSelect.astro'
|
||||
@@ -545,6 +546,13 @@ const apiCalls = await Astro.locals.banners.try(
|
||||
cardSize="sm"
|
||||
/>
|
||||
|
||||
<InputCheckbox
|
||||
label="Strict Commenting"
|
||||
name="strictCommentingEnabled"
|
||||
checked={service.strictCommentingEnabled}
|
||||
descriptionInline="Require proof of being a client for comments."
|
||||
/>
|
||||
|
||||
<InputSubmitButton label="Update" icon="ri:save-line" hideCancel />
|
||||
</form>
|
||||
</FormSection>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { AttributeCategory, Currency, VerificationStatus } from '@prisma/client'
|
||||
import { Icon } from 'astro-icon/components'
|
||||
import { actions, isInputError } from 'astro:actions'
|
||||
|
||||
import InputCheckbox from '../../../components/InputCheckbox.astro'
|
||||
import BaseLayout from '../../../layouts/BaseLayout.astro'
|
||||
import { cn } from '../../../lib/cn'
|
||||
import { prisma } from '../../../lib/prisma'
|
||||
@@ -368,6 +369,13 @@ const inputErrors = isInputError(result?.error) ? result.error.fields : {}
|
||||
}
|
||||
</div>
|
||||
|
||||
<InputCheckbox
|
||||
label="Strict Commenting"
|
||||
name="strictCommentingEnabled"
|
||||
checked={false}
|
||||
descriptionInline="Require proof of being a client for comments."
|
||||
/>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="font-title inline-flex justify-center rounded-md border border-green-500/30 bg-green-500/10 px-4 py-2 text-sm text-green-400 shadow-xs transition-colors duration-200 hover:bg-green-500/20 focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-black focus:outline-hidden"
|
||||
|
||||
@@ -102,6 +102,7 @@ const [service, dbNotificationPreferences] = await Astro.locals.banners.tryMany(
|
||||
userSentimentAt: true,
|
||||
averageUserRating: true,
|
||||
isRecentlyApproved: true,
|
||||
strictCommentingEnabled: true,
|
||||
contactMethods: {
|
||||
select: {
|
||||
value: true,
|
||||
@@ -1533,6 +1534,20 @@ const activeEventToShow =
|
||||
<li>Moderation is light.</li>
|
||||
<li>Double-check before trusting.</li>
|
||||
</ul>
|
||||
|
||||
{
|
||||
service.strictCommentingEnabled && (
|
||||
<p class="mt-2">
|
||||
<Icon
|
||||
name="ri:verified-badge-fill"
|
||||
class="me-0.5 inline-block size-4 align-[-0.3em] text-orange-100/95"
|
||||
/>
|
||||
<span class="font-medium text-orange-100/95">Proof of being a client required</span>, for this
|
||||
service.
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
<div class="absolute inset-y-2 right-2 flex flex-col justify-center">
|
||||
<Icon name="ri:alert-line" class="xs:opacity-20 h-full max-h-16 w-auto opacity-10" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user