This commit is contained in:
Julian Freeman
2026-01-19 09:32:12 -04:00
parent 2a468518af
commit 0b8f060c6f
4 changed files with 32 additions and 32 deletions

View File

@@ -33,7 +33,7 @@ async function openFolder() {
async function exportBatch() {
if (store.images.length === 0) return;
if (!store.watermarkSettings.text) {
alert("Please enter watermark text.");
alert("请输入水印文字。");
return;
}
@@ -41,7 +41,7 @@ async function exportBatch() {
const outputDir = await open({
directory: true,
multiple: false,
title: "Select Output Directory"
title: "选择输出目录"
});
if (outputDir && typeof outputDir === 'string') {
@@ -69,11 +69,11 @@ async function exportBatch() {
watermark: rustWatermarkSettings,
outputDir: outputDir
});
alert("Batch export completed!");
alert("批量导出完成!");
}
} catch (e) {
console.error("Export failed:", e);
alert("Export failed: " + e);
alert("导出失败: " + e);
} finally {
isExporting.value = false;
}
@@ -84,7 +84,7 @@ async function exportBatch() {
<div class="h-screen w-screen bg-gray-900 text-white overflow-hidden flex flex-col">
<header class="h-14 bg-gray-800 flex items-center justify-between px-6 border-b border-gray-700 shrink-0 shadow-md z-10">
<div class="flex items-center gap-4">
<h1 class="text-lg font-bold tracking-wider bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">WATERMARK WIZARD</h1>
<h1 class="text-lg font-bold tracking-wider bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">水印精灵</h1>
</div>
<div class="flex items-center gap-3">
@@ -93,7 +93,7 @@ async function exportBatch() {
class="flex items-center gap-2 bg-gray-700 hover:bg-gray-600 text-gray-200 px-4 py-2 rounded-md text-sm font-medium transition-all hover:shadow-lg"
>
<FolderOpen class="w-4 h-4" />
Open Folder
打开文件夹
</button>
<button
@@ -103,7 +103,7 @@ async function exportBatch() {
>
<Download class="w-4 h-4" v-if="!isExporting" />
<div v-else class="w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"></div>
{{ isExporting ? 'Exporting...' : 'Export Batch' }}
{{ isExporting ? '导出中...' : '批量导出' }}
</button>
</div>
</header>