This commit is contained in:
1 parent
3eee288f78
commit
e7328d9d2b
2 files changed
+27
-11
No files matched your search
+6
-11
@@ -20,17 +20,12 @@ $redirectUrlUtm = $redirect_url_utm ?? '';
|
|||||||
<div class="dropzone-form-format">
|
<div class="dropzone-form-format">
|
||||||
<div class="dropzone-form-format-label"><?= Yii::t('app', 'Поддерживаемые форматы') ?>:</div>
|
<div class="dropzone-form-format-label"><?= Yii::t('app', 'Поддерживаемые форматы') ?>:</div>
|
||||||
<div class="dropzone-form-format-list">
|
<div class="dropzone-form-format-list">
|
||||||
<div class="dropzone-form-format-item">png</div>
|
<div class="dropzone-form-format-item">JPG</div>
|
||||||
<div class="dropzone-form-format-item">jpeg</div>
|
<div class="dropzone-form-format-item">PNG</div>
|
||||||
<div class="dropzone-form-format-item">jpg</div>
|
<div class="dropzone-form-format-item">HEIC</div>
|
||||||
<div class="dropzone-form-format-item">webp</div>
|
<div class="dropzone-form-format-item">WebP</div>
|
||||||
<div class="dropzone-form-format-item">heic</div>
|
<div class="dropzone-form-format-item">GIF</div>
|
||||||
<div class="dropzone-form-format-item">gif</div>
|
<div class="dropzone-form-format-item">+много</div>
|
||||||
<div class="dropzone-form-format-item">tiff</div>
|
|
||||||
<div class="dropzone-form-format-item">bmp</div>
|
|
||||||
<div class="dropzone-form-format-item">avif</div>
|
|
||||||
<div class="dropzone-form-format-item">jxl</div>
|
|
||||||
<div class="dropzone-form-format-item">dng</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropzone-form-action">
|
<div class="dropzone-form-action">
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Регрессия видимого списка форматов Preland.
|
||||||
|
* Список не управляет приёмом файла: он только кратко объясняет пользователю
|
||||||
|
* поддерживаемые типы и не должен разрастаться в несколько строк.
|
||||||
|
*/
|
||||||
|
|
||||||
|
$form = file_get_contents(dirname(__DIR__) . '/components/form.php');
|
||||||
|
if ($form === false) {
|
||||||
|
fwrite(STDERR, "FAIL: не удалось прочитать компонент формы Preland.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
preg_match_all('/<div class="dropzone-form-format-item">([^<]+)<\\/div>/', $form, $formatMatches);
|
||||||
|
$visibleFormats = ['JPG', 'PNG', 'HEIC', 'WebP', 'GIF', '+много'];
|
||||||
|
if ($formatMatches[1] !== $visibleFormats) {
|
||||||
|
fwrite(STDERR, "FAIL: Preland не показывает утверждённый компактный список форматов в нужном порядке.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "OK: Preland показывает утверждённый компактный список форматов\n";
|
||||||
Reference in new issue
Block a user