From d0fdb79821b24ab801d808f5c4e261e9be9bdde8 Mon Sep 17 00:00:00 2001 From: Molunerfinn Date: Wed, 29 Nov 2017 16:23:05 +0800 Subject: [PATCH] Added: qiniu page --- package.json | 1 + src/main/index.js | 6 +- src/renderer/components/SettingPage.vue | 4 + src/renderer/components/SettingView/Qiniu.vue | 144 ++++++++++++++++++ .../components/SettingView/Upload.vue | 8 + src/renderer/components/TrayPage.vue | 7 +- src/renderer/router/index.js | 5 + yarn.lock | 132 ++++++++++++++-- 8 files changed, 292 insertions(+), 15 deletions(-) create mode 100644 src/renderer/components/SettingView/Qiniu.vue diff --git a/package.json b/package.json index 506d11e..483fb31 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "fs-extra": "^4.0.2", "image-size": "^0.6.1", "lowdb": "^1.0.0", + "qiniu": "^7.1.1", "request": "^2.83.0", "request-promise": "^4.2.2", "vue": "^2.3.3", diff --git a/src/main/index.js b/src/main/index.js index d296e22..f02a2c4 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -47,7 +47,11 @@ function createTray () { { label: '微博图床', type: 'radio', - checked: db.read().get('picBed.current').value() === 'weibo' + checked: db.read().get('picBed.current').value() === 'weibo', + click () { + db.read().set('picBed.current', 'weibo') + .write() + } }, { label: '七牛图床', diff --git a/src/renderer/components/SettingPage.vue b/src/renderer/components/SettingPage.vue index 258ccc3..0f428b1 100644 --- a/src/renderer/components/SettingPage.vue +++ b/src/renderer/components/SettingPage.vue @@ -18,6 +18,10 @@ 微博设置 + + + 七牛设置 + diff --git a/src/renderer/components/SettingView/Qiniu.vue b/src/renderer/components/SettingView/Qiniu.vue new file mode 100644 index 0000000..e95d402 --- /dev/null +++ b/src/renderer/components/SettingView/Qiniu.vue @@ -0,0 +1,144 @@ + + + \ No newline at end of file diff --git a/src/renderer/components/SettingView/Upload.vue b/src/renderer/components/SettingView/Upload.vue index 8721ff4..ec0793c 100644 --- a/src/renderer/components/SettingView/Upload.vue +++ b/src/renderer/components/SettingView/Upload.vue @@ -166,4 +166,12 @@ export default { .el-radio-button:first-child .el-radio-button__inner border-left none + .el-radio-button:first-child + .el-radio-button__inner + border-left none + border-radius 14px 0 0 14px + .el-radio-button:last-child + .el-radio-button__inner + border-left none + border-radius 0 14px 14px 0 \ No newline at end of file diff --git a/src/renderer/components/TrayPage.vue b/src/renderer/components/TrayPage.vue index 423ec01..cacb426 100644 --- a/src/renderer/components/TrayPage.vue +++ b/src/renderer/components/TrayPage.vue @@ -23,6 +23,7 @@