顶部资料卡新增签到按钮
This commit is contained in:
1 parent
5f01b3b316
commit
d27c0757f2
7 files changed
+145
-62
No files matched your search
@@ -34,12 +34,14 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
|
||||
<div class="uc-asset-card__title">
|
||||
<i class="fa fas fa-money-bill em12 mr6" aria-hidden="true"></i><?php echo esc_html($currency); ?>
|
||||
</div>
|
||||
<?php if (!empty($signin_enabled)) : ?>
|
||||
<span class="uc-asset-card__head-action muted-color px12" data-aksrt-signin>
|
||||
<button type="button" class="uc-asset-card__signin muted-color px12" data-signin-btn disabled>
|
||||
<?php esc_html_e('签到领积分', 'aksrt'); ?><i class="fa fas fa-angle-right em12 ml3" aria-hidden="true"></i>
|
||||
<button type="button" class="uc-asset-card__signin muted-color px12" data-signin-btn data-signin-idle-label="<?php esc_attr_e('签到领积分', 'aksrt'); ?>" data-signin-done-label="<?php esc_attr_e('已签到', 'aksrt'); ?>" disabled>
|
||||
<span data-signin-label><?php esc_html_e('签到领积分', 'aksrt'); ?></span><i class="fa fas fa-angle-right em12 ml3" aria-hidden="true"></i>
|
||||
</button>
|
||||
<span class="uc-asset-card__signin-status" data-signin-status></span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="uc-asset-card__body flex jsb ac">
|
||||
<div class="uc-asset-card__amount c-green">
|
||||
|
||||
@@ -14,14 +14,6 @@ if (!$credits_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (function_exists('aksrt_is_captcha_enabled_for') && aksrt_is_captcha_enabled_for('signin')) :
|
||||
?>
|
||||
<div class="aksrt-signin-captcha" data-signin-captcha style="margin-bottom:16px;">
|
||||
<?php aksrt_render_captcha('signin'); ?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$signin_dates = [];
|
||||
if (class_exists('\AKSRT\Credits\Signin')) {
|
||||
$signin_log = \AKSRT\Credits\Signin::get_instance()->get_recent_signins($user_id, 30);
|
||||
|
||||
@@ -69,9 +69,24 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
|
||||
</div>
|
||||
</div>
|
||||
<div class="uc-header__actions">
|
||||
<?php if (!empty($signin_enabled)) : ?>
|
||||
<span data-aksrt-signin>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm uc-header__signin-btn<?php echo !empty($signin_signed_today) ? ' is-done' : ''; ?>"
|
||||
data-signin-btn
|
||||
data-signin-idle-label="<?php esc_attr_e('签到', 'aksrt'); ?>"
|
||||
data-signin-done-label="<?php esc_attr_e('已签到', 'aksrt'); ?>"
|
||||
<?php disabled(!empty($signin_signed_today)); ?>
|
||||
>
|
||||
<i class="fa fas fa-calendar-check" aria-hidden="true"></i>
|
||||
<span data-signin-label><?php echo !empty($signin_signed_today) ? esc_html__('已签到', 'aksrt') : esc_html__('签到', 'aksrt'); ?></span>
|
||||
</button>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($messages_url)) : ?>
|
||||
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm">
|
||||
<i class="fa fas fa-bell" aria-hidden="true"></i> <?php esc_html_e('消息通知', 'aksrt'); ?>
|
||||
<a href="<?php echo esc_url($messages_url); ?>" class="btn-ghost btn-sm btn-icon uc-header__message-btn" aria-label="<?php esc_attr_e('消息通知', 'aksrt'); ?>" title="<?php esc_attr_e('消息通知', 'aksrt'); ?>">
|
||||
<i class="fa fas fa-bell" aria-hidden="true"></i>
|
||||
<?php if ($notification_unread_count > 0) : ?>
|
||||
<span class="uc-header__action-badge"><?php echo esc_html((string) $notification_unread_count); ?></span>
|
||||
<?php endif; ?>
|
||||
@@ -79,4 +94,9 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($signin_enabled) && function_exists('aksrt_is_captcha_enabled_for') && aksrt_is_captcha_enabled_for('signin')) : ?>
|
||||
<div class="aksrt-signin-captcha" data-signin-captcha>
|
||||
<?php aksrt_render_captcha('signin'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in new issue
Block a user