diff --git a/package.json b/package.json index 02e5442e..da177e16 100644 --- a/package.json +++ b/package.json @@ -200,6 +200,7 @@ "vue-resize": "^0.5.0", "vue-router": "^3.4.3", "vue-shortkey": "^3.1.7", + "vue-virtual-scroller": "^1.0.10", "vuex": "^3.5.1", "vuex-router-sync": "^5.0.0" }, diff --git a/src/renderer/components/TimelineSpace.vue b/src/renderer/components/TimelineSpace.vue index caee80a7..9c809676 100644 --- a/src/renderer/components/TimelineSpace.vue +++ b/src/renderer/components/TimelineSpace.vue @@ -10,7 +10,7 @@ >
-
+
diff --git a/src/renderer/components/TimelineSpace/Contents.vue b/src/renderer/components/TimelineSpace/Contents.vue index 2d940354..4a5b7723 100644 --- a/src/renderer/components/TimelineSpace/Contents.vue +++ b/src/renderer/components/TimelineSpace/Contents.vue @@ -49,7 +49,7 @@ export default { openSideBar: state => state.openSideBar }), ...mapGetters('TimelineSpace/Modals', ['modalOpened']), - customWidth: function() { + customWidth: function () { return { '--current-sidebar-width': `${this.sidebarWidth}px` } @@ -77,7 +77,7 @@ export default { #contents { --current-sidebar-width: 360px; - padding-top: 48px; + padding-top: 49px; height: 100%; box-sizing: border-box; user-select: text; diff --git a/src/renderer/components/TimelineSpace/Contents/Home.vue b/src/renderer/components/TimelineSpace/Contents/Home.vue index 339d851b..b88a79d8 100644 --- a/src/renderer/components/TimelineSpace/Contents/Home.vue +++ b/src/renderer/components/TimelineSpace/Contents/Home.vue @@ -2,23 +2,25 @@
{{ unread.length > 0 ? unread.length : '' }}
- -
- - -
-
+ + +
diff --git a/src/renderer/main.ts b/src/renderer/main.ts index 3d472849..69a0ca79 100644 --- a/src/renderer/main.ts +++ b/src/renderer/main.ts @@ -11,6 +11,8 @@ import shortkey from 'vue-shortkey' import VueI18Next from '@panter/vue-i18next' import 'vue-resize/dist/vue-resize.css' import VueResize from 'vue-resize' +import VueVirtualScroller from 'vue-virtual-scroller' +import 'vue-virtual-scroller/dist/vue-virtual-scroller.css' import './assets/fonts/fonts.css' import App from './App.vue' @@ -22,6 +24,7 @@ Vue.use(ElementUI, { locale }) Vue.use(shortkey) Vue.use(VueI18Next) Vue.use(VueResize) +Vue.use(VueVirtualScroller) Vue.component('icon', Icon) Vue.component('popper', Popper) diff --git a/yarn.lock b/yarn.lock index 46ed5ff2..45603975 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11213,6 +11213,11 @@ schema-utils@^2.6.5, schema-utils@^2.6.6, schema-utils@^2.7.0, schema-utils@^2.7 ajv "^6.12.4" ajv-keywords "^3.5.2" +scrollparent@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/scrollparent/-/scrollparent-2.0.1.tgz#715d5b9cc57760fb22bdccc3befb5bfe06b1a317" + integrity sha1-cV1bnMV3YPsivczDvvtb/gaxoxc= + scss-tokenizer@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz#8eb06db9a9723333824d3f5530641149847ce5d1" @@ -13313,6 +13318,11 @@ vue-loader@^15.9.3: vue-hot-reload-api "^2.3.0" vue-style-loader "^4.1.0" +vue-observe-visibility@^0.4.4: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vue-observe-visibility/-/vue-observe-visibility-0.4.6.tgz#878cb8ebcf3078e40807af29774e97105ebd519e" + integrity sha512-xo0CEVdkjSjhJoDdLSvoZoQrw/H2BlzB5jrCBKGZNXN2zdZgMuZ9BKrxXDjNP2AxlcCoKc8OahI3F3r3JGLv2Q== + vue-popperjs@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/vue-popperjs/-/vue-popperjs-2.3.0.tgz#9cfa052878a3b47b670339ea81e05edcb863200f" @@ -13321,6 +13331,11 @@ vue-popperjs@^2.3.0: opencollective-postinstall "^2.0.2" popper.js "^1.15.0" +vue-resize@^0.4.5: + version "0.4.5" + resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-0.4.5.tgz#4777a23042e3c05620d9cbda01c0b3cc5e32dcea" + integrity sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg== + vue-resize@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/vue-resize/-/vue-resize-0.5.0.tgz#f55bb2b721a0ebcdfad8f3c14dfd00e3fd0fd913" @@ -13360,6 +13375,15 @@ vue-template-es2015-compiler@^1.9.0: resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825" integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw== +vue-virtual-scroller@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/vue-virtual-scroller/-/vue-virtual-scroller-1.0.10.tgz#fdf243240001f05bd79aa77f2e2e60403760e2fb" + integrity sha512-Hn4qSBDhRY4XdngPioYy/ykDjrLX/NMm1fQXm/4UQQ/Xv1x8JbHGFZNftQowTcfICgN7yc31AKnUk1UGLJ2ndA== + dependencies: + scrollparent "^2.0.1" + vue-observe-visibility "^0.4.4" + vue-resize "^0.4.5" + vue@^2.6.11: version "2.6.12" resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.12.tgz#f5ebd4fa6bd2869403e29a896aed4904456c9123"