feat(insta): Trends tab — account focus + external trends + impact preview
- api.js: add getInstaTrends, instaCollectTrends, getInstaPreferences, putInstaPreferences helpers - InstaCards.jsx: add Cards/Trends tab bar with URL sync (?tab=trends); add AccountFocusPanel (category weight sliders + save), ExternalTrendsPanel (Naver+Google trend rows + manual collect), PreferenceImpactPanel (next extract preview); existing 5-panel Cards tab preserved intact - InstaCards.css: add ic-tabbar, ic-tab, ic-trends-grid, ic-panel base, ic-focus/ic-trend/ic-impact component styles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
src/api.js
21
src/api.js
@@ -544,6 +544,27 @@ export function putInstaPrompt(name, template, description = '') {
|
||||
return apiPut(`/api/insta/templates/prompts/${encodeURIComponent(name)}`, { template, description });
|
||||
}
|
||||
|
||||
// ── insta-lab trends ──
|
||||
export function getInstaTrends({ source, category, days = 1 } = {}) {
|
||||
const q = new URLSearchParams();
|
||||
if (source) q.set('source', source);
|
||||
if (category) q.set('category', category);
|
||||
q.set('days', String(days));
|
||||
return apiGet(`/api/insta/trends?${q.toString()}`);
|
||||
}
|
||||
|
||||
export function instaCollectTrends(categories) {
|
||||
return apiPost('/api/insta/trends/collect', categories ? { categories } : {});
|
||||
}
|
||||
|
||||
export function getInstaPreferences() {
|
||||
return apiGet('/api/insta/preferences');
|
||||
}
|
||||
|
||||
export function putInstaPreferences(categories) {
|
||||
return apiPut('/api/insta/preferences', { categories });
|
||||
}
|
||||
|
||||
// ── Agent Office ──────────────────────────────────
|
||||
export const getAgents = () => apiGet('/api/agent-office/agents');
|
||||
export const getAgentDetail = (id) => apiGet(`/api/agent-office/agents/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user