Skip to content

Commit 8664ea4

Browse files
committed
chore: 优化上传提示文案和状态显示
1 parent c014645 commit 8664ea4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ <h1 class="topbar-title">R2 Web</h1>
930930
<!-- Upload Panel -->
931931
<div class="upload-panel" id="upload-panel" hidden>
932932
<div class="upload-panel-header">
933-
<span id="upload-panel-title">上传中...</span>
933+
<span id="upload-panel-title">准备中...</span>
934934
<button type="button" class="icon-btn sm" id="upload-panel-close" data-tooltip="关闭">
935935
<svg
936936
class="icon"

src/js/upload-manager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ async function compressFile(file, config, onStatus) {
104104
if (config.compressMode === 'tinify') {
105105
if (!config.tinifyKey) return file
106106

107-
onStatus && onStatus('Cloud 压缩中...')
107+
onStatus && onStatus('云端压缩中...')
108108

109109
const apiUrl = new URL('https://api.tinify.com/shrink')
110110
apiUrl.searchParams.set('proxy-host', 'api.tinify.com')
@@ -280,7 +280,7 @@ class UploadManager {
280280
e.preventDefault()
281281
const allImages = files.every((f) => f.type.startsWith('image/'))
282282
if (allImages) {
283-
this.#ui.toast(t('pasteToUpload', { count: files.length }), 'info')
283+
this.#ui.toast(t('pasteToUpload', { count: files.length }), 'success')
284284
this.uploadFiles(files)
285285
return
286286
}
@@ -308,8 +308,8 @@ class UploadManager {
308308
if (hasText) {
309309
e.preventDefault()
310310
let content = plainText
311-
if (!content.trim() && hasHtml) {
312-
const doc = new DOMParser().parseFromString(htmlText, 'text/html')
311+
if (!content.trim() && htmlTextContent) {
312+
const doc = new DOMParser().parseFromString(htmlTextContent, 'text/html')
313313
content = doc.body?.textContent || ''
314314
}
315315
content = content.trim()

0 commit comments

Comments
 (0)