瀏覽代碼

fix: hide open with internal ip if force_expose is true

Nicolas Meienberger 2 年之前
父節點
當前提交
bea4268aaf
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 1 1
      public/mockServiceWorker.js
  2. 6 4
      src/client/modules/Apps/components/AppActions/AppActions.tsx

+ 1 - 1
public/mockServiceWorker.js

@@ -2,7 +2,7 @@
 /* tslint:disable */
 /* tslint:disable */
 
 
 /**
 /**
- * Mock Service Worker (1.2.1).
+ * Mock Service Worker (1.2.2).
  * @see https://github.com/mswjs/msw
  * @see https://github.com/mswjs/msw
  * - Please do NOT modify this file.
  * - Please do NOT modify this file.
  * - Please do NOT serve this file on production.
  * - Please do NOT serve this file on production.

+ 6 - 4
src/client/modules/Apps/components/AppActions/AppActions.tsx

@@ -84,10 +84,12 @@ export const AppActions: React.FC<IProps> = ({ app, status, localDomain, onInsta
             <IconLock className="text-muted me-2" size={16} />
             <IconLock className="text-muted me-2" size={16} />
             {app.id}.{localDomain}
             {app.id}.{localDomain}
           </DropdownMenuItem>
           </DropdownMenuItem>
-          <DropdownMenuItem onClick={() => onOpen('local')}>
-            <IconLockOff className="text-muted me-2" size={16} />
-            {window.location.hostname}:{app.info.port}
-          </DropdownMenuItem>
+          {!app.info.force_expose && (
+            <DropdownMenuItem onClick={() => onOpen('local')}>
+              <IconLockOff className="text-muted me-2" size={16} />
+              {window.location.hostname}:{app.info.port}
+            </DropdownMenuItem>
+          )}
         </DropdownMenuGroup>
         </DropdownMenuGroup>
       </DropdownMenuContent>
       </DropdownMenuContent>
     </DropdownMenu>
     </DropdownMenu>