DawnC commited on
Commit
3fc03a4
1 Parent(s): f6a6c85

Update search_history.py

Browse files
Files changed (1) hide show
  1. search_history.py +9 -10
search_history.py CHANGED
@@ -112,7 +112,6 @@ class SearchHistoryComponent:
112
  # """
113
 
114
  if search_type == "criteria":
115
- # 原有的條件搜尋顯示邏輯
116
  prefs = entry.get('preferences', {})
117
  html += f"""
118
  <div class="params-list" style="background: #f8fafc; padding: 16px; border-radius: 8px; margin-bottom: 16px;">
@@ -127,15 +126,15 @@ class SearchHistoryComponent:
127
  </ul>
128
  </div>
129
  """
130
- else:
131
- # Description 搜尋的顯示邏輯
132
- description = entry.get('description', 'No description provided')
133
- html += f"""
134
- <div class="description-section" style="background: #f8fafc; padding: 16px; border-radius: 8px; margin-bottom: 16px;">
135
- <h4 style="font-size: 1.1em; font-weight: 600; color: #2D3748; margin-bottom: 12px; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;">Search Description:</h4>
136
- <p class="user-description" style="color: #4A5568; font-style: italic; line-height: 1.6; margin: 8px 0;">{description}</p>
137
- </div>
138
- """
139
 
140
  # 共用的結果顯示邏輯
141
  html += """
 
112
  # """
113
 
114
  if search_type == "criteria":
 
115
  prefs = entry.get('preferences', {})
116
  html += f"""
117
  <div class="params-list" style="background: #f8fafc; padding: 16px; border-radius: 8px; margin-bottom: 16px;">
 
126
  </ul>
127
  </div>
128
  """
129
+ else:
130
+ # Description 搜尋的顯示邏輯
131
+ description = entry.get('description', 'No description provided')
132
+ html += f"""
133
+ <div class="description-section" style="background: #f8fafc; padding: 16px; border-radius: 8px; margin-bottom: 16px;">
134
+ <h4 style="font-size: 1.1em; font-weight: 600; color: #2D3748; margin-bottom: 12px; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;">Search Description:</h4>
135
+ <p class="user-description" style="color: #4A5568; font-style: italic; line-height: 1.6; margin: 8px 0;">{description}</p>
136
+ </div>
137
+ """
138
 
139
  # 共用的結果顯示邏輯
140
  html += """