From 132d50219445eed68f2269f3afe503bbaa9645cc Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Tue, 21 Feb 2017 11:23:03 +0100 Subject: [PATCH 1/5] 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/5] 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/5] 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/5] 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/5] 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 {