refactor: 调整登录模态框渲染逻辑和docker-compose配置
将登录模态框的条件渲染移至hooks调用之后,确保路径处理完成 将docker-compose中的name字段改为container_name以符合最新语法规范
This commit is contained in:
@@ -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:
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user