Skip to content

Commit 548e500

Browse files
committed
feat(gdpr): token modal + delete-with-token disclosure markup
1 parent d584c2b commit 548e500

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/templates/pad.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ <h2 data-l10n-id="pad.settings.myView"></h2>
164164
<% e.end_block(); %>
165165
</div>
166166
<button data-l10n-id="pad.settings.deletePad" id="delete-pad">Delete pad</button>
167+
<details id="delete-pad-with-token">
168+
<summary data-l10n-id="pad.deletionToken.deleteWithToken">Delete with token</summary>
169+
<label for="delete-pad-token-input" data-l10n-id="pad.deletionToken.tokenFieldLabel">Pad deletion token</label>
170+
<input type="password" id="delete-pad-token-input" autocomplete="off" spellcheck="false">
171+
<button id="delete-pad-token-submit" type="button" class="btn btn-danger"
172+
data-l10n-id="pad.settings.deletePad">Delete pad</button>
173+
</details>
167174
<div id="theme-switcher" style="display: none;">
168175
<svg width="2rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
169176
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" />
@@ -182,6 +189,22 @@ <h2 data-l10n-id="pad.settings.about">About</h2>
182189
<a href="https://etherpad.org" target="_blank" referrerpolicy="no-referrer" rel="noopener">Etherpad</a>
183190
<% if (settings.exposeVersion) { %>(commit <%= settings.gitVersion %>)<% } %> </div></div>
184191

192+
<!--------------------------------------------------->
193+
<!-- PAD DELETION TOKEN MODAL (shown once on create) -->
194+
<!--------------------------------------------------->
195+
196+
<div id="deletiontoken-modal" class="popup" hidden><div class="popup-content">
197+
<h1 data-l10n-id="pad.deletionToken.modalTitle">Save your pad deletion token</h1>
198+
<p data-l10n-id="pad.deletionToken.modalBody">
199+
This token is the only way to delete this pad if you lose your browser session or switch device. Save it somewhere safe — it is shown here exactly once.
200+
</p>
201+
<div class="deletiontoken-row">
202+
<input type="text" id="deletiontoken-value" readonly>
203+
<button id="deletiontoken-copy" type="button" data-l10n-id="pad.deletionToken.copy">Copy</button>
204+
</div>
205+
<button id="deletiontoken-ack" type="button" class="btn btn-primary"
206+
data-l10n-id="pad.deletionToken.acknowledge">I've saved it</button>
207+
</div></div>
185208

186209
<!------------------------->
187210
<!-- IMPORT EXPORT POPUP -->

0 commit comments

Comments
 (0)