From 132d50219445eed68f2269f3afe503bbaa9645cc Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 11:23:03 +0100 Subject: [PATCH 1/8] Use correct vue import. --- build/webpack.base.conf.js | 2 +- package.json | 3 +- yarn.lock | 64 ++++++++++++++++++++++++++++++++------ 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index ebe8d9d8..ccff6772 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -23,7 +23,7 @@ module.exports = { extensions: ['', '.js', '.vue'], fallback: [path.join(__dirname, '../node_modules')], alias: { - 'vue$': 'vue/dist/vue', + 'vue$': 'vue/dist/vue.common', 'src': path.resolve(__dirname, '../src'), 'assets': path.resolve(__dirname, '../src/assets'), 'components': path.resolve(__dirname, '../src/components') diff --git a/package.json b/package.json index c23f001e..568aa87a 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "tributejs": "^2.1.0", "vue": "^2.1.0", "vue-router": "^2.2.0", + "vue-template-compiler": "^2.1.10", "vue-timeago": "^3.1.2", "vuex": "^2.1.0" }, @@ -82,7 +83,7 @@ "sinon": "^1.17.3", "sinon-chai": "^2.8.0", "url-loader": "^0.5.7", - "vue-loader": "^9.4.0", + "vue-loader": "^11.1.0", "vue-style-loader": "^1.0.0", "webpack": "^1.13.2", "webpack-dev-middleware": "^1.8.3", diff --git a/yarn.lock b/yarn.lock index 0d26977f..4d5a5f61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1356,6 +1356,17 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.1.1.tgz#817f2c2039347a1e9bf7d090c0923e53f749ca82" + dependencies: + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + cross-spawn@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-3.0.1.tgz#1256037ecb9f0c5f79e3d6ef135e30770184b982" @@ -3007,7 +3018,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@3.x, js-yaml@^3.5.1: +js-yaml@3.x, js-yaml@^3.4.3, js-yaml@^3.5.1: version "3.8.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" dependencies: @@ -3909,7 +3920,7 @@ object-assign@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" -object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3996,7 +4007,7 @@ os-browserify@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" -os-homedir@^1.0.0: +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -4229,6 +4240,29 @@ postcss-filter-plugins@^2.0.0: postcss "^5.0.4" uniqid "^4.0.0" +postcss-load-config@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + postcss-merge-idents@^2.1.5: version "2.1.7" resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" @@ -4814,6 +4848,10 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -5570,22 +5608,21 @@ vue-hot-reload-api@^2.0.1: version "2.0.9" resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.0.9.tgz#2e8cfbfc8e531eea57d8c1f0bd761047c7e11b56" -vue-loader@^9.4.0: - version "9.9.5" - resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-9.9.5.tgz#0893e3093e90c8fbe852053b2b0f4854a3bf4651" +vue-loader@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-11.1.0.tgz#8f3fcdd8a233ce96b3e99bd3d56e83cc0f2050f2" dependencies: consolidate "^0.14.0" hash-sum "^1.0.2" js-beautify "^1.6.3" loader-utils "^0.2.10" lru-cache "^4.0.1" - object-assign "^4.0.0" postcss "^5.0.10" + postcss-load-config "^1.1.0" postcss-selector-parser "^2.0.0" source-map "^0.5.6" vue-hot-reload-api "^2.0.1" - vue-style-loader "^1.0.0" - vue-template-compiler "^2.0.5" + vue-style-loader "^2.0.0" vue-template-es2015-compiler "^1.2.2" vue-router@^2.2.0: @@ -5598,7 +5635,14 @@ vue-style-loader@^1.0.0: dependencies: loader-utils "^0.2.7" -vue-template-compiler@^2.0.5: +vue-style-loader@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-2.0.0.tgz#1a3bb55239ac541ee3af0301d66f16fc86786543" + dependencies: + hash-sum "^1.0.2" + loader-utils "^0.2.7" + +vue-template-compiler@^2.1.10: version "2.1.10" resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.1.10.tgz#cb89643adc395e97435585522e43d0a9b1913257" dependencies: From abc9f06d93b9f380301da14fb9073771cadd71f5 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 11:48:08 +0100 Subject: [PATCH 2/8] Use runtime only build. --- build/webpack.base.conf.js | 2 +- src/main.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index ccff6772..68e75972 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -23,7 +23,7 @@ module.exports = { extensions: ['', '.js', '.vue'], fallback: [path.join(__dirname, '../node_modules')], alias: { - 'vue$': 'vue/dist/vue.common', + 'vue$': 'vue/dist/vue.runtime.common', 'src': path.resolve(__dirname, '../src'), 'assets': path.resolve(__dirname, '../src/assets'), 'components': path.resolve(__dirname, '../src/components') diff --git a/src/main.js b/src/main.js index 97156b64..22879b34 100644 --- a/src/main.js +++ b/src/main.js @@ -67,8 +67,7 @@ new Vue({ router, store, el: '#app', - template: '', - components: { App } + render: h => h(App) }) window.fetch('/static/config.json') From f385e64a7c3922fee229cd9bf907dd0949090f13 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 15:23:46 +0100 Subject: [PATCH 3/8] Update vue-style-loader. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 568aa87a..52733425 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "sinon-chai": "^2.8.0", "url-loader": "^0.5.7", "vue-loader": "^11.1.0", - "vue-style-loader": "^1.0.0", + "vue-style-loader": "^2.0.0", "webpack": "^1.13.2", "webpack-dev-middleware": "^1.8.3", "webpack-hot-middleware": "^2.12.2", From 137a7e643d22be6461f79cc134df1e459c576228 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 15:24:05 +0100 Subject: [PATCH 4/8] Remove flex from general attachments. --- src/components/attachment/attachment.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 738a1e86..e0eba6a9 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -16,8 +16,6 @@ - Don't know how to display this... -
@@ -38,12 +36,12 @@ flex-wrap: wrap; .attachment { flex: 1 0 30%; - display: flex; margin: 0.5em 0.8em 0.6em 0.1em; align-self: flex-start; &.html { flex-basis: 100%; + display: flex; } .hider { From 40fe40d96b2a4dadf706637954b529ee80af75a4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 15:24:35 +0100 Subject: [PATCH 5/8] Better attachment removal styling. --- src/components/post_status_form/post_status_form.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 1bad41c7..ebb92b26 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -6,11 +6,11 @@
@@ -52,6 +52,15 @@ .attachments { padding: 0.5em; + + i { + position: absolute; + margin: 10px; + padding: 5px; + background: rgba(230,230,230,0.6); + border-radius: 0.5em; + font-weight: bold; + } } form { From 892b826df59203a920bfebbd2ac37ef62dcf411b Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 21:48:48 +0100 Subject: [PATCH 6/8] Small style adjustment, add meta-enter posting. --- src/components/media_upload/media_upload.js | 5 +++-- src/components/post_status_form/post_status_form.js | 2 +- src/components/post_status_form/post_status_form.vue | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index 3f6fec5b..746970aa 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -16,7 +16,7 @@ const mediaUpload = { } }, methods: { - uploadFile(file) { + uploadFile (file) { const self = this const store = this.$store const formData = new FormData() @@ -40,8 +40,9 @@ const mediaUpload = { ], watch: { 'dropFiles': function (fileInfos) { - if (!this.uploading) + if (!this.uploading) { this.uploadFile(fileInfos[0]) + } } } } diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index e798b196..d55525bb 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -144,7 +144,7 @@ const PostStatusForm = { return fileTypeService.fileType(fileInfo.mimetype) }, fileDrop (e) { - if(e.dataTransfer.files.length > 0) { + if (e.dataTransfer.files.length > 0) { e.preventDefault() // allow dropping text like before this.dropFiles = e.dataTransfer.files } diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index d9138109..eceef4a2 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -2,7 +2,7 @@
- +
From aa3512205dedff9df4b041ecd7eeb8c083e8ff2f Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Wed, 22 Feb 2017 10:32:09 +0100 Subject: [PATCH 7/8] Only save every minute. --- src/lib/persisted_state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js index de1e5383..31ced37d 100644 --- a/src/lib/persisted_state.js +++ b/src/lib/persisted_state.js @@ -51,7 +51,7 @@ export default function createPersistedState ({ } return value && value !== 'undefined' ? JSON.parse(value) : undefined }, - setState = throttle(defaultSetState, 5000), + setState = throttle(defaultSetState, 60000), reducer = defaultReducer, storage = defaultStorage, subscriber = store => handler => store.subscribe(handler) From 874f9765318897bfde0cf80c9e75da9b3b66f25d Mon Sep 17 00:00:00 2001 From: shpuld Date: Wed, 22 Feb 2017 11:54:09 +0200 Subject: [PATCH 8/8] Hide Follow-button and 'Follows you' text when not logged in --- .../user_card_content/user_card_content.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 59cee734..ee4384fa 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -7,18 +7,18 @@
{{user.name}}
@{{user.screen_name}}
-
+
Follows you!
-