Skip to content

Commit 0251636

Browse files
author
icheer
committed
fix: uploaded images count limit 2 -> 3
1 parent bc13593 commit 0251636

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

openai.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,8 +1590,8 @@ <h4>
15901590
<button
15911591
class="upload-image-btn"
15921592
@click="triggerImageUpload"
1593-
:disabled="!canInput || uploadedImages.length >= 2 || isUploadingImage"
1594-
:title="uploadedImages.length >= 2 ? '最多上传2张图片' : '上传图片'"
1593+
:disabled="!canInput || uploadedImages.length >= 3 || isUploadingImage"
1594+
:title="uploadedImages.length >= 3 ? '最多上传3张图片' : '上传图片'"
15951595
>
15961596
📎
15971597
</button>
@@ -2344,7 +2344,7 @@ <h3 style="margin: 20px 0 10px; color: #333">🔗 GitHub 仓库</h3>
23442344

23452345
// 触发图片上传
23462346
triggerImageUpload() {
2347-
if (this.uploadedImages.length >= 2) return;
2347+
if (this.uploadedImages.length >= 3) return;
23482348
this.preheatImageUploadService();
23492349
this.$refs.imageInput.click();
23502350
},
@@ -2373,10 +2373,10 @@ <h3 style="margin: 20px 0 10px; color: #333">🔗 GitHub 仓库</h3>
23732373
event.preventDefault(); // 阻止默认粘贴行为
23742374

23752375
// 检查是否已达到上传限制
2376-
if (this.uploadedImages.length >= 2) {
2376+
if (this.uploadedImages.length >= 3) {
23772377
Swal.fire({
23782378
title: '无法上传',
2379-
text: '最多只能上传2张图片',
2379+
text: '最多只能上传3张图片',
23802380
icon: 'warning',
23812381
confirmButtonText: '确定'
23822382
});

worker.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,13 +1328,13 @@ function getHtmlContent(modelIds, tavilyKeys, title) {
13281328
<title>OpenAI Chat</title>
13291329
13301330
<!-- Favicon -->
1331-
<link rel="icon" type="image/svg+xml" href="favicon.svg?v=1" />
1331+
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
13321332
13331333
<!-- Web App Manifest -->
1334-
<link rel="manifest" href="site.webmanifest?v=1" />
1334+
<link rel="manifest" href="site.webmanifest" />
13351335
13361336
<!-- iOS Safari -->
1337-
<link rel="apple-touch-icon" href="favicon.svg?v=1" />
1337+
<link rel="apple-touch-icon" href="favicon.svg" />
13381338
<meta name="apple-mobile-web-app-capable" content="yes" />
13391339
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
13401340
<meta name="apple-mobile-web-app-title" content="OpenAI Chat" />
@@ -2594,7 +2594,7 @@ function getHtmlContent(modelIds, tavilyKeys, title) {
25942594
<div class="header">
25952595
<h2 @click="showAbout" style="cursor: pointer">
25962596
<img
2597-
src="./favicon.svg?v=1"
2597+
src="./favicon.svg"
25982598
alt=""
25992599
width="24"
26002600
height="24"
@@ -2910,8 +2910,8 @@ function getHtmlContent(modelIds, tavilyKeys, title) {
29102910
<button
29112911
class="upload-image-btn"
29122912
@click="triggerImageUpload"
2913-
:disabled="!canInput || uploadedImages.length >= 2 || isUploadingImage"
2914-
:title="uploadedImages.length >= 2 ? '最多上传2张图片' : '上传图片'"
2913+
:disabled="!canInput || uploadedImages.length >= 3 || isUploadingImage"
2914+
:title="uploadedImages.length >= 3 ? '最多上传3张图片' : '上传图片'"
29152915
>
29162916
📎
29172917
</button>
@@ -3664,7 +3664,7 @@ function getHtmlContent(modelIds, tavilyKeys, title) {
36643664
36653665
// 触发图片上传
36663666
triggerImageUpload() {
3667-
if (this.uploadedImages.length >= 2) return;
3667+
if (this.uploadedImages.length >= 3) return;
36683668
this.preheatImageUploadService();
36693669
this.$refs.imageInput.click();
36703670
},
@@ -3693,10 +3693,10 @@ function getHtmlContent(modelIds, tavilyKeys, title) {
36933693
event.preventDefault(); // 阻止默认粘贴行为
36943694
36953695
// 检查是否已达到上传限制
3696-
if (this.uploadedImages.length >= 2) {
3696+
if (this.uploadedImages.length >= 3) {
36973697
Swal.fire({
36983698
title: '无法上传',
3699-
text: '最多只能上传2张图片',
3699+
text: '最多只能上传3张图片',
37003700
icon: 'warning',
37013701
confirmButtonText: '确定'
37023702
});

0 commit comments

Comments
 (0)