Skip to content

Commit

Permalink
Merge branch 'refactor'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Mar 22, 2024
2 parents db04274 + 0d271dd commit 0a93c10
Show file tree
Hide file tree
Showing 9 changed files with 2,724 additions and 2,762 deletions.
27 changes: 14 additions & 13 deletions Help/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@

<body>
<h4 class="text-center text-bg-light p-3">Suggested Workflow</h4>
<figure class="figure float-end m-3">
<img src="Help/amend file.png"
alt="The context menu accessed from the filename contains options to amend the file's start time and the recording location"
class="rounded figure-img float-end img-fluid">
<figcaption class="figure-caption text-muted text-end">File name context menu.</figcaption>
</figure>

<ol>
<li>Open an audio file, files or folder of audio. There are a three ways to do this:
<ol>
Expand All @@ -28,7 +23,12 @@ <h4 class="text-center text-bg-light p-3">Suggested Workflow</h4>
detected. If not, you can still display (and store) the correct time of day for the file and detections if
you edit its start time.
This can be edited by right-clicking the filename in the control bar.

<figure class="figure float-end m-3">
<img src="Help/amend file.png"
alt="The context menu accessed from the filename contains options to amend the file's start time and the recording location"
class="rounded figure-img float-end img-fluid">
<figcaption class="figure-caption text-muted text-end">File name context menu.</figcaption>
</figure>
</li>
<li>
Select &quot;<i>Analyse file</i>&quot; from the
Expand All @@ -46,17 +46,18 @@ <h5 class="pt-2">Exploring Detections</h5>
the table will cause the playhead to jump to the start of that detection and highlight its location on the
spectrogram.
Right-clicking the row will bring up the detection context menu.
<figure class="figure float-end m-3">
<img src="Help/detection menu.png"
alt="The context menu accessed from a detection contains options to inspect and amend the record"
class="rounded figure-img float-end img-fluid">
<figcaption class="figure-caption text-muted text-end">Detection context menu.</figcaption>
</figure>

This contains options specific to the currently highlighted detection.
You may press the SpaceBar to play from the beginning of the selection and continue playing the
audio until you press the SpaceBar again. Clicking the spectrogram will move the playhead to that position.
If currently playing, playback will continue, so this allows you to replay a call repeatedly.
</li>
<figure class="figure float-end m-3">
<img src="Help/detection menu.png"
alt="The context menu accessed from a detection contains options to inspect and amend the record"
class="rounded figure-img float-end img-fluid">
<figcaption class="figure-caption text-muted text-end">Detection context menu.</figcaption>
</figure>
<li>
If multiple detections apply for a given time period, a circle will be displayed next to the Species' name.
Clicking this circle will display the other species detected in the region, and the confidence given to
Expand Down
12 changes: 4 additions & 8 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,19 @@ ul {
color: whitesmoke; /* White color on hover */
}

/*
tbody tr:not(.table-active):hover {
background-color: whitesmoke;
}
*/

#results>thead,
#results>th,
#resultSummary>thead,
#resultSummary>th {
position: sticky;
top: 0;
color: white;
background-color: #1b1e21;
z-index: 2;
}

/* Stop table-hover overriding the text colour */
.table-hover tbody tr.text-warning:hover td {
color: #ffae42; /* Change to your desired text color */
}

#resultTableBody {
scroll-margin-top: 120px;
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<body>
<!-- Loading Spinner Overlay -->
<div id="loadingOverlay" class="overlay d-none text-white">
<div class="d-flex text-white">Loading Xento Canto data...</div>
<div class="d-flex">Loading Xento Canto data...</div>
<div class="d-flex justify-content-evenly">
<div class="spinner-grow spinner-grow-sm m-3" role="status">
<span class="visually-hidden">Loading...</span>
Expand Down Expand Up @@ -620,7 +620,7 @@ <h5>Saved Records</h5>
<span class="material-symbols-outlined">explore</span> Explore Archive
</li>
<li class="dropdown-divider"></li>
<li class="dropdown-item" id="purge-file">
<li class="dropdown-item disabled" id="purge-file">
<span class="material-symbols-outlined">unarchive</span> Remove Current File From
Archive
</li>
Expand Down Expand Up @@ -1041,7 +1041,7 @@ <h5 class="modal-title" id="locationModalLabel">Set Location</h5>
<!-- Results table -->
<div class="col-8 ps-1 pe-0 h-100 position-relative overflow-auto" id="resultsDiv">
<table id="results" class="text-center table w-100 align-middle">
<thead id="resultsHead" class="d-none">
<thead id="resultsHead" class="text-bg-secondary d-none">

</thead>
<tbody class="text-dark" id="resultTableBody">
Expand Down
4 changes: 3 additions & 1 deletion js/tracking.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const DEBUG = false;
const ID_SITE = 2;
const ID_SITE = 3;


function trackEvent(uuid, event, action, name, value){
DEBUG && event === 'Error' && console.log(action, name);
// Squash result numbers
name = typeof name == 'string' ? name.replace(/result\d+/, 'result') : name;
const t = new Date()
name = name ? `&e_n=${name}` : '';
value = value ? `&e_v=${value}` : '';
Expand Down
Loading

0 comments on commit 0a93c10

Please sign in to comment.