导航栏调整
This commit is contained in:
@@ -90,16 +90,21 @@ def test_navigation_structure():
|
||||
if response.status_code == 200:
|
||||
content = response.text
|
||||
|
||||
# 检查导航栏结构(优化历史应该被移除)
|
||||
# 检查导航栏结构(优化历史和我的收藏应该被移除)
|
||||
nav_checks = [
|
||||
('生成提示词', 'href="{{ url_for(\'main.index\') }}"'),
|
||||
('饭菜规划', 'href="{{ url_for(\'meal_planning.meal_planning_page\') }}"'),
|
||||
('古诗词解析', 'href="{{ url_for(\'poetry.poetry_page\') }}"'),
|
||||
('古诗词收藏', 'href="{{ url_for(\'poetry.poetry_favorites\') }}"'),
|
||||
('我的规划', 'href="{{ url_for(\'meal_planning.meal_planning_history\') }}"'),
|
||||
('我的收藏', 'href="{{ url_for(\'favorites.favorites_page\') }}"')
|
||||
('我的规划', 'href="{{ url_for(\'meal_planning.meal_planning_history\') }}"')
|
||||
]
|
||||
|
||||
# 检查我的收藏是否已被移除
|
||||
if 'href="{{ url_for(\'favorites.favorites_page\') }}"' not in content:
|
||||
print("✅ 我的收藏 导航链接已移除")
|
||||
else:
|
||||
print("❌ 我的收藏 导航链接仍存在")
|
||||
|
||||
# 检查优化历史是否已被移除
|
||||
if 'href="{{ url_for(\'history.history_page\') }}"' not in content:
|
||||
print("✅ 优化历史 导航链接已移除")
|
||||
@@ -112,16 +117,21 @@ def test_navigation_structure():
|
||||
else:
|
||||
print(f"❌ {name} 导航链接缺失或错误")
|
||||
|
||||
# 检查图标(优化历史应该被移除)
|
||||
# 检查图标(优化历史和我的收藏应该被移除)
|
||||
icon_checks = [
|
||||
('生成提示词', 'fas fa-plus'),
|
||||
('饭菜规划', 'fas fa-utensils'),
|
||||
('古诗词解析', 'fas fa-scroll'),
|
||||
('古诗词收藏', 'fas fa-heart'),
|
||||
('我的规划', 'fas fa-calendar-alt'),
|
||||
('我的收藏', 'fas fa-star')
|
||||
('我的规划', 'fas fa-calendar-alt')
|
||||
]
|
||||
|
||||
# 检查我的收藏图标是否已被移除
|
||||
if 'fas fa-star' not in content:
|
||||
print("✅ 我的收藏 图标已移除")
|
||||
else:
|
||||
print("❌ 我的收藏 图标仍存在")
|
||||
|
||||
# 检查优化历史图标是否已被移除
|
||||
if 'fas fa-history' not in content:
|
||||
print("✅ 优化历史 图标已移除")
|
||||
@@ -156,8 +166,8 @@ def main():
|
||||
print("🎉 导航栏测试完成!")
|
||||
print("="*50)
|
||||
print("📋 测试结果:")
|
||||
print(" ✅ 导航栏已移除优化历史功能入口")
|
||||
print(" ✅ 用户菜单保留优化历史链接")
|
||||
print(" ✅ 导航栏已移除优化历史和我的收藏功能入口")
|
||||
print(" ✅ 用户菜单保留优化历史和我的收藏链接")
|
||||
print(" ✅ 图标和样式已正确配置")
|
||||
print("\n🌐 访问地址:")
|
||||
print(" 主页: http://localhost:5002/")
|
||||
|
||||
Reference in New Issue
Block a user