Skip to content

Commit

Permalink
Event schema sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Feb 12, 2024
1 parent 8c0629f commit eda1c20
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
26 changes: 15 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ <h5>Saved Records</h5>
<div class="collapse navbar-collapse" id="main_nav">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" data-bs-toggle="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navBarFile" data-bs-toggle="dropdown">
File
</a>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -210,7 +210,7 @@ <h5>Saved Records</h5>
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Analysis
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<ul class="dropdown-menu" aria-labelledby="navbarAnalysis">
<!-- <li><a class="dropdown-item text-danger" href="#" id="warmup">Model Warming up
<div class="spinner-grow spinner-grow-sm" role="status">
<span class="visually-hidden">Loading...</span>
Expand Down Expand Up @@ -273,7 +273,7 @@ <h5>Saved Records</h5>
<div class="row p-2">
<div class="p-2 form-group rounded bg-light">
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="List" data-bs-content="Filters the detections returned in results. Local Birds: excludes birds
unlikely to be found in your region. Nocturnal Birds: excludes species' songs and species not known to call at night">?</a>
unlikely to be found in your region. Nocturnal Birds: excludes bird song and species not known to call at night">?</a>
<div class="row pe-3">
<label class="col-auto" for="list-to-use">List:</label>
<div class="col d-flex align-items-start">
Expand All @@ -292,17 +292,21 @@ <h5>Saved Records</h5>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="local" checked>
<label class="form-check-label" for="local">Use Location settings</label>
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Use Location settings" data-bs-content="When enabled, the Nocturnal birds filter will only report birds included according to your location filter settings">?</a>
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Use Location settings" data-bs-content="When activated, the Nocturnal birds filter reports birds based on your location settings.">?</a>
</div>
</div>

<div id="species-threshold-el">
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Species Threshold" data-bs-content="Set the minimum eBird checklist frequency for a bird to be included
If 'Use Week' is checked, the filter will be refined to include only the species likely in the week the recording was made.">?</a>
<a class="circle" tabindex="-1" data-bs-toggle="popover" data-bs-trigger="focus" data-bs-title="Species Threshold" data-bs-content="Define the minimum eBird checklist frequency for species inclusion.
If 'Adjust for Seasons' is enabled, the list will be adjusted to include species expected for the recording week.">?</a>
<div class="input-group mt-0 w-100 align-bottom">
<span class="input-group-text col">Threshold:</span>
<input id="species-frequency-threshold" type="number" class="form-control" style="width: 30%;" value="0.005" step="0.001" min="0.001" max="1" aria-label="species frequency threshold" aria-describedby="species-frequency-threshold">
<label class="text-nowrap ms-2 me-2 " for="species-week">Use Week</label><div class="form-switch"><input id="species-week" role="switch" type="checkbox" class="form-check-input form-check-inline"></div>
<span class="text-nowrap"><label class="ms-2 me-2 " for="species-week">Adjust for seasons</label>
<span class="form-switch">
<input id="species-week" role="switch" type="checkbox" class="form-check-input form-check-inline">
</span>
</span>
</div>
</div>

Expand Down Expand Up @@ -688,20 +692,20 @@ <h5>Saved Records</h5>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="help" role="button"
<a class="nav-link dropdown-toggle" href="#" id="navbarHelp" role="button"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Help
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<ul class="dropdown-menu" aria-labelledby="navBarHelp">
<li><a class="dropdown-item" id="usage" href="#">
<span class="material-symbols-outlined">help</span> Using Chirpity</a>
</li>
<li>
<a class="dropdown-item" id="settings" href="#">
<a class="dropdown-item" id="settingsHelp" href="#">
<span class="material-symbols-outlined">help</span> Settings
</a>
</li>
<li><a class="dropdown-item" id="keyboard" href="#">
<li><a class="dropdown-item" id="keyboardHelp" href="#">
<span class="material-symbols-outlined">help</span> Keyboard Shortcuts
</a>
</li>
Expand Down
16 changes: 13 additions & 3 deletions js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -3284,10 +3284,10 @@ function onChartData(args) {
document.getElementById('exit').addEventListener('click', exitApplication);

// Help menu handling
document.getElementById('keyboard').addEventListener('click', async () => {
document.getElementById('keyboardHelp').addEventListener('click', async () => {
await populateHelpModal('Help/keyboard.html', 'Keyboard shortcuts');
});
document.getElementById('settings').addEventListener('click', async () => {
document.getElementById('settingsHelp').addEventListener('click', async () => {
await populateHelpModal('Help/settings.html', 'Settings Help');
});

Expand Down Expand Up @@ -4063,8 +4063,17 @@ DOM.gain.addEventListener('input', () => {


document.addEventListener('click', function (e) {
const target = e.target.closest('[id]').id;
contextMenu.classList.add("d-none");
hideConfidenceSlider();
console.log('clicked', target);

fetch(`https://analytics.mattkirkland.co.uk/matomo.php?action_name=Settings%20Change&idsite=2&rand=${Date.now()}&rec=1&uid=${config.UUID}&apiv=1
&e_c=Click&e_a=${target}`)
.then(response => {
if (! response.ok) throw new Error('Network response was not ok', response);
})
.catch(error => console.log('Error posting click tracking:', error))
})


Expand Down Expand Up @@ -4265,8 +4274,9 @@ DOM.gain.addEventListener('input', () => {
};
}
updatePrefs();

fetch(`https://analytics.mattkirkland.co.uk/matomo.php?action_name=Settings%20Change&idsite=2&rand=${Date.now()}&rec=1&uid=${config.UUID}&apiv=1
&dimension9=${JSON.stringify([target, element.value])}}`)
&e_c=Change&e_a=${target}&e_n=${element.value}`)
.then(response => {
if (! response.ok) throw new Error('Network response was not ok', response);
})
Expand Down
2 changes: 1 addition & 1 deletion js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ const prepSummaryStatement = (included) => {
UI.postMessage({ event: 'progress', text: 'File decompressed', progress: 1 })
resolve(destination)
})
STATE.audio.normalise && command.audioFilter("loudnorm=I=-16:LRA=11:TP=-1.5")
//STATE.audio.normalise && command.audioFilter("loudnorm=I=-16:LRA=11:TP=-1.5")
command.save(destination)
});
}
Expand Down

0 comments on commit eda1c20

Please sign in to comment.