mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 08:46:55 +08:00
1 parent
73889edefb
commit
b06df462ea
3 files changed
+10
-5
No files matched your search
@@ -579,11 +579,11 @@ button:not(:disabled):hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.close-icon {
|
.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 {
|
.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 {
|
.save-icon {
|
||||||
@@ -591,7 +591,7 @@ button:not(:disabled):hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.edit-icon {
|
.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 {
|
.save-as-icon {
|
||||||
@@ -603,7 +603,7 @@ button:not(:disabled):hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pages-icon {
|
.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 {
|
.info-icon {
|
||||||
|
|||||||
@@ -8714,6 +8714,10 @@ async function exportFile(whole, indices = null, value = el.exportFormat.value,
|
|||||||
const writer = await file.createWritable();
|
const writer = await file.createWritable();
|
||||||
try {
|
try {
|
||||||
await writer.write(result.blob);
|
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();
|
await writer.close();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await writer.abort().catch(() => {});
|
await writer.abort().catch(() => {});
|
||||||
|
|||||||
@@ -282,7 +282,6 @@ async function handleMessage({ id, name, args }) {
|
|||||||
signal?.throwIfAborted();
|
signal?.throwIfAborted();
|
||||||
const result = typeof payload === "string" ? JSON.parse(payload) : payload;
|
const result = typeof payload === "string" ? JSON.parse(payload) : payload;
|
||||||
if (signal && !importing && !converting && !resources && result.ok) {
|
if (signal && !importing && !converting && !resources && result.ok) {
|
||||||
operations.delete(id);
|
|
||||||
result.data.size = size;
|
result.data.size = size;
|
||||||
if (name !== "ofdgoExportMedia") self.postMessage({ id, type: "export", stage: "save" });
|
if (name !== "ofdgoExportMedia") self.postMessage({ id, type: "export", stage: "save" });
|
||||||
if (output) {
|
if (output) {
|
||||||
@@ -290,6 +289,8 @@ async function handleMessage({ id, name, args }) {
|
|||||||
const current = await saveFile.getFile();
|
const current = await saveFile.getFile();
|
||||||
if (current.size !== saveStamp.size || current.lastModified !== saveStamp.modified) throw new Error("文件已被修改,请另存");
|
if (current.size !== saveStamp.size || current.lastModified !== saveStamp.modified) throw new Error("文件已被修改,请另存");
|
||||||
}
|
}
|
||||||
|
signal.throwIfAborted();
|
||||||
|
operations.delete(id);
|
||||||
await output.close();
|
await output.close();
|
||||||
} else {
|
} else {
|
||||||
result.data.blob = new Blob(chunks, { type: result.data.mime });
|
result.data.blob = new Blob(chunks, { type: result.data.mime });
|
||||||
|
|||||||
Reference in new issue
Block a user