feat(widgets): rebuild admin widgets page to match reference theme
- Replace transfer modal/admin-post flow with reference-style AJAX export/import/template dialogs (admin-transfer.js, TransferController) - Customizer "移出模块" action, reference lazy form loading with t-notice - Common fields use reference labels, dependencies, compact/inline rows, top/bottom-only extra spacing; form header with description/reminder - Remove placement hint, template preview and legacy transfer code - Fix widget audit (current_datetime stub, honor catalog common flags) and regenerate stale golden fixtures for posts_toc, quote, posts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea80cd96cc
commit
a579a5b00a
14 files changed
+698
-446
No files matched your search
@@ -133,8 +133,15 @@ foreach ($registry as $slug => $definition) {
|
||||
$fields = $definition->fields();
|
||||
$walk($fields, $slug);
|
||||
$field_ids = array_column($fields, 'id');
|
||||
$required_common = ['show_type', 'show_id_type', 'show_ids', 'layout_pin_pc', 'layout_bg'];
|
||||
if (($definition->common()['animation'] ?? true)) {
|
||||
$flags = $definition->common();
|
||||
$required_common = [];
|
||||
if (!empty($flags['visibility'])) {
|
||||
array_push($required_common, 'show_type', 'show_id_type', 'show_ids');
|
||||
}
|
||||
if (!empty($flags['layout'])) {
|
||||
array_push($required_common, 'layout_pin_pc', 'layout_bg');
|
||||
}
|
||||
if (!empty($flags['animation'])) {
|
||||
$required_common[] = 'animation_in';
|
||||
}
|
||||
foreach ($required_common as $required) {
|
||||
@@ -164,6 +171,11 @@ foreach ($expected as $slug) {
|
||||
if (!defined('DAY_IN_SECONDS')) {
|
||||
define('DAY_IN_SECONDS', 86400);
|
||||
}
|
||||
if (!function_exists('current_datetime')) {
|
||||
function current_datetime(): DateTimeImmutable {
|
||||
return new DateTimeImmutable('now', new DateTimeZone('UTC'));
|
||||
}
|
||||
}
|
||||
$query_args = PostQuery::arguments([
|
||||
'count' => 7,
|
||||
'category_ids' => '2,5',
|
||||
|
||||
Reference in new issue
Block a user