From 90af9eedde4e9fdb8c4c965e4911326703e23c5f Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 28 Jan 2018 13:09:39 -0800 Subject: [PATCH] refactor store --- routes/_actions/timeline.js | 2 +- routes/_components/Layout.html | 2 +- routes/_components/status/Status.html | 2 +- routes/_components/timeline/LazyTimeline.html | 2 +- routes/_components/timeline/Timeline.html | 2 +- routes/_store/LocalStorageStore.js | 40 +++++ routes/_store/computations.js | 7 + routes/_store/instanceComputations.js | 49 +++++++ routes/_store/mixins.js | 19 +++ .../storeObservers.js => _store/obsevers.js} | 2 +- routes/_store/store.js | 38 +++++ routes/_store/timelineComputations.js | 11 ++ routes/_utils/binary.js | 27 ---- routes/_utils/store.js | 138 ------------------ routes/accounts/[accountId].html | 2 +- routes/accounts/_actions/[accountId].js | 2 +- routes/federated.html | 2 +- routes/index.html | 2 +- routes/local.html | 2 +- routes/settings/instances/[instanceName].html | 2 +- .../instances/_actions/[instanceName].js | 2 +- routes/settings/instances/_actions/add.js | 2 +- routes/settings/instances/add.html | 2 +- routes/settings/instances/index.html | 2 +- routes/tags/[tagName].html | 2 +- 25 files changed, 181 insertions(+), 182 deletions(-) create mode 100644 routes/_store/LocalStorageStore.js create mode 100644 routes/_store/computations.js create mode 100644 routes/_store/instanceComputations.js create mode 100644 routes/_store/mixins.js rename routes/{_utils/storeObservers.js => _store/obsevers.js} (84%) create mode 100644 routes/_store/store.js create mode 100644 routes/_store/timelineComputations.js delete mode 100644 routes/_utils/binary.js delete mode 100644 routes/_utils/store.js diff --git a/routes/_actions/timeline.js b/routes/_actions/timeline.js index 829c902..0104c8a 100644 --- a/routes/_actions/timeline.js +++ b/routes/_actions/timeline.js @@ -1,4 +1,4 @@ -import { store } from '../_utils/store' +import { store } from '../_store/store' import { database } from '../_utils/database/database' import { getTimeline } from '../_utils/mastodon/timelines' import { toast } from '../_utils/toast' diff --git a/routes/_components/Layout.html b/routes/_components/Layout.html index c7e9692..e68639b 100644 --- a/routes/_components/Layout.html +++ b/routes/_components/Layout.html @@ -17,7 +17,7 @@