From 3c7d71174b8892b905f9d4e7a481d65907cdfb09 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 19 Sep 2019 11:52:11 +0800 Subject: [PATCH] remove electron-positioner --- package.json | 1 - src/pages/Video.vue | 8 +++----- yarn.lock | 5 ----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index d076296..86e104a 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "dependencies": { "@quasar/extras": "^1.3.1", "axios": "^0.19.0", - "electron-positioner": "^4.1.0", "electron-store": "^5.0.0", "electron-util": "^0.12.1", "fs-extra": "^8.1.0", diff --git a/src/pages/Video.vue b/src/pages/Video.vue index f79eb29..17dfc22 100644 --- a/src/pages/Video.vue +++ b/src/pages/Video.vue @@ -105,7 +105,7 @@ import normalizeUrl from 'normalize-url'; import isAbsoluteUrl from 'is-absolute-url'; import { mapState } from 'vuex'; import { stringify } from 'query-string'; -import Positioner from 'electron-positioner'; + import _find from 'lodash/find'; import _get from 'lodash/get'; @@ -227,8 +227,8 @@ export default { const encodeUrl = stringify({ video: videoInfo, episode: episodeInfo }); const parentWindow = getCurrentWindow(); const win = new BrowserWindow({ - width: 800, - height: 600, + width: 400, + height: 300, useContentSize: true, webPreferences: { nodeIntegration: true, @@ -237,8 +237,6 @@ export default { parent: parentWindow, }); win.removeMenu(); - const positioner = new Positioner(win); - positioner.move('bottomRight'); win.loadURL(`${process.env.APP_URL}#/mini-video?${encodeUrl}`); }, errorHandler(event, data) { diff --git a/yarn.lock b/yarn.lock index 93c2031..e6bb640 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3436,11 +3436,6 @@ electron-packager@^14.0.6: semver "^6.0.0" yargs-parser "^13.0.0" -electron-positioner@^4.1.0: - version "4.1.0" - resolved "https://registry.npm.taobao.org/electron-positioner/download/electron-positioner-4.1.0.tgz#e158f8f6aabd6725a8a9b4f2279b9504bcbea1b0" - integrity sha1-4Vj49qq9ZyWoqbTyJ5uVBLy+obA= - electron-publish@21.2.0: version "21.2.0" resolved "https://registry.npm.taobao.org/electron-publish/download/electron-publish-21.2.0.tgz#cc225cb46aa62e74b899f2f7299b396c9802387d"