pukaad-ui-lib 1.278.0 → 1.279.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -157,10 +157,19 @@ const onSaveDraft = async () => {
|
|
|
157
157
|
}
|
|
158
158
|
} else {
|
|
159
159
|
try {
|
|
160
|
+
const rawCoverImage = form.value.coverImage?.map((img) => ({
|
|
161
|
+
file: img.file,
|
|
162
|
+
// File object is not a proxy, safe to copy reference
|
|
163
|
+
url: img.url
|
|
164
|
+
})) || [];
|
|
160
165
|
const draftData = {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
id: form.value.id || `draft_${Date.now()}`,
|
|
167
|
+
title: form.value.title,
|
|
168
|
+
content: JSON.parse(JSON.stringify(form.value.content || [])),
|
|
169
|
+
tags: JSON.parse(JSON.stringify(form.value.tags || [])),
|
|
170
|
+
disableComment: form.value.disableComment,
|
|
171
|
+
coverImage: rawCoverImage,
|
|
172
|
+
savedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
164
173
|
};
|
|
165
174
|
const request = indexedDB.open("PukaadDraftsDB", 1);
|
|
166
175
|
request.onupgradeneeded = (e) => {
|