diff --git a/docker-compose.yml b/docker-compose.yml index 9d42fe7..ed52aee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - /opt/audio/output:/app/server/output - /opt/audio/sqlite.db:/app/web/sqlite.db restart: always - name: podcast-web + container_name: podcast-web depends_on: - server @@ -26,7 +26,7 @@ services: volumes: - /opt/audio/output:/app/server/output restart: always - name: podcast-server + container_name: podcast-server volumes: audio-data: \ No newline at end of file diff --git a/web/src/components/LoginModal.tsx b/web/src/components/LoginModal.tsx index 01b02c2..25d9c3b 100644 --- a/web/src/components/LoginModal.tsx +++ b/web/src/components/LoginModal.tsx @@ -30,10 +30,11 @@ const LoginModal: FC = ({ isOpen, onClose, lang }) => { [onClose] ); - if (!isOpen) return null; - const pathname = usePathname(); const truePath = getTruePathFromPathname(pathname, lang); + + if (!isOpen) return null; + // 使用 React Portal 将模态框渲染到 body 下,避免Z-index问题和父组件样式影响 return createPortal(