45 lines
1.8 KiB
PHP
45 lines
1.8 KiB
PHP
<div class="bg-white rounded-lg border border-gray-200 p-6" x-data="{ loading: true }" data-skeleton-id="domain-input">
|
|
<h3 class="text-lg font-semibold text-gray-800 mb-4">{{ __('Domain') }}</h3>
|
|
|
|
<!-- Skeleton Loading -->
|
|
<template x-if="loading">
|
|
<div class="space-y-4 animate-pulse">
|
|
<div class="h-12 bg-gray-200 rounded-lg"></div>
|
|
<div class="h-4 bg-gray-200 rounded w-3/4"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<!-- Actual Content -->
|
|
<template x-if="!loading">
|
|
<div x-data="{ serverName: '', isValid: true }">
|
|
<flux:input
|
|
name="server_name"
|
|
placeholder="{{ __('Nhập tên domain') }}"
|
|
x-model="serverName"
|
|
@input="isValid = /^[a-zA-Z0-9.-]+$/.test(serverName)"
|
|
>
|
|
<x-slot name="iconTrailing">
|
|
<flux:button
|
|
size="sm"
|
|
variant="subtle"
|
|
icon="x-mark"
|
|
class="-mr-1"
|
|
@click="serverName = ''; isValid = true"
|
|
type="button"
|
|
/>
|
|
</x-slot>
|
|
</flux:input>
|
|
|
|
<template x-if="!isValid">
|
|
<div class="p-4 my-4 text-sm text-red-800 rounded-lg bg-red-50" role="alert">
|
|
{{ __('Tên server không hợp lệ. Chỉ được dùng chữ, số, dấu chấm và dấu gạch ngang.') }}
|
|
<b>{{ __('VD: tenmiencuaban.com.vn') }}</b>
|
|
</div>
|
|
</template>
|
|
|
|
<p class="text-xs text-red-600 mt-2">
|
|
{{ __('Lưu ý: Quý khách chỉ ghi tên Domain, không cần ghi đầy đủ tiền tố http:// hoặc https://') }}
|
|
</p>
|
|
</div>
|
|
</template>
|
|
</div> |