mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-03 01:23:22 +02:00
Fixed #205
This commit is contained in:
parent
032d89a9a6
commit
325c0fb235
3 changed files with 9 additions and 2 deletions
|
@ -409,6 +409,9 @@ class SystemController extends Controller
|
||||||
case 'korean':
|
case 'korean':
|
||||||
$idntable = '/^[가-힣0-9]+$/u';
|
$idntable = '/^[가-힣0-9]+$/u';
|
||||||
break;
|
break;
|
||||||
|
case 'arabic':
|
||||||
|
$idntable = '/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(?<!-)$/u';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$idntable = '/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i';
|
$idntable = '/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i';
|
||||||
break;
|
break;
|
||||||
|
@ -983,6 +986,7 @@ class SystemController extends Controller
|
||||||
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ]+$/u' => 'Cyrillic',
|
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ]+$/u' => 'Cyrillic',
|
||||||
'/^[ぁ-んァ-ン一-龯々]+$/u' => 'Japanese',
|
'/^[ぁ-んァ-ン一-龯々]+$/u' => 'Japanese',
|
||||||
'/^[가-힣]+$/u' => 'Korean',
|
'/^[가-힣]+$/u' => 'Korean',
|
||||||
|
'/^(?!-)(?!.*--)[\x{0621}-\x{064A}\x{0660}-\x{0669}\x{0671}-\x{06D3}-]{1,63}(?<!-)$/u' => 'Arabic',
|
||||||
];
|
];
|
||||||
|
|
||||||
$idnRegex = $tld['idn_table'];
|
$idnRegex = $tld['idn_table'];
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
<option value="cyrillic">{{ __('Cyrillic') }}</option>
|
<option value="cyrillic">{{ __('Cyrillic') }}</option>
|
||||||
<option value="japanese">{{ __('Japanese') }}</option>
|
<option value="japanese">{{ __('Japanese') }}</option>
|
||||||
<option value="korean">{{ __('Korean') }}</option>
|
<option value="korean">{{ __('Korean') }}</option>
|
||||||
|
<option value="arabic">{{ __('Arabic') }}</option>
|
||||||
</select>
|
</select>
|
||||||
<small class="form-text text-muted">{{ __('Choose the script type that the TLD will support. Options include ASCII, Cyrillic, Japanese, and Korean.') }}</small>
|
<small class="form-text text-muted">{{ __('Choose the script type that the TLD will support. Options include ASCII, Cyrillic, Japanese, and Korean.') }}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,20 +26,22 @@
|
||||||
function actionsFormatter(cell, formatterParams, onRendered) {
|
function actionsFormatter(cell, formatterParams, onRendered) {
|
||||||
return `<a class="btn btn-icon btn-outline-info" href="/registry/tld/${cell.getRow().getData().tld_o}" title="{{ __('Manage Settings') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5" /></svg></a> <a class="btn btn-icon btn-outline-secondary" href="/registry/reserved" title="{{ __('Manage Reserved Names') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l11 0" /><path d="M9 12l11 0" /><path d="M9 18l11 0" /><path d="M5 6l0 .01" /><path d="M5 12l0 .01" /><path d="M5 18l0 .01" /></svg></a> <a class="btn btn-icon btn-outline-dark" href="/registry/tokens" title="{{ __('Manage Allocation Tokens') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12l8 -4.5" /><path d="M12 12v9" /><path d="M12 12l-8 -4.5" /><path d="M12 12l8 4.5" /><path d="M12 3v9" /><path d="M12 12l-8 4.5" /></svg></a>`;
|
return `<a class="btn btn-icon btn-outline-info" href="/registry/tld/${cell.getRow().getData().tld_o}" title="{{ __('Manage Settings') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5" /></svg></a> <a class="btn btn-icon btn-outline-secondary" href="/registry/reserved" title="{{ __('Manage Reserved Names') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l11 0" /><path d="M9 12l11 0" /><path d="M9 18l11 0" /><path d="M5 6l0 .01" /><path d="M5 12l0 .01" /><path d="M5 18l0 .01" /></svg></a> <a class="btn btn-icon btn-outline-dark" href="/registry/tokens" title="{{ __('Manage Allocation Tokens') }}"><svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12l8 -4.5" /><path d="M12 12v9" /><path d="M12 12l-8 -4.5" /><path d="M12 12l8 4.5" /><path d="M12 3v9" /><path d="M12 12l-8 4.5" /></svg></a>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mapping of database string values to script names
|
// Mapping of database string values to script names
|
||||||
const dbValueToScriptName = {
|
const dbValueToScriptName = {
|
||||||
'/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i': 'ASCII',
|
'/^(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-)(.(?!-)(?!.*--)[A-Z0-9-]{1,63}(?<!-))*$/i': 'ASCII',
|
||||||
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ0-9ʼѫѣѭ]+$/u': 'Cyrillic',
|
'/^[а-яА-ЯґҐєЄіІїЇѝЍћЋљЈ0-9ʼѫѣѭ]+$/u': 'Cyrillic',
|
||||||
'/^[ぁ-んァ-ン一-龯々0-9]+$/u': 'Japanese',
|
'/^[ぁ-んァ-ン一-龯々0-9]+$/u': 'Japanese',
|
||||||
'/^[가-힣0-9]+$/u': 'Korean',
|
'/^[가-힣0-9]+$/u': 'Korean',
|
||||||
|
'/^(?!-)(?!.*--)[\u0621-\u064A\u0660-\u0669\u0671-\u06D3-]{1,63}(?<!-)$/u': 'Arabic'
|
||||||
};
|
};
|
||||||
|
|
||||||
const scriptNameToBadgeClass = {
|
const scriptNameToBadgeClass = {
|
||||||
'ASCII': 'bg-indigo-lt', // Blue badge for ASCII
|
'ASCII': 'bg-indigo-lt', // Blue badge for ASCII
|
||||||
'Cyrillic': 'bg-secondary-lt', // Grey badge for Cyrillic
|
'Cyrillic': 'bg-secondary-lt', // Grey badge for Cyrillic
|
||||||
'Japanese': 'bg-success-lt', // Green badge for Japanese
|
'Japanese': 'bg-success-lt', // Green badge for Japanese
|
||||||
'Korean': 'bg-danger-lt', // Red badge for Korean
|
'Korean': 'bg-danger-lt', // Red badge for Korean
|
||||||
|
'Arabic': 'bg-teal-lt', // Teal badge for Japanese
|
||||||
// Add more mappings as needed
|
// Add more mappings as needed
|
||||||
'Unknown': 'bg-warning-lt' // Yellow badge for Unknown
|
'Unknown': 'bg-warning-lt' // Yellow badge for Unknown
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue