mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-01-23 14:48:13 -05:00
✨ Feature: click picbed name can link to login page now, add some i18n key
This commit is contained in:
parent
8feb30adbf
commit
d725e71617
@ -30,6 +30,7 @@ CURRENT_PICBED: Current Picbed
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: 'Choose ${d} as your default picbed:'
|
||||
UPLOAD_AREA: Upload Area
|
||||
UPLOAD_VIEW_HINT: Click to open picbeds settings
|
||||
MANAGE_PAGE: Manage Page
|
||||
GALLERY: Gallery
|
||||
PICBEDS_SETTINGS: Picbeds Settings
|
||||
PICBEDS_MANAGE: Picbeds Manage
|
||||
|
@ -30,6 +30,7 @@ CURRENT_PICBED: 当前图床
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: 选择 ${d} 作为你默认图床:
|
||||
UPLOAD_AREA: 上传区
|
||||
UPLOAD_VIEW_HINT: 点击打开图床设置
|
||||
MANAGE_PAGE: 管理页面
|
||||
GALLERY: 相册
|
||||
PICBEDS_SETTINGS: 图床设置
|
||||
PICBEDS_MANAGE: 图床管理
|
||||
|
@ -30,6 +30,7 @@ CURRENT_PICBED: 當前圖床
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: 選擇 ${d} 作為你的預設圖床:
|
||||
UPLOAD_AREA: 上傳區
|
||||
UPLOAD_VIEW_HINT: 點擊打開圖床設定
|
||||
MANAGE_PAGE: 管理頁面
|
||||
GALLERY: 相簿
|
||||
PICBEDS_SETTINGS: 圖床設定
|
||||
PICBEDS_MANAGE: 圖床管理
|
||||
|
@ -63,7 +63,7 @@
|
||||
<el-icon>
|
||||
<PieChart />
|
||||
</el-icon>
|
||||
<span>管理页面</span>
|
||||
<span>{{ $T('MANAGE_PAGE') }}</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item :index="routerConfig.GALLERY_PAGE">
|
||||
<el-icon>
|
||||
|
@ -3,9 +3,9 @@
|
||||
id="mini-page"
|
||||
:class="{ linux: os === 'linux' }"
|
||||
>
|
||||
<img
|
||||
:src="logoPath.value ? logoPath.value : require('../assets/squareLogo.png')"
|
||||
style="width: 100%; height: 100%;border-radius: 50%;"
|
||||
<img
|
||||
:src="logoPath.value ? logoPath.value : require('../assets/squareLogo.png')"
|
||||
style="width: 100%; height: 100%;border-radius: 50%;"
|
||||
>
|
||||
<div
|
||||
id="upload-area"
|
||||
|
@ -8,8 +8,16 @@
|
||||
:span="20"
|
||||
:offset="2"
|
||||
>
|
||||
<div class="view-title">
|
||||
<div
|
||||
class="view-title"
|
||||
@click="handelNameClick"
|
||||
>
|
||||
{{ picBedName }} {{ $T('SETTINGS') }}
|
||||
<el-icon
|
||||
v-if="linkToLogInList.includes(picBedName)"
|
||||
>
|
||||
<Link />
|
||||
</el-icon>
|
||||
</div>
|
||||
<config-form
|
||||
v-if="config.length > 0"
|
||||
@ -53,6 +61,8 @@ import {
|
||||
ipcRenderer,
|
||||
IpcRendererEvent
|
||||
} from 'electron'
|
||||
import { OPEN_URL } from '~/universal/events/constants'
|
||||
import { Link } from '@element-plus/icons-vue'
|
||||
const type = ref('')
|
||||
const config = ref<IPicGoPluginConfig[]>([])
|
||||
const picBedName = ref('')
|
||||
@ -80,6 +90,37 @@ const handleConfirm = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const linkToLogInList = ['GitHub', '腾讯云COS', '阿里云OSS', 'SM.MS', '七牛云', 'Imgur', '又拍云', 'githubPlus']
|
||||
|
||||
function handelNameClick () {
|
||||
switch (picBedName.value) {
|
||||
case 'GitHub':
|
||||
case 'githubPlus':
|
||||
sendToMain(OPEN_URL, 'https://github.com')
|
||||
break
|
||||
case '腾讯云COS':
|
||||
sendToMain(OPEN_URL, 'https://cloud.tencent.com/login')
|
||||
break
|
||||
case '阿里云OSS':
|
||||
sendToMain(OPEN_URL, 'https://account.aliyun.com/login/login.htm')
|
||||
break
|
||||
case 'SM.MS':
|
||||
sendToMain(OPEN_URL, 'https://smms.app')
|
||||
break
|
||||
case '七牛云':
|
||||
sendToMain(OPEN_URL, 'https://portal.qiniu.com')
|
||||
break
|
||||
case 'Imgur':
|
||||
sendToMain(OPEN_URL, 'https://imgur.com')
|
||||
break
|
||||
case '又拍云':
|
||||
sendToMain(OPEN_URL, 'https://console.upyun.com')
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
function getPicBeds (event: IpcRendererEvent, _config: IPicGoPluginConfig[], name: string) {
|
||||
config.value = _config
|
||||
picBedName.value = name
|
||||
@ -104,6 +145,10 @@ export default {
|
||||
height 100%
|
||||
overflow-y auto
|
||||
overflow-x hidden
|
||||
.view-title
|
||||
&:hover
|
||||
cursor pointer
|
||||
color #409EFF
|
||||
.confirm-btn
|
||||
width: 250px
|
||||
.el-form
|
||||
|
1
src/universal/types/i18n.d.ts
vendored
1
src/universal/types/i18n.d.ts
vendored
@ -28,6 +28,7 @@ interface ILocales {
|
||||
CHOOSE_YOUR_DEFAULT_PICBED: string
|
||||
UPLOAD_AREA: string
|
||||
UPLOAD_VIEW_HINT: string
|
||||
MANAGE_PAGE: string
|
||||
GALLERY: string
|
||||
PICBEDS_SETTINGS: string
|
||||
PICBEDS_MANAGE: string
|
||||
|
Loading…
Reference in New Issue
Block a user