mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-24 09:40:16 +08:00
✨ Feature: add tencent-cos options for url
ISSUES CLOSED: #862, #863, #865, #524, #845, #732
This commit is contained in:
@@ -270,6 +270,11 @@ export default class extends Vue {
|
||||
</script>
|
||||
<style lang='stylus'>
|
||||
$darwinBg = transparentify(#172426, #000, 0.7)
|
||||
.setting-list-scroll
|
||||
height 425px
|
||||
overflow-y auto
|
||||
overflow-x hidden
|
||||
margin-right 0!important
|
||||
.picgo-fade
|
||||
&-enter,
|
||||
&-leave,
|
||||
|
||||
@@ -147,8 +147,13 @@
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('SETTINGS_USE_BUILTIN_CLIPBOARD_UPLOAD')"
|
||||
>
|
||||
<div class="el-form-item__custom-label" slot="label">
|
||||
{{ $T('SETTINGS_USE_BUILTIN_CLIPBOARD_UPLOAD') }}
|
||||
<el-tooltip class="item" effect="dark" :content="$T('BUILTIN_CLIPBOARD_TIPS')" placement="right">
|
||||
<i class="el-icon-question"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-switch
|
||||
v-model="form.useBuiltinClipboard"
|
||||
:active-text="$T('SETTINGS_OPEN')"
|
||||
@@ -811,6 +816,9 @@ export default class extends Vue {
|
||||
color #eee
|
||||
flex-basis: 50%
|
||||
flex-shrink: 0
|
||||
.el-form-item__custom-label
|
||||
display flex
|
||||
align-items center
|
||||
.el-button-group
|
||||
width 100%
|
||||
.el-button
|
||||
@@ -824,9 +832,7 @@ export default class extends Vue {
|
||||
&.is-active
|
||||
color #409EFF
|
||||
.el-icon-question
|
||||
font-size 20px
|
||||
float right
|
||||
margin-top 9px
|
||||
margin-left 4px
|
||||
color #eee
|
||||
cursor pointer
|
||||
transition .2s color ease-in-out
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div id="tcyun-view">
|
||||
<el-row :gutter="16">
|
||||
<el-row :gutter="16" class="setting-list-scroll">
|
||||
<el-col :span="16" :offset="4">
|
||||
<div class="view-title">
|
||||
腾讯云COS设置
|
||||
@@ -74,6 +74,11 @@
|
||||
>
|
||||
<el-input v-model="form.customUrl" @keyup.native.enter="confirm" placeholder="例如https://xxxx.com"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="设定网址后缀"
|
||||
>
|
||||
<el-input v-model="form.options" @keyup.native.enter="confirm" placeholder="例如?imageMogr2"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="confirm" round>确定</el-button>
|
||||
@@ -90,12 +95,13 @@ import { ipcRenderer } from 'electron'
|
||||
import { Component, Vue } from 'vue-property-decorator'
|
||||
import mixin from '@/utils/ConfirmButtonMixin'
|
||||
import { OPEN_URL } from '#/events/constants'
|
||||
import { ITcyunConfig } from 'picgo/dist/types'
|
||||
@Component({
|
||||
name: 'tcyun',
|
||||
mixins: [mixin]
|
||||
})
|
||||
export default class extends Vue {
|
||||
form: ITcYunConfig = {
|
||||
form: ITcyunConfig = {
|
||||
secretId: '',
|
||||
secretKey: '',
|
||||
bucket: '',
|
||||
@@ -103,11 +109,12 @@ export default class extends Vue {
|
||||
area: '',
|
||||
path: '',
|
||||
customUrl: '',
|
||||
version: 'v4'
|
||||
version: 'v5',
|
||||
options: ''
|
||||
}
|
||||
|
||||
async created () {
|
||||
const config = await this.getConfig<ITcYunConfig>('picBed.tcyun')
|
||||
const config = await this.getConfig<ITcyunConfig>('picBed.tcyun')
|
||||
if (config) {
|
||||
this.form = Object.assign({}, config)
|
||||
}
|
||||
|
||||
@@ -67,21 +67,23 @@
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'vue-property-decorator'
|
||||
import mixin from '@/utils/ConfirmButtonMixin'
|
||||
import { IUpyunConfig } from 'picgo/dist/types'
|
||||
@Component({
|
||||
name: 'upyun',
|
||||
mixins: [mixin]
|
||||
})
|
||||
export default class extends Vue {
|
||||
form: IUpYunConfig = {
|
||||
form: IUpyunConfig = {
|
||||
bucket: '',
|
||||
operator: '',
|
||||
password: '',
|
||||
options: '',
|
||||
url: '',
|
||||
path: ''
|
||||
}
|
||||
|
||||
async created () {
|
||||
const config = await this.getConfig<IUpYunConfig>('picBed.upyun')
|
||||
const config = await this.getConfig<IUpyunConfig>('picBed.upyun')
|
||||
if (config) {
|
||||
this.form = Object.assign({}, config)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user