Skip to content

Commit

Permalink
Merge pull request #132 from omnivore-app/highlight-color
Browse files Browse the repository at this point in the history
fix: highlight color not available in the template
  • Loading branch information
sywhb authored Sep 26, 2023
2 parents cb4a7f0 + e90807d commit a6eac8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface Highlight {
labels?: Label[];
type: HighlightType;
highlightPositionPercent?: number;
color?: string;
}

const requestHeaders = (apiKey: string) => ({
Expand Down Expand Up @@ -132,6 +133,7 @@ export const loadArticles = async (
labels {
name
}
color
}
labels {
name
Expand Down Expand Up @@ -200,4 +202,4 @@ export const deleteArticleById = async (endpoint: string, apiKey: string, articl
}

return false
}
}
1 change: 1 addition & 0 deletions src/settings/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export const renderArticleContnet = async (
dateHighlighted: formatDate(highlight.updatedAt, dateHighlightedFormat),
note: highlight.annotation ?? undefined,
labels: renderLabels(highlight.labels),
color: highlight.color ?? 'yellow',
};
});
const dateSaved = formatDate(article.savedAt, dateSavedFormat);
Expand Down

0 comments on commit a6eac8e

Please sign in to comment.