Skip to content

Commit e90807d

Browse files
committed
fix: highlight color not available in the template
1 parent cb4a7f0 commit e90807d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/api.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface Highlight {
7575
labels?: Label[];
7676
type: HighlightType;
7777
highlightPositionPercent?: number;
78+
color?: string;
7879
}
7980

8081
const requestHeaders = (apiKey: string) => ({
@@ -132,6 +133,7 @@ export const loadArticles = async (
132133
labels {
133134
name
134135
}
136+
color
135137
}
136138
labels {
137139
name
@@ -200,4 +202,4 @@ export const deleteArticleById = async (endpoint: string, apiKey: string, articl
200202
}
201203

202204
return false
203-
}
205+
}

src/settings/template.ts

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export const renderArticleContnet = async (
189189
dateHighlighted: formatDate(highlight.updatedAt, dateHighlightedFormat),
190190
note: highlight.annotation ?? undefined,
191191
labels: renderLabels(highlight.labels),
192+
color: highlight.color ?? 'yellow',
192193
};
193194
});
194195
const dateSaved = formatDate(article.savedAt, dateSavedFormat);

0 commit comments

Comments
 (0)