@etspress/netflix 0.1.0 → 0.1.1

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,9 +1,14 @@
1
1
  {
2
2
  "name": "@etspress/netflix",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "流媒体合租主题插件",
6
6
  "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/cnmbdb/dujioka-next-deve.git",
10
+ "directory": "plugins/netflix"
11
+ },
7
12
  "files": [
8
13
  "plugin.json",
9
14
  ".env.example",
@@ -13,7 +18,7 @@
13
18
  "id": "netflix",
14
19
  "name": "流媒体合租主题",
15
20
  "description": "流媒体合租商店主题与页面展示配置",
16
- "version": "0.1.0",
21
+ "version": "0.1.1",
17
22
  "runtime": {
18
23
  "type": "npm-static",
19
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.0",
6
+ "version": "0.1.1",
7
7
  "description": "流媒体合租商店主题与页面展示配置。",
8
8
  "author": "D&J Studio",
9
9
  "license": "MIT",
package/public/inject.js CHANGED
@@ -329,10 +329,12 @@
329
329
  if (state.checking) return;
330
330
  state.checking = true;
331
331
  try {
332
- var response = await fetch('/plugins/registry.json', { cache: 'no-store' });
332
+ var response = await fetch(apiBase + '/plugins/public-assets?context=admin', { cache: 'no-store' });
333
333
  if (!response.ok) return;
334
334
  var registry = await response.json();
335
- var enabled = registry.plugins && registry.plugins[pluginId] && registry.plugins[pluginId].enabled === true;
335
+ var enabled = Array.isArray(registry.assets) && registry.assets.some(function (plugin) {
336
+ return plugin && plugin.id === pluginId;
337
+ });
336
338
  state.enabled = Boolean(enabled);
337
339
  if (!state.enabled) {
338
340
  state.configLoaded = false;