Add timing stats reset button
This commit is contained in:
parent
1680ad6c30
commit
5996a87058
4 changed files with 25 additions and 5 deletions
|
|
@ -298,10 +298,16 @@
|
|||
<tr><th>Messages per day</th><td id="per-day">0</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="button is-danger" id="clear-cache" type="button">
|
||||
<span class="icon is-small"><img data-icon="trash" data-size="16" src="../resources/img/trash-light-16.png" alt=""></span>
|
||||
<span>Clear Cache</span>
|
||||
</button>
|
||||
<div class="buttons">
|
||||
<button class="button is-danger" id="clear-cache" type="button">
|
||||
<span class="icon is-small"><img data-icon="trash" data-size="16" src="../resources/img/trash-light-16.png" alt=""></span>
|
||||
<span>Clear Cache</span>
|
||||
</button>
|
||||
<button class="button is-warning" id="reset-timing" type="button">
|
||||
<span class="icon is-small"><img data-icon="average" data-size="16" src="../resources/img/average-light-16.png" alt=""></span>
|
||||
<span>Reset Timing Stats</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="field mt-4">
|
||||
<label class="label">Data categories</label>
|
||||
<div class="control">
|
||||
|
|
|
|||
|
|
@ -1017,6 +1017,11 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||
cacheCountEl.textContent = '0';
|
||||
});
|
||||
|
||||
document.getElementById('reset-timing').addEventListener('click', async () => {
|
||||
await browser.runtime.sendMessage({ type: 'sortana:resetTimingStats' });
|
||||
await refreshMaintenance();
|
||||
});
|
||||
|
||||
function selectedCategories() {
|
||||
return [...document.querySelectorAll('.transfer-category:checked')].map(el => el.value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue