DawnC commited on
Commit
d2b283f
1 Parent(s): a4581f6

Update search_history.py

Browse files
Files changed (1) hide show
  1. search_history.py +15 -15
search_history.py CHANGED
@@ -112,21 +112,21 @@ 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;">
119
- <h4 style="font-size: 1.1em; font-weight: 600; color: #2D3748; margin-bottom: 12px; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;">Search Parameters:</h4>
120
- <ul style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; padding: 0;">
121
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Living Space:</span> {prefs.get('living_space', 'N/A')}</li>
122
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Exercise Time:</span> {prefs.get('exercise_time', 'N/A')} minutes</li>
123
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Grooming:</span> {prefs.get('grooming_commitment', 'N/A')}</li>
124
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Experience:</span> {prefs.get('experience_level', 'N/A')}</li>
125
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Children at Home:</span> {"Yes" if prefs.get('has_children') else "No"}</li>
126
- <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Noise Tolerance:</span> {prefs.get('noise_tolerance', 'N/A')}</li>
127
- </ul>
128
- </div>
129
- """
130
  else:
131
  # Description 搜尋的顯示邏輯
132
  description = entry.get('description', 'No description provided')
 
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;">
119
+ <h4 style="font-size: 1.1em; font-weight: 600; color: #2D3748; margin-bottom: 12px; border-bottom: 2px solid #E2E8F0; padding-bottom: 8px;">Search Parameters:</h4>
120
+ <ul style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; list-style: none; padding: 0;">
121
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Living Space:</span> {prefs.get('living_space', 'N/A')}</li>
122
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Exercise Time:</span> {prefs.get('exercise_time', 'N/A')} minutes</li>
123
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Grooming:</span> {prefs.get('grooming_commitment', 'N/A')}</li>
124
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Experience:</span> {prefs.get('experience_level', 'N/A')}</li>
125
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Children at Home:</span> {"Yes" if prefs.get('has_children') else "No"}</li>
126
+ <li><span class="param-label" style="font-weight: 600; color: #2D3748;">Noise Tolerance:</span> {prefs.get('noise_tolerance', 'N/A')}</li>
127
+ </ul>
128
+ </div>
129
+ """
130
  else:
131
  # Description 搜尋的顯示邏輯
132
  description = entry.get('description', 'No description provided')