浏览代码

Add URL suffix

Nicolas Meienberger 3 年之前
父节点
当前提交
c854b14267

+ 4 - 4
apps/plex/config.json

@@ -6,10 +6,10 @@
   "url_suffix": "/web",
   "categories": ["media"],
   "description": "",
-  "short_desc": "",
-  "author": "",
-  "source": "",
-  "image": "",
+  "short_desc": "Stream Movies & TV Shows",
+  "author": "plexinc",
+  "source": "https://github.com/plexinc/pms-docker",
+  "image": "/logos/apps/plex.png",
   "form_fields": {
     "claim": {
       "type": "text",

+ 1 - 0
apps/plex/metadata/description.md

@@ -0,0 +1 @@
+## Stream Movies & TV Shows

+ 1 - 0
packages/common/src/types/app.types.ts

@@ -60,4 +60,5 @@ export interface AppConfig {
   installed: boolean;
   categories: AppCategoriesEnum[];
   status: AppStatusEnum;
+  url_suffix: string;
 }

二进制
packages/dashboard/public/logos/apps/plex.png


+ 1 - 1
packages/dashboard/src/modules/Apps/containers/AppDetails.tsx

@@ -90,7 +90,7 @@ const AppDetails: React.FC<IProps> = ({ app }) => {
   };
 
   const handleOpen = () => {
-    window.open(`http://${internalIp}:${app.port}`, '_blank', 'noreferrer');
+    window.open(`http://${internalIp}:${app.port}${app.url_suffix || ''}`, '_blank', 'noreferrer');
   };
 
   console.log(app.description);