fix(修复问题): 修复保存边界并统一工具图标
build.yaml / build (push) Successful in 43s

This commit is contained in:
xiaoqidun committed 2026-10-19 09:07:51 +08:00
1 parent 73889edefb
commit b06df462ea
3 files changed
+10 -5

No files matched your search

+4 -4
View File
@@ -579,11 +579,11 @@ button:not(:disabled):hover {
}
.close-icon {
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 5 14 14M19 5 5 19'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18M21 3 3 21'/%3E%3C/svg%3E") center / contain no-repeat;
}
.new-icon {
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M4 12h16'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M3 12h18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.save-icon {
@@ -591,7 +591,7 @@ button:not(:disabled):hover {
}
.edit-icon {
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 4 5 5M3 21l2-7L16 3a2 2 0 0 1 5 5L10 19Z'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14 5 5 5M3 21l2-7L15 4a3.5 3.5 0 0 1 5 5L10 19Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.save-as-icon {
@@ -603,7 +603,7 @@ button:not(:disabled):hover {
}
.pages-icon {
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16M4 12h16M4 19h16'/%3E%3C/svg%3E") center / contain no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18M3 12h18M3 21h18'/%3E%3C/svg%3E") center / contain no-repeat;
}
.info-icon {
+4
View File
@@ -8714,6 +8714,10 @@ async function exportFile(whole, indices = null, value = el.exportFormat.value,
const writer = await file.createWritable();
try {
await writer.write(result.blob);
if (destination?.saveStamp) {
const current = await file.getFile();
if (current.size !== destination.saveStamp.size || current.lastModified !== destination.saveStamp.modified) throw new Error("文件已被修改,请另存");
}
await writer.close();
} catch (error) {
await writer.abort().catch(() => {});
+2 -1
View File
@@ -282,7 +282,6 @@ async function handleMessage({ id, name, args }) {
signal?.throwIfAborted();
const result = typeof payload === "string" ? JSON.parse(payload) : payload;
if (signal && !importing && !converting && !resources && result.ok) {
operations.delete(id);
result.data.size = size;
if (name !== "ofdgoExportMedia") self.postMessage({ id, type: "export", stage: "save" });
if (output) {
@@ -290,6 +289,8 @@ async function handleMessage({ id, name, args }) {
const current = await saveFile.getFile();
if (current.size !== saveStamp.size || current.lastModified !== saveStamp.modified) throw new Error("文件已被修改,请另存");
}
signal.throwIfAborted();
operations.delete(id);
await output.close();
} else {
result.data.blob = new Blob(chunks, { type: result.data.mime });