进行了一些优化
This commit is contained in:
1 parent
c6e0423e46
commit
17dabca568
2 files changed
+29
-56
No files matched your search
+11
-11
@@ -138,17 +138,17 @@
|
||||
}
|
||||
|
||||
// ===== 统一视图壳(下载 / 错误 / 扫码共用主题化外观) =====
|
||||
// variant 决定 hero 渐变配色(对应 CSS 的 .dlv-* 修饰符)。
|
||||
// 头部与按钮统一继承运行时主题色(--focus-color),状态用图标 + 标题区分。
|
||||
const DL_VIEWS = {
|
||||
success: { variant: 'success', icon: 'fa-cloud-download-alt', title: '下载已就绪' },
|
||||
login: { variant: 'info', icon: 'fa-user-lock', title: '请先登录' },
|
||||
purchase: { variant: 'brand', icon: 'fa-shopping-cart', title: '请先购买' },
|
||||
vip: { variant: 'vip', icon: 'fa-gem', title: '会员专属' },
|
||||
credits: { variant: 'warn', icon: 'fa-coins', title: '积分不足' },
|
||||
quota: { variant: 'warn', icon: 'fa-hourglass-half', title: '今日免费额度已用完' },
|
||||
captcha: { variant: 'error', icon: 'fa-shield-alt', title: '验证失败' },
|
||||
error: { variant: 'error', icon: 'fa-exclamation-circle', title: '下载失败' },
|
||||
pay: { variant: 'info', icon: 'fa-qrcode', title: '扫码支付' },
|
||||
success: { icon: 'fa-cloud-download-alt', title: '下载已就绪' },
|
||||
login: { icon: 'fa-user-lock', title: '请先登录' },
|
||||
purchase: { icon: 'fa-shopping-cart', title: '请先购买' },
|
||||
vip: { icon: 'fa-gem', title: '会员专属' },
|
||||
credits: { icon: 'fa-coins', title: '积分不足' },
|
||||
quota: { icon: 'fa-hourglass-half', title: '今日免费额度已用完' },
|
||||
captcha: { icon: 'fa-shield-alt', title: '验证失败' },
|
||||
error: { icon: 'fa-exclamation-circle', title: '下载失败' },
|
||||
pay: { icon: 'fa-qrcode', title: '扫码支付' },
|
||||
};
|
||||
|
||||
function dlActionButton(action) {
|
||||
@@ -169,7 +169,7 @@
|
||||
function dlView(viewKey, options) {
|
||||
const meta = DL_VIEWS[viewKey] || DL_VIEWS.error;
|
||||
options = options || {};
|
||||
let html = '<div class="aksrt-dl-view dlv-' + meta.variant + '">';
|
||||
let html = '<div class="aksrt-dl-view">';
|
||||
html += '<div class="aksrt-dl-modal__hero">';
|
||||
html += '<div class="aksrt-dl-modal__hero-icon"><i class="fa fas ' + meta.icon + '" aria-hidden="true"></i></div>';
|
||||
html += '<h3 class="aksrt-dl-modal__title">' + (options.title || meta.title) + '</h3>';
|
||||
|
||||
Reference in new issue
Block a user