Skip to content

Commit a7b7a5b

Browse files
committed
chore(release): v2.2.0
1 parent f7b6540 commit a7b7a5b

9 files changed

Lines changed: 52 additions & 58 deletions

File tree

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@
1818

1919
## 产品亮点 | Highlights
2020

21-
- **简单** - 无需下载,无需安装,不限平台,浏览器[在线使用](https://picx.xpoet.cn)
22-
- **免费** - PicX 巧妙结合多种开源技术搭建,完全免费。
23-
- **安全** - Token 信息和图片数据均保存在用户端,安全可靠。
24-
21+
- **简单** - 无需下载,无需安装,不限平台,浏览器在线使用。
22+
- **免费** - PicX 巧妙结合多种开源技术搭建而成,完全免费。
23+
- **安全** - Token、用户信息和图片数据均保存在用户端,安全可靠。
2524

2625
## 如何使用 | How to use
2726

28-
只需选择或[新建](https://github.com/new)一个 GitHub 仓库,在 **[PicX 官网](https://picx.xpoet.cn)** 使用 GitHub Token 登录,完成仓库绑定后即可使用,如此简单~
29-
30-
在线使用入口 >> **https://picx.xpoet.cn**
27+
只需 [创建一个 GitHub Token](https://github.com/settings/tokens/new),在 [PicX 官网](https://picx.xpoet.cn) 使用 Token 完成图床配置即可。
3128

29+
PicX 在线使用入口 >> **https://picx.xpoet.cn**
3230

3331
## 功能 | Features
3432

@@ -42,7 +40,7 @@
4240
- [x] 支持 **图片压缩** (内置高效压缩算法,可配置在上传前自动压缩)
4341
- [x] 支持 **暗夜模式** (自由切换 / 自动切换)
4442
- [x] 支持 **PWA**
45-
- [ ] 设置图片水印
43+
- [ ] 配置图片水印
4644
- [ ] i18n
4745

4846

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "picx",
3-
"version": "2.1.4",
3+
"version": "2.2.0",
44
"private": false,
55
"author": "XPoet <i@xpoet.cn>",
66
"license": "AGPL-3.0",

src/components/site-count/site-count.vue

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,44 @@
11
<template>
2-
<span class="site-count" ref="siteCountDom" v-show="isShow">
2+
<span class="site-count" ref="siteCountDom" v-show="isShow && isProd">
33
超过
44
<span id="busuanzi_value_site_uv" class="uv" v-show="isuv"></span>
55
<span id="busuanzi_value_site_pv" class="pv" v-show="!isuv"></span>
66
次被使用
77
</span>
88
</template>
99

10-
<script lang="ts">
11-
import { defineComponent, onMounted, ref, Ref } from 'vue'
10+
<script setup lang="ts">
11+
import { computed, onMounted, ref, Ref } from 'vue'
1212
13-
export default defineComponent({
14-
name: 'site-count',
13+
const props = defineProps({
14+
isuv: {
15+
type: Boolean,
16+
default: false
17+
}
18+
})
1519
16-
props: {
17-
isuv: {
18-
type: Boolean,
19-
default: false
20-
}
21-
},
20+
const siteCountDom: Ref = ref<null | HTMLElement>(null)
21+
const isShow: Ref<boolean> = ref(false)
2222
23-
setup(props, ctx) {
24-
const siteCountDom: Ref = ref<null | HTMLElement>(null)
25-
const isShow: Ref<boolean> = ref(false)
23+
const isProd = computed(() => import.meta.env.MODE === 'production')
2624
27-
const getInnerText = (dom, isuv) => {
28-
return dom.querySelector(`.${isuv ? 'u' : 'p'}v`).innerText
29-
}
25+
const getInnerText = (dom: any, isuv: boolean) => {
26+
return dom.querySelector(`.${isuv ? 'u' : 'p'}v`).innerText
27+
}
3028
31-
onMounted(() => {
32-
const script: any = document.createElement('script')
33-
script.async = true
34-
script.src = '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'
35-
siteCountDom.value.appendChild(script)
29+
onMounted(() => {
30+
const script: any = document.createElement('script')
31+
script.async = true
32+
script.src = '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js'
33+
siteCountDom.value.appendChild(script)
3634
37-
script.onload = () => {
38-
const tempT = setTimeout(() => {
39-
if (getInnerText(siteCountDom.value, props.isuv)) {
40-
isShow.value = true
41-
}
42-
clearTimeout(tempT)
43-
}, 1500)
35+
script.onload = () => {
36+
const tempT = setTimeout(() => {
37+
if (getInnerText(siteCountDom.value, props.isuv)) {
38+
isShow.value = true
4439
}
45-
})
46-
47-
return {
48-
siteCountDom,
49-
isShow
50-
}
40+
clearTimeout(tempT)
41+
}, 1500)
5142
}
5243
})
5344
</script>

src/components/to-upload-image-card/to-upload-image-card.styl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ $image-width = $info-item-height - ($info-item-border * 2)
3434
border 1rem solid var(--border-color)
3535
border-radius 6rem
3636

37+
&.no-border {
38+
padding 2rem
39+
border none
40+
}
41+
3742
&::-webkit-scrollbar {
3843
width 5rem
3944
}
@@ -58,8 +63,8 @@ $image-width = $info-item-height - ($info-item-border * 2)
5863
padding-left $image-width
5964
overflow hidden
6065
font-size 15rem
61-
border $info-item-border solid var(--border-color)
6266
border-radius 5rem
67+
box-shadow 0 0 3rem var(--shadow-hover-color)
6368
transition all 0.3s ease
6469

6570
&.disable {
@@ -72,7 +77,7 @@ $image-width = $info-item-height - ($info-item-border * 2)
7277
}
7378

7479
&:hover {
75-
box-shadow 0 0 5rem var(--shadow-hover-color)
80+
box-shadow 0 0 6rem var(--shadow-hover-color)
7681
}
7782

7883
.left-image-box {

src/components/to-upload-image-card/to-upload-image-card.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
</div>
1515
</div>
1616

17-
<div class="body" v-if="toUploadImages.list.length">
17+
<div
18+
class="body"
19+
:class="{ 'no-border': toUploadImages.list.length === 1 }"
20+
v-if="toUploadImages.list.length"
21+
>
1822
<ul class="image-uploading-info-box">
1923
<li
2024
class="image-uploading-info-item"
@@ -37,7 +41,7 @@
3741
</span>
3842

3943
<span class="file-size item" :class="{ compressed: userSettings.isCompress }">
40-
{{ getFileSize(imgItem.fileInfo.size) }}
44+
{{ getFileSize(imgItem.fileInfo.size) }} KB
4145
</span>
4246

4347
<span class="last-modified item">

src/components/upload-area/upload-area.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
.upload-area-tips {
3939
color #aaa
4040
text-align center
41+
user-select none
4142

4243
.icon {
4344
font-size 100rem

src/router/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import upload from '@/views/upload-image/upload-image.vue'
44
import management from '@/views/imgs-management/imgs-management.vue'
55
import tutorials from '@/views/use-tutorials/use-tutorials.vue'
66
import settings from '@/views/my-settings/my-settings.vue'
7+
import help from '@/views/help-info/help-info.vue'
78

89
const titleSuffix = ` | PicX 图床神器`
910

@@ -50,7 +51,7 @@ const routes: Array<RouteRecordRaw> = [
5051
{
5152
path: '/help',
5253
name: 'help',
53-
component: () => import('@/views/help-info/help-info.vue'),
54+
component: help,
5455
meta: {
5556
title: `帮助反馈${titleSuffix}`
5657
}

src/style/variables.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $first-text-color = darken($default-text-color, 10%)
4343
$second-text-color = darken($default-text-color, 5%)
4444
$third-text-color = lighten($default-text-color, 30%)
4545
$fourth-text-color = lighten($default-text-color, 90%)
46-
$border-color = darken($background-color, 30%)
46+
$border-color = darken($background-color, 20%)
4747
$selection-color = lighten($primary-color, 10%)
4848
$shadow-color = rgba(0, 0, 0, 0.3)
4949
$shadow-hover-color = rgba(0, 0, 0, 0.28)

src/views/upload-image/upload-image.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@
2828
</div>
2929

3030
<!-- 重置 & 上传 -->
31-
<div class="row-item">
31+
<div class="row-item" v-if="toUploadImage.list.length">
3232
<div class="content-box" style="text-align: right">
33-
<el-button
34-
:disabled="uploading"
35-
v-if="toUploadImage.list.length"
36-
plain
37-
type="warning"
38-
@click="resetUploadInfo"
39-
>
33+
<el-button :disabled="uploading" plain type="warning" @click="resetUploadInfo">
4034
重置 <span class="shortcut-key">{{ shortcutKey }} + A</span>
4135
</el-button>
4236
<el-button :loading="uploading" plain type="primary" @click="uploadImage">

0 commit comments

Comments
 (0)