mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2026-09-23 18:44:17 +02:00
If the user reconnects and did write something in the brief window (~10s) after a disconnect and before we discover the connection loss, we can't really fix the sync anymore, because we don't know how long the user was offline. We would need to reconcile any changes other user have made in the meantime. So we show a dialog informing the user of the sync problem and let them copy their changes before reconnecting correctly again. Before this fix, users would write for a long time, because they reconnected, but HedgeDoc did not sync the text they wrote, losing a potential long work session. Signed-off-by: Philip Molares <philip.molares@udo.edu>
20 lines
1.3 KiB
Text
20 lines
1.3 KiB
Text
<!-- refresh modal -->
|
|
<div class="modal fade" id="outOfSyncModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-md">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" id="myModalLabel"><%= __('Your editor is out of sync') %></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<strong><%= __('You typed something while being offline, but we can\'t sync you up again. Your offline changes will be lost on reload, but a reload is necessary to get you back in sync. So please copy your content into a different window and reload the editor.') %></strong>
|
|
<br/>
|
|
<br/>
|
|
<textarea readonly="readonly" class="form-control" name="out of sync text" id="outOfSyncTextarea" rows="25" cols="80"></textarea>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" id="outOfSyncModalCopy" data-toggle="tooltip" data-placement="top" title="<%= __('Copied!') %>"><%= __('Copy Content') %></button>
|
|
<button type="button" class="btn btn-primary" id="outOfSyncModalReload"><%= __('Reload Editor') %></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|