All files / app/page/settings/local local.component.html

54.48% Statements 85/156
50% Branches 3/6
0% Functions 0/6
58.06% Lines 54/93

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 1371x 1x 1x   1x 1x     1x 1x 1x 1x 1x 2x 1x 1x 1x     2x         1x 1x 1x                             1x 1x             1x 1x     1x 1x 1x 1x 1x 2x 1x 1x 1x       2x         1x 1x                           1x 1x             1x 1x     1x 1x 1x 1x 1x 2x 1x 1x 1x     2x         1x                     1x 1x             1x 1x   1x  
<div class="form">
  <span></span>
  <h2 i18n>Local Storage</h2>
 
  <span></span>
  <p i18n>This page shows data stored in your browser's local storage for Refs and Exts.<br><br></p>
 
 
  <h3 i18n>Refs</h3>
  <p i18n>Stored toggle states and last seen counts for Refs.</p>
  <span></span>
  <div class="buttons">
    <button type="button"
            [disabled]="!refEntries.length"
            (click)="clearAllRefs()"
            i18n-title title="Clear all Ref data from local storage"
            i18n>🗑️ clear all refs</button>
  </div>
 
  @if (refEntries.length) {
    <span></span>
    <table class="local-storage-table">
      <thead>
      <tr>
        <th i18n>URL</th>
        <th i18n>Type</th>
        <th i18n>Value</th>
        <th></th>
      </tr>
      </thead>
      <tbody>
        @for (entry of refEntries; track entry.key) {
          <tr>
            <td class="url-cell">
              <a [routerLink]="['/ref', entry.url]">{{ entry.url }}</a>
            </td>
            <td>{{ entry.type }}</td>
            <td>{{ entry.value }}</td>
            <td>
              <button type="button"
                      (click)="clearRefEntry(entry.key)"
                      i18n-title title="Remove this entry"
                      i18n>🗑️</button>
            </td>
          </tr>
        }
      </tbody>
    </table>
  } @else {
    <span></span>
    <p class="empty" i18n>No Ref data stored in local storage.<br><br></p>
  }
 
  <h3 i18n>Exts</h3>
  <p i18n>Cached Ext tags for faster loading.</p>
  <span></span>
  <div class="buttons">
    <button type="button"
            [disabled]="!extEntries.length"
            (click)="clearAllExts()"
            i18n-title title="Clear all Ext data from local storage"
            i18n>🗑️ clear all exts</button>
  </div>
 
 
  @if (extEntries.length) {
    <span></span>
    <table class="local-storage-table">
      <thead>
      <tr>
        <th i18n>Tag</th>
        <th i18n>Status</th>
        <th></th>
      </tr>
      </thead>
      <tbody>
        @for (entry of extEntries; track entry.key) {
          <tr>
            <td class="tag-cell">
              <a [routerLink]="['/tag', entry.tag]">{{ entry.tag }}</a>
            </td>
            <td>{{ entry.value }}</td>
            <td>
              <button type="button"
                      (click)="clearExtEntry(entry.key)"
                      i18n-title title="Remove this entry"
                      i18n>🗑️</button>
            </td>
          </tr>
        }
      </tbody>
    </table>
  } @else {
    <span></span>
    <p class="empty" i18n>No Ext data stored in local storage.<br><br></p>
  }
 
  <h3 i18n>Help Messages</h3>
  <p i18n>Dismissed help messages stored so they won't be shown again.</p>
  <span></span>
  <div class="buttons">
    <button type="button"
            [disabled]="!helpEntries.length"
            (click)="clearAllHelp()"
            i18n-title title="Clear all help message history from local storage"
            i18n>🗑️ clear all help</button>
  </div>
 
  @if (helpEntries.length) {
    <span></span>
    <table class="local-storage-table">
      <thead>
      <tr>
        <th i18n>ID</th>
        <th></th>
      </tr>
      </thead>
      <tbody>
        @for (entry of helpEntries; track entry.key) {
          <tr>
            <td class="id-cell">{{ entry.id }}</td>
            <td>
              <button type="button"
                      (click)="clearHelpEntry(entry.key)"
                      i18n-title title="Remove this entry"
                      i18n>🗑️</button>
            </td>
          </tr>
        }
      </tbody>
    </table>
  } @else {
    <span></span>
    <p class="empty" i18n>No help message history stored in local storage.</p>
  }
</div>