refactor: 调整登录模态框渲染逻辑和docker-compose配置

将登录模态框的条件渲染移至hooks调用之后,确保路径处理完成
将docker-compose中的name字段改为container_name以符合最新语法规范
This commit is contained in:
hex2077
2025-08-25 22:50:16 +08:00
parent bf314aa5b4
commit ee6dfb0fe1
2 changed files with 5 additions and 4 deletions

View File

@@ -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:

View File

@@ -30,10 +30,11 @@ const LoginModal: FC<LoginModalProps> = ({ 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(
<div