@etspress/netflix 0.1.10 → 0.1.11

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.10",
3
+ "version": "0.1.11",
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.10",
21
+ "version": "0.1.11",
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.10",
6
+ "version": "0.1.11",
7
7
  "description": "流媒体合租商店主题与页面展示配置。",
8
8
  "author": "D&J Studio",
9
9
  "license": "MIT",
package/public/console.js CHANGED
@@ -243,6 +243,7 @@
243
243
  '<div class="nfh-language"><label for="nfc-language-select">站点语言</label><select class="nfc-language" id="nfc-language-select"><option value="zh-CN">简体中文</option><option value="zh-TW">繁體中文</option><option value="en-US">English</option></select></div><div class="nfh-footer-bottom"><span>' + escapeHtml(c.copyrightText || '© 2019 - 2026 奈飞小铺') + '</span><div>' + (licenseRows || '<span>辽ICP备2021010230号</span><span class="nfh-license-separator">|</span><span>ICP经营许可证:辽B2-20220360</span>') + '</div></div></div></footer>' +
244
244
  mobileNavMarkup(c, page) + '<button class="nfc-to-top" type="button" aria-label="返回顶部">⌃</button>';
245
245
  document.body.appendChild(root);
246
+ document.documentElement.classList.remove('nfc-auth-route-pending');
246
247
  root.querySelector('.nfc-logout').addEventListener('click', function () {
247
248
  localStorage.removeItem('user_token');
248
249
  localStorage.removeItem('user_profile');
@@ -600,7 +601,7 @@
600
601
  root = document.createElement('div'); root.id = 'netflix-theme-home'; root.className = 'nfc-console nfc-auth';
601
602
  var brand = homeConfig.brandLogoUrl ? '<img src="' + escapeHtml(homeConfig.brandLogoUrl) + '" alt="' + escapeHtml(homeConfig.brandName || '奈飞小铺') + '">' : escapeHtml(homeConfig.brandName || '奈飞小铺');
602
603
  root.innerHTML = '<header class="nfh-header"><nav class="nfh-header-inner"><a class="nfh-logo" href="/">' + brand + '</a><div class="nfh-header-right"><div class="nfh-header-nav"><a href="/">' + escapeHtml(homeConfig.navHomeLabel || '首页') + '</a><a href="/me/orders">' + escapeHtml(homeConfig.navProductsLabel || '车票') + '</a><a href="/me/affiliate">' + escapeHtml(homeConfig.navPromotionLabel || '推广') + '</a></div></div></nav></header><main class="nfc-auth-main"><section class="nfc-auth-card"><a class="nfc-auth-back" href="/">‹ 返回首页</a>' + content + '</section></main><footer class="nfc-auth-footer">' + escapeHtml(homeConfig.copyrightText || '© 2019 - 2026 奈飞小铺') + '</footer>';
603
- document.body.appendChild(root); document.documentElement.classList.add('nfc-active');
604
+ document.body.appendChild(root); document.documentElement.classList.add('nfc-active'); document.documentElement.classList.remove('nfc-auth-route-pending');
604
605
  host = document.querySelector('#app'); if (host) {
605
606
  if (!hostStateSaved) { hostDisplay = host.style.display; hostVisibility = host.style.visibility; hostStateSaved = true; }
606
607
  host.style.visibility = ''; host.style.display = 'none';
package/public/inject.js CHANGED
@@ -1,6 +1,16 @@
1
1
  (function () {
2
2
  var pluginId = 'netflix';
3
3
  var adminPath = '/admin/';
4
+ var authPath = window.location.pathname;
5
+ if ((authPath === '/auth/login' || authPath === '/auth/register') && new URLSearchParams(window.location.search).get('native') !== '1') {
6
+ document.documentElement.classList.add('nfc-auth-route-pending');
7
+ if (!document.getElementById('nfc-auth-route-gate')) {
8
+ var authGateStyle = document.createElement('style');
9
+ authGateStyle.id = 'nfc-auth-route-gate';
10
+ authGateStyle.textContent = 'html.nfc-auth-route-pending #app{visibility:hidden!important}';
11
+ (document.head || document.documentElement).appendChild(authGateStyle);
12
+ }
13
+ }
4
14
  if (window.location.pathname.indexOf(adminPath) !== 0) return;
5
15
  if (window.__NETFLIX_THEME_SETTINGS_INJECTOR__) return;
6
16
  window.__NETFLIX_THEME_SETTINGS_INJECTOR__ = true;