From 1a67d16888f907307dca675f1f80511064414ce5 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 17 May 2023 09:45:23 +0800 Subject: [PATCH] fix: add dateArchived to the exposed variable in the template --- src/api.ts | 2 ++ src/settings/template.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/api.ts b/src/api.ts index fd4e51d..947400f 100644 --- a/src/api.ts +++ b/src/api.ts @@ -43,6 +43,7 @@ export interface Article { wordsCount?: number; readingProgressPercent: number; isArchived: boolean; + archivedAt?: string; } export interface Label { @@ -109,6 +110,7 @@ export const loadArticles = async ( wordsCount isArchived readingProgressPercent + archivedAt highlights { id quote diff --git a/src/settings/template.ts b/src/settings/template.ts index 889af23..cc33f8c 100644 --- a/src/settings/template.ts +++ b/src/settings/template.ts @@ -87,6 +87,7 @@ export type ArticleView = wordsCount?: number; readLength?: number; state: string; + dateArchived?: string; } | FunctionMap; @@ -251,6 +252,7 @@ export const renderArticleContnet = async ( wordsCount, readLength, state: getArticleState(article), + dateArchived: article.archivedAt, ...functionMap, }; // Build content string based on template