@etspress/netflix 0.1.26 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etspress/netflix",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "private": false,
5
5
  "description": "流媒体合租主题插件",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "id": "netflix",
19
19
  "name": "流媒体合租主题",
20
20
  "description": "流媒体合租商店主题与页面展示配置",
21
- "version": "0.1.26",
21
+ "version": "0.1.28",
22
22
  "runtime": {
23
23
  "type": "npm-static",
24
24
  "publicRoot": "public"
package/plugin.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "schemaVersion": 1,
4
4
  "id": "netflix",
5
5
  "name": "流媒体合租主题",
6
- "version": "0.1.26",
6
+ "version": "0.1.28",
7
7
  "description": "流媒体合租商店主题与页面展示配置。",
8
8
  "author": "D&J Studio",
9
9
  "license": "MIT",
@@ -1,8 +1,9 @@
1
1
  @import url("/plugins/appstore/static-plugins/netflix/home.css");
2
2
 
3
3
  html.nfc-active #app { display: none !important; }
4
+ html.nfc-active, html.nfc-active body { background: #f7f7f8 !important; }
4
5
 
5
- #netflix-theme-home.nfc-console{min-height:100vh;background:#f7f7f8;color:#333;font-family:-apple-system,"Yuanti SC",system-ui,"Helvetica Neue",Helvetica,"Segoe UI",Arial,Roboto,"PingFang SC",miui,"Hiragino Sans GB","Microsoft Yahei",sans-serif;font-size:14px;line-height:1.5}
6
+ #netflix-theme-home.nfc-console{display:flow-root;min-height:100vh;background:#f7f7f8;color:#333;font-family:-apple-system,"Yuanti SC",system-ui,"Helvetica Neue",Helvetica,"Segoe UI",Arial,Roboto,"PingFang SC",miui,"Hiragino Sans GB","Microsoft Yahei",sans-serif;font-size:14px;line-height:1.5}
6
7
  #netflix-theme-home.nfc-console *{box-sizing:border-box}
7
8
  #netflix-theme-home.nfc-console .nfc-layout{display:grid;grid-template-columns:155px minmax(0,1fr);gap:20px;width:96vw;max-width:1200px;min-height:490px;margin:20px auto 84px;align-items:start}
8
9
  #netflix-theme-home.nfc-console .nfc-sidebar{position:sticky;top:80px;min-height:380px;padding:22px 12px 14px;background:#fff;border-radius:8px;box-shadow:0 2px 7px rgba(24,32,45,.06)}
@@ -262,6 +263,6 @@ html.nfc-active #app { display: none !important; }
262
263
  }
263
264
 
264
265
  @media(max-width:720px){
265
- #netflix-theme-home.nfc-console .nfc-layout{min-height:calc(100vh - 72px)}
266
+ #netflix-theme-home.nfc-console .nfc-layout{min-height:calc(100vh - 72px);margin-top:66px}
266
267
  #netflix-theme-home.nfc-console .nfc-sidebar{display:none}
267
268
  }
package/public/console.js CHANGED
@@ -279,6 +279,13 @@
279
279
  document.body.appendChild(root);
280
280
  animateThemePage(root.querySelector('.nfc-page-content'));
281
281
  document.documentElement.classList.remove('nfc-auth-route-pending');
282
+ root.querySelectorAll('.nfc-avatar img').forEach(function (image) {
283
+ image.addEventListener('error', function () {
284
+ var fallback = document.createElement('span');
285
+ fallback.textContent = image.dataset.fallback || 'U';
286
+ image.replaceWith(fallback);
287
+ }, { once: true });
288
+ });
282
289
  root.querySelector('.nfc-logout').addEventListener('click', logoutUser);
283
290
  var language = root.querySelector('.nfc-language');
284
291
  language.value = localStorage.getItem('locale') || 'zh-CN';
@@ -556,8 +563,10 @@
556
563
 
557
564
  function renderAccount() {
558
565
  var p = accountProfile || {};
559
- var avatar = safeHref(p.avatar_url || p.avatar || '', '');
560
- var avatarMarkup = avatar ? '<img src="' + escapeHtml(avatar) + '" alt="">' : escapeHtml(String(p.nickname || p.email || 'U').charAt(0).toUpperCase());
566
+ var avatarSource = String(p.avatar_url || p.avatar || '').trim();
567
+ var avatar = avatarSource ? safeHref(avatarSource, '') : '';
568
+ var avatarInitial = String(p.nickname || p.email || 'U').charAt(0).toUpperCase();
569
+ var avatarMarkup = avatar ? '<img src="' + escapeHtml(avatar) + '" data-fallback="' + escapeHtml(avatarInitial) + '" alt="">' : escapeHtml(avatarInitial);
561
570
  var content = '<div class="nfc-section-title"><h1>个人中心</h1><a class="nfc-refresh" href="/me/profile">编辑资料</a></div>' +
562
571
  '<section class="nfc-panel nfc-account-hero"><span class="nfc-avatar">' + avatarMarkup + '</span><div><h2>' + escapeHtml(p.nickname || p.email || '用户') + '</h2><p>' + escapeHtml(p.email || '账号信息') + '</p></div><a href="/me/profile">账户设置 ›</a></section>' +
563
572
  '<section class="nfc-account-grid"><a class="nfc-panel nfc-account-tile" href="/me/orders"><strong>我的车票</strong><span>查看订单与车票状态 ›</span></a><a class="nfc-panel nfc-account-tile" href="/me/affiliate"><strong>我的推广</strong><span>推广链接与返佣记录 ›</span></a><a class="nfc-panel nfc-account-tile" href="/me/wallet"><strong>我的钱包</strong><span>余额 ' + escapeHtml(formatMoney(walletAccount.balance_amount || walletAccount.balance || 0, walletAccount.currency)) + ' ›</span></a><a class="nfc-panel nfc-account-tile" href="/me/profile"><strong>个人资料</strong><span>昵称与账号安全 ›</span></a></section><button class="nfc-mobile-logout" type="button"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M10 17l5-5-5-5m5 5H3m9-9h6a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3h-6"/></svg>退出登录</button>';