From 90762897db2c1e9df7b80a51e7d9bf273fd3d6d8 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Thu, 18 Jan 2018 20:25:34 -0800 Subject: [PATCH] first stab at online mode --- package-lock.json | 5 --- package.json | 1 - routes/_components/Layout.html | 9 ++-- routes/_components/Timeline.html | 45 +++++++++++++++---- routes/_utils/database/database.js | 2 - routes/_utils/database/idb-keyval.js | 57 ------------------------ routes/_utils/database/statuses.js | 65 ++++++++++++++++++++++++++++ routes/_utils/mastodon/oauth.js | 19 -------- routes/_utils/mastodon/timelines.js | 20 +++++++++ routes/_utils/statuses.js | 33 ++++++++++++++ 10 files changed, 159 insertions(+), 97 deletions(-) delete mode 100644 routes/_utils/database/database.js delete mode 100644 routes/_utils/database/idb-keyval.js create mode 100644 routes/_utils/database/statuses.js create mode 100644 routes/_utils/mastodon/timelines.js create mode 100644 routes/_utils/statuses.js diff --git a/package-lock.json b/package-lock.json index 85fae1c1..f5a85226 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3282,11 +3282,6 @@ } } }, - "idb": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/idb/-/idb-2.0.4.tgz", - "integrity": "sha512-Nw4ykKrrVje6YODRiRm/k2ucFEQeoY+zrkszfOuzVmxx8yyBMtZh2KLaRCKk9r5GzhuF0QlNCVjBewP2n5OZ7Q==" - }, "ieee754": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", diff --git a/package.json b/package.json index 6d953475..3a3d94d8 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "fg-loadcss": "^2.0.1", "font-awesome-svg-png": "^1.2.2", "glob": "^7.1.2", - "idb": "^2.0.4", "intersection-observer": "^0.5.0", "intl-relativeformat": "^2.1.0", "lodash": "^4.17.4", diff --git a/routes/_components/Layout.html b/routes/_components/Layout.html index 947ae82c..def3f340 100644 --- a/routes/_components/Layout.html +++ b/routes/_components/Layout.html @@ -20,16 +20,17 @@ export default { oncreate() { mark('onCreate Layout') + let node = this.refs.node this.observe('innerHeight', debounce(() => { // respond to window resize events this.store.set({ - offsetHeight: this.refs.node.offsetHeight + offsetHeight: node.offsetHeight }) }, RESIZE_EVENT_DELAY)) this.store.set({ - scrollTop: this.refs.node.scrollTop, - scrollHeight: this.refs.node.scrollHeight, - offsetHeight: this.refs.node.offsetHeight + scrollTop: node.scrollTop, + scrollHeight: node.scrollHeight, + offsetHeight: node.offsetHeight }) stop('onCreate Layout') }, diff --git a/routes/_components/Timeline.html b/routes/_components/Timeline.html index 3a4e06b1..6aa756e4 100644 --- a/routes/_components/Timeline.html +++ b/routes/_components/Timeline.html @@ -1,3 +1,4 @@ +<:Window bind:online />