perf(modal): unify cancellable frontend modal flows
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
25ce1d8f43
commit
5375ad6429
36 files changed
+2623
-1806
No files matched your search
@@ -110,7 +110,7 @@ $tabs = [
|
||||
<div class="aksrt-orders-page__list" data-aksrt-order-list>
|
||||
<?php foreach ($orders as $order) :
|
||||
$number = (string) ($order['order_number'] ?? '');
|
||||
$actions = (array) ($order['actions'] ?? []);
|
||||
$actions = (array) ($order['allowed_actions'] ?? []);
|
||||
$amount = !empty($order['is_points'])
|
||||
? esc_html((string) ($order['currency_symbol'] ?? __('积分', 'aksrt')) . ' ' . (string) (int) round((float) ($order['amount'] ?? 0)))
|
||||
: '¥' . esc_html(number_format((float) ($order['amount'] ?? 0), 2));
|
||||
@@ -137,5 +137,4 @@ $tabs = [
|
||||
<div class="aksrt-orders-page__empty"><i class="fas fa-receipt" aria-hidden="true"></i><h3><?php echo esc_html($order_number !== '' || $type !== '' || $status !== 'all' ? __('没有匹配的订单', 'aksrt') : __('还没有购买记录', 'aksrt')); ?></h3><p><?php echo esc_html($order_number !== '' || $type !== '' || $status !== 'all' ? __('换个条件试试,或清除当前筛选。', 'aksrt') : __('购买内容或开通权益后,订单会出现在这里。', 'aksrt')); ?></p><?php if ($order_number !== '' || $type !== '' || $status !== 'all') : ?><a class="btn-outline" href="<?php echo esc_url($orders_url(['order_status' => null, 'order_type' => null, 'order_number' => null, 'order_page' => null])); ?>"><?php esc_html_e('清除条件', 'aksrt'); ?></a><?php endif; ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="aksrt-modal" data-aksrt-order-detail-modal hidden><div class="aksrt-modal__overlay" data-aksrt-order-detail-close></div><section class="aksrt-modal__dialog aksrt-order-detail-dialog" role="dialog" aria-modal="true" aria-labelledby="aksrt-order-detail-title"><header class="aksrt-modal__header"><h3 id="aksrt-order-detail-title"><?php esc_html_e('订单详情', 'aksrt'); ?></h3><button class="aksrt-modal__close" type="button" data-aksrt-order-detail-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>">×</button></header><div class="aksrt-modal__body" data-aksrt-order-detail-body></div><footer class="aksrt-modal__footer" data-aksrt-order-detail-footer></footer></section></div>
|
||||
</div>
|
||||
Reference in new issue
Block a user