diff options
author | crupest <crupest@outlook.com> | 2020-08-07 18:32:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 18:32:05 +0800 |
commit | 0f89ad243258e83940528732e90a4ba6fbc16bef (patch) | |
tree | 32603eda8592590e869b11f6c95dad9db74ce9b8 /Timeline/ClientApp/src/app/data | |
parent | ef5f490cf3155234a12d42f1b43630e38cb49a38 (diff) | |
parent | 00b4f38a4c6f3c1039873cc8e274e24f207d81a7 (diff) | |
download | timeline-0f89ad243258e83940528732e90a4ba6fbc16bef.tar.gz timeline-0f89ad243258e83940528732e90a4ba6fbc16bef.tar.bz2 timeline-0f89ad243258e83940528732e90a4ba6fbc16bef.zip |
Merge pull request #138 from crupest/home-offline
Create home page for offline.
Diffstat (limited to 'Timeline/ClientApp/src/app/data')
-rw-r--r-- | Timeline/ClientApp/src/app/data/timeline.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Timeline/ClientApp/src/app/data/timeline.ts b/Timeline/ClientApp/src/app/data/timeline.ts index c0d2141f..9fc99d59 100644 --- a/Timeline/ClientApp/src/app/data/timeline.ts +++ b/Timeline/ClientApp/src/app/data/timeline.ts @@ -881,3 +881,13 @@ export function usePostList( }, [timelineName]);
return state;
}
+
+export async function getAllCachedTimelineNames(): Promise<string[]> {
+ const keys = await dataStorage.keys();
+ return keys
+ .filter(
+ (key) =>
+ key.startsWith('timeline.') && (key.match(/\./g) ?? []).length === 1
+ )
+ .map((key) => key.substr('timeline.'.length));
+}
|