From 576ce2ae45f8300a03625c69f57f2c3cf4757059 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 15:54:41 +0800 Subject: [PATCH 01/11] move config into page --- src/layouts/Config.vue | 498 +---------------------------------- src/pages/config/index.vue | 517 +++++++++++++++++++++++++++++++++++++ src/router/routes.js | 2 +- 3 files changed, 519 insertions(+), 498 deletions(-) create mode 100644 src/pages/config/index.vue diff --git a/src/layouts/Config.vue b/src/layouts/Config.vue index a3e73d9..2d19072 100644 --- a/src/layouts/Config.vue +++ b/src/layouts/Config.vue @@ -26,526 +26,30 @@ - - - -
视频源设置
- -
- -
-
- - - - - - - -
name
-
- - - - - -
url
-
- - - - - -
httpApi
-
- - - - - -
httpsApi
-
- - - - - -
type
-
- - - - - - - - - -
-
-
-
- -
-
- - - - - - 清空视频源后需要重新导入或添加,请确定已备份当前视频源 - - - - - - - - -
-
全局设置
- -
- -
-
- -
-
- -
-
软件信息
- -
-
- 当前版本: - {{currentVersion}} -
-
- 最新版本: - {{latestVersion}} -
-
-
- -
-
- -
-
-
-
+
diff --git a/src/pages/config/index.vue b/src/pages/config/index.vue new file mode 100644 index 0000000..3190bb8 --- /dev/null +++ b/src/pages/config/index.vue @@ -0,0 +1,517 @@ + + + + + diff --git a/src/router/routes.js b/src/router/routes.js index abfc0e1..db75c92 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -24,7 +24,7 @@ const routes = [ { path: '/config', component: () => import('layouts/Config'), - // children: [{ path: '', component: () => import('pages/MiniVideo') }], + children: [{ path: '', component: () => import('pages/config') }], }, ]; From ea9822b823484cf263785b4283825a486a724c0c Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 20:53:44 +0800 Subject: [PATCH 02/11] add video source sort feature --- package.json | 1 + src/pages/config/components/dndSort.vue | 102 +++++++++++++++++++++ src/pages/config/index.vue | 115 +++++++++++++++++------- yarn.lock | 12 +++ 4 files changed, 196 insertions(+), 34 deletions(-) create mode 100644 src/pages/config/components/dndSort.vue diff --git a/package.json b/package.json index 38ac029..abee7e0 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "vue-i18n": "^8.14.1", "vue-navigation": "^1.1.4", "vue-rx": "^6.2.0", + "vuedraggable": "^2.23.0", "xml2js": "^0.4.22" }, "devDependencies": { diff --git a/src/pages/config/components/dndSort.vue b/src/pages/config/components/dndSort.vue new file mode 100644 index 0000000..1c1ca1a --- /dev/null +++ b/src/pages/config/components/dndSort.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/pages/config/index.vue b/src/pages/config/index.vue index 3190bb8..400f5d2 100644 --- a/src/pages/config/index.vue +++ b/src/pages/config/index.vue @@ -32,6 +32,14 @@ label="添加" @click="addRow" /> + - -
name
+ +
添加视频源
+ +
- - + - - -
url
-
- - - - -
httpApi
-
- - - - -
httpsApi
-
- - - - -
type
-
- - -
+ + + +
拖动排序
+ + +
+ + + + + + + +
+
Date: Thu, 19 Sep 2019 21:21:21 +0800 Subject: [PATCH 03/11] validate add video source input --- src/pages/config/index.vue | 47 +++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/src/pages/config/index.vue b/src/pages/config/index.vue index 400f5d2..7568aed 100644 --- a/src/pages/config/index.vue +++ b/src/pages/config/index.vue @@ -173,13 +173,15 @@ /> @@ -233,7 +238,7 @@ /> @@ -371,6 +376,7 @@ import { mapMutations, mapState } from 'vuex'; import { uid } from 'quasar'; import fs from 'fs-extra'; import { openNewGitHubIssue } from 'electron-util'; +import isAbsoluteUrl from 'is-absolute-url'; import dndSort from './components/dndSort'; export default { @@ -501,16 +507,28 @@ export default { this.data = this.data.filter(element => element.id !== prop.row.id); }, addRowInTable() { - this.addRowData.id = uid(); - this.data.push(this.addRowData); - this.addRowData = { - id: '', - name: '', - uri: '', - httpApi: '', - httpsApi: '', - type: '', - }; + this.$refs.name.validate(); + this.$refs.httpApi.validate(); + this.$refs.httpsApi.validate(); + + if (this.$refs.name.hasError || this.$refs.httpApi.hasError || this.$refs.httpsApi.hasError) { + this.$q.notify({ + color: 'negative', + message: '请完善添加的视频源信息', + }); + } else { + this.addRowData.id = uid(); + this.data.push(this.addRowData); + this.addRowData = { + id: '', + name: '', + uri: '', + httpApi: '', + httpsApi: '', + type: '', + }; + this.addDialog = false; + } }, showSort() { this.sortDialog = true; @@ -557,6 +575,9 @@ export default { } } }, + isUrl(val) { + return isAbsoluteUrl(val) || '请输入有效url'; + }, }, }; From 5db7420db06abc89b8123d33cbbd5d386af6e34d Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 21:34:33 +0800 Subject: [PATCH 04/11] test win x32 build --- .travis.yml | 31 ++++++++++++++++--------------- quasar.conf.js | 10 +++++++++- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 251c5f4..160204c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,17 +38,17 @@ script: - | rm -rf yarn.lock if [ "$TRAVIS_OS_NAME" == "linux" ]; then - docker run --rm \ - --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ - --env ELECTRON_CACHE="/root/.cache/electron" \ - --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ - -v ${PWD}:/project \ - -v ~/.cache/electron:/root/.cache/electron \ - -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" - linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` - ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f + # docker run --rm \ + # --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ + # --env ELECTRON_CACHE="/root/.cache/electron" \ + # --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ + # -v ${PWD}:/project \ + # -v ~/.cache/electron:/root/.cache/electron \ + # -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + # electronuserland/builder:wine \ + # /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" + # linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` + # ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f docker run --rm \ --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ @@ -58,9 +58,10 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target win" - win_file=`ls dist/electron/Packaged/ | grep '.zip$'` - ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f + /bin/bash -c "npm install && npm run electron:build -- --linux --win" + ls dist/electron/Packaged/ + # win_file=`ls dist/electron/Packaged/ | grep '.zip$'` + # ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f else npm run electron:build osx_file=`ls dist/electron/Packaged/ | grep '.dmg$'` @@ -72,4 +73,4 @@ before_cache: branches: except: - - 'dev' + - 'master' diff --git a/quasar.conf.js b/quasar.conf.js index 3dc5a20..07f1a84 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -208,7 +208,15 @@ module.exports = function (ctx) { target: 'dmg', }, win: { - target: 'zip', + target: [ + { + target: 'zip', + arch: [ + 'x64', + 'ia32', + ], + }, + ], }, linux: { target: 'AppImage', From c9a2a1cc3a9d0ebb3366ca2fb7ac8884812fc6e2 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 21:49:24 +0800 Subject: [PATCH 05/11] test-win32-build --- .travis.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 160204c..dfd702c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,15 +38,16 @@ script: - | rm -rf yarn.lock if [ "$TRAVIS_OS_NAME" == "linux" ]; then - # docker run --rm \ - # --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ - # --env ELECTRON_CACHE="/root/.cache/electron" \ - # --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ - # -v ${PWD}:/project \ - # -v ~/.cache/electron:/root/.cache/electron \ - # -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - # electronuserland/builder:wine \ - # /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" + docker run --rm \ + --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ + --env ELECTRON_CACHE="/root/.cache/electron" \ + --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" + ls dist/electron/Packaged/ # linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` # ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f @@ -58,14 +59,15 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --linux --win" + /bin/bash -c "npm install && npm run electron:build -- --target linux win" ls dist/electron/Packaged/ # win_file=`ls dist/electron/Packaged/ | grep '.zip$'` # ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f else npm run electron:build - osx_file=`ls dist/electron/Packaged/ | grep '.dmg$'` - ./ossutilmac64 cp "dist/electron/Packaged/${osx_file}" "${BUCKET}/${osx_file}" -f + ls dist/electron/Packaged/ + # osx_file=`ls dist/electron/Packaged/ | grep '.dmg$'` + # ./ossutilmac64 cp "dist/electron/Packaged/${osx_file}" "${BUCKET}/${osx_file}" -f fi before_cache: From 23c855295e632fcb58583af70e789f5971eb97cb Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 21:50:13 +0800 Subject: [PATCH 06/11] remove --bundler builder --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dfd702c..00b7604 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" + /bin/bash -c "npm install && npm run electron:build -- --target linux" ls dist/electron/Packaged/ # linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` # ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f From 1a628cb6dc2b674daccf5cb6a86c57d293ad06d2 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 22:08:57 +0800 Subject: [PATCH 07/11] change target --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 00b7604..246f1bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,7 +59,7 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --target linux win" + /bin/bash -c "npm install && npm run electron:build -- --target win" ls dist/electron/Packaged/ # win_file=`ls dist/electron/Packaged/ | grep '.zip$'` # ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f From f896d1f42b5db62e4b839bb250d48dedd730f633 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 22:15:36 +0800 Subject: [PATCH 08/11] add --bundler builder --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 246f1bd..1edb0f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --target linux" + /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" ls dist/electron/Packaged/ # linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` # ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f @@ -59,7 +59,7 @@ script: -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ electronuserland/builder:wine \ - /bin/bash -c "npm install && npm run electron:build -- --target win" + /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target win" ls dist/electron/Packaged/ # win_file=`ls dist/electron/Packaged/ | grep '.zip$'` # ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f From bb28d14784563faf818d19e0cf45cf13a28bd95f Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 22:47:45 +0800 Subject: [PATCH 09/11] add win x32 build --- .travis.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1edb0f1..bb76002 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,8 +48,8 @@ script: electronuserland/builder:wine \ /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target linux" ls dist/electron/Packaged/ - # linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` - # ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f + linux_file=`ls dist/electron/Packaged/ | grep '.AppImage$'` + ./ossutil64 cp "dist/electron/Packaged/${linux_file}" "${BUCKET}/${linux_file}" -f docker run --rm \ --env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ @@ -61,13 +61,15 @@ script: electronuserland/builder:wine \ /bin/bash -c "npm install && npm run electron:build -- --bundler builder --target win" ls dist/electron/Packaged/ - # win_file=`ls dist/electron/Packaged/ | grep '.zip$'` - # ./ossutil64 cp "dist/electron/Packaged/${win_file}" "${BUCKET}/${win_file}" -f + for i in `ls dist/electron/Packaged/ | grep 'win.zip$'`; + do + ./ossutil64 cp "dist/electron/Packaged/$i" "${BUCKET}/$i" -f + done else npm run electron:build ls dist/electron/Packaged/ - # osx_file=`ls dist/electron/Packaged/ | grep '.dmg$'` - # ./ossutilmac64 cp "dist/electron/Packaged/${osx_file}" "${BUCKET}/${osx_file}" -f + osx_file=`ls dist/electron/Packaged/ | grep '.dmg$'` + ./ossutilmac64 cp "dist/electron/Packaged/${osx_file}" "${BUCKET}/${osx_file}" -f fi before_cache: From ba5c39609fe805c9b2d658c32700d9ef78df272b Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 22:49:01 +0800 Subject: [PATCH 10/11] bump 0.9.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index abee7e0..90e61fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "h-player", - "version": "0.9.4", + "version": "0.9.5", "description": "A Quasar Framework app", "productName": "h-player", "cordovaId": "org.cordova.quasar.app", From e8e8a436dd60a43c85fe487fd68acd92a126380c Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 23:18:55 +0800 Subject: [PATCH 11/11] change ci branches --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bb76002..0f93df6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -77,4 +77,4 @@ before_cache: branches: except: - - 'master' + - 'dev'