Skip to content

Commit

Permalink
Update 7.1.4 (#60)
Browse files Browse the repository at this point in the history
* chore: 升级部分包

* fix: 为解决electron的无边框早macos 10.15.1的拖拽BUG,只用有边框

BUG:electron/electron#21034

* fix: 使用https

* fix: 解决同源策略,可以修复右键功能

* fix: 解决mac qq选中整个content截图白屏的问题,实际上这是qq的问题,识图的截图方式依然存在白屏问题

* chore: 升级版本

* chore: 还原功能,记录问题

调试发现,qq截图白屏是new tray执行的原因,只要tray顺利执行,那么qq弹框截屏就白屏

* feat: 增加回到日事清功能

* fix: 升级@sentry/electron解决提示getName被废弃警告的问题
  • Loading branch information
lumozx authored and qinyang912 committed Dec 16, 2019
1 parent c7c1a91 commit 8bf3073
Show file tree
Hide file tree
Showing 19 changed files with 282 additions and 405 deletions.
6 changes: 3 additions & 3 deletions download.js
Expand Up @@ -75,9 +75,9 @@ class Download extends Page {
if (!isExist) return fileName;
const extname = path.extname(fileName);
const basename = path.basename(fileName, extname);

let count = 0;

while (isExist) {
isExist = this.isFileExist(`${basename}(${++count})${extname}`);
}
Expand Down Expand Up @@ -154,4 +154,4 @@ class Download extends Page {
}
}

module.exports = new Download();
module.exports = new Download();
4 changes: 3 additions & 1 deletion electron-builder.js
Expand Up @@ -16,7 +16,9 @@ const output = process.platform === 'darwin' ? `package-${process.env.CHANNEL}`

try {
rimraf.sync(output);
} catch (e) {}
} catch (e) {
console.log(e)
}

builder.build({
config: {
Expand Down
151 changes: 2 additions & 149 deletions fe/modules/index/Index.vue
@@ -1,34 +1,5 @@
<template>
<div id="index">
<div class="drag-bar-mac" style="-webkit-app-region: drag;" @dblclick.stop="full($event)">
<div class="traffic-lights mac" style="-webkit-app-region: no-drag;">
<span class="close" @click="close">
<img src="../../assets/img/mac-traffic-light-close.svg" class="normal">
<img src="../../assets/img/mac-traffic-light-close-hover.svg" class="hover">
</span>
<span class="minimize" @click="minimize">
<img src="../../assets/img/mac-traffic-light-minimize.svg" class="normal">
<img src="../../assets/img/mac-traffic-light-minimize-hover.svg" class="hover">
</span>
<span class="zoom" @click="zoom">
<img src="../../assets/img/mac-traffic-light-zoom.svg" class="normal">
<img src="../../assets/img/mac-traffic-light-zoom-hover.svg" class="hover">
</span>
</div>
</div>
<div class="drag-bar-win" style="-webkit-app-region: drag;" @dblclick.stop="full($event)">
<div class="traffic-lights" style="-webkit-app-region: no-drag">
<span class="minimize" @click="minimize">
<img src="../../assets/img/win-minimize.svg">
</span>
<span class="zoom" @click="zoom">
<img src="../../assets/img/win-zoom.svg">
</span>
<span class="close" @click="close">
<img src="../../assets/img/win-close.svg">
</span>
</div>
</div>
<iframe id="main-iframe" allowFullscreen="true" ref="mainIframe" @load="iframeLoad"></iframe>
<div id="loading" ref="loading" v-show="loadingDisplay">
<div class="loading-splash" ref="loadingSplash" v-show="loadingSplashDisplay">
Expand Down Expand Up @@ -716,8 +687,8 @@ body.win .welcome-page:before {
bottom: 0;
border: none;
width: 100%;
top: 30px;
height: calc(100% - 30px);
top: 0px;
height: 100%;
}
#loading {
position: absolute;
Expand Down Expand Up @@ -804,122 +775,4 @@ body.win .welcome-page:before {
margin-top: -6px;
margin-left: 18px;
}
.drag-bar-mac {
display: none;
}
.drag-bar-mac .drag-bar {
position: absolute;
left: 80px;
top: 0;
height: 56px;
width: calc(50% - 285px);
}
.drag-bar-mac .drag-bar-2 {
position: absolute;
left: 0;
top: 0;
right: 0;
height: 10px;
}
.drag-bar-mac .drag-bar-3 {
position: absolute;
left: 0;
top: 46px;
right: 0;
height: 10px;
}
.traffic-lights.mac {
position: absolute;
left: 0;
top: 0;
height: 30px;
display: flex;
z-index: 2;
justify-content: space-between;
width: 76px;
align-items: center;
padding: 0 12px;
user-select: none;
}
.traffic-lights.mac > span {
display: inline-block;
height: 12px;
width: 12px;
border-radius: 50%;
}
.traffic-lights.mac > span img {
height: 12px;
width: 12px;
vertical-align: top;
}
.traffic-lights.mac > span img.hover {
display: none;
}
.traffic-lights.mac:hover img.normal {
display: none;
}
.traffic-lights.mac:hover img.hover {
display: inline-block;
}
.drag-bar-win {
display: none;
position: absolute;
left: 0;
top: 0;
right: 0;
height: 30px;
background:linear-gradient(180deg,rgba(88,157,228,1) 0%,rgba(77,140,202,1) 100%);
z-index: 2;
}
.drag-bar-win .traffic-lights {
position: absolute;
right: 0;
top: 0;
height: 30px;
display: flex;
z-index: 1;
justify-content: space-between;
width: 140px;
align-items: center;
padding: 0 18px;
user-select: none;
}
.drag-bar-win .traffic-lights > span {
display: flex;
height: 100%;
width: 12px;
align-items: center;
justify-content: center;
}
.drag-bar-win .traffic-lights > span img {
vertical-align: top;
}
.drag-bar-win .traffic-lights > span.minimize img {
vertical-align: bottom;
}
body.mac .drag-bar-mac {
user-select:none;
display: block;
position: absolute;
left: 0;
top: 0;
right: 0;
height: 30px;
background:linear-gradient(180deg,rgba(88,157,228,1) 0%,rgba(77,140,202,1) 100%);
z-index: 2;
}
body.win {
background: #5A98D4;
}
body.win .drag-bar-win {
user-select:none;
display: block;
}
body.win .traffic-lights.mac {
display: none;
}
</style>
2 changes: 1 addition & 1 deletion fe/modules/index/pub/Welcome.vue
Expand Up @@ -225,4 +225,4 @@ export default {
margin-left: 40px;
}
</style>
</style>
14 changes: 4 additions & 10 deletions fe/modules/preference/Preference.vue
Expand Up @@ -35,7 +35,7 @@ const { testProxy } = electron.remote.require('./native/proxy')
async function getConfig() {
const proxyConfig = await mainDb.getProxyConfig()
const serverConfig = await mainDb.getServerConfig()
const cacheSize = await getCacheSize()
const cacheSize = await session.getCacheSize()
const downloadConfig = await mainDb.getDownloadConfig()
const hotkeyConfig = await mainDb.getHotKeyConfig()
const isAutoLaunch = autoLaunch.isEnabled()
Expand All @@ -48,13 +48,7 @@ async function getConfig() {
isAutoLaunch,
}
}
async function getCacheSize() {
return new Promise((resolve) => {
session.getCacheSize((size) => {
resolve(size)
})
})
}
export default {
name: "preference",
components: {
Expand Down Expand Up @@ -128,7 +122,7 @@ export default {
async onRestore() {
mainDb.restore()
autoLaunch.disable()
const config = await getConfig()
const config = await getConfig()
this.proxyConfig = config.proxyConfig
this.serverConfig = {
enablePrivate: config.serverConfig. enablePrivate,
Expand Down Expand Up @@ -271,4 +265,4 @@ ul {
color: #3B3B3B;
}
</style>
</style>
16 changes: 5 additions & 11 deletions fe/modules/preference/main.js
Expand Up @@ -13,17 +13,11 @@ webFrame.setZoomFactor(1)
webFrame.setVisualZoomLevelLimits(1, 1)
webFrame.setLayoutZoomLevelLimits(0, 0)

async function getCacheSize() {
return new Promise((resolve) => {
session.getCacheSize((size) => {
resolve(size)
})
})
}

async function getConfig() {
const proxyConfig = await mainDb.getProxyConfig()
const serverConfig = await mainDb.getServerConfig()
const cacheSize = await getCacheSize()
const cacheSize = await session.getCacheSize()
const downloadConfig = await mainDb.getDownloadConfig()
const hotkeyConfig = await mainDb.getHotKeyConfig()
const isAutoLaunch = autoLaunch.isEnabled()
Expand All @@ -37,11 +31,11 @@ async function getConfig() {
}
}
async function render () {
const res = await getConfig()
const res = await getConfig()
await store.commit('SAVR_CON',res)
new Vue({
store,
store,
render: h => h(Preference)
}).$mount('#preference')
}
render()
render()
2 changes: 1 addition & 1 deletion fe/modules/preference/pub/Server.vue
Expand Up @@ -60,4 +60,4 @@ export default {

<style scoped>
</style>
</style>
6 changes: 3 additions & 3 deletions fe/modules/utils/config.js
Expand Up @@ -2,9 +2,9 @@ import electron from 'electron'
const package_json = electron.remote.require('./package.json')
const env = package_json.env//dev是开发环境,release是发布环境, beta是beta环境
const PREFIX_URL = {
dev: 'http://beta.rishiqing.com',
beta: 'http://beta.rishiqing.com',
debug: 'http://beta.rishiqing.com',
dev: 'https://beta.rishiqing.com',
beta: 'https://beta.rishiqing.com',
debug: 'https://beta.rishiqing.com',
release: 'https://www.rishiqing.com',
}

Expand Down

0 comments on commit 8bf3073

Please sign in to comment.