feat: weather card and RSS reactions in briefing screen
- Parse metadata field on Message model (weather, rss_item_ids) - Add WeatherCard widget: location, current temp, condition, today hi/lo, delta from yesterday, scrollable 3-day forecast strip - BriefingScreen shows WeatherCard above the first assistant message that carries weather metadata (mirrors web BriefingView.vue behaviour) - RSS reaction buttons (👍/👎) shown below assistant messages with rss_item_ids; optimistic toggle with rollback on failure - Add postRssReaction / deleteRssReaction to BriefingApi Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,4 +59,23 @@ class BriefingApi {
|
||||
throw dioToApp(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// POST /api/briefing/rss-reactions body: {rss_item_id, reaction: "up"|"down"}
|
||||
Future<void> postRssReaction(int rssItemId, String reaction) async {
|
||||
try {
|
||||
await _dio.post('/api/briefing/rss-reactions',
|
||||
data: {'rss_item_id': rssItemId, 'reaction': reaction});
|
||||
} on DioException catch (e) {
|
||||
throw dioToApp(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// DELETE /api/briefing/rss-reactions/{rssItemId}
|
||||
Future<void> deleteRssReaction(int rssItemId) async {
|
||||
try {
|
||||
await _dio.delete('/api/briefing/rss-reactions/$rssItemId');
|
||||
} on DioException catch (e) {
|
||||
throw dioToApp(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user