@etspress/netflix 0.1.2 → 0.1.4

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.2",
3
+ "version": "0.1.4",
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.2",
21
+ "version": "0.1.4",
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.2",
6
+ "version": "0.1.4",
7
7
  "description": "流媒体合租商店主题与页面展示配置。",
8
8
  "author": "D&J Studio",
9
9
  "license": "MIT",
package/public/console.js CHANGED
@@ -75,10 +75,9 @@
75
75
 
76
76
  function mobileNavMarkup(config, page) {
77
77
  return '<nav class="nfh-mobile" aria-label="移动导航">' +
78
- mobileNavItem('/', config.navHomeLabel || '首页', 'M4 14.85V11q0-.2.075-.375T4.3 10.3l7-7q.15-.15.325-.225Q11.8 3 12 3t.375.075q.175.075.325.225l1.425 1.4ZM17 20v-8.175L13.075 7.9 15.2 5.775l4.5 4.525q.125.15.213.325Q20 10.8 20 11v8q0 .425-.288.712Q19.425 20 19 20ZM5 20q-.425 0-.713-.288Q4 19.425 4 19v-2.05l3-3V17h8.5v3Z', false) +
78
+ mobileNavItem('/', config.navHomeLabel || '首页', 'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z', false) +
79
79
  mobileNavItem('/me/orders', config.navProductsLabel || '车票', 'M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49M16 20c0-.55-.45-1-1-1H8.93c-1.48 0-2.74-1.08-2.96-2.54L4.16 7.78A.976.976 0 0 0 3.2 7c-.62 0-1.08.57-.96 1.18l1.75 8.58A5.01 5.01 0 0 0 8.94 21H15c.55 0 1-.45 1-1m-.46-5h-4.19l-1.03-4.1c1.28.72 2.63 1.28 4.1 1.3.58.01 1.05-.49 1.05-1.07 0-.59-.49-1.04-1.08-1.06-1.31-.04-2.63-.56-3.61-1.33L9.14 7.47c-.23-.18-.49-.3-.76-.38a2.2 2.2 0 0 0-.99-.06h-.02a2.27 2.27 0 0 0-1.84 2.61l1.35 5.92A3.01 3.01 0 0 0 9.83 18h6.85l3.09 2.42c.42.33 1.02.29 1.39-.08.45-.45.4-1.18-.1-1.57l-4.29-3.35a2 2 0 0 0-1.23-.42', page === 'ticket') +
80
80
  mobileNavItem('/me/affiliate', config.navPromotionLabel || '推广', 'm13.576 17.271-5.11-2.787a3.5 3.5 0 1 1 0-4.968l5.11-2.787a3.5 3.5 0 1 1 .958 1.755l-5.11 2.787a3.5 3.5 0 0 1 0 1.457l5.11 2.788a3.5 3.5 0 1 1-.958 1.755', page === 'promotion') +
81
- mobileNavItem('/support', '工单', 'M21 8a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-1.062A8 8 0 0 1 12 23v-2a6 6 0 0 0 6-6V9A6 6 0 0 0 6 9v7H3a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1.062a8.001 8.001 0 0 1 15.876 0zM7.76 15.785l1.06-1.696A5.97 5.97 0 0 0 12 15a5.97 5.97 0 0 0 3.18-.911l1.06 1.696A7.96 7.96 0 0 1 12 17a7.96 7.96 0 0 1-4.24-1.215', false) +
82
81
  mobileNavItem('/me', '我的', 'M12 17c3.662 0 6.865 1.575 8.607 3.925l-1.842.871C17.347 20.116 14.847 19 12 19c-2.848 0-5.347 1.116-6.765 2.796l-1.841-.872C5.136 18.574 8.338 17 12 17m0-15a5 5 0 0 1 5 5v3a5 5 0 0 1-4.783 4.995L12 15a5 5 0 0 1-5-5V7a5 5 0 0 1 4.783-4.995zm0 2a3 3 0 0 0-2.995 2.824L9 7v3a3 3 0 0 0 5.995.176L15 10V7a3 3 0 0 0-3-3', false) + '</nav>';
83
82
  }
84
83
 
package/public/home.js CHANGED
@@ -142,6 +142,7 @@
142
142
  return src ? '<img src="' + escapeHtml(safeHref(src, '')) + '" alt="" loading="lazy"' + (index >= 5 ? ' hidden' : '') + '>' : '';
143
143
  }).join('');
144
144
  var recentSource = config.productCardShowRecentPurchase === '否' ? '' : (block.recentText || localized(product.recentlyGotOnBus || product.recent_purchase_text || product.latest_purchase_text));
145
+ if (config.productCardShowRecentPurchase !== '否' && !recentSource) { var baseMinutes = 33 + Number(cardIndex || 0) * 11; recentSource = [baseMinutes, baseMinutes + 6, baseMinutes + 13].map(function (minutes) { return minutes + '分钟前有人上车'; }).join('\n'); }
145
146
  var recentText = String(recentSource || '').split(/\r?\n/).map(function (item) { return item.replace(/^演示\s*[·•|::-]?\s*/, '').trim(); }).filter(Boolean).join('\n');
146
147
  var sparse = !tags && !description && !avatars.length && !recentText;
147
148
  var recentItems = recentText ? recentText.split(/\r?\n/).map(function (s) { return s.trim(); }).filter(Boolean) : [];
@@ -288,7 +289,7 @@
288
289
  '<footer class="nfh-footer"><div class="nfh-footer-inner"><div class="nfh-promises">' + promises + '</div><div class="nfh-footer-divider"></div><div class="nfh-footer-body"><div class="nfh-footer-links">' + footerGroups + '</div>' +
289
290
  '</div><div class="nfh-language"><label for="nfh-language-select">' + escapeHtml(translate('language')) + '</label><div class="nfh-language-picker"><button id="nfh-language-select" class="nfh-language-select" type="button" aria-haspopup="listbox" aria-expanded="false"><span class="nfh-language-current"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></button><div class="nfh-language-menu" role="listbox" aria-label="' + escapeHtml(translate('language')) + '" hidden>' + languageOptions + '</div></div></div>' +
290
291
  '<div class="nfh-footer-bottom"><span>' + escapeHtml(config.copyrightText || '') + '</span><div>' + licenseInfo + '</div></div></div></footer>' +
291
- '<nav class="nfh-mobile" aria-label="移动导航">' + mobileNavItem('/', configuredLabel(config.navHomeLabel, '首页', 'home'), 'M4 14.85V11q0-.2.075-.375T4.3 10.3l7-7q.15-.15.325-.225Q11.8 3 12 3t.375.075q.175.075.325.225l1.425 1.4ZM17 20v-8.175L13.075 7.9 15.2 5.775l4.5 4.525q.125.15.213.325Q20 10.8 20 11v8q0 .425-.288.712Q19.425 20 19 20ZM5 20q-.425 0-.713-.288Q4 19.425 4 19v-2.05l3-3V17h8.5v3Z', true) + mobileNavItem('/me/orders', configuredLabel(config.navProductsLabel, '车票', 'tickets'), 'M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49M16 20c0-.55-.45-1-1-1H8.93c-1.48 0-2.74-1.08-2.96-2.54L4.16 7.78A.976.976 0 0 0 3.2 7c-.62 0-1.08.57-.96 1.18l1.75 8.58A5.01 5.01 0 0 0 8.94 21H15c.55 0 1-.45 1-1m-.46-5h-4.19l-1.03-4.1c1.28.72 2.63 1.28 4.1 1.3.58.01 1.05-.49 1.05-1.07 0-.59-.49-1.04-1.08-1.06-1.31-.04-2.63-.56-3.61-1.33L9.14 7.47c-.23-.18-.49-.3-.76-.38a2.2 2.2 0 0 0-.99-.06h-.02a2.27 2.27 0 0 0-1.84 2.61l1.35 5.92A3.01 3.01 0 0 0 9.83 18h6.85l3.09 2.42c.42.33 1.02.29 1.39-.08.45-.45.4-1.18-.1-1.57l-4.29-3.35a2 2 0 0 0-1.23-.42', false) + mobileNavItem('/me/affiliate', configuredLabel(config.navPromotionLabel, '推广', 'promotion'), 'm13.576 17.271-5.11-2.787a3.5 3.5 0 1 1 0-4.968l5.11-2.787a3.5 3.5 0 1 1 .958 1.755l-5.11 2.787a3.5 3.5 0 0 1 0 1.457l5.11 2.788a3.5 3.5 0 1 1-.958 1.755', false) + mobileNavItem('/support', translate('support'), 'M21 8a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-1.062A8 8 0 0 1 12 23v-2a6 6 0 0 0 6-6V9A6 6 0 0 0 6 9v7H3a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1.062a8.001 8.001 0 0 1 15.876 0zM7.76 15.785l1.06-1.696A5.97 5.97 0 0 0 12 15a5.97 5.97 0 0 0 3.18-.911l1.06 1.696A7.96 7.96 0 0 1 12 17a7.96 7.96 0 0 1-4.24-1.215', false) + mobileNavItem('/me', translate('mine'), 'M12 17c3.662 0 6.865 1.575 8.607 3.925l-1.842.871C17.347 20.116 14.847 19 12 19c-2.848 0-5.347 1.116-6.765 2.796l-1.841-.872C5.136 18.574 8.338 17 12 17m0-15a5 5 0 0 1 5 5v3a5 5 0 0 1-4.783 4.995L12 15a5 5 0 0 1-5-5V7a5 5 0 0 1 4.783-4.995zm0 2a3 3 0 0 0-2.995 2.824L9 7v3a3 3 0 0 0 5.995.176L15 10V7a3 3 0 0 0-3-3', false) + '</nav>';
292
+ '<nav class="nfh-mobile" aria-label="移动导航">' + mobileNavItem('/', configuredLabel(config.navHomeLabel, '首页', 'home'), 'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z', true) + mobileNavItem('/me/orders', configuredLabel(config.navProductsLabel, '车票', 'tickets'), 'M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49M16 20c0-.55-.45-1-1-1H8.93c-1.48 0-2.74-1.08-2.96-2.54L4.16 7.78A.976.976 0 0 0 3.2 7c-.62 0-1.08.57-.96 1.18l1.75 8.58A5.01 5.01 0 0 0 8.94 21H15c.55 0 1-.45 1-1m-.46-5h-4.19l-1.03-4.1c1.28.72 2.63 1.28 4.1 1.3.58.01 1.05-.49 1.05-1.07 0-.59-.49-1.04-1.08-1.06-1.31-.04-2.63-.56-3.61-1.33L9.14 7.47c-.23-.18-.49-.3-.76-.38a2.2 2.2 0 0 0-.99-.06h-.02a2.27 2.27 0 0 0-1.84 2.61l1.35 5.92A3.01 3.01 0 0 0 9.83 18h6.85l3.09 2.42c.42.33 1.02.29 1.39-.08.45-.45.4-1.18-.1-1.57l-4.29-3.35a2 2 0 0 0-1.23-.42', false) + mobileNavItem('/me/affiliate', configuredLabel(config.navPromotionLabel, '推广', 'promotion'), 'm13.576 17.271-5.11-2.787a3.5 3.5 0 1 1 0-4.968l5.11-2.787a3.5 3.5 0 1 1 .958 1.755l-5.11 2.787a3.5 3.5 0 0 1 0 1.457l5.11 2.788a3.5 3.5 0 1 1-.958 1.755', false) + mobileNavItem('/me', translate('mine'), 'M12 17c3.662 0 6.865 1.575 8.607 3.925l-1.842.871C17.347 20.116 14.847 19 12 19c-2.848 0-5.347 1.116-6.765 2.796l-1.841-.872C5.136 18.574 8.338 17 12 17m0-15a5 5 0 0 1 5 5v3a5 5 0 0 1-4.783 4.995L12 15a5 5 0 0 1-5-5V7a5 5 0 0 1 4.783-4.995zm0 2a3 3 0 0 0-2.995 2.824L9 7v3a3 3 0 0 0 5.995.176L15 10V7a3 3 0 0 0-3-3', false) + '</nav>';
292
293
 
293
294
  if (config.heroBackgroundUrl) {
294
295
  var background = safeHref(config.heroBackgroundUrl, '');