Fixed: view-title style & open config file

This commit is contained in:
Molunerfinn
2018-12-19 16:46:07 +08:00
parent 5cf96d38b8
commit 8ff7d15f8d
11 changed files with 16 additions and 47 deletions

View File

@@ -272,6 +272,7 @@ export default {
return Object.values(obj).some(item => item) return Object.values(obj).some(item => item)
}, },
multiDelete () { multiDelete () {
// choosedList -> { [id]: true or false }; true means choosed. false means not choosed.
if (Object.values(this.choosedList).some(item => item)) { if (Object.values(this.choosedList).some(item => item)) {
this.$confirm('将删除刚才选中的图片,是否继续?', '提示', { this.$confirm('将删除刚才选中的图片,是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@@ -302,9 +303,11 @@ export default {
if (Object.values(this.choosedList).some(item => item)) { if (Object.values(this.choosedList).some(item => item)) {
let copyString = '' let copyString = ''
const style = this.$db.read().get('settings.pasteStyle').value() || 'markdown' const style = this.$db.read().get('settings.pasteStyle').value() || 'markdown'
// choosedList -> { [id]: true or false }; true means choosed. false means not choosed.
Object.keys(this.choosedList).forEach(key => { Object.keys(this.choosedList).forEach(key => {
if (this.choosedList[key]) { if (this.choosedList[key]) {
copyString += pasteStyle(style, this.$db.read().get('uploaded').getById(key).value().imgUrl) + '\n' copyString += pasteStyle(style, this.$db.read().get('uploaded').getById(key).value().imgUrl) + '\n'
this.choosedList[key] = false
} }
}) })
const obj = { const obj = {

View File

@@ -11,6 +11,11 @@
label-position="right" label-position="right"
size="small" size="small"
> >
<el-form-item
label="打开配置文件"
>
<el-button type="primary" round size="mini" @click="openConfigFile">点击打开</el-button>
</el-form-item>
<el-form-item <el-form-item
label="修改快捷键" label="修改快捷键"
> >
@@ -180,9 +185,9 @@
</div> </div>
</template> </template>
<script> <script>
// import db from '../../../datastore'
import keyDetect from 'utils/key-binding' import keyDetect from 'utils/key-binding'
import pkg from 'root/package.json' import pkg from 'root/package.json'
import path from 'path'
const release = 'https://api.github.com/repos/Molunerfinn/PicGo/releases/latest' const release = 'https://api.github.com/repos/Molunerfinn/PicGo/releases/latest'
const downloadUrl = 'https://github.com/Molunerfinn/PicGo/releases/latest' const downloadUrl = 'https://github.com/Molunerfinn/PicGo/releases/latest'
export default { export default {
@@ -241,6 +246,12 @@ export default {
}) })
}, },
methods: { methods: {
openConfigFile () {
const { app, shell } = this.$electron.remote
const STORE_PATH = app.getPath('userData')
const CONFIG_FILE = path.join(STORE_PATH, '/data.json')
shell.openItem(CONFIG_FILE)
},
keyDetect (type, event) { keyDetect (type, event) {
this.shortKey[type] = keyDetect(event).join('+') this.shortKey[type] = keyDetect(event).join('+')
}, },
@@ -338,11 +349,6 @@ export default {
<style lang='stylus'> <style lang='stylus'>
.el-message .el-message
left 60% left 60%
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#picgo-setting #picgo-setting
.sub-title .sub-title
font-size 14px font-size 14px

View File

@@ -150,7 +150,7 @@ export default {
color #eee color #eee
font-size 20px font-size 20px
text-align center text-align center
margin 20px auto margin 10px auto
#upload-view #upload-view
#upload-area #upload-area
height 220px height 220px

View File

@@ -109,11 +109,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#aliyun-view #aliyun-view
.el-form .el-form
label label

View File

@@ -100,11 +100,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#github-view #github-view
.el-form .el-form
label label

View File

@@ -77,11 +77,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#imgur-view #imgur-view
.el-form .el-form
label label

View File

@@ -120,11 +120,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#qiniu-view #qiniu-view
.el-form .el-form
label label

View File

@@ -38,11 +38,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#smms-view #smms-view
.content .content
text-align center text-align center

View File

@@ -135,11 +135,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#tcyun-view #tcyun-view
.el-form .el-form
label label

View File

@@ -108,11 +108,6 @@ export default {
} }
</script> </script>
<style lang='stylus'> <style lang='stylus'>
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#tcyun-view #tcyun-view
.el-form .el-form
label label

View File

@@ -121,11 +121,6 @@ export default {
<style lang='stylus'> <style lang='stylus'>
.el-message .el-message
left 60% left 60%
.view-title
color #eee
font-size 20px
text-align center
margin 20px auto
#weibo-view #weibo-view
.el-form .el-form
label label