Refactor autosave draft script and add error handling

This commit is contained in:
andrigamerita 2025-06-07 15:35:01 +02:00 committed by GitHub
commit a0b8059647
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 35 deletions

View file

@ -145,6 +145,7 @@ $( function() {
<?php if (isset($error)) { ?>
<div class="error-message"><?php echo $error ?></div>
<?php } ?>
<div class="notice error" id="response-error"></div>
<div class="notice" id="response"></div>
<div class="row">
<div class="hide-button" style="margin-bottom:1em;width:100%;text-align:right;"><button type="button" title="<?php echo i18n('Focus_mode');?>" id="hideButton" class="note-btn btn btn-sm <?php echo ((config('admin.theme') === 'light' || is_null(config('admin.theme'))) ? "btn-light" : "btn-dark");?>" style="width:38px;height:38px;font-size:18px;" ><i class="fa fa-eye" aria-hidden="true"></i></button></div>