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 | 87e87e6f93ed1dc3f4c1e0fd312a95e17d8162fc (patch) | |
| tree | cb3dcd5dfd2ea37592f51e22b76c64023ece8aeb /Timeline/ClientApp/src/app/data | |
| parent | 394ba7b875e93ec571f92e808ec0ec80298d8a23 (diff) | |
| parent | 0d4e3079aa53f9553eb538951b6ebd6bf4a7a2ee (diff) | |
| download | timeline-87e87e6f93ed1dc3f4c1e0fd312a95e17d8162fc.tar.gz timeline-87e87e6f93ed1dc3f4c1e0fd312a95e17d8162fc.tar.bz2 timeline-87e87e6f93ed1dc3f4c1e0fd312a95e17d8162fc.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));
+}
|
