hlassiege/darylpublic Fork
⑂ bf47d6e
Commits
⬇ Clone ▾
git clone https://git.rickub.com/hlassiege/daryl.git
git clone ssh://git@rickub.com/hlassiege/daryl.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

fix(publish): let the description be edited once publish data exists

structuredClone threw on the reactive publish object, so every edit was dropped and the field snapped back to the saved text.
hlassiege committed 2026-10-13T15:24:13+02:00 Browse files
bf47d6e parent: b810874
modified web/src/project/steps/publish/usePublish.ts +3 -2
@@ -3,7 +3,7 @@
33 * Upload : le serveur donne les valeurs par défaut, l'envoi et le rendu ; ce qui est saisi ici va dans
44 * project.publish et l'emporte aussitôt, sans attendre la relecture.
55 */
6-import { computed, ref, type Ref } from "vue";
6+import { computed, ref, toRaw, type Ref } from "vue";
77 import { api, post } from "../../../lib/api";
88 import { usePolling, usePref } from "../../../lib/composables";
99 import { t } from "../../../i18n";
@@ -91,7 +91,8 @@ export function usePublish(project: Ref<Project>) {
9191 }));
9292
9393 function write(change: (p: Required<PublishData>) => void, delay = 500): void {
94- const next = structuredClone({ videos: {}, pub: {}, ...saved() }) as Required<PublishData>;
94+ // les objets réactifs ne se clonent pas : on clone l'objet brut
95+ const next = structuredClone({ videos: {}, pub: {}, ...toRaw(saved()) }) as Required<PublishData>;
9596 change(next);
9697 update({ publish: next }, delay);
9798 }
@@ -3,7 +3,7 @@
3 * Upload : le serveur donne les valeurs par défaut, l'envoi et le rendu ; ce qui est saisi ici va dans3 * Upload : le serveur donne les valeurs par défaut, l'envoi et le rendu ; ce qui est saisi ici va dans
4 * project.publish et l'emporte aussitôt, sans attendre la relecture.4 * project.publish et l'emporte aussitôt, sans attendre la relecture.
5 */5 */
6-import { computed, ref, type Ref } from "vue";6+import { computed, ref, toRaw, type Ref } from "vue";
7 import { api, post } from "../../../lib/api";7 import { api, post } from "../../../lib/api";
8 import { usePolling, usePref } from "../../../lib/composables";8 import { usePolling, usePref } from "../../../lib/composables";
9 import { t } from "../../../i18n";9 import { t } from "../../../i18n";
@@ -91,7 +91,8 @@ export function usePublish(project: Ref<Project>) {
91 }));91 }));
92 92
93 function write(change: (p: Required<PublishData>) => void, delay = 500): void {93 function write(change: (p: Required<PublishData>) => void, delay = 500): void {
94- const next = structuredClone({ videos: {}, pub: {}, ...saved() }) as Required<PublishData>;94+ // les objets réactifs ne se clonent pas : on clone l'objet brut
95+ const next = structuredClone({ videos: {}, pub: {}, ...toRaw(saved()) }) as Required<PublishData>;
95 change(next);96 change(next);
96 update({ publish: next }, delay);97 update({ publish: next }, delay);
97 }98 }