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

@@ -40,7 +40,7 @@ const currentColor = computed({
});
const applyAll = () => {
if (confirm("Apply current settings (Size, Opacity, Color) to ALL images?")) {
if (confirm("是否将当前设置(大小、透明度、颜色)应用到所有图片?")) {
store.applySettingsToAll();
}
};
@@ -56,14 +56,14 @@ const applyAll = () => {
class="flex-1 py-3 text-sm font-medium flex items-center justify-center gap-2 transition-colors"
:class="store.editMode === 'add' ? 'bg-gray-700 text-blue-400 border-b-2 border-blue-400' : 'text-gray-400 hover:bg-gray-750'"
>
<PlusSquare class="w-4 h-4" /> Add
<PlusSquare class="w-4 h-4" /> 添加
</button>
<button
@click="store.editMode = 'remove'"
class="flex-1 py-3 text-sm font-medium flex items-center justify-center gap-2 transition-colors"
:class="store.editMode === 'remove' ? 'bg-gray-700 text-red-400 border-b-2 border-red-400' : 'text-gray-400 hover:bg-gray-750'"
>
<Eraser class="w-4 h-4" /> Remove
<Eraser class="w-4 h-4" /> 移除
</button>
</div>
@@ -75,20 +75,20 @@ const applyAll = () => {
<h2 class="text-lg font-bold flex items-center justify-between">
<div class="flex items-center gap-2">
<Settings class="w-5 h-5" />
Watermark
水印设置
</div>
<button
@click="applyAll"
title="Apply Settings to All Images"
title="应用设置到所有图片"
class="bg-gray-700 hover:bg-gray-600 p-1.5 rounded text-xs text-blue-300 transition-colors flex items-center gap-1"
>
<Copy class="w-3 h-3" /> All
<Copy class="w-3 h-3" /> 全部
</button>
</h2>
<!-- Text Input -->
<div class="flex flex-col gap-2">
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">Content</label>
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">水印内容</label>
<div class="flex gap-2">
<div class="relative flex-1">
<Type class="absolute left-3 top-2.5 w-4 h-4 text-gray-500" />
@@ -96,13 +96,13 @@ const applyAll = () => {
type="text"
v-model="store.watermarkSettings.text"
class="w-full bg-gray-700 text-white pl-10 pr-3 py-2 rounded border border-gray-600 focus:border-blue-500 focus:outline-none"
placeholder="Enter text..."
placeholder="输入水印文字..."
/>
</div>
<button
@click="store.recalcAllWatermarks()"
class="bg-blue-600 hover:bg-blue-500 text-white p-2 rounded flex items-center justify-center transition-colors"
title="Apply & Recalculate Layout for ALL Images"
title="应用并重新计算所有图片布局"
>
<RotateCw class="w-4 h-4" />
</button>
@@ -111,7 +111,7 @@ const applyAll = () => {
<!-- Color Picker -->
<div class="flex flex-col gap-2">
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">Color</label>
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">字体颜色</label>
<div class="flex items-center gap-2 bg-gray-700 p-2 rounded border border-gray-600">
<Palette class="w-4 h-4 text-gray-400" />
<input
@@ -127,7 +127,7 @@ const applyAll = () => {
<div class="space-y-4">
<div>
<div class="flex justify-between mb-1">
<label class="text-xs text-gray-400">Size (Scale)</label>
<label class="text-xs text-gray-400">字体大小 (比例)</label>
<span class="text-xs text-gray-300">{{ (currentScale * 100).toFixed(1) }}%</span>
</div>
<input
@@ -138,12 +138,12 @@ const applyAll = () => {
v-model.number="currentScale"
class="w-full h-1 bg-gray-600 rounded-lg appearance-none cursor-pointer accent-blue-500"
/>
<p class="text-[10px] text-gray-500 mt-1">Relative to image height</p>
<p class="text-[10px] text-gray-500 mt-1">基于图片高度的比例</p>
</div>
<div>
<div class="flex justify-between mb-1">
<label class="text-xs text-gray-400">Opacity</label>
<label class="text-xs text-gray-400">不透明度</label>
<span class="text-xs text-gray-300">{{ (currentOpacity * 100).toFixed(0) }}%</span>
</div>
<input
@@ -159,15 +159,15 @@ const applyAll = () => {
<!-- Placement Info -->
<div class="flex flex-col gap-2">
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">Placement Status</label>
<label class="text-sm text-gray-400 uppercase tracking-wider font-semibold">位置状态</label>
<div class="flex items-center gap-2 p-2 rounded bg-gray-700/50 border border-gray-600">
<div class="p-1 rounded bg-green-500/20 text-green-400">
<CheckSquare class="w-4 h-4" v-if="!store.selectedImage?.manualPosition" />
<div class="w-4 h-4" v-else></div>
</div>
<div class="flex-1">
<p class="text-sm font-medium text-gray-200" v-if="!store.selectedImage?.manualPosition">Auto (ZCA)</p>
<p class="text-sm font-medium text-blue-300" v-else>Manual Override</p>
<p class="text-sm font-medium text-gray-200" v-if="!store.selectedImage?.manualPosition">自动 (ZCA)</p>
<p class="text-sm font-medium text-blue-300" v-else>手动调整</p>
</div>
</div>
</div>
@@ -177,7 +177,7 @@ const applyAll = () => {
<div v-else class="flex flex-col gap-6">
<h2 class="text-lg font-bold flex items-center gap-2 text-red-400">
<Brush class="w-5 h-5" />
Magic Eraser
魔法橡皮擦
</h2>
<!-- Auto Detect Controls -->
@@ -186,23 +186,23 @@ const applyAll = () => {
@click="store.detectAllWatermarks()"
class="flex-1 bg-blue-600 hover:bg-blue-500 text-white py-2 rounded flex items-center justify-center gap-2 text-sm transition-colors"
>
<Sparkles class="w-4 h-4" /> Auto Detect
<Sparkles class="w-4 h-4" /> 自动检测
</button>
<button
@click="store.selectedIndex >= 0 && store.clearMask(store.selectedIndex)"
class="bg-gray-700 hover:bg-gray-600 text-gray-300 px-3 rounded flex items-center justify-center transition-colors"
title="Clear Mask"
title="清空遮罩"
:disabled="store.selectedIndex < 0"
>
<Trash2 class="w-4 h-4" />
</button>
</div>
<p class="text-xs text-gray-400">Paint over the watermark you want to remove. The AI will fill in the background.</p>
<p class="text-xs text-gray-400">涂抹想要移除的水印AI 将自动填充背景</p>
<div>
<div class="flex justify-between mb-1">
<label class="text-xs text-gray-400">Brush Size</label>
<label class="text-xs text-gray-400">画笔大小</label>
<span class="text-xs text-gray-300">{{ store.brushSettings.size }}px</span>
</div>
<input
@@ -216,7 +216,7 @@ const applyAll = () => {
</div>
<div class="p-3 bg-red-900/20 border border-red-900/50 rounded text-xs text-red-200">
AI Inpainting (Diffusion) connected.
AI 修复功能已就绪
</div>
<button
@@ -225,7 +225,7 @@ const applyAll = () => {
:disabled="store.selectedIndex < 0"
>
<Eraser class="w-5 h-5" />
Process Removal
执行移除
</button>
</div>