From 6d0ccd7f500e689998f61a5d22fbada1877592b0 Mon Sep 17 00:00:00 2001 From: webxoss Date: Tue, 7 Feb 2017 17:47:46 +0800 Subject: [PATCH 1/8] add appcache --- build.js | 4 +++- package.json | 1 + src/index.tpl | 2 +- webpack.config.js | 5 +++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 4bf2024..6f07e85 100644 --- a/build.js +++ b/build.js @@ -5,7 +5,9 @@ const shell = require('shelljs') shell.rm('-rf', 'dist') require('webpack')(require('./webpack.config.js'), (err, stats) => { - if (err) throw err + if (err) { + throw err + } process.stdout.write(stats.toString({ colors: true, modules: false, diff --git a/package.json b/package.json index f0781fa..bf3fb35 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "vuex-router-sync": "^3.0.0" }, "devDependencies": { + "appcache-webpack-plugin": "^1.3.0", "autoprefixer": "^6.4.0", "babel-core": "^6.16.0", "babel-helper-vue-jsx-merge-props": "^2.0.1", diff --git a/src/index.tpl b/src/index.tpl index 70bfca5..2eab931 100644 --- a/src/index.tpl +++ b/src/index.tpl @@ -1,5 +1,5 @@ - + diff --git a/webpack.config.js b/webpack.config.js index 73a49f6..ad6ba94 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -171,6 +171,11 @@ config.base = { filename: 'index.html', template: PATHS.template, }), + new (require('appcache-webpack-plugin'))({ + cache: ['CardInfo.json'], + exclude: ['index.html'], + output: 'webxoss.appcache', + }), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false, From 67cf997999f85ef0de707e8947aa9d7304f6f4c7 Mon Sep 17 00:00:00 2001 From: webxoss Date: Tue, 7 Feb 2017 21:46:38 +0800 Subject: [PATCH 2/8] add update tips --- src/components/DeckFloatButton.vue | 2 +- src/components/UpdateStatusBar.vue | 77 ++++++++++++++++++++++++++++++ src/pages/Deck.vue | 32 ++++++++++++- 3 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 src/components/UpdateStatusBar.vue diff --git a/src/components/DeckFloatButton.vue b/src/components/DeckFloatButton.vue index af6e6e3..202904a 100644 --- a/src/components/DeckFloatButton.vue +++ b/src/components/DeckFloatButton.vue @@ -57,7 +57,7 @@ export default { diff --git a/src/pages/Deck.vue b/src/pages/Deck.vue index 5cc3efd..c89b0f7 100644 --- a/src/pages/Deck.vue +++ b/src/pages/Deck.vue @@ -3,6 +3,7 @@ import { mapState, mapGetters } from 'vuex' import { AppHeader, HeaderIcon, HeaderMenu } from 'components/AppHeader' import DeckModals from 'components/DeckModals' import DeckFloatButton from 'components/DeckFloatButton' +import UpdateStatusBar from 'components/UpdateStatusBar' import Cell from 'components/Cell' import Block from 'components/Block' import DeckHead from 'components/DeckHead' @@ -20,6 +21,7 @@ export default { HeaderMenu, DeckModals, DeckFloatButton, + UpdateStatusBar, Cell, Block, DeckHead, @@ -203,9 +205,25 @@ export default { - + + +
+
+ +
+
+ +
+
+ + + @@ -225,4 +243,14 @@ export default { .block { width: 20%; } - \ No newline at end of file +.bottom { + position: fixed; + left: 0; + right: 0; + bottom: 0; + + & > div { + position: relative; + } +} + From 39b79f2835601dc45999cbf05cb67bdc93add871 Mon Sep 17 00:00:00 2001 From: webxoss Date: Tue, 7 Feb 2017 21:54:13 +0800 Subject: [PATCH 3/8] add animation --- src/components/UpdateStatusBar.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/UpdateStatusBar.vue b/src/components/UpdateStatusBar.vue index 2313dc1..a1463e3 100644 --- a/src/components/UpdateStatusBar.vue +++ b/src/components/UpdateStatusBar.vue @@ -47,7 +47,7 @@ export default {