Skip to content

Commit

Permalink
Fixed format of dataset folders
Browse files Browse the repository at this point in the history
Better formating of summary table.
  • Loading branch information
Mattk70 committed Nov 12, 2023
1 parent 0e25e3a commit d349946
Show file tree
Hide file tree
Showing 21 changed files with 23 additions and 30 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -630,4 +630,8 @@ input[type="range"].vertical {
/* Style the filled-in part for WebKit browsers (Chrome, Safari) */
#update-progress-bar::-webkit-progress-value {
background-color: #4CAF50; /* Set the color for WebKit browsers */
}

.form-select {
font-size: 0.74rem;
}
27 changes: 11 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
</head>

<body>
<<<<<<< HEAD
=======


>>>>>>> wavesurfer-upgrade
<!-- The modal for the tour -->
<div class="modal modal-fade" id="tourModal" tabindex="-1" aria-labelledby="tourModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
Expand Down Expand Up @@ -229,7 +224,7 @@ <h5>Saved Records</h5>
data-bs-toggle="dropdown">Settings</a>
<ul id="settingsMenu" class="nav-item dropdown-menu">
<li>
<form id="settingsForm">
<form id="settingsForm" class="fs-6">
<div class="row">
<div class="col-6 pe-0">
<fieldset class="border rounded m-2 p-1">
Expand All @@ -254,7 +249,7 @@ <h5>Saved Records</h5>
title="Filters the detections returned in results.">?</span>
<div class="row pe-3">
<label class="col-auto ps-0" for="list-to-use">Show:</label>
<select class="form-control col" id="list-to-use">
<select class="form-select col" id="list-to-use">
<option value="migrants">Nocturnal Birds</option>
<option value="birds">Birds</option>
<option value="everything">Everything</option>
Expand Down Expand Up @@ -384,7 +379,7 @@ <h5>Saved Records</h5>
<div class="form-group rounded p-2 mb-2 bg-light">
<div class="row pe-3">
<label class="col" for="colourmap">Colourmap:</label>
<select class="form-control col" id="colourmap">
<select class="form-select col" id="colourmap">
<option value="greys">Greyscale</option>
<option value="bone">Bone</option>
<option value="turbidity">Turbidity</option>
Expand Down Expand Up @@ -415,7 +410,7 @@ <h5>Saved Records</h5>
<div class="form-group rounded p-2 mb-2 bg-light">
<div class="row pe-3">
<label class="col" for="timelineSetting">Timeline:</label>
<select class="form-control col" id="timelineSetting">
<select class="form-select col" id="timelineSetting">
<option value="timecode">Timecode</option>
<option value="timeOfDay">Time of day</option>
</select>
Expand Down Expand Up @@ -483,7 +478,7 @@ <h5>Saved Records</h5>
<div class="form-group rounded p-2 mb-2 bg-light">
<div class="row pe-3">
<label class="col" for="model-to-use">Model:</label>
<select class="form-control col" id="model-to-use">
<select class="form-select col" id="model-to-use">
<option value="v2">Chirpity</option>
<option value="v3">BirdNet</option>
<option value="v4">Test chirp</option>
Expand Down Expand Up @@ -517,7 +512,7 @@ <h5>Saved Records</h5>
<div class="form-group rounded p-2 mb-2 bg-light">
<div class="row pe-3">
<label class="col" for="format">Format:</label>
<select class="form-control col" id="format">
<select class="form-select col" id="format">
<option value="wav">WAV</option>
<option value="flac">FLAC</option>
<option value="mp3">MP3</option>
Expand Down Expand Up @@ -558,7 +553,7 @@ <h5>Saved Records</h5>
<div class="form-group rounded p-2 mb-2 bg-light">
<div id="bitrate-container" class="row pe-3 ease">
<label class="col" for="bitrate">Bitrate:</label>
<select class="form-control col" id="bitrate">
<select class="form-select col" id="bitrate">
<option value="320">320 kbps</option>
<option value="192">192 kbps</option>
<option value="160">160 kbps</option>
Expand All @@ -567,9 +562,9 @@ <h5>Saved Records</h5>
</select>
</div>
<div id="quality-container" class="row pe-3 ease">
<label class="col" for="quality">Compression
<label class="col-2" for="quality">Compression
Level:</label>
<select class="form-control col" id="quality">
<select class="form-select col" id="quality">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
Expand Down Expand Up @@ -826,7 +821,7 @@ <h5 class="modal-title" id="gotoModalLabel">Go to Position</h5>
<h5 class="modal-title" id="gotoModalLabel">Set Location</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form id="locationForm">
<form id="locationForm" class="fs-6">
<div class="modal-body">
<fieldset class="border rounded m-2 p-1">
<legend class="h6">Pick A Saved Location</legend>
Expand All @@ -835,7 +830,7 @@ <h5 class="modal-title" id="gotoModalLabel">Set Location</h5>
<div class="input-group col">
<div class="form-group w-100">
<label for="savedLocations"></label>
<select class="form-control" id="savedLocations">
<select class="form-select" id="savedLocations">
</select>
</div>
</div>
Expand Down
12 changes: 2 additions & 10 deletions js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ const updateSummary = ({ summary = [], filterSpecies = '' }) => {
summaryHTML += `<tr tabindex="-1" class="${selected}">
<td class="max">${iconizeScore(item.max)}</td>
<td class="cname">
<span class="pointer"><span class="cname">${item.cname}</span> <i>${item.sname}</i></span>
<span class="pointer"><span class="cname">${item.cname}</span> <br><i>${item.sname}</i></span>
</td>
<td class="text-end">${item.count}</td>
<td class="text-end">${item.calls}</td>
Expand All @@ -2568,17 +2568,9 @@ const updateSummary = ({ summary = [], filterSpecies = '' }) => {
const old_summary = document.getElementById('summaryTable');
const buffer = old_summary.cloneNode();
buffer.innerHTML = summaryHTML;
// Make the star icon look good on black
// const starIcons = buffer.getElementsByClassName('material-symbols-outlined');
// [...starIcons].forEach(icon =>{
// icon.classList.add('text-bg-light', 'rounded-5')
// })
old_summary.replaceWith(buffer);
const currentFilter = document.querySelector('#speciesFilter tr.text-warning');
if (currentFilter) {
//const filterRow = currentFilter.rowIndex;
currentFilter.focus();
}
if (currentFilter) currentFilter.focus();
return total;
}

Expand Down
6 changes: 3 additions & 3 deletions js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ const saveResults2DataSet = ({species}) => {
const folders = p.dirname(result.file).split(p.sep); //.match(/^.*\/(.*)$/)
species = result.cname.replaceAll(' ', '_');
const sname = result.sname.replaceAll(' ', '_');
const folder = `${species}~${sname}`;
const folder = `${sname}~${species}`;
// get start and end from timestamp
const start = result.position;
let end = start + 3;
Expand Down Expand Up @@ -2509,8 +2509,8 @@ async function onDelete({
sql += ' AND speciesID = (SELECT id FROM species WHERE cname = ?)'
params.push(species);
}
let test = await db.allAsync('SELECT * from records WHERE speciesID = (SELECT id FROM species WHERE cname = ?)', species)
console.log('After insert: ',JSON.stringify(test));
// let test = await db.allAsync('SELECT * from records WHERE speciesID = (SELECT id FROM species WHERE cname = ?)', species)
// console.log('After insert: ',JSON.stringify(test));
let { changes } = await db.runAsync(sql, ...params);
if (changes) {
if (STATE.mode !== 'selection') {
Expand Down
Loading

0 comments on commit d349946

Please sign in to comment.